@volter/twin-upstash 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +202 -0
  3. package/api/src/fetch.ts +54 -0
  4. package/api/src/generated/surface.gen.json +1 -0
  5. package/api/src/generated/ui.gen.json +1 -0
  6. package/api/src/index.ts +19 -0
  7. package/api/src/key-gate.ts +30 -0
  8. package/api/src/manifest.ts +103 -0
  9. package/api/src/screens/developer-api.tsx +106 -0
  10. package/api/src/screens/qstash.tsx +99 -0
  11. package/api/src/screens/session.tsx +125 -0
  12. package/api/src/screens/teams.tsx +114 -0
  13. package/api/src/semantics/backups.ts +90 -0
  14. package/api/src/semantics/index.ts +191 -0
  15. package/api/src/semantics/shared.ts +42 -0
  16. package/api/src/semantics/teams.ts +108 -0
  17. package/api/src/semantics/time.ts +40 -0
  18. package/dist/api/src/fetch.d.ts +15 -0
  19. package/dist/api/src/fetch.js +44 -0
  20. package/dist/api/src/fetch.ts +54 -0
  21. package/dist/api/src/generated/surface.gen.json +1 -0
  22. package/dist/api/src/generated/ui.gen.json +1 -0
  23. package/dist/api/src/index.ts +19 -0
  24. package/dist/api/src/key-gate.d.ts +3 -0
  25. package/dist/api/src/key-gate.js +30 -0
  26. package/dist/api/src/key-gate.ts +30 -0
  27. package/dist/api/src/manifest.d.ts +2 -0
  28. package/dist/api/src/manifest.js +81 -0
  29. package/dist/api/src/manifest.ts +103 -0
  30. package/dist/api/src/screens/developer-api.d.ts +3 -0
  31. package/dist/api/src/screens/developer-api.js +101 -0
  32. package/dist/api/src/screens/developer-api.tsx +106 -0
  33. package/dist/api/src/screens/qstash.d.ts +3 -0
  34. package/dist/api/src/screens/qstash.js +92 -0
  35. package/dist/api/src/screens/qstash.tsx +99 -0
  36. package/dist/api/src/screens/session.d.ts +9 -0
  37. package/dist/api/src/screens/session.js +118 -0
  38. package/dist/api/src/screens/session.tsx +125 -0
  39. package/dist/api/src/screens/teams.d.ts +3 -0
  40. package/dist/api/src/screens/teams.js +99 -0
  41. package/dist/api/src/screens/teams.tsx +114 -0
  42. package/dist/api/src/semantics/backups.d.ts +7 -0
  43. package/dist/api/src/semantics/backups.js +75 -0
  44. package/dist/api/src/semantics/backups.ts +90 -0
  45. package/dist/api/src/semantics/index.d.ts +10 -0
  46. package/dist/api/src/semantics/index.js +191 -0
  47. package/dist/api/src/semantics/index.ts +191 -0
  48. package/dist/api/src/semantics/shared.d.ts +21 -0
  49. package/dist/api/src/semantics/shared.js +34 -0
  50. package/dist/api/src/semantics/shared.ts +42 -0
  51. package/dist/api/src/semantics/teams.d.ts +13 -0
  52. package/dist/api/src/semantics/teams.js +100 -0
  53. package/dist/api/src/semantics/teams.ts +108 -0
  54. package/dist/api/src/semantics/time.d.ts +2 -0
  55. package/dist/api/src/semantics/time.js +34 -0
  56. package/dist/api/src/semantics/time.ts +40 -0
  57. package/dist/qstash/src/doors.d.ts +6 -0
  58. package/dist/qstash/src/doors.js +33 -0
  59. package/dist/qstash/src/doors.ts +51 -0
  60. package/dist/qstash/src/egress.d.ts +7 -0
  61. package/dist/qstash/src/egress.js +66 -0
  62. package/dist/qstash/src/egress.ts +58 -0
  63. package/dist/qstash/src/fetch.d.ts +7 -0
  64. package/dist/qstash/src/fetch.js +48 -0
  65. package/dist/qstash/src/fetch.ts +46 -0
  66. package/dist/qstash/src/generated/surface.gen.json +1 -0
  67. package/dist/qstash/src/generated/ui.gen.json +1 -0
  68. package/dist/qstash/src/index.ts +35 -0
  69. package/dist/qstash/src/manifest.d.ts +10 -0
  70. package/dist/qstash/src/manifest.js +105 -0
  71. package/dist/qstash/src/manifest.ts +134 -0
  72. package/dist/qstash/src/semantics/account.d.ts +29 -0
  73. package/dist/qstash/src/semantics/account.js +91 -0
  74. package/dist/qstash/src/semantics/account.ts +98 -0
  75. package/dist/qstash/src/semantics/delivery.d.ts +17 -0
  76. package/dist/qstash/src/semantics/delivery.js +274 -0
  77. package/dist/qstash/src/semantics/delivery.ts +264 -0
  78. package/dist/qstash/src/semantics/dlq.d.ts +4 -0
  79. package/dist/qstash/src/semantics/dlq.js +51 -0
  80. package/dist/qstash/src/semantics/dlq.ts +61 -0
  81. package/dist/qstash/src/semantics/index.d.ts +2 -0
  82. package/dist/qstash/src/semantics/index.js +10 -0
  83. package/dist/qstash/src/semantics/index.ts +13 -0
  84. package/dist/qstash/src/semantics/keys.d.ts +2 -0
  85. package/dist/qstash/src/semantics/keys.js +9 -0
  86. package/dist/qstash/src/semantics/keys.ts +14 -0
  87. package/dist/qstash/src/semantics/messages.d.ts +74 -0
  88. package/dist/qstash/src/semantics/messages.js +233 -0
  89. package/dist/qstash/src/semantics/messages.ts +249 -0
  90. package/dist/qstash/src/semantics/queues.d.ts +2 -0
  91. package/dist/qstash/src/semantics/queues.js +60 -0
  92. package/dist/qstash/src/semantics/queues.ts +66 -0
  93. package/dist/qstash/src/semantics/schedules.d.ts +19 -0
  94. package/dist/qstash/src/semantics/schedules.js +125 -0
  95. package/dist/qstash/src/semantics/schedules.ts +132 -0
  96. package/dist/qstash/src/semantics/shared.d.ts +45 -0
  97. package/dist/qstash/src/semantics/shared.js +115 -0
  98. package/dist/qstash/src/semantics/shared.ts +121 -0
  99. package/dist/qstash/src/semantics/urlgroups.d.ts +2 -0
  100. package/dist/qstash/src/semantics/urlgroups.js +58 -0
  101. package/dist/qstash/src/semantics/urlgroups.ts +69 -0
  102. package/dist/qstash/src/semantics/workflows.d.ts +44 -0
  103. package/dist/qstash/src/semantics/workflows.js +379 -0
  104. package/dist/qstash/src/semantics/workflows.ts +401 -0
  105. package/dist/qstash/src/signing.d.ts +4 -0
  106. package/dist/qstash/src/signing.js +16 -0
  107. package/dist/qstash/src/signing.ts +19 -0
  108. package/dist/src/cli.d.ts +2 -0
  109. package/dist/src/cli.js +35 -0
  110. package/dist/src/generated/surface.gen.json +1 -0
  111. package/dist/src/index.d.ts +18 -0
  112. package/dist/src/index.js +124 -0
  113. package/dist/src/manifest.d.ts +14 -0
  114. package/dist/src/manifest.js +8 -0
  115. package/dist/src/upstash-budget.d.ts +85 -0
  116. package/dist/src/upstash-budget.js +440 -0
  117. package/dist/src/upstash-capabilities.d.ts +4 -0
  118. package/dist/src/upstash-capabilities.js +1286 -0
  119. package/dist/src/upstash-conformance.d.ts +7 -0
  120. package/dist/src/upstash-conformance.js +119 -0
  121. package/dist/src/upstash-connector.d.ts +115 -0
  122. package/dist/src/upstash-connector.js +309 -0
  123. package/dist/src/upstash-lua.d.ts +140 -0
  124. package/dist/src/upstash-lua.js +1229 -0
  125. package/dist/src/upstash-server.d.ts +29 -0
  126. package/dist/src/upstash-server.js +81 -0
  127. package/dist/src/upstash-store.d.ts +114 -0
  128. package/dist/src/upstash-store.js +1663 -0
  129. package/dist/src/upstash-twin.d.ts +73 -0
  130. package/dist/src/upstash-twin.js +437 -0
  131. package/package.json +59 -0
  132. package/qstash/src/doors.ts +51 -0
  133. package/qstash/src/egress.ts +58 -0
  134. package/qstash/src/fetch.ts +46 -0
  135. package/qstash/src/generated/surface.gen.json +1 -0
  136. package/qstash/src/generated/ui.gen.json +1 -0
  137. package/qstash/src/index.ts +35 -0
  138. package/qstash/src/manifest.ts +134 -0
  139. package/qstash/src/semantics/account.ts +98 -0
  140. package/qstash/src/semantics/delivery.ts +264 -0
  141. package/qstash/src/semantics/dlq.ts +61 -0
  142. package/qstash/src/semantics/index.ts +13 -0
  143. package/qstash/src/semantics/keys.ts +14 -0
  144. package/qstash/src/semantics/messages.ts +249 -0
  145. package/qstash/src/semantics/queues.ts +66 -0
  146. package/qstash/src/semantics/schedules.ts +132 -0
  147. package/qstash/src/semantics/shared.ts +121 -0
  148. package/qstash/src/semantics/urlgroups.ts +69 -0
  149. package/qstash/src/semantics/workflows.ts +401 -0
  150. package/qstash/src/signing.ts +19 -0
  151. package/src/cli.ts +36 -0
  152. package/src/generated/surface.gen.json +1 -0
  153. package/src/index.ts +203 -0
  154. package/src/manifest.ts +26 -0
  155. package/src/upstash-budget.ts +486 -0
  156. package/src/upstash-capabilities.ts +1418 -0
  157. package/src/upstash-conformance.ts +131 -0
  158. package/src/upstash-connector.ts +340 -0
  159. package/src/upstash-lua.ts +1120 -0
  160. package/src/upstash-server.ts +103 -0
  161. package/src/upstash-store.ts +1437 -0
  162. package/src/upstash-twin.ts +465 -0
@@ -0,0 +1 @@
1
+ {"generatedBy":"scripts/derive-pack.ts","spec":"commands","format":"command-table","version":"8.4.7","commands":[{"id":"ACL CAT","group":"server","since":"6.0.0","arity":-2,"summary":"Lists the ACL categories, or the commands inside a category.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"category","type":"string","optional":true}],"reply":{"anyOf":[{"type":"array","description":"In case `category` was not given, a list of existing ACL categories","items":{"type":"string"}},{"type":"array","description":"In case `category` was given, list of commands that fall under the provided ACL category","items":{"type":"string"}}]}},{"id":"ACL DELUSER","group":"server","since":"6.0.0","arity":-3,"summary":"Deletes ACL users, and terminates their connections.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"username","type":"string","multiple":true}],"reply":{"type":"integer","description":"The number of users that were deleted"}},{"id":"ACL GENPASS","group":"server","since":"6.0.0","arity":-2,"summary":"Generates a pseudorandom, secure password that can be used to identify ACL users.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"bits","type":"integer","optional":true}],"reply":{"type":"string","description":"Pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4."}},{"id":"ACL GETUSER","group":"server","since":"6.0.0","arity":3,"summary":"Lists the ACL rules of a user.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"username","type":"string"}],"reply":{"oneOf":[{"description":"a set of ACL rule definitions for the user","type":"object","additionalProperties":false,"properties":{"flags":{"type":"array","items":{"type":"string"}},"passwords":{"type":"array","items":{"type":"string"}},"commands":{"description":"root selector's commands","type":"string"},"keys":{"description":"root selector's keys","type":"string"},"channels":{"description":"root selector's channels","type":"string"},"selectors":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"commands":{"type":"string"},"keys":{"type":"string"},"channels":{"type":"string"}}}}}},{"description":"If user does not exist","type":"null"}]}},{"id":"ACL LIST","group":"server","since":"6.0.0","arity":2,"summary":"Dumps the effective rules in ACL file format.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"type":"array","description":"A list of currently active ACL rules","items":{"type":"string"}}},{"id":"ACL LOAD","group":"server","since":"6.0.0","arity":2,"summary":"Reloads the rules from the configured ACL file.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"const":"OK"}},{"id":"ACL LOG","group":"server","since":"6.0.0","arity":-2,"summary":"Lists recent security events generated due to ACL rules.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"operation","type":"oneof","optional":true,"arguments":[{"name":"count","type":"integer"},{"name":"reset","type":"pure-token","token":"RESET"}]}],"reply":{"oneOf":[{"description":"In case `RESET` was not given, a list of recent ACL security events.","type":"array","items":{"type":"object","additionalProperties":false,"properties":{"count":{"type":"integer"},"reason":{"type":"string"},"context":{"type":"string"},"object":{"type":"string"},"username":{"type":"string"},"age-seconds":{"type":"number"},"client-info":{"type":"string"},"entry-id":{"type":"integer"},"timestamp-created":{"type":"integer"},"timestamp-last-updated":{"type":"integer"}}}},{"const":"OK","description":"In case `RESET` was given, OK indicates ACL log was cleared."}]}},{"id":"ACL SAVE","group":"server","since":"6.0.0","arity":2,"summary":"Saves the effective ACL rules in the configured ACL file.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"const":"OK"}},{"id":"ACL SETUSER","group":"server","since":"6.0.0","arity":-3,"summary":"Creates and modifies an ACL user and its rules.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"username","type":"string"},{"name":"rule","type":"string","optional":true,"multiple":true}],"reply":{"const":"OK"}},{"id":"ACL USERS","group":"server","since":"6.0.0","arity":2,"summary":"Lists all ACL users.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"type":"array","description":"List of existing ACL users","items":{"type":"string"}}},{"id":"ACL WHOAMI","group":"server","since":"6.0.0","arity":2,"summary":"Returns the authenticated username of the current connection.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"type":"string","description":"The username of the current connection."}},{"id":"APPEND","group":"string","since":"2.0.0","arity":3,"summary":"Appends a string to the value of a key. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"value","type":"string"}],"reply":{"type":"integer","description":"The length of the string after the append operation."}},{"id":"AUTH","group":"connection","since":"1.0.0","arity":-2,"summary":"Authenticates the connection.","flags":["NOSCRIPT","LOADING","STALE","FAST","NO_AUTH","SENTINEL","ALLOW_BUSY"],"arguments":[{"name":"username","type":"string","optional":true},{"name":"password","type":"string"}],"reply":{"const":"OK"}},{"id":"BITCOUNT","group":"bitmap","since":"2.6.0","arity":-2,"summary":"Counts the number of set bits (population counting) in a string.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"range","type":"block","optional":true,"arguments":[{"name":"start","type":"integer"},{"name":"end","type":"integer"},{"name":"unit","type":"oneof","optional":true,"arguments":[{"name":"byte","type":"pure-token","token":"BYTE"},{"name":"bit","type":"pure-token","token":"BIT"}]}]}],"reply":{"description":"The number of bits set to 1.","type":"integer","minimum":0}},{"id":"BITFIELD","group":"bitmap","since":"3.2.0","arity":-2,"summary":"Performs arbitrary bitfield integer operations on strings.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"operation","type":"oneof","optional":true,"multiple":true,"arguments":[{"name":"get-block","type":"block","token":"GET","arguments":[{"name":"encoding","type":"string"},{"name":"offset","type":"integer"}]},{"name":"write","type":"block","arguments":[{"name":"overflow-block","type":"oneof","optional":true,"token":"OVERFLOW","arguments":[{"name":"wrap","type":"pure-token","token":"WRAP"},{"name":"sat","type":"pure-token","token":"SAT"},{"name":"fail","type":"pure-token","token":"FAIL"}]},{"name":"write-operation","type":"oneof","arguments":[{"name":"set-block","type":"block","token":"SET","arguments":[{"name":"encoding","type":"string"},{"name":"offset","type":"integer"},{"name":"value","type":"integer"}]},{"name":"incrby-block","type":"block","token":"INCRBY","arguments":[{"name":"encoding","type":"string"},{"name":"offset","type":"integer"},{"name":"increment","type":"integer"}]}]}]}]}],"reply":{"type":"array","items":{"oneOf":[{"description":"The result of the subcommand at the same position","type":"integer"},{"description":"In case OVERFLOW FAIL was given and overflows or underflows detected","type":"null"}]}}},{"id":"BITFIELD_RO","group":"bitmap","since":"6.0.0","arity":-2,"summary":"Performs arbitrary read-only bitfield integer operations on strings.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"get-block","type":"block","optional":true,"multiple":true,"token":"GET","arguments":[{"name":"encoding","type":"string"},{"name":"offset","type":"integer"}]}],"reply":{"type":"array","items":{"description":"The result of the subcommand at the same position","type":"integer"}}},{"id":"BITOP","group":"bitmap","since":"2.6.0","arity":-4,"summary":"Performs bitwise operations on multiple strings, and stores the result.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"operation","type":"oneof","arguments":[{"name":"and","type":"pure-token","token":"AND"},{"name":"or","type":"pure-token","token":"OR"},{"name":"xor","type":"pure-token","token":"XOR"},{"name":"not","type":"pure-token","token":"NOT"},{"name":"diff","type":"pure-token","token":"DIFF"},{"name":"diff1","type":"pure-token","token":"DIFF1"},{"name":"andor","type":"pure-token","token":"ANDOR"},{"name":"one","type":"pure-token","token":"ONE"}]},{"name":"destkey","type":"key"},{"name":"key","type":"key","multiple":true}],"reply":{"description":"the size of the string stored in the destination key, that is equal to the size of the longest input string","type":"integer","minimum":0}},{"id":"BITPOS","group":"bitmap","since":"2.8.7","arity":-3,"summary":"Finds the first set (1) or clear (0) bit in a string.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"bit","type":"integer"},{"name":"range","type":"block","optional":true,"arguments":[{"name":"start","type":"integer"},{"name":"end-unit-block","type":"block","optional":true,"arguments":[{"name":"end","type":"integer"},{"name":"unit","type":"oneof","optional":true,"arguments":[{"name":"byte","type":"pure-token","token":"BYTE"},{"name":"bit","type":"pure-token","token":"BIT"}]}]}]}],"reply":{"oneOf":[{"description":"the position of the first bit set to 1 or 0 according to the request","type":"integer","minimum":0},{"description":"In case the `bit` argument is 1 and the string is empty or composed of just zero bytes","const":-1}]}},{"id":"BLMOVE","group":"list","since":"6.2.0","arity":6,"summary":"Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved.","flags":["WRITE","DENYOOM","BLOCKING"],"arguments":[{"name":"source","type":"key"},{"name":"destination","type":"key"},{"name":"wherefrom","type":"oneof","arguments":[{"name":"left","type":"pure-token","token":"LEFT"},{"name":"right","type":"pure-token","token":"RIGHT"}]},{"name":"whereto","type":"oneof","arguments":[{"name":"left","type":"pure-token","token":"LEFT"},{"name":"right","type":"pure-token","token":"RIGHT"}]},{"name":"timeout","type":"double"}],"reply":{"oneOf":[{"description":"The popped element.","type":"string"},{"description":"Operation timed-out","type":"null"}]}},{"id":"BLMPOP","group":"list","since":"7.0.0","arity":-5,"summary":"Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped.","flags":["WRITE","BLOCKING"],"arguments":[{"name":"timeout","type":"double"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"where","type":"oneof","arguments":[{"name":"left","type":"pure-token","token":"LEFT"},{"name":"right","type":"pure-token","token":"RIGHT"}]},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"oneOf":[{"description":"Operation timed-out","type":"null"},{"description":"The key from which elements were popped and the popped elements","type":"array","minItems":2,"maxItems":2,"items":[{"description":"List key from which elements were popped.","type":"string"},{"description":"Array of popped elements.","type":"array","minItems":1,"items":{"type":"string"}}]}]}},{"id":"BLPOP","group":"list","since":"2.0.0","arity":-3,"summary":"Removes and returns the first element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.","flags":["WRITE","BLOCKING"],"arguments":[{"name":"key","type":"key","multiple":true},{"name":"timeout","type":"double"}],"reply":{"oneOf":[{"type":"null","description":"No element could be popped and timeout expired"},{"description":"The key from which the element was popped and the value of the popped element","type":"array","minItems":2,"maxItems":2,"items":[{"description":"List key from which the element was popped.","type":"string"},{"description":"Value of the popped element.","type":"string"}]}]}},{"id":"BRPOP","group":"list","since":"2.0.0","arity":-3,"summary":"Removes and returns the last element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.","flags":["WRITE","BLOCKING"],"arguments":[{"name":"key","type":"key","multiple":true},{"name":"timeout","type":"double"}],"reply":{"oneOf":[{"description":"No element could be popped and the timeout expired.","type":"null"},{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"The name of the key where an element was popped ","type":"string"},{"description":"The value of the popped element","type":"string"}]}]}},{"id":"BRPOPLPUSH","group":"list","since":"2.2.0","arity":4,"summary":"Pops an element from a list, pushes it to another list and returns it. Block until an element is available otherwise. Deletes the list if the last element was popped.","flags":["WRITE","DENYOOM","BLOCKING"],"arguments":[{"name":"source","type":"key"},{"name":"destination","type":"key"},{"name":"timeout","type":"double"}],"reply":{"oneOf":[{"type":"string","description":"The element being popped from source and pushed to destination."},{"type":"null","description":"Timeout is reached."}]}},{"id":"BZMPOP","group":"sorted_set","since":"7.0.0","arity":-5,"summary":"Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.","flags":["WRITE","BLOCKING"],"arguments":[{"name":"timeout","type":"double"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"where","type":"oneof","arguments":[{"name":"min","type":"pure-token","token":"MIN"},{"name":"max","type":"pure-token","token":"MAX"}]},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"oneOf":[{"description":"Timeout reached and no elements were popped.","type":"null"},{"description":"The keyname and the popped members.","type":"array","minItems":2,"maxItems":2,"items":[{"description":"Keyname","type":"string"},{"description":"Popped members and their scores.","type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Member","type":"string"},{"description":"Score","type":"number"}]}}]}]}},{"id":"BZPOPMAX","group":"sorted_set","since":"5.0.0","arity":-3,"summary":"Removes and returns the member with the highest score from one or more sorted sets. Blocks until a member available otherwise. Deletes the sorted set if the last element was popped.","flags":["WRITE","FAST","BLOCKING"],"arguments":[{"name":"key","type":"key","multiple":true},{"name":"timeout","type":"double"}],"reply":{"oneOf":[{"description":"Timeout reached and no elements were popped.","type":"null"},{"description":"The keyname, popped member, and its score.","type":"array","minItems":3,"maxItems":3,"items":[{"description":"Keyname","type":"string"},{"description":"Member","type":"string"},{"description":"Score","type":"number"}]}]}},{"id":"BZPOPMIN","group":"sorted_set","since":"5.0.0","arity":-3,"summary":"Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.","flags":["WRITE","FAST","BLOCKING"],"arguments":[{"name":"key","type":"key","multiple":true},{"name":"timeout","type":"double"}],"reply":{"oneOf":[{"description":"Timeout reached and no elements were popped.","type":"null"},{"description":"The keyname, popped member, and its score.","type":"array","minItems":3,"maxItems":3,"items":[{"description":"Keyname","type":"string"},{"description":"Member","type":"string"},{"description":"Score","type":"number"}]}]}},{"id":"CLIENT GETNAME","group":"connection","since":"2.6.9","arity":2,"summary":"Returns the name of the connection.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"oneOf":[{"type":"string","description":"The connection name of the current connection"},{"type":"null","description":"Connection name was not set"}]}},{"id":"CLIENT ID","group":"connection","since":"5.0.0","arity":2,"summary":"Returns the unique client ID of the connection.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"type":"integer","description":"The id of the client"}},{"id":"CLIENT INFO","group":"connection","since":"6.2.0","arity":2,"summary":"Returns information about the connection.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[],"reply":{"description":"a unique string, as described at the CLIENT LIST page, for the current client","type":"string"}},{"id":"CLIENT LIST","group":"connection","since":"2.4.0","arity":-2,"summary":"Lists open connections.","flags":["ADMIN","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"client-type","type":"oneof","optional":true,"token":"TYPE","arguments":[{"name":"normal","type":"pure-token","token":"normal"},{"name":"master","type":"pure-token","token":"master"},{"name":"replica","type":"pure-token","token":"replica"},{"name":"pubsub","type":"pure-token","token":"pubsub"}]},{"name":"client-id","type":"integer","optional":true,"multiple":true,"token":"ID"}],"reply":{"type":"string","description":"Information and statistics about client connections"}},{"id":"CLIENT SETINFO","group":"connection","since":"7.2.0","arity":4,"summary":"Sets information specific to the client or connection.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"attr","type":"oneof","arguments":[{"name":"libname","type":"string","token":"lib-name"},{"name":"libver","type":"string","token":"lib-ver"}]}],"reply":{"const":"OK"}},{"id":"CLIENT SETNAME","group":"connection","since":"2.6.9","arity":3,"summary":"Sets the connection name.","flags":["NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"connection-name","type":"string"}],"reply":{"const":"OK"}},{"id":"COMMAND","group":"server","since":"2.8.13","arity":-1,"summary":"Returns detailed information about all commands.","flags":["LOADING","STALE","SENTINEL"],"arguments":[]},{"id":"CONFIG GET","group":"server","since":"2.0.0","arity":-3,"summary":"Returns the effective values of configuration parameters.","flags":["ADMIN","NOSCRIPT","LOADING","STALE"],"arguments":[{"name":"parameter","type":"string","multiple":true}],"reply":{"type":"object","additionalProperties":{"type":"string"}}},{"id":"CONFIG SET","group":"server","since":"2.0.0","arity":-4,"summary":"Sets configuration parameters in-flight.","flags":["ADMIN","NOSCRIPT","LOADING","STALE"],"arguments":[{"name":"data","type":"block","multiple":true,"arguments":[{"name":"parameter","type":"string"},{"name":"value","type":"string"}]}],"reply":{"const":"OK"}},{"id":"COPY","group":"generic","since":"6.2.0","arity":-3,"summary":"Copies the value of a key to a new key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"source","type":"key"},{"name":"destination","type":"key"},{"name":"destination-db","type":"integer","optional":true,"token":"DB"},{"name":"replace","type":"pure-token","optional":true,"token":"REPLACE"}],"reply":{"oneOf":[{"description":"source was copied","const":1},{"description":"source was not copied","const":0}]}},{"id":"DBSIZE","group":"server","since":"1.0.0","arity":1,"summary":"Returns the number of keys in the database.","flags":["READONLY","FAST"],"arguments":[],"reply":{"type":"integer","description":"The number of keys in the currently-selected database."}},{"id":"DECR","group":"string","since":"1.0.0","arity":2,"summary":"Decrements the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"type":"integer","description":"The value of the key after decrementing it."}},{"id":"DECRBY","group":"string","since":"1.0.0","arity":3,"summary":"Decrements a number from the integer value of a key. Uses 0 as initial value if the key doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"decrement","type":"integer"}],"reply":{"type":"integer","description":"The value of the key after decrementing it."}},{"id":"DEL","group":"generic","since":"1.0.0","arity":-2,"summary":"Deletes one or more keys.","flags":["WRITE"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"description":"the number of keys that were removed","type":"integer","minimum":0}},{"id":"DELEX","group":"string","since":"8.4.0","arity":-2,"summary":"Conditionally removes the specified key based on value or digest comparison.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"ifeq-value","type":"string","token":"IFEQ"},{"name":"ifne-value","type":"string","token":"IFNE"},{"name":"ifdeq-digest","type":"integer","token":"IFDEQ"},{"name":"ifdne-digest","type":"integer","token":"IFDNE"}]}],"reply":{"oneOf":[{"description":"The key exists but holds a non-string value","const":"WRONGTYPE"},{"description":"The key does not exist or the specified condition was not met.","const":0},{"description":"The key was deleted.","const":1}]}},{"id":"DIGEST","group":"string","since":"8.4.0","arity":2,"summary":"Returns the XXH3 hash of a string value.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"description":"The XXH3 64-bit hash of the string value as a signed integer.","type":"string"},{"description":"Key does not exist","type":"null"}]}},{"id":"DISCARD","group":"transactions","since":"2.0.0","arity":1,"summary":"Discards a transaction.","flags":["NOSCRIPT","LOADING","STALE","FAST","ALLOW_BUSY"],"arguments":[],"reply":{"const":"OK"}},{"id":"DUMP","group":"generic","since":"2.6.0","arity":2,"summary":"Returns a serialized representation of the value stored at a key.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"description":"The serialized value.","type":"string"},{"description":"Key does not exist.","type":"null"}]}},{"id":"ECHO","group":"connection","since":"1.0.0","arity":2,"summary":"Returns the given string.","flags":["LOADING","STALE","FAST"],"arguments":[{"name":"message","type":"string"}],"reply":{"description":"The given string","type":"string"}},{"id":"EVAL","group":"scripting","since":"2.6.0","arity":-3,"summary":"Executes a server-side Lua script.","flags":["NOSCRIPT","SKIP_MONITOR","MAY_REPLICATE","NO_MANDATORY_KEYS","STALE"],"arguments":[{"name":"script","type":"string"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","optional":true,"multiple":true},{"name":"arg","type":"string","optional":true,"multiple":true}],"reply":{"description":"Return value depends on the script that is executed"}},{"id":"EVAL_RO","group":"scripting","since":"7.0.0","arity":-3,"summary":"Executes a read-only server-side Lua script.","flags":["NOSCRIPT","SKIP_MONITOR","NO_MANDATORY_KEYS","STALE","READONLY"],"arguments":[{"name":"script","type":"string"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","optional":true,"multiple":true},{"name":"arg","type":"string","optional":true,"multiple":true}],"reply":{"description":"Return value depends on the script that is executed"}},{"id":"EVALSHA","group":"scripting","since":"2.6.0","arity":-3,"summary":"Executes a server-side Lua script by SHA1 digest.","flags":["NOSCRIPT","SKIP_MONITOR","MAY_REPLICATE","NO_MANDATORY_KEYS","STALE"],"arguments":[{"name":"sha1","type":"string"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","optional":true,"multiple":true},{"name":"arg","type":"string","optional":true,"multiple":true}],"reply":{"description":"Return value depends on the script that is executed"}},{"id":"EVALSHA_RO","group":"scripting","since":"7.0.0","arity":-3,"summary":"Executes a read-only server-side Lua script by SHA1 digest.","flags":["NOSCRIPT","SKIP_MONITOR","NO_MANDATORY_KEYS","STALE","READONLY"],"arguments":[{"name":"sha1","type":"string"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","optional":true,"multiple":true},{"name":"arg","type":"string","optional":true,"multiple":true}],"reply":{"description":"Return value depends on the script that is executed"}},{"id":"EXEC","group":"transactions","since":"1.2.0","arity":1,"summary":"Executes all commands in a transaction.","flags":["NOSCRIPT","LOADING","STALE","SKIP_SLOWLOG"],"arguments":[],"reply":{"oneOf":[{"description":"Each element being the reply to each of the commands in the atomic transaction.","type":"array"},{"description":"The transaction was aborted because a `WATCH`ed key was touched","type":"null"}]}},{"id":"EXISTS","group":"generic","since":"1.0.0","arity":-2,"summary":"Determines whether one or more keys exist.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"description":"Number of keys that exist from those specified as arguments.","type":"integer"}},{"id":"EXPIRE","group":"generic","since":"1.0.0","arity":-3,"summary":"Sets the expiration time of a key in seconds.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"seconds","type":"integer"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]}],"reply":{"oneOf":[{"description":"The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.","const":0},{"description":"The timeout was set.","const":1}]}},{"id":"EXPIREAT","group":"generic","since":"1.2.0","arity":-3,"summary":"Sets the expiration time of a key to a Unix timestamp.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"unix-time-seconds","type":"unix-time"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]}],"reply":{"oneOf":[{"const":1,"description":"The timeout was set."},{"const":0,"description":"The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments."}]}},{"id":"EXPIRETIME","group":"generic","since":"7.0.0","arity":2,"summary":"Returns the expiration time of a key as a Unix timestamp.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"type":"integer","description":"Expiration Unix timestamp in seconds.","minimum":0},{"const":-1,"description":"The key exists but has no associated expiration time."},{"const":-2,"description":"The key does not exist."}]}},{"id":"FCALL","group":"scripting","since":"7.0.0","arity":-3,"summary":"Invokes a function.","flags":["NOSCRIPT","SKIP_MONITOR","MAY_REPLICATE","NO_MANDATORY_KEYS","STALE"],"arguments":[{"name":"function","type":"string"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","optional":true,"multiple":true},{"name":"arg","type":"string","optional":true,"multiple":true}],"reply":{"description":"Return value depends on the function that is executed"}},{"id":"FCALL_RO","group":"scripting","since":"7.0.0","arity":-3,"summary":"Invokes a read-only function.","flags":["NOSCRIPT","SKIP_MONITOR","NO_MANDATORY_KEYS","STALE","READONLY"],"arguments":[{"name":"function","type":"string"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","optional":true,"multiple":true},{"name":"arg","type":"string","optional":true,"multiple":true}],"reply":{"description":"Return value depends on the function that is executed"}},{"id":"FLUSHALL","group":"server","since":"1.0.0","arity":-1,"summary":"Removes all keys from all databases.","flags":["WRITE"],"arguments":[{"name":"flush-type","type":"oneof","optional":true,"arguments":[{"name":"async","type":"pure-token","token":"ASYNC"},{"name":"sync","type":"pure-token","token":"SYNC"}]}],"reply":{"const":"OK"}},{"id":"FLUSHDB","group":"server","since":"1.0.0","arity":-1,"summary":"Remove all keys from the current database.","flags":["WRITE"],"arguments":[{"name":"flush-type","type":"oneof","optional":true,"arguments":[{"name":"async","type":"pure-token","token":"ASYNC"},{"name":"sync","type":"pure-token","token":"SYNC"}]}],"reply":{"const":"OK"}},{"id":"FUNCTION DELETE","group":"scripting","since":"7.0.0","arity":3,"summary":"Deletes a library and its functions.","flags":["NOSCRIPT","WRITE"],"arguments":[{"name":"library-name","type":"string"}],"reply":{"const":"OK"}},{"id":"FUNCTION FLUSH","group":"scripting","since":"7.0.0","arity":-2,"summary":"Deletes all libraries and functions.","flags":["NOSCRIPT","WRITE"],"arguments":[{"name":"flush-type","type":"oneof","optional":true,"arguments":[{"name":"async","type":"pure-token","token":"ASYNC"},{"name":"sync","type":"pure-token","token":"SYNC"}]}],"reply":{"const":"OK"}},{"id":"FUNCTION KILL","group":"scripting","since":"7.0.0","arity":2,"summary":"Terminates a function during execution.","flags":["NOSCRIPT","ALLOW_BUSY"],"arguments":[],"reply":{"const":"OK"}},{"id":"FUNCTION LIST","group":"scripting","since":"7.0.0","arity":-2,"summary":"Returns information about all libraries.","flags":["NOSCRIPT"],"arguments":[{"name":"library-name-pattern","type":"string","optional":true,"token":"LIBRARYNAME"},{"name":"withcode","type":"pure-token","optional":true,"token":"WITHCODE"}],"reply":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"library_name":{"description":" the name of the library","type":"string"},"engine":{"description":"the engine of the library","type":"string"},"functions":{"description":"the list of functions in the library","type":"array","items":{"type":"object","additionalProperties":false,"properties":{"name":{"description":"the name of the function","type":"string"},"description":{"description":"the function's description","oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"description":"an array of function flags","type":"array","items":{"type":"string"}}}}},"library_code":{"description":"the library's source code (when given the WITHCODE modifier)","type":"string"}}}}},{"id":"FUNCTION LOAD","group":"scripting","since":"7.0.0","arity":-3,"summary":"Creates a library.","flags":["NOSCRIPT","WRITE","DENYOOM"],"arguments":[{"name":"replace","type":"pure-token","optional":true,"token":"REPLACE"},{"name":"function-code","type":"string"}],"reply":{"description":"The library name that was loaded","type":"string"}},{"id":"FUNCTION STATS","group":"scripting","since":"7.0.0","arity":2,"summary":"Returns information about a function during execution.","flags":["NOSCRIPT","ALLOW_BUSY"],"arguments":[],"reply":{"type":"object","additionalProperties":false,"properties":{"running_script":{"description":"information about the running script.","oneOf":[{"description":"If there's no in-flight function","type":"null"},{"description":"a map with the information about the running script","type":"object","additionalProperties":false,"properties":{"name":{"description":"the name of the function.","type":"string"},"command":{"description":"the command and arguments used for invoking the function.","type":"array","items":{"type":"string"}},"duration_ms":{"description":"the function's runtime duration in milliseconds.","type":"integer"}}}]},"engines":{"description":"A map when each entry in the map represent a single engine.","type":"object","patternProperties":{"^.*$":{"description":"Engine map contains statistics about the engine","type":"object","additionalProperties":false,"properties":{"libraries_count":{"description":"number of libraries","type":"integer"},"functions_count":{"description":"number of functions","type":"integer"}}}}}}}},{"id":"GEOADD","group":"geo","since":"3.2.0","arity":-5,"summary":"Adds one or more members to a geospatial index. The key is created if it doesn't exist.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"}]},{"name":"change","type":"pure-token","optional":true,"token":"CH"},{"name":"data","type":"block","multiple":true,"arguments":[{"name":"longitude","type":"double"},{"name":"latitude","type":"double"},{"name":"member","type":"string"}]}],"reply":{"description":"When used without optional arguments, the number of elements added to the sorted set (excluding score updates). If the CH option is specified, the number of elements that were changed (added or updated).","type":"integer"}},{"id":"GEODIST","group":"geo","since":"3.2.0","arity":-4,"summary":"Returns the distance between two members of a geospatial index.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"member1","type":"string"},{"name":"member2","type":"string"},{"name":"unit","type":"oneof","optional":true,"arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]}],"reply":{"oneOf":[{"description":"one or both of elements are missing","type":"null"},{"description":"distance as a double (represented as a string) in the specified units","type":"string","pattern":"^[0-9]*(.[0-9]*)?$"}]}},{"id":"GEOHASH","group":"geo","since":"3.2.0","arity":-2,"summary":"Returns members from a geospatial index as geohash strings.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string","optional":true,"multiple":true}],"reply":{"description":"An array where each element is the Geohash corresponding to each member name passed as argument to the command.","type":"array","items":{"type":"string"}}},{"id":"GEOPOS","group":"geo","since":"3.2.0","arity":-2,"summary":"Returns the longitude and latitude of members from a geospatial index.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string","optional":true,"multiple":true}],"reply":{"description":"An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command","type":"array","items":{"oneOf":[{"description":"Element does not exist","type":"null"},{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Latitude (x)","type":"number"},{"description":"Longitude (y)","type":"number"}]}]}}},{"id":"GEORADIUS","group":"geo","since":"3.2.0","arity":-6,"summary":"Queries a geospatial index for members within a distance from a coordinate, optionally stores the result.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"longitude","type":"double"},{"name":"latitude","type":"double"},{"name":"radius","type":"double"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]},{"name":"withcoord","type":"pure-token","optional":true,"token":"WITHCOORD"},{"name":"withdist","type":"pure-token","optional":true,"token":"WITHDIST"},{"name":"withhash","type":"pure-token","optional":true,"token":"WITHHASH"},{"name":"count-block","type":"block","optional":true,"arguments":[{"name":"count","type":"integer","token":"COUNT"},{"name":"any","type":"pure-token","optional":true,"token":"ANY"}]},{"name":"order","type":"oneof","optional":true,"arguments":[{"name":"asc","type":"pure-token","token":"ASC"},{"name":"desc","type":"pure-token","token":"DESC"}]},{"name":"store","type":"oneof","optional":true,"arguments":[{"name":"storekey","type":"key","token":"STORE"},{"name":"storedistkey","type":"key","token":"STOREDIST"}]}],"reply":{"description":"Array of matched members information","anyOf":[{"description":"If no WITH* option is specified, array of matched members names","type":"array","items":{"description":"name","type":"string"}},{"type":"array","items":{"type":"array","minItems":1,"maxItems":4,"items":[{"description":"Matched member name","type":"string"}],"additionalItems":{"oneOf":[{"description":"If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius","type":"string"},{"description":"If WITHHASH option is specified, the geohash integer","type":"integer"},{"description":"If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)","type":"array","minItems":2,"maxItems":2,"items":[{"description":"latitude (x)","type":"number"},{"description":"longitude (y)","type":"number"}]}]}}},{"description":"number of items stored in key","type":"integer"}]}},{"id":"GEORADIUS_RO","group":"geo","since":"3.2.10","arity":-6,"summary":"Returns members from a geospatial index that are within a distance from a coordinate.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"longitude","type":"double"},{"name":"latitude","type":"double"},{"name":"radius","type":"double"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]},{"name":"withcoord","type":"pure-token","optional":true,"token":"WITHCOORD"},{"name":"withdist","type":"pure-token","optional":true,"token":"WITHDIST"},{"name":"withhash","type":"pure-token","optional":true,"token":"WITHHASH"},{"name":"count-block","type":"block","optional":true,"arguments":[{"name":"count","type":"integer","token":"COUNT"},{"name":"any","type":"pure-token","optional":true,"token":"ANY"}]},{"name":"order","type":"oneof","optional":true,"arguments":[{"name":"asc","type":"pure-token","token":"ASC"},{"name":"desc","type":"pure-token","token":"DESC"}]}],"reply":{"description":"Array of matched members information","anyOf":[{"description":"If no WITH* option is specified, array of matched members names","type":"array","items":{"description":"name","type":"string"}},{"type":"array","items":{"type":"array","minItems":1,"maxItems":4,"items":[{"description":"Matched member name","type":"string"}],"additionalItems":{"oneOf":[{"description":"If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius","type":"string"},{"description":"If WITHHASH option is specified, the geohash integer","type":"integer"},{"description":"If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)","type":"array","minItems":2,"maxItems":2,"items":[{"description":"latitude (x)","type":"number"},{"description":"longitude (y)","type":"number"}]}]}}}]}},{"id":"GEORADIUSBYMEMBER","group":"geo","since":"3.2.0","arity":-5,"summary":"Queries a geospatial index for members within a distance from a member, optionally stores the result.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string"},{"name":"radius","type":"double"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]},{"name":"withcoord","type":"pure-token","optional":true,"token":"WITHCOORD"},{"name":"withdist","type":"pure-token","optional":true,"token":"WITHDIST"},{"name":"withhash","type":"pure-token","optional":true,"token":"WITHHASH"},{"name":"count-block","type":"block","optional":true,"arguments":[{"name":"count","type":"integer","token":"COUNT"},{"name":"any","type":"pure-token","optional":true,"token":"ANY"}]},{"name":"order","type":"oneof","optional":true,"arguments":[{"name":"asc","type":"pure-token","token":"ASC"},{"name":"desc","type":"pure-token","token":"DESC"}]},{"name":"store","type":"oneof","optional":true,"arguments":[{"name":"storekey","type":"key","token":"STORE"},{"name":"storedistkey","type":"key","token":"STOREDIST"}]}],"reply":{"description":"Array of matched members information","anyOf":[{"description":"If no WITH* option is specified, array of matched members names","type":"array","items":{"description":"name","type":"string"}},{"type":"array","items":{"type":"array","minItems":1,"maxItems":4,"items":[{"description":"Matched member name","type":"string"}],"additionalItems":{"oneOf":[{"description":"If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius","type":"string"},{"description":"If WITHHASH option is specified, the geohash integer","type":"integer"},{"description":"If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)","type":"array","minItems":2,"maxItems":2,"items":[{"description":"latitude (x)","type":"number"},{"description":"longitude (y)","type":"number"}]}]}}},{"description":"number of items stored in key","type":"integer"}]}},{"id":"GEORADIUSBYMEMBER_RO","group":"geo","since":"3.2.10","arity":-5,"summary":"Returns members from a geospatial index that are within a distance from a member.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string"},{"name":"radius","type":"double"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]},{"name":"withcoord","type":"pure-token","optional":true,"token":"WITHCOORD"},{"name":"withdist","type":"pure-token","optional":true,"token":"WITHDIST"},{"name":"withhash","type":"pure-token","optional":true,"token":"WITHHASH"},{"name":"count-block","type":"block","optional":true,"arguments":[{"name":"count","type":"integer","token":"COUNT"},{"name":"any","type":"pure-token","optional":true,"token":"ANY"}]},{"name":"order","type":"oneof","optional":true,"arguments":[{"name":"asc","type":"pure-token","token":"ASC"},{"name":"desc","type":"pure-token","token":"DESC"}]}],"reply":{"description":"Array of matched members information","anyOf":[{"description":"If no WITH* option is specified, array of matched members names","type":"array","items":{"description":"name","type":"string"}},{"type":"array","items":{"type":"array","minItems":1,"maxItems":4,"items":[{"description":"Matched member name","type":"string"}],"additionalItems":{"oneOf":[{"description":"If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius","type":"string"},{"description":"If WITHHASH option is specified, the geohash integer","type":"integer"},{"description":"If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)","type":"array","minItems":2,"maxItems":2,"items":[{"description":"latitude (x)","type":"number"},{"description":"longitude (y)","type":"number"}]}]}}}]}},{"id":"GEOSEARCH","group":"geo","since":"6.2.0","arity":-7,"summary":"Queries a geospatial index for members inside an area of a box or a circle.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"from","type":"oneof","arguments":[{"name":"member","type":"string","token":"FROMMEMBER"},{"name":"fromlonlat","type":"block","token":"FROMLONLAT","arguments":[{"name":"longitude","type":"double"},{"name":"latitude","type":"double"}]}]},{"name":"by","type":"oneof","arguments":[{"name":"circle","type":"block","arguments":[{"name":"radius","type":"double","token":"BYRADIUS"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]}]},{"name":"box","type":"block","arguments":[{"name":"width","type":"double","token":"BYBOX"},{"name":"height","type":"double"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]}]}]},{"name":"order","type":"oneof","optional":true,"arguments":[{"name":"asc","type":"pure-token","token":"ASC"},{"name":"desc","type":"pure-token","token":"DESC"}]},{"name":"count-block","type":"block","optional":true,"arguments":[{"name":"count","type":"integer","token":"COUNT"},{"name":"any","type":"pure-token","optional":true,"token":"ANY"}]},{"name":"withcoord","type":"pure-token","optional":true,"token":"WITHCOORD"},{"name":"withdist","type":"pure-token","optional":true,"token":"WITHDIST"},{"name":"withhash","type":"pure-token","optional":true,"token":"WITHHASH"}],"reply":{"description":"Array of matched members information","anyOf":[{"description":"If no WITH* option is specified, array of matched members names","type":"array","items":{"description":"name","type":"string"}},{"type":"array","items":{"type":"array","minItems":1,"maxItems":4,"items":[{"description":"Matched member name","type":"string"}],"additionalItems":{"oneOf":[{"description":"If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius","type":"string"},{"description":"If WITHHASH option is specified, the geohash integer","type":"integer"},{"description":"If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)","type":"array","minItems":2,"maxItems":2,"items":[{"description":"latitude (x)","type":"number"},{"description":"longitude (y)","type":"number"}]}]}}}]}},{"id":"GEOSEARCHSTORE","group":"geo","since":"6.2.0","arity":-8,"summary":"Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destination","type":"key"},{"name":"source","type":"key"},{"name":"from","type":"oneof","arguments":[{"name":"member","type":"string","token":"FROMMEMBER"},{"name":"fromlonlat","type":"block","token":"FROMLONLAT","arguments":[{"name":"longitude","type":"double"},{"name":"latitude","type":"double"}]}]},{"name":"by","type":"oneof","arguments":[{"name":"circle","type":"block","arguments":[{"name":"radius","type":"double","token":"BYRADIUS"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]}]},{"name":"box","type":"block","arguments":[{"name":"width","type":"double","token":"BYBOX"},{"name":"height","type":"double"},{"name":"unit","type":"oneof","arguments":[{"name":"m","type":"pure-token","token":"m"},{"name":"km","type":"pure-token","token":"km"},{"name":"ft","type":"pure-token","token":"ft"},{"name":"mi","type":"pure-token","token":"mi"}]}]}]},{"name":"order","type":"oneof","optional":true,"arguments":[{"name":"asc","type":"pure-token","token":"ASC"},{"name":"desc","type":"pure-token","token":"DESC"}]},{"name":"count-block","type":"block","optional":true,"arguments":[{"name":"count","type":"integer","token":"COUNT"},{"name":"any","type":"pure-token","optional":true,"token":"ANY"}]},{"name":"storedist","type":"pure-token","optional":true,"token":"STOREDIST"}],"reply":{"description":"the number of elements in the resulting set","type":"integer"}},{"id":"GET","group":"string","since":"1.0.0","arity":2,"summary":"Returns the string value of a key.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"description":"The value of the key.","type":"string"},{"description":"Key does not exist.","type":"null"}]}},{"id":"GETBIT","group":"bitmap","since":"2.2.0","arity":3,"summary":"Returns a bit value by offset.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"offset","type":"integer"}],"reply":{"description":"The bit value stored at offset.","oneOf":[{"const":0},{"const":1}]}},{"id":"GETDEL","group":"string","since":"6.2.0","arity":2,"summary":"Returns the string value of a key after deleting the key.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"description":"The value of the key.","type":"string"},{"description":"The key does not exist.","type":"null"}]}},{"id":"GETEX","group":"string","since":"6.2.0","arity":-2,"summary":"Returns the string value of a key after setting its expiration time.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"expiration","type":"oneof","optional":true,"arguments":[{"name":"seconds","type":"integer","token":"EX"},{"name":"milliseconds","type":"integer","token":"PX"},{"name":"unix-time-seconds","type":"unix-time","token":"EXAT"},{"name":"unix-time-milliseconds","type":"unix-time","token":"PXAT"},{"name":"persist","type":"pure-token","token":"PERSIST"}]}],"reply":{"oneOf":[{"description":"The value of the key.","type":"string"},{"description":"Key does not exist.","type":"null"}]}},{"id":"GETRANGE","group":"string","since":"2.4.0","arity":4,"summary":"Returns a substring of the string stored at a key.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"start","type":"integer"},{"name":"end","type":"integer"}],"reply":{"type":"string","description":"The substring of the string value stored at key, determined by the offsets start and end (both are inclusive)."}},{"id":"GETSET","group":"string","since":"1.0.0","arity":3,"summary":"Returns the previous string value of a key after setting it to a new value.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"value","type":"string"}],"reply":{"oneOf":[{"description":"The old value stored at the key.","type":"string"},{"description":"The key does not exist.","type":"null"}]}},{"id":"HDEL","group":"hash","since":"2.0.0","arity":-3,"summary":"Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string","multiple":true}],"reply":{"type":"integer","description":"The number of fields that were removed from the hash."}},{"id":"HELLO","group":"connection","since":"6.0.0","arity":-1,"summary":"Handshakes with the Redis server.","flags":["NOSCRIPT","LOADING","STALE","FAST","NO_AUTH","SENTINEL","ALLOW_BUSY"],"arguments":[{"name":"arguments","type":"block","optional":true,"arguments":[{"name":"protover","type":"integer"},{"name":"auth","type":"block","optional":true,"token":"AUTH","arguments":[{"name":"username","type":"string"},{"name":"password","type":"string"}]},{"name":"clientname","type":"string","optional":true,"token":"SETNAME"}]}],"reply":{"type":"object","additionalProperties":false,"properties":{"server":{"type":"string"},"version":{"type":"string"},"proto":{"const":3},"id":{"type":"integer"},"mode":{"type":"string"},"role":{"type":"string"},"modules":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"ver":{"type":"integer"},"path":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}}}}}}},{"id":"HEXISTS","group":"hash","since":"2.0.0","arity":3,"summary":"Determines whether a field exists in a hash.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string"}],"reply":{"oneOf":[{"description":"The hash does not contain the field, or key does not exist.","const":0},{"description":"The hash contains the field.","const":1}]}},{"id":"HEXPIRE","group":"hash","since":"7.4.0","arity":-6,"summary":"Set expiry for hash field using relative time to expire (seconds)","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"seconds","type":"integer"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"Specified NX | XX | GT | LT condition not met","const":0},{"description":"Expiration time was set or updated.","const":1},{"description":"Field deleted because the specified expiration time is in the past.","const":2}]}}},{"id":"HEXPIREAT","group":"hash","since":"7.4.0","arity":-6,"summary":"Set expiry for hash field using an absolute Unix timestamp (seconds)","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"unix-time-seconds","type":"unix-time"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"Specified NX | XX | GT | LT condition not met","const":0},{"description":"Expiration time was set or updated.","const":1},{"description":"Field deleted because the specified expiration time is in the past.","const":2}]}}},{"id":"HEXPIRETIME","group":"hash","since":"7.4.0","arity":-5,"summary":"Returns the expiration time of a hash field as a Unix timestamp, in seconds.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"The field exists but has no associated expire.","const":-1},{"description":"Expiration Unix timestamp in seconds.","type":"integer","minimum":1}]}}},{"id":"HGET","group":"hash","since":"2.0.0","arity":3,"summary":"Returns the value of a field in a hash.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string"}],"reply":{"oneOf":[{"description":"The value associated with the field.","type":"string"},{"description":"If the field is not present in the hash or key does not exist.","type":"null"}]}},{"id":"HGETALL","group":"hash","since":"2.0.0","arity":2,"summary":"Returns all fields and values in a hash.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"}],"reply":{"type":"object","description":"Map of fields and their values stored in the hash, or an empty list when key does not exist. In RESP2 this is returned as a flat array.","additionalProperties":{"type":"string"}}},{"id":"HGETDEL","group":"hash","since":"8.0.0","arity":-5,"summary":"Returns the value of a field and deletes it from the hash.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"List of values associated with the given fields, in the same order as they are requested.","type":"array","minItems":1,"items":{"oneOf":[{"type":"string"},{"type":"null"}]}}},{"id":"HGETEX","group":"hash","since":"8.0.0","arity":-5,"summary":"Get the value of one or more fields of a given hash key, and optionally set their expiration.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"expiration","type":"oneof","optional":true,"arguments":[{"name":"seconds","type":"integer","token":"EX"},{"name":"milliseconds","type":"integer","token":"PX"},{"name":"unix-time-seconds","type":"unix-time","token":"EXAT"},{"name":"unix-time-milliseconds","type":"unix-time","token":"PXAT"},{"name":"persist","type":"pure-token","token":"PERSIST"}]},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"List of values associated with the given fields, in the same order as they are requested.","type":"array","minItems":1,"items":{"oneOf":[{"type":"string"},{"type":"null"}]}}},{"id":"HINCRBY","group":"hash","since":"2.0.0","arity":4,"summary":"Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string"},{"name":"increment","type":"integer"}],"reply":{"type":"integer","description":"The value of the field after the increment operation."}},{"id":"HINCRBYFLOAT","group":"hash","since":"2.6.0","arity":4,"summary":"Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string"},{"name":"increment","type":"double"}],"reply":{"type":"string","description":"The value of the field after the increment operation."}},{"id":"HKEYS","group":"hash","since":"2.0.0","arity":2,"summary":"Returns all fields in a hash.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"}],"reply":{"type":"array","description":"List of fields in the hash, or an empty list when the key does not exist.","uniqueItems":true,"items":{"type":"string"}}},{"id":"HLEN","group":"hash","since":"2.0.0","arity":2,"summary":"Returns the number of fields in a hash.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"type":"integer","description":"Number of the fields in the hash, or 0 when the key does not exist."}},{"id":"HMGET","group":"hash","since":"2.0.0","arity":-3,"summary":"Returns the values of all fields in a hash.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string","multiple":true}],"reply":{"description":"List of values associated with the given fields, in the same order as they are requested.","type":"array","minItems":1,"items":{"oneOf":[{"type":"string"},{"type":"null"}]}}},{"id":"HMSET","group":"hash","since":"2.0.0","arity":-4,"summary":"Sets the values of multiple fields.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"data","type":"block","multiple":true,"arguments":[{"name":"field","type":"string"},{"name":"value","type":"string"}]}],"reply":{"const":"OK"}},{"id":"HPERSIST","group":"hash","since":"7.4.0","arity":-5,"summary":"Removes the expiration time for each specified field","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"The field exists but has no associated expire.","const":-1},{"description":"Expiration time was removed","const":1}]}}},{"id":"HPEXPIRE","group":"hash","since":"7.4.0","arity":-6,"summary":"Set expiry for hash field using relative time to expire (milliseconds)","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"milliseconds","type":"integer"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"Specified NX | XX | GT | LT condition not met","const":0},{"description":"Expiration time was set or updated.","const":1},{"description":"Field deleted because the specified expiration time is in the past.","const":2}]}}},{"id":"HPEXPIREAT","group":"hash","since":"7.4.0","arity":-6,"summary":"Set expiry for hash field using an absolute Unix timestamp (milliseconds)","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"unix-time-milliseconds","type":"unix-time"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"Specified NX | XX | GT | LT condition not met","const":0},{"description":"Expiration time was set or updated.","const":1},{"description":"Field deleted because the specified expiration time is in the past.","const":2}]}}},{"id":"HPEXPIRETIME","group":"hash","since":"7.4.0","arity":-5,"summary":"Returns the expiration time of a hash field as a Unix timestamp, in msec.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"The field exists but has no associated expire.","const":-1},{"description":"Expiration Unix timestamp in milliseconds.","type":"integer","minimum":1}]}}},{"id":"HPTTL","group":"hash","since":"7.4.0","arity":-5,"summary":"Returns the TTL in milliseconds of a hash field.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"The field exists but has no associated expire.","const":-1},{"description":"TTL in milliseconds.","type":"integer","minimum":1}]}}},{"id":"HRANDFIELD","group":"hash","since":"6.2.0","arity":-2,"summary":"Returns one or more random fields from a hash.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"options","type":"block","optional":true,"arguments":[{"name":"count","type":"integer"},{"name":"withvalues","type":"pure-token","optional":true,"token":"WITHVALUES"}]}],"reply":{"anyOf":[{"description":"Key doesn't exist","type":"null"},{"description":"A single random field. Returned in case `COUNT` was not used.","type":"string"},{"description":"A list of fields. Returned in case `COUNT` was used.","type":"array","items":{"type":"string"}},{"description":"Fields and their values. Returned in case `COUNT` and `WITHVALUES` were used. In RESP2 this is returned as a flat array.","type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Field","type":"string"},{"description":"Value","type":"string"}]}}]}},{"id":"HSCAN","group":"hash","since":"2.8.0","arity":-3,"summary":"Iterates over fields and values of a hash.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"cursor","type":"integer"},{"name":"pattern","type":"pattern","optional":true,"token":"MATCH"},{"name":"count","type":"integer","optional":true,"token":"COUNT"},{"name":"novalues","type":"pure-token","optional":true,"token":"NOVALUES"}],"reply":{"description":"cursor and scan response in array form","type":"array","minItems":2,"maxItems":2,"items":[{"description":"cursor","type":"string"},{"description":"list of key/value pairs from the hash where each even element is the key, and each odd element is the value, or when novalues option is on, a list of keys from the hash","type":"array","items":{"type":"string"}}]}},{"id":"HSET","group":"hash","since":"2.0.0","arity":-4,"summary":"Creates or modifies the value of a field in a hash.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"data","type":"block","multiple":true,"arguments":[{"name":"field","type":"string"},{"name":"value","type":"string"}]}],"reply":{"description":"The number of fields that were added","type":"integer"}},{"id":"HSETEX","group":"hash","since":"8.0.0","arity":-6,"summary":"Set the value of one or more fields of a given hash key, and optionally set their expiration.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"fnx","type":"pure-token","token":"FNX"},{"name":"fxx","type":"pure-token","token":"FXX"}]},{"name":"expiration","type":"oneof","optional":true,"arguments":[{"name":"seconds","type":"integer","token":"EX"},{"name":"milliseconds","type":"integer","token":"PX"},{"name":"unix-time-seconds","type":"unix-time","token":"EXAT"},{"name":"unix-time-milliseconds","type":"unix-time","token":"PXAT"},{"name":"keepttl","type":"pure-token","token":"KEEPTTL"}]},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"data","type":"block","multiple":true,"arguments":[{"name":"field","type":"string"},{"name":"value","type":"string"}]}]}],"reply":{"oneOf":[{"description":"No field was set (due to FXX or FNX flags).","const":0},{"description":"All the fields were set.","const":1}]}},{"id":"HSETNX","group":"hash","since":"2.0.0","arity":4,"summary":"Sets the value of a field in a hash only when the field doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string"},{"name":"value","type":"string"}],"reply":{"oneOf":[{"description":"The field is a new field in the hash and value was set.","const":0},{"description":"The field already exists in the hash and no operation was performed.","const":1}]}},{"id":"HSTRLEN","group":"hash","since":"3.2.0","arity":3,"summary":"Returns the length of the value of a field.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"field","type":"string"}],"reply":{"type":"integer","description":"String length of the value associated with the field, or zero when the field is not present in the hash or key does not exist at all.","minimum":0}},{"id":"HTTL","group":"hash","since":"7.4.0","arity":-5,"summary":"Returns the TTL in seconds of a hash field.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"fields","type":"block","token":"FIELDS","arguments":[{"name":"numfields","type":"integer"},{"name":"field","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns empty array if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The field does not exist.","const":-2},{"description":"The field exists but has no associated expire.","const":-1},{"description":"TTL in seconds.","type":"integer","minimum":1}]}}},{"id":"HVALS","group":"hash","since":"2.0.0","arity":2,"summary":"Returns all values in a hash.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"}],"reply":{"type":"array","description":"List of values in the hash, or an empty list when the key does not exist.","items":{"type":"string"}}},{"id":"INCR","group":"string","since":"1.0.0","arity":2,"summary":"Increments the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"description":"The value of key after the increment","type":"integer"}},{"id":"INCRBY","group":"string","since":"1.0.0","arity":3,"summary":"Increments the integer value of a key by a number. Uses 0 as initial value if the key doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"increment","type":"integer"}],"reply":{"type":"integer","description":"The value of the key after incrementing it."}},{"id":"INCRBYFLOAT","group":"string","since":"2.6.0","arity":3,"summary":"Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"increment","type":"double"}],"reply":{"type":"string","description":"The value of the key after incrementing it."}},{"id":"INFO","group":"server","since":"1.0.0","arity":-1,"summary":"Returns information and statistics about the server.","flags":["LOADING","STALE","SENTINEL"],"arguments":[{"name":"section","type":"string","optional":true,"multiple":true}],"reply":{"description":"A map of info fields, one field per line in the form of <field>:<value> where the value can be a comma separated map like <key>=<val>. Also contains section header lines starting with `#` and blank lines.","type":"string"}},{"id":"KEYS","group":"generic","since":"1.0.0","arity":2,"summary":"Returns all key names that match a pattern.","flags":["READONLY"],"arguments":[{"name":"pattern","type":"pattern"}],"reply":{"description":"list of keys matching pattern","type":"array","items":{"type":"string"}}},{"id":"LINDEX","group":"list","since":"1.0.0","arity":3,"summary":"Returns an element from a list by its index.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"index","type":"integer"}],"reply":{"oneOf":[{"type":"null","description":"Index is out of range"},{"description":"The requested element","type":"string"}]}},{"id":"LINSERT","group":"list","since":"2.2.0","arity":5,"summary":"Inserts an element before or after another element in a list.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"where","type":"oneof","arguments":[{"name":"before","type":"pure-token","token":"BEFORE"},{"name":"after","type":"pure-token","token":"AFTER"}]},{"name":"pivot","type":"string"},{"name":"element","type":"string"}],"reply":{"oneOf":[{"description":"List length after a successful insert operation.","type":"integer","minimum":1},{"description":"in case key doesn't exist.","const":0},{"description":"when the pivot wasn't found.","const":-1}]}},{"id":"LLEN","group":"list","since":"1.0.0","arity":2,"summary":"Returns the length of a list.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"description":"List length.","type":"integer","minimum":0}},{"id":"LMOVE","group":"list","since":"6.2.0","arity":5,"summary":"Returns an element after popping it from one list and pushing it to another. Deletes the list if the last element was moved.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"source","type":"key"},{"name":"destination","type":"key"},{"name":"wherefrom","type":"oneof","arguments":[{"name":"left","type":"pure-token","token":"LEFT"},{"name":"right","type":"pure-token","token":"RIGHT"}]},{"name":"whereto","type":"oneof","arguments":[{"name":"left","type":"pure-token","token":"LEFT"},{"name":"right","type":"pure-token","token":"RIGHT"}]}],"reply":{"description":"The element being popped and pushed.","type":"string"}},{"id":"LMPOP","group":"list","since":"7.0.0","arity":-4,"summary":"Returns multiple elements from a list after removing them. Deletes the list if the last element was popped.","flags":["WRITE"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"where","type":"oneof","arguments":[{"name":"left","type":"pure-token","token":"LEFT"},{"name":"right","type":"pure-token","token":"RIGHT"}]},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"anyOf":[{"description":"If no element could be popped.","type":"null"},{"description":"List key from which elements were popped.","type":"array","minItems":2,"maxItems":2,"items":[{"description":"Name of the key from which elements were popped.","type":"string"},{"description":"Array of popped elements.","type":"array","minItems":1,"items":{"type":"string"}}]}]}},{"id":"LPOP","group":"list","since":"1.0.0","arity":-2,"summary":"Returns the first elements in a list after removing it. Deletes the list if the last element was popped.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer","optional":true}],"reply":{"oneOf":[{"description":"Key does not exist.","type":"null"},{"description":"In case `count` argument was not given, the value of the first element.","type":"string"},{"description":"In case `count` argument was given, a list of popped elements","type":"array","items":{"type":"string"}}]}},{"id":"LPOS","group":"list","since":"6.0.6","arity":-3,"summary":"Returns the index of matching elements in a list.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"element","type":"string"},{"name":"rank","type":"integer","optional":true,"token":"RANK"},{"name":"num-matches","type":"integer","optional":true,"token":"COUNT"},{"name":"len","type":"integer","optional":true,"token":"MAXLEN"}],"reply":{"anyOf":[{"description":"In case there is no matching element","type":"null"},{"description":"An integer representing the matching element","type":"integer"},{"description":"If the COUNT option is given, an array of integers representing the matching elements (empty if there are no matches)","type":"array","uniqueItems":true,"items":{"type":"integer"}}]}},{"id":"LPUSH","group":"list","since":"1.0.0","arity":-3,"summary":"Prepends one or more elements to a list. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"element","type":"string","multiple":true}],"reply":{"description":"Length of the list after the push operations.","type":"integer"}},{"id":"LPUSHX","group":"list","since":"2.2.0","arity":-3,"summary":"Prepends one or more elements to a list only when the list exists.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"element","type":"string","multiple":true}],"reply":{"type":"integer","description":"the length of the list after the push operation","minimum":0}},{"id":"LRANGE","group":"list","since":"1.0.0","arity":4,"summary":"Returns a range of elements from a list.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"start","type":"integer"},{"name":"stop","type":"integer"}],"reply":{"description":"List of elements in the specified range","type":"array","items":{"type":"string"}}},{"id":"LREM","group":"list","since":"1.0.0","arity":4,"summary":"Removes elements from a list. Deletes the list if the last element was removed.","flags":["WRITE"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer"},{"name":"element","type":"string"}],"reply":{"description":"The number of removed elements.","type":"integer","minimum":0}},{"id":"LSET","group":"list","since":"1.0.0","arity":4,"summary":"Sets the value of an element in a list by its index.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"index","type":"integer"},{"name":"element","type":"string"}],"reply":{"const":"OK"}},{"id":"LTRIM","group":"list","since":"1.0.0","arity":4,"summary":"Removes elements from both ends a list. Deletes the list if all elements were trimmed.","flags":["WRITE"],"arguments":[{"name":"key","type":"key"},{"name":"start","type":"integer"},{"name":"stop","type":"integer"}],"reply":{"const":"OK"}},{"id":"MEMORY USAGE","group":"server","since":"4.0.0","arity":-3,"summary":"Estimates the memory usage of a key.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer","optional":true,"token":"SAMPLES"}],"reply":{"oneOf":[{"description":"Number of bytes that a key and its value require to be stored in RAM.","type":"integer"},{"description":"Key does not exist.","type":"null"}]}},{"id":"MGET","group":"string","since":"1.0.0","arity":-2,"summary":"Atomically returns the string values of one or more keys.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"description":"List of values at the specified keys.","type":"array","minItems":1,"items":{"oneOf":[{"type":"string"},{"type":"null"}]}}},{"id":"MONITOR","group":"server","since":"1.0.0","arity":1,"summary":"Listens for all requests received by the server in real-time.","flags":["ADMIN","NOSCRIPT","LOADING","STALE"],"arguments":[]},{"id":"MSET","group":"string","since":"1.0.1","arity":-3,"summary":"Atomically creates or modifies the string values of one or more keys.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"data","type":"block","multiple":true,"arguments":[{"name":"key","type":"key"},{"name":"value","type":"string"}]}],"reply":{"const":"OK"}},{"id":"MSETEX","group":"string","since":"8.4.0","arity":-4,"summary":"Atomically sets multiple string keys with a shared expiration in a single operation. Supports flexible argument parsing where condition and expiration flags can appear in any order.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"data","type":"block","multiple":true,"arguments":[{"name":"key","type":"key"},{"name":"value","type":"string"}]},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"}]},{"name":"expiration","type":"oneof","optional":true,"arguments":[{"name":"seconds","type":"integer","token":"EX"},{"name":"milliseconds","type":"integer","token":"PX"},{"name":"unix-time-seconds","type":"unix-time","token":"EXAT"},{"name":"unix-time-milliseconds","type":"unix-time","token":"PXAT"},{"name":"keepttl","type":"pure-token","token":"KEEPTTL"}]}],"reply":{"oneOf":[{"description":"No key was set (at least one key failed).","const":0},{"description":"All the keys were set.","const":1}]}},{"id":"MSETNX","group":"string","since":"1.0.1","arity":-3,"summary":"Atomically modifies the string values of one or more keys only when all keys don't exist.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"data","type":"block","multiple":true,"arguments":[{"name":"key","type":"key"},{"name":"value","type":"string"}]}],"reply":{"oneOf":[{"description":"No key was set (at least one key already existed).","const":0},{"description":"All the keys were set.","const":1}]}},{"id":"MULTI","group":"transactions","since":"1.2.0","arity":1,"summary":"Starts a transaction.","flags":["NOSCRIPT","LOADING","STALE","FAST","ALLOW_BUSY"],"arguments":[],"reply":{"const":"OK"}},{"id":"PERSIST","group":"generic","since":"2.2.0","arity":2,"summary":"Removes the expiration time of a key.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"const":0,"description":"Key does not exist or does not have an associated timeout."},{"const":1,"description":"The timeout has been removed."}]}},{"id":"PEXPIRE","group":"generic","since":"2.6.0","arity":-3,"summary":"Sets the expiration time of a key in milliseconds.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"milliseconds","type":"integer"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]}],"reply":{"oneOf":[{"const":0,"description":"The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments."},{"const":1,"description":"The timeout was set."}]}},{"id":"PEXPIREAT","group":"generic","since":"2.6.0","arity":-3,"summary":"Sets the expiration time of a key to a Unix milliseconds timestamp.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"unix-time-milliseconds","type":"unix-time"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]}],"reply":{"oneOf":[{"const":1,"description":"The timeout was set."},{"const":0,"description":"The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments."}]}},{"id":"PEXPIRETIME","group":"generic","since":"7.0.0","arity":2,"summary":"Returns the expiration time of a key as a Unix milliseconds timestamp.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"type":"integer","description":"Expiration Unix timestamp in milliseconds.","minimum":0},{"const":-1,"description":"The key exists but has no associated expiration time."},{"const":-2,"description":"The key does not exist."}]}},{"id":"PFADD","group":"hyperloglog","since":"2.8.9","arity":-2,"summary":"Adds elements to a HyperLogLog key. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"element","type":"string","optional":true,"multiple":true}],"reply":{"oneOf":[{"description":"if at least 1 HyperLogLog internal register was altered","const":1},{"description":"if no HyperLogLog internal register were altered","const":0}]}},{"id":"PFCOUNT","group":"hyperloglog","since":"2.8.9","arity":-2,"summary":"Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).","flags":["READONLY","MAY_REPLICATE"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"description":"The approximated number of unique elements observed via PFADD","type":"integer"}},{"id":"PFMERGE","group":"hyperloglog","since":"2.8.9","arity":-2,"summary":"Merges one or more HyperLogLog values into a single key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destkey","type":"key"},{"name":"sourcekey","type":"key","optional":true,"multiple":true}],"reply":{"const":"OK"}},{"id":"PING","group":"connection","since":"1.0.0","arity":-1,"summary":"Returns the server's liveliness response.","flags":["FAST","SENTINEL"],"arguments":[{"name":"message","type":"string","optional":true}],"reply":{"anyOf":[{"const":"PONG","description":"Default reply."},{"type":"string","description":"Relay of given `message`."}]}},{"id":"PSETEX","group":"string","since":"2.6.0","arity":4,"summary":"Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"milliseconds","type":"integer"},{"name":"value","type":"string"}],"reply":{"const":"OK"}},{"id":"PSUBSCRIBE","group":"pubsub","since":"2.0.0","arity":-2,"summary":"Listens for messages published to channels that match one or more patterns.","flags":["PUBSUB","NOSCRIPT","LOADING","STALE","SENTINEL","DENYOOM"],"arguments":[{"name":"pattern","type":"pattern","multiple":true}]},{"id":"PTTL","group":"generic","since":"2.6.0","arity":2,"summary":"Returns the expiration time in milliseconds of a key.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"description":"TTL in milliseconds.","type":"integer","minimum":0},{"description":"The key exists but has no associated expire.","const":-1},{"description":"The key does not exist.","const":-2}]}},{"id":"PUBLISH","group":"pubsub","since":"2.0.0","arity":3,"summary":"Posts a message to a channel.","flags":["PUBSUB","LOADING","STALE","FAST","MAY_REPLICATE","SENTINEL"],"arguments":[{"name":"channel","type":"string"},{"name":"message","type":"string"}],"reply":{"description":"the number of clients that received the message. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count","type":"integer","minimum":0}},{"id":"PUBSUB","group":"pubsub","since":"2.8.0","arity":-2,"summary":"A container for Pub/Sub commands.","flags":[],"arguments":[]},{"id":"PUNSUBSCRIBE","group":"pubsub","since":"2.0.0","arity":-1,"summary":"Stops listening to messages published to channels that match one or more patterns.","flags":["PUBSUB","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"pattern","type":"pattern","optional":true,"multiple":true}]},{"id":"QUIT","group":"connection","since":"1.0.0","arity":-1,"summary":"Closes the connection.","flags":["ALLOW_BUSY","NOSCRIPT","LOADING","STALE","FAST","NO_AUTH"],"arguments":[],"reply":{"const":"OK"}},{"id":"RANDOMKEY","group":"generic","since":"1.0.0","arity":1,"summary":"Returns a random key name from the database.","flags":["READONLY","TOUCHES_ARBITRARY_KEYS"],"arguments":[],"reply":{"oneOf":[{"description":"when the database is empty","type":"null"},{"description":"random key in db","type":"string"}]}},{"id":"RENAME","group":"generic","since":"1.0.0","arity":3,"summary":"Renames a key and overwrites the destination.","flags":["WRITE"],"arguments":[{"name":"key","type":"key"},{"name":"newkey","type":"key"}],"reply":{"const":"OK"}},{"id":"RENAMENX","group":"generic","since":"1.0.0","arity":3,"summary":"Renames a key only when the target key name doesn't exist.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"newkey","type":"key"}],"reply":{"oneOf":[{"description":"key was renamed to newkey","const":1},{"description":"new key already exists","const":0}]}},{"id":"RESET","group":"connection","since":"6.2.0","arity":1,"summary":"Resets the connection.","flags":["NOSCRIPT","LOADING","STALE","FAST","NO_AUTH","ALLOW_BUSY"],"arguments":[],"reply":{"const":"RESET"}},{"id":"RESTORE","group":"generic","since":"2.6.0","arity":-4,"summary":"Creates a key from the serialized representation of a value.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"ttl","type":"integer"},{"name":"serialized-value","type":"string"},{"name":"replace","type":"pure-token","optional":true,"token":"REPLACE"},{"name":"absttl","type":"pure-token","optional":true,"token":"ABSTTL"},{"name":"seconds","type":"integer","optional":true,"token":"IDLETIME"},{"name":"frequency","type":"integer","optional":true,"token":"FREQ"}],"reply":{"const":"OK"}},{"id":"RPOP","group":"list","since":"1.0.0","arity":-2,"summary":"Returns and removes the last elements of a list. Deletes the list if the last element was popped.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer","optional":true}],"reply":{"oneOf":[{"type":"null","description":"Key does not exist."},{"type":"string","description":"When 'COUNT' was not given, the value of the last element."},{"type":"array","description":"When 'COUNT' was given, list of popped elements.","items":{"type":"string"}}]}},{"id":"RPOPLPUSH","group":"list","since":"1.2.0","arity":3,"summary":"Returns the last element of a list after removing and pushing it to another list. Deletes the list if the last element was popped.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"source","type":"key"},{"name":"destination","type":"key"}],"reply":{"oneOf":[{"type":"string","description":"The element being popped and pushed."},{"type":"null","description":"Source list is empty."}]}},{"id":"RPUSH","group":"list","since":"1.0.0","arity":-3,"summary":"Appends one or more elements to a list. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"element","type":"string","multiple":true}],"reply":{"description":"Length of the list after the push operations.","type":"integer","minimum":1}},{"id":"RPUSHX","group":"list","since":"2.2.0","arity":-3,"summary":"Appends an element to a list only when the list exists.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"element","type":"string","multiple":true}],"reply":{"type":"integer","description":"Length of the list after the push operation.","minimum":0}},{"id":"SADD","group":"set","since":"1.0.0","arity":-3,"summary":"Adds one or more members to a set. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string","multiple":true}],"reply":{"description":"Number of elements that were added to the set, not including all the elements already present in the set.","type":"integer"}},{"id":"SCAN","group":"generic","since":"2.8.0","arity":-2,"summary":"Iterates over the key names in the database.","flags":["READONLY","TOUCHES_ARBITRARY_KEYS"],"arguments":[{"name":"cursor","type":"integer"},{"name":"pattern","type":"pattern","optional":true,"token":"MATCH"},{"name":"count","type":"integer","optional":true,"token":"COUNT"},{"name":"type","type":"string","optional":true,"token":"TYPE"}],"reply":{"description":"cursor and scan response in array form","type":"array","minItems":2,"maxItems":2,"items":[{"description":"cursor","type":"string"},{"description":"list of keys","type":"array","items":{"type":"string"}}]}},{"id":"SCARD","group":"set","since":"1.0.0","arity":2,"summary":"Returns the number of members in a set.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"description":"The cardinality (number of elements) of the set, or 0 if key does not exist.","type":"integer","minimum":0}},{"id":"SCRIPT EXISTS","group":"scripting","since":"2.6.0","arity":-3,"summary":"Determines whether server-side Lua scripts exist in the script cache.","flags":["NOSCRIPT"],"arguments":[{"name":"sha1","type":"string","multiple":true}],"reply":{"description":"An array of integers that correspond to the specified SHA1 digest arguments.","type":"array","items":{"oneOf":[{"description":"sha1 hash exists in script cache","const":1},{"description":"sha1 hash does not exist in script cache","const":0}]}}},{"id":"SCRIPT FLUSH","group":"scripting","since":"2.6.0","arity":-2,"summary":"Removes all server-side Lua scripts from the script cache.","flags":["NOSCRIPT"],"arguments":[{"name":"flush-type","type":"oneof","optional":true,"arguments":[{"name":"async","type":"pure-token","token":"ASYNC"},{"name":"sync","type":"pure-token","token":"SYNC"}]}],"reply":{"const":"OK"}},{"id":"SCRIPT KILL","group":"scripting","since":"2.6.0","arity":2,"summary":"Terminates a server-side Lua script during execution.","flags":["NOSCRIPT","ALLOW_BUSY"],"arguments":[],"reply":{"const":"OK"}},{"id":"SCRIPT LOAD","group":"scripting","since":"2.6.0","arity":3,"summary":"Loads a server-side Lua script to the script cache.","flags":["NOSCRIPT","STALE"],"arguments":[{"name":"script","type":"string"}],"reply":{"description":"The SHA1 digest of the script added into the script cache","type":"string"}},{"id":"SDIFF","group":"set","since":"1.0.0","arity":-2,"summary":"Returns the difference of multiple sets.","flags":["READONLY"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"type":"array","description":"List with the members of the resulting set.","uniqueItems":true,"items":{"type":"string"}}},{"id":"SDIFFSTORE","group":"set","since":"1.0.0","arity":-3,"summary":"Stores the difference of multiple sets in a key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destination","type":"key"},{"name":"key","type":"key","multiple":true}],"reply":{"description":"Number of the elements in the resulting set.","type":"integer","minimum":0}},{"id":"SELECT","group":"connection","since":"1.0.0","arity":2,"summary":"Changes the selected database.","flags":["LOADING","STALE","FAST"],"arguments":[{"name":"index","type":"integer"}],"reply":{"const":"OK"}},{"id":"SET","group":"string","since":"1.0.0","arity":-3,"summary":"Sets the string value of a key, ignoring its type. The key is created if it doesn't exist.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"value","type":"string"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"},{"name":"ifeq-value","type":"string","token":"IFEQ"},{"name":"ifne-value","type":"string","token":"IFNE"},{"name":"ifdeq-digest","type":"integer","token":"IFDEQ"},{"name":"ifdne-digest","type":"integer","token":"IFDNE"}]},{"name":"get","type":"pure-token","optional":true,"token":"GET"},{"name":"expiration","type":"oneof","optional":true,"arguments":[{"name":"seconds","type":"integer","token":"EX"},{"name":"milliseconds","type":"integer","token":"PX"},{"name":"unix-time-seconds","type":"unix-time","token":"EXAT"},{"name":"unix-time-milliseconds","type":"unix-time","token":"PXAT"},{"name":"keepttl","type":"pure-token","token":"KEEPTTL"}]}],"reply":{"anyOf":[{"description":"`GET` not given: Operation was aborted (conflict with one of the `XX`/`NX`/`IFEQ`/`IFDEQ` options or condition not met).","type":"null"},{"description":"`GET` not given: The key was set.","const":"OK"},{"description":"`GET` given: The key didn't exist before the `SET`","type":"null"},{"description":"`GET` given: The previous value of the key","type":"string"}]}},{"id":"SETBIT","group":"bitmap","since":"2.2.0","arity":4,"summary":"Sets or clears the bit at offset of the string value. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"offset","type":"integer"},{"name":"value","type":"integer"}],"reply":{"description":"The original bit value stored at offset.","oneOf":[{"const":0},{"const":1}]}},{"id":"SETEX","group":"string","since":"2.0.0","arity":4,"summary":"Sets the string value and expiration time of a key. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"seconds","type":"integer"},{"name":"value","type":"string"}],"reply":{"const":"OK"}},{"id":"SETNX","group":"string","since":"1.0.0","arity":3,"summary":"Set the string value of a key only when the key doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"value","type":"string"}],"reply":{"oneOf":[{"description":"The key was set.","const":0},{"description":"The key was not set.","const":1}]}},{"id":"SETRANGE","group":"string","since":"2.2.0","arity":4,"summary":"Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"key","type":"key"},{"name":"offset","type":"integer"},{"name":"value","type":"string"}],"reply":{"description":"Length of the string after it was modified by the command.","type":"integer","minimum":0}},{"id":"SINTER","group":"set","since":"1.0.0","arity":-2,"summary":"Returns the intersect of multiple sets.","flags":["READONLY"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"type":"array","description":"List with the members of the resulting set.","uniqueItems":true,"items":{"type":"string"}}},{"id":"SINTERCARD","group":"set","since":"7.0.0","arity":-3,"summary":"Returns the number of members of the intersect of multiple sets.","flags":["READONLY"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"limit","type":"integer","optional":true,"token":"LIMIT"}],"reply":{"description":"Number of the elements in the resulting intersection.","type":"integer","minimum":0}},{"id":"SINTERSTORE","group":"set","since":"1.0.0","arity":-3,"summary":"Stores the intersect of multiple sets in a key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destination","type":"key"},{"name":"key","type":"key","multiple":true}],"reply":{"description":"Number of the elements in the result set.","type":"integer","minimum":0}},{"id":"SISMEMBER","group":"set","since":"1.0.0","arity":3,"summary":"Determines whether a member belongs to a set.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string"}],"reply":{"oneOf":[{"const":0,"description":"The element is not a member of the set, or the key does not exist."},{"const":1,"description":"The element is a member of the set."}]}},{"id":"SMEMBERS","group":"set","since":"1.0.0","arity":2,"summary":"Returns all members of a set.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"}],"reply":{"type":"array","description":"All elements of the set.","uniqueItems":true,"items":{"type":"string"}}},{"id":"SMISMEMBER","group":"set","since":"6.2.0","arity":-3,"summary":"Determines whether multiple members belong to a set.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string","multiple":true}],"reply":{"type":"array","description":"List representing the membership of the given elements, in the same order as they are requested.","minItems":1,"items":{"oneOf":[{"const":0,"description":"Not a member of the set or the key does not exist."},{"const":1,"description":"A member of the set."}]}}},{"id":"SMOVE","group":"set","since":"1.0.0","arity":4,"summary":"Moves a member from one set to another.","flags":["WRITE","FAST"],"arguments":[{"name":"source","type":"key"},{"name":"destination","type":"key"},{"name":"member","type":"string"}],"reply":{"oneOf":[{"const":1,"description":"Element is moved."},{"const":0,"description":"The element is not a member of source and no operation was performed."}]}},{"id":"SPOP","group":"set","since":"1.0.0","arity":-2,"summary":"Returns one or more random members from a set after removing them. Deletes the set if the last member was popped.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer","optional":true}],"reply":{"oneOf":[{"type":"null","description":"The key does not exist."},{"type":"string","description":"The removed member when 'COUNT' is not given."},{"type":"array","description":"List to the removed members when 'COUNT' is given.","uniqueItems":true,"items":{"type":"string"}}]}},{"id":"SRANDMEMBER","group":"set","since":"1.0.0","arity":-2,"summary":"Get one or multiple random members from a set","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer","optional":true}],"reply":{"oneOf":[{"description":"In case `count` is not given and key doesn't exist","type":"null"},{"description":"In case `count` is not given, randomly selected element","type":"string"},{"description":"In case `count` is given, an array of elements","type":"array","items":{"type":"string"},"minItems":1},{"description":"In case `count` is given and key doesn't exist","type":"array","maxItems":0}]}},{"id":"SREM","group":"set","since":"1.0.0","arity":-3,"summary":"Removes one or more members from a set. Deletes the set if the last member was removed.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string","multiple":true}],"reply":{"description":"Number of members that were removed from the set, not including non existing members.","type":"integer","minimum":0}},{"id":"SSCAN","group":"set","since":"2.8.0","arity":-3,"summary":"Iterates over members of a set.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"cursor","type":"integer"},{"name":"pattern","type":"pattern","optional":true,"token":"MATCH"},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"description":"cursor and scan response in array form","type":"array","minItems":2,"maxItems":2,"items":[{"description":"cursor","type":"string"},{"description":"list of set members","type":"array","items":{"type":"string"}}]}},{"id":"STRLEN","group":"string","since":"2.2.0","arity":2,"summary":"Returns the length of a string value.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"description":"The length of the string value stored at key, or 0 when key does not exist.","type":"integer","minimum":0}},{"id":"SUBSCRIBE","group":"pubsub","since":"2.0.0","arity":-2,"summary":"Listens for messages published to channels.","flags":["PUBSUB","NOSCRIPT","LOADING","STALE","SENTINEL","DENYOOM"],"arguments":[{"name":"channel","type":"string","multiple":true}]},{"id":"SUNION","group":"set","since":"1.0.0","arity":-2,"summary":"Returns the union of multiple sets.","flags":["READONLY"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"type":"array","description":"List with the members of the resulting set.","uniqueItems":true,"items":{"type":"string"}}},{"id":"SUNIONSTORE","group":"set","since":"1.0.0","arity":-3,"summary":"Stores the union of multiple sets in a key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destination","type":"key"},{"name":"key","type":"key","multiple":true}],"reply":{"type":"integer","description":"Number of the elements in the resulting set.","minimum":0}},{"id":"TIME","group":"server","since":"2.6.0","arity":1,"summary":"Returns the server time.","flags":["LOADING","STALE","FAST"],"arguments":[],"reply":{"type":"array","description":"Array containing two elements: Unix time in seconds and microseconds.","minItems":2,"maxItems":2,"items":{"type":"string","pattern":"[0-9]+"}}},{"id":"TOUCH","group":"generic","since":"3.2.1","arity":-2,"summary":"Returns the number of existing keys out of those specified after updating the time they were last accessed.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"description":"the number of touched keys","type":"integer","minimum":0}},{"id":"TTL","group":"generic","since":"1.0.0","arity":2,"summary":"Returns the expiration time in seconds of a key.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"description":"TTL in seconds.","type":"integer","minimum":0},{"description":"The key exists but has no associated expire.","const":-1},{"description":"The key does not exist.","const":-2}]}},{"id":"TYPE","group":"generic","since":"1.0.0","arity":2,"summary":"Determines the type of value stored at a key.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"oneOf":[{"description":"Key doesn't exist","type":"null"},{"description":"Type of the key","type":"string"}]}},{"id":"UNLINK","group":"generic","since":"4.0.0","arity":-2,"summary":"Asynchronously deletes one or more keys.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"description":"the number of keys that were unlinked","type":"integer","minimum":0}},{"id":"UNSUBSCRIBE","group":"pubsub","since":"2.0.0","arity":-1,"summary":"Stops listening to messages posted to channels.","flags":["PUBSUB","NOSCRIPT","LOADING","STALE","SENTINEL"],"arguments":[{"name":"channel","type":"string","optional":true,"multiple":true}]},{"id":"UNWATCH","group":"transactions","since":"2.2.0","arity":1,"summary":"Forgets about watched keys of a transaction.","flags":["NOSCRIPT","LOADING","STALE","FAST","ALLOW_BUSY"],"arguments":[],"reply":{"const":"OK"}},{"id":"WAIT","group":"generic","since":"3.0.0","arity":3,"summary":"Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.","flags":["BLOCKING"],"arguments":[{"name":"numreplicas","type":"integer"},{"name":"timeout","type":"integer"}],"reply":{"type":"integer","description":"The number of replicas reached by all the writes performed in the context of the current connection.","minimum":0}},{"id":"WAITAOF","group":"generic","since":"7.2.0","arity":4,"summary":"Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the master and/or replicas.","flags":["BLOCKING"],"arguments":[{"name":"numlocal","type":"integer"},{"name":"numreplicas","type":"integer"},{"name":"timeout","type":"integer"}],"reply":{"type":"array","description":"Number of local and remote AOF files in sync.","minItems":2,"maxItems":2,"items":[{"description":"Number of local AOF files.","type":"integer","minimum":0},{"description":"Number of replica AOF files.","type":"number","minimum":0}]}},{"id":"WATCH","group":"transactions","since":"2.2.0","arity":-2,"summary":"Monitors changes to keys to determine the execution of a transaction.","flags":["NOSCRIPT","LOADING","STALE","FAST","ALLOW_BUSY"],"arguments":[{"name":"key","type":"key","multiple":true}],"reply":{"const":"OK"}},{"id":"XACK","group":"stream","since":"5.0.0","arity":-4,"summary":"Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"group","type":"string"},{"name":"ID","type":"string","multiple":true}],"reply":{"description":"The command returns the number of messages successfully acknowledged. Certain message IDs may no longer be part of the PEL (for example because they have already been acknowledged), and XACK will not count them as successfully acknowledged.","type":"integer","minimum":0}},{"id":"XACKDEL","group":"stream","since":"8.2.0","arity":-6,"summary":"Acknowledges and deletes one or multiple messages for a stream consumer group.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"group","type":"string"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"keepref","type":"pure-token","token":"KEEPREF"},{"name":"delref","type":"pure-token","token":"DELREF"},{"name":"acked","type":"pure-token","token":"ACKED"}]},{"name":"ids","type":"block","token":"IDS","arguments":[{"name":"numids","type":"integer"},{"name":"id","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns an array with -1 for each requested ID if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The id does not exist in the provided stream key.","const":-1},{"description":"Entry was acknowledged and deleted from the stream.","const":1},{"description":"Entry was acknowledged but not deleted, there are still dangling references.","const":2}]}}},{"id":"XADD","group":"stream","since":"5.0.0","arity":-5,"summary":"Appends a new message to a stream. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"nomkstream","type":"pure-token","optional":true,"token":"NOMKSTREAM"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"keepref","type":"pure-token","token":"KEEPREF"},{"name":"delref","type":"pure-token","token":"DELREF"},{"name":"acked","type":"pure-token","token":"ACKED"}]},{"name":"trim","type":"block","optional":true,"arguments":[{"name":"strategy","type":"oneof","arguments":[{"name":"maxlen","type":"pure-token","token":"MAXLEN"},{"name":"minid","type":"pure-token","token":"MINID"}]},{"name":"operator","type":"oneof","optional":true,"arguments":[{"name":"equal","type":"pure-token","token":"="},{"name":"approximately","type":"pure-token","token":"~"}]},{"name":"threshold","type":"string"},{"name":"count","type":"integer","optional":true,"token":"LIMIT"}]},{"name":"id-selector","type":"oneof","arguments":[{"name":"auto-id","type":"pure-token","token":"*"},{"name":"id","type":"string"}]},{"name":"data","type":"block","multiple":true,"arguments":[{"name":"field","type":"string"},{"name":"value","type":"string"}]}],"reply":{"oneOf":[{"description":"The ID of the added entry. The ID is the one auto-generated if * is passed as ID argument, otherwise the command just returns the same ID specified by the user during insertion.","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"The NOMKSTREAM option is given and the key doesn't exist.","type":"null"}]}},{"id":"XAUTOCLAIM","group":"stream","since":"6.2.0","arity":-6,"summary":"Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"group","type":"string"},{"name":"consumer","type":"string"},{"name":"min-idle-time","type":"string"},{"name":"start","type":"string"},{"name":"count","type":"integer","optional":true,"token":"COUNT"},{"name":"justid","type":"pure-token","optional":true,"token":"JUSTID"}],"reply":{"anyOf":[{"description":"Claimed stream entries (with data, if `JUSTID` was not given).","type":"array","minItems":3,"maxItems":3,"items":[{"description":"Cursor for next call.","type":"string","pattern":"[0-9]+-[0-9]+"},{"type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Data","type":"array","items":{"type":"string"}}]}},{"description":"Entry IDs which no longer exist in the stream, and were deleted from the PEL in which they were found.","type":"array","items":{"type":"string","pattern":"[0-9]+-[0-9]+"}}]},{"description":"Claimed stream entries (without data, if `JUSTID` was given).","type":"array","minItems":3,"maxItems":3,"items":[{"description":"Cursor for next call.","type":"string","pattern":"[0-9]+-[0-9]+"},{"type":"array","uniqueItems":true,"items":{"type":"string","pattern":"[0-9]+-[0-9]+"}},{"description":"Entry IDs which no longer exist in the stream, and were deleted from the PEL in which they were found.","type":"array","items":{"type":"string","pattern":"[0-9]+-[0-9]+"}}]}]}},{"id":"XCLAIM","group":"stream","since":"5.0.0","arity":-6,"summary":"Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"group","type":"string"},{"name":"consumer","type":"string"},{"name":"min-idle-time","type":"string"},{"name":"ID","type":"string","multiple":true},{"name":"ms","type":"integer","optional":true,"token":"IDLE"},{"name":"unix-time-milliseconds","type":"unix-time","optional":true,"token":"TIME"},{"name":"count","type":"integer","optional":true,"token":"RETRYCOUNT"},{"name":"force","type":"pure-token","optional":true,"token":"FORCE"},{"name":"justid","type":"pure-token","optional":true,"token":"JUSTID"},{"name":"lastid","type":"string","optional":true,"token":"LASTID"}],"reply":{"description":"Stream entries with IDs matching the specified range.","anyOf":[{"description":"If JUSTID option is specified, return just an array of IDs of messages successfully claimed","type":"array","items":{"description":"Entry ID","type":"string","pattern":"[0-9]+-[0-9]+"}},{"description":"array of stream entries that contains each entry as an array of 2 elements, the Entry ID and the entry data itself","type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Data","type":"array","items":{"type":"string"}}]}}]}},{"id":"XDEL","group":"stream","since":"5.0.0","arity":-3,"summary":"Returns the number of messages after removing them from a stream.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"ID","type":"string","multiple":true}],"reply":{"description":"The number of entries actually deleted","type":"integer","minimum":0}},{"id":"XDELEX","group":"stream","since":"8.2.0","arity":-5,"summary":"Deletes one or multiple entries from the stream.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"keepref","type":"pure-token","token":"KEEPREF"},{"name":"delref","type":"pure-token","token":"DELREF"},{"name":"acked","type":"pure-token","token":"ACKED"}]},{"name":"ids","type":"block","token":"IDS","arguments":[{"name":"numids","type":"integer"},{"name":"id","type":"string","multiple":true}]}],"reply":{"description":"Array of results. Returns an array with -1 for each requested ID if the key does not exist.","type":"array","minItems":0,"maxItems":4294967295,"items":{"oneOf":[{"description":"The id does not exist in the provided stream key.","const":-1},{"description":"Entry was deleted from the stream.","const":1},{"description":"Entry was not deleted, but there are still dangling references.","const":2}]}}},{"id":"XGROUP","group":"stream","since":"5.0.0","arity":-2,"summary":"A container for consumer groups commands.","flags":[],"arguments":[]},{"id":"XINFO CONSUMERS","group":"stream","since":"5.0.0","arity":4,"summary":"Returns a list of the consumers in a consumer group.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"group","type":"string"}],"reply":{"description":"Array list of consumers","type":"array","uniqueItems":true,"items":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"pending":{"type":"integer"},"idle":{"type":"integer"},"inactive":{"type":"integer"}}}}},{"id":"XINFO GROUPS","group":"stream","since":"5.0.0","arity":3,"summary":"Returns a list of the consumer groups of a stream.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"}],"reply":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"consumers":{"type":"integer"},"pending":{"type":"integer"},"last-delivered-id":{"type":"string","pattern":"[0-9]+-[0-9]+"},"entries-read":{"oneOf":[{"type":"null"},{"type":"integer"}]},"lag":{"oneOf":[{"type":"null"},{"type":"integer"}]}}}}},{"id":"XINFO STREAM","group":"stream","since":"5.0.0","arity":-3,"summary":"Returns information about a stream.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"full-block","type":"block","optional":true,"arguments":[{"name":"full","type":"pure-token","token":"FULL"},{"name":"count","type":"integer","optional":true,"token":"COUNT"}]}],"reply":{"oneOf":[{"description":"Summary form, in case `FULL` was not given.","type":"object","additionalProperties":false,"properties":{"length":{"description":"the number of entries in the stream (see `XLEN`)","type":"integer"},"radix-tree-keys":{"description":"the number of keys in the underlying radix data structure","type":"integer"},"radix-tree-nodes":{"description":"the number of nodes in the underlying radix data structure","type":"integer"},"last-generated-id":{"description":"the ID of the least-recently entry that was added to the stream","type":"string","pattern":"[0-9]+-[0-9]+"},"max-deleted-entry-id":{"description":"the maximal entry ID that was deleted from the stream","type":"string","pattern":"[0-9]+-[0-9]+"},"recorded-first-entry-id":{"description":"cached copy of the first entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},"entries-added":{"description":"the count of all entries added to the stream during its lifetime","type":"integer"},"groups":{"description":"the number of consumer groups defined for the stream","type":"integer"},"first-entry":{"description":"the first entry of the stream","oneOf":[{"type":"null"},{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"data","type":"array","items":{"type":"string"}}]}]},"last-entry":{"description":"the last entry of the stream","oneOf":[{"type":"null"},{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"data","type":"array","items":{"type":"string"}}]}]}}},{"description":"Extended form, in case `FULL` was given.","type":"object","additionalProperties":false,"properties":{"length":{"description":"the number of entries in the stream (see `XLEN`)","type":"integer"},"radix-tree-keys":{"description":"the number of keys in the underlying radix data structure","type":"integer"},"radix-tree-nodes":{"description":"the number of nodes in the underlying radix data structure","type":"integer"},"last-generated-id":{"description":"the ID of the least-recently entry that was added to the stream","type":"string","pattern":"[0-9]+-[0-9]+"},"max-deleted-entry-id":{"description":"the maximal entry ID that was deleted from the stream","type":"string","pattern":"[0-9]+-[0-9]+"},"recorded-first-entry-id":{"description":"cached copy of the first entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},"entries-added":{"description":"the count of all entries added to the stream during its lifetime","type":"integer"},"entries":{"description":"all the entries of the stream","type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"data","type":"array","items":{"type":"string"}}]}},"groups":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"name":{"description":"group name","type":"string"},"last-delivered-id":{"description":"last entry ID that was delivered to a consumer","type":"string","pattern":"[0-9]+-[0-9]+"},"entries-read":{"description":"total number of entries ever read by consumers in the group","oneOf":[{"type":"null"},{"type":"integer"}]},"lag":{"description":"number of entries left to be consumed from the stream","oneOf":[{"type":"null"},{"type":"integer"}]},"pel-count":{"description":"total number of unacknowledged entries","type":"integer"},"pending":{"description":"data about all of the unacknowledged entries","type":"array","items":{"type":"array","minItems":4,"maxItems":4,"items":[{"description":"Entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Consumer name","type":"string"},{"description":"Delivery timestamp","type":"integer"},{"description":"Delivery count","type":"integer"}]}},"consumers":{"description":"data about all of the consumers of the group","type":"array","items":{"type":"object","additionalProperties":false,"properties":{"active-time":{"type":"integer","description":"Last time this consumer was active (successful reading/claiming).","minimum":0},"name":{"description":"consumer name","type":"string"},"seen-time":{"description":"timestamp of the last interaction attempt of the consumer","type":"integer","minimum":0},"pel-count":{"description":"number of unacknowledged entries that belong to the consumer","type":"integer"},"pending":{"description":"data about the unacknowledged entries","type":"array","items":{"type":"array","minItems":3,"maxItems":3,"items":[{"description":"Entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Delivery timestamp","type":"integer"},{"description":"Delivery count","type":"integer"}]}}}}}}}}}}]}},{"id":"XLEN","group":"stream","since":"5.0.0","arity":2,"summary":"Return the number of messages in a stream.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"description":"The number of entries of the stream at key","type":"integer","minimum":0}},{"id":"XPENDING","group":"stream","since":"5.0.0","arity":-3,"summary":"Returns the information and entries from a stream consumer group's pending entries list.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"group","type":"string"},{"name":"filters","type":"block","optional":true,"arguments":[{"name":"min-idle-time","type":"integer","optional":true,"token":"IDLE"},{"name":"start","type":"string"},{"name":"end","type":"string"},{"name":"count","type":"integer"},{"name":"consumer","type":"string","optional":true}]}],"reply":{"oneOf":[{"description":"Extended form, in case `start` was given.","type":"array","items":{"type":"array","minItems":4,"maxItems":4,"items":[{"description":"Entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Consumer name","type":"string"},{"description":"Idle time","type":"integer"},{"description":"Delivery count","type":"integer"}]}},{"description":"Summary form, in case `start` was not given.","type":"array","minItems":4,"maxItems":4,"items":[{"description":"Total number of pending messages","type":"integer"},{"description":"Minimal pending entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Maximal pending entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Consuers with pending messages","oneOf":[{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Consumer name","type":"string"},{"description":"Number of pending messages","type":"string"}]}},{"type":"null","description":"When there are no consumers with pending messages"}]}]},{"description":"Summary form, in case `start` was not given and there are no pending messages.","type":"array","minItems":4,"maxItems":4,"items":[{"description":"Total number of pending messages","const":0},{"type":"null"},{"type":"null"},{"type":"null"}]}]}},{"id":"XRANGE","group":"stream","since":"5.0.0","arity":-4,"summary":"Returns the messages from a stream within a range of IDs.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"start","type":"string"},{"name":"end","type":"string"},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"description":"Stream entries with IDs matching the specified range.","type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Entry ID","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Data","type":"array","items":{"type":"string"}}]}}},{"id":"XREAD","group":"stream","since":"5.0.0","arity":-4,"summary":"Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise.","flags":["BLOCKING","READONLY"],"arguments":[{"name":"count","type":"integer","optional":true,"token":"COUNT"},{"name":"milliseconds","type":"integer","optional":true,"token":"BLOCK"},{"name":"streams","type":"block","token":"STREAMS","arguments":[{"name":"key","type":"key","multiple":true},{"name":"ID","type":"string","multiple":true}]}],"reply":{"oneOf":[{"description":"A map of key-value elements when each element composed of key name and the entries reported for that key","type":"object","patternProperties":{"^.*$":{"description":"The entries reported for that key","type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"entry id","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"array of field-value pairs","type":"array","items":{"type":"string"}}]}}}},{"description":"If BLOCK option is given, and a timeout occurs, or there is no stream we can serve","type":"null"}]}},{"id":"XREADGROUP","group":"stream","since":"5.0.0","arity":-7,"summary":"Returns new or historical messages from a stream for a consumer in a group. Blocks until a message is available otherwise.","flags":["BLOCKING","WRITE"],"arguments":[{"name":"group-block","type":"block","token":"GROUP","arguments":[{"name":"group","type":"string"},{"name":"consumer","type":"string"}]},{"name":"count","type":"integer","optional":true,"token":"COUNT"},{"name":"milliseconds","type":"integer","optional":true,"token":"BLOCK"},{"name":"min-idle-time","type":"integer","optional":true,"token":"CLAIM"},{"name":"noack","type":"pure-token","optional":true,"token":"NOACK"},{"name":"streams","type":"block","token":"STREAMS","arguments":[{"name":"key","type":"key","multiple":true},{"name":"ID","type":"string","multiple":true}]}],"reply":{"oneOf":[{"description":"If BLOCK option is specified and the timeout expired","type":"null"},{"description":"A map of key-value elements when each element composed of key name and the entries reported for that key","type":"object","additionalProperties":{"description":"The entries reported for that key","type":"array","items":{"oneOf":[{"description":"Entry without CLAIM option","type":"array","minItems":2,"maxItems":2,"items":[{"description":"Stream id","type":"string","pattern":"[0-9]+-[0-9]+"},{"oneOf":[{"description":"Array of field-value pairs","type":"array","items":{"type":"string"}},{"type":"null"}]}]},{"description":"Entry with CLAIM option - includes elapsed milliseconds and delivery count","type":"array","minItems":4,"maxItems":4,"items":[{"description":"Stream id","type":"string","pattern":"[0-9]+-[0-9]+"},{"oneOf":[{"description":"Array of field-value pairs","type":"array","items":{"type":"string"}},{"type":"null"}]},{"description":"Milliseconds elapsed since last delivery","type":"integer"},{"description":"Delivery count (0 for new messages, 1+ for claimed messages)","type":"integer"}]}]}}}]}},{"id":"XREVRANGE","group":"stream","since":"5.0.0","arity":-4,"summary":"Returns the messages from a stream within a range of IDs in reverse order.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"end","type":"string"},{"name":"start","type":"string"},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"description":"An array of the entries with IDs matching the specified range","type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Stream id","type":"string","pattern":"[0-9]+-[0-9]+"},{"description":"Array of field-value pairs","type":"array","items":{"type":"string"}}]}}},{"id":"XTRIM","group":"stream","since":"5.0.0","arity":-4,"summary":"Deletes messages from the beginning of a stream.","flags":["WRITE"],"arguments":[{"name":"key","type":"key"},{"name":"trim","type":"block","arguments":[{"name":"strategy","type":"oneof","arguments":[{"name":"maxlen","type":"pure-token","token":"MAXLEN"},{"name":"minid","type":"pure-token","token":"MINID"}]},{"name":"operator","type":"oneof","optional":true,"arguments":[{"name":"equal","type":"pure-token","token":"="},{"name":"approximately","type":"pure-token","token":"~"}]},{"name":"threshold","type":"string"},{"name":"count","type":"integer","optional":true,"token":"LIMIT"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"keepref","type":"pure-token","token":"KEEPREF"},{"name":"delref","type":"pure-token","token":"DELREF"},{"name":"acked","type":"pure-token","token":"ACKED"}]}]}],"reply":{"description":"The number of entries deleted from the stream.","type":"integer","minimum":0}},{"id":"ZADD","group":"sorted_set","since":"1.2.0","arity":-4,"summary":"Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"condition","type":"oneof","optional":true,"arguments":[{"name":"nx","type":"pure-token","token":"NX"},{"name":"xx","type":"pure-token","token":"XX"}]},{"name":"comparison","type":"oneof","optional":true,"arguments":[{"name":"gt","type":"pure-token","token":"GT"},{"name":"lt","type":"pure-token","token":"LT"}]},{"name":"change","type":"pure-token","optional":true,"token":"CH"},{"name":"increment","type":"pure-token","optional":true,"token":"INCR"},{"name":"data","type":"block","multiple":true,"arguments":[{"name":"score","type":"double"},{"name":"member","type":"string"}]}],"reply":{"anyOf":[{"description":"Operation was aborted (conflict with one of the `XX`/`NX`/`LT`/`GT` options).","type":"null"},{"description":"The number of new members (when the `CH` option is not used)","type":"integer"},{"description":"The number of new or updated members (when the `CH` option is used)","type":"integer"},{"description":"The updated score of the member (when the `INCR` option is used)","type":"number"}]}},{"id":"ZCARD","group":"sorted_set","since":"1.2.0","arity":2,"summary":"Returns the number of members in a sorted set.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"}],"reply":{"description":"The cardinality (number of elements) of the sorted set, or 0 if key does not exist","type":"integer"}},{"id":"ZCOUNT","group":"sorted_set","since":"2.0.0","arity":4,"summary":"Returns the count of members in a sorted set that have scores within a range.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"min","type":"double"},{"name":"max","type":"double"}],"reply":{"description":"The number of elements in the specified score range","type":"integer"}},{"id":"ZDIFF","group":"sorted_set","since":"6.2.0","arity":-3,"summary":"Returns the difference between multiple sorted sets.","flags":["READONLY"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"}],"reply":{"anyOf":[{"description":"A list of members. Returned in case `WITHSCORES` was not used.","type":"array","items":{"type":"string"}},{"description":"Members and their scores. Returned in case `WITHSCORES` was used. In RESP2 this is returned as a flat array","type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Member","type":"string"},{"description":"Score","type":"number"}]}}]}},{"id":"ZDIFFSTORE","group":"sorted_set","since":"6.2.0","arity":-4,"summary":"Stores the difference of multiple sorted sets in a key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destination","type":"key"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true}],"reply":{"description":"Number of elements in the resulting sorted set at `destination`","type":"integer"}},{"id":"ZINCRBY","group":"sorted_set","since":"1.2.0","arity":4,"summary":"Increments the score of a member in a sorted set.","flags":["WRITE","DENYOOM","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"increment","type":"integer"},{"name":"member","type":"string"}],"reply":{"description":"The new score of `member`","type":"number"}},{"id":"ZINTER","group":"sorted_set","since":"6.2.0","arity":-3,"summary":"Returns the intersect of multiple sorted sets.","flags":["READONLY"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"weight","type":"integer","optional":true,"multiple":true,"token":"WEIGHTS"},{"name":"aggregate","type":"oneof","optional":true,"token":"AGGREGATE","arguments":[{"name":"sum","type":"pure-token","token":"SUM"},{"name":"min","type":"pure-token","token":"MIN"},{"name":"max","type":"pure-token","token":"MAX"}]},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"}],"reply":{"anyOf":[{"description":"Result of intersection, containing only the member names. Returned in case `WITHSCORES` was not used.","type":"array","items":{"type":"string"}},{"description":"Result of intersection, containing members and their scores. Returned in case `WITHSCORES` was used. In RESP2 this is returned as a flat array","type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Member","type":"string"},{"description":"Score","type":"number"}]}}]}},{"id":"ZINTERCARD","group":"sorted_set","since":"7.0.0","arity":-3,"summary":"Returns the number of members of the intersect of multiple sorted sets.","flags":["READONLY"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"limit","type":"integer","optional":true,"token":"LIMIT"}],"reply":{"description":"Number of elements in the resulting intersection.","type":"integer","minimum":0}},{"id":"ZINTERSTORE","group":"sorted_set","since":"2.0.0","arity":-4,"summary":"Stores the intersect of multiple sorted sets in a key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destination","type":"key"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"weight","type":"integer","optional":true,"multiple":true,"token":"WEIGHTS"},{"name":"aggregate","type":"oneof","optional":true,"token":"AGGREGATE","arguments":[{"name":"sum","type":"pure-token","token":"SUM"},{"name":"min","type":"pure-token","token":"MIN"},{"name":"max","type":"pure-token","token":"MAX"}]}],"reply":{"description":"Number of elements in the resulting sorted set.","type":"integer","minimum":0}},{"id":"ZLEXCOUNT","group":"sorted_set","since":"2.8.9","arity":4,"summary":"Returns the number of members in a sorted set within a lexicographical range.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"min","type":"string"},{"name":"max","type":"string"}],"reply":{"description":"Number of elements in the specified score range.","type":"integer","minimum":0}},{"id":"ZMPOP","group":"sorted_set","since":"7.0.0","arity":-4,"summary":"Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped.","flags":["WRITE"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"where","type":"oneof","arguments":[{"name":"min","type":"pure-token","token":"MIN"},{"name":"max","type":"pure-token","token":"MAX"}]},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"oneOf":[{"description":"No element could be popped.","type":"null"},{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string","description":"Name of the key that elements were popped."},{"type":"array","description":"Popped elements.","items":{"type":"array","uniqueItems":true,"minItems":2,"maxItems":2,"items":[{"type":"string","description":"Name of the member."},{"type":"number","description":"Score."}]}}]}]}},{"id":"ZMSCORE","group":"sorted_set","since":"6.2.0","arity":-3,"summary":"Returns the score of one or more members in a sorted set.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string","multiple":true}],"reply":{"type":"array","minItems":1,"items":{"oneOf":[{"type":"number","description":"The score of the member (a double precision floating point number). In RESP2, this is returned as string."},{"type":"null","description":"Member does not exist in the sorted set."}]}}},{"id":"ZPOPMAX","group":"sorted_set","since":"5.0.0","arity":-2,"summary":"Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer","optional":true}],"reply":{"anyOf":[{"type":"array","description":"List of popped elements and scores when 'COUNT' isn't specified.","minItems":2,"maxItems":2,"items":[{"type":"string","description":"Popped element."},{"type":"number","description":"Score."}]},{"type":"array","description":"List of popped elements and scores when 'COUNT' is specified.","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string","description":"Popped element."},{"type":"number","description":"Score."}]}}]}},{"id":"ZPOPMIN","group":"sorted_set","since":"5.0.0","arity":-2,"summary":"Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"count","type":"integer","optional":true}],"reply":{"anyOf":[{"type":"array","description":"List of popped elements and scores when 'COUNT' isn't specified.","minItems":2,"maxItems":2,"items":[{"type":"string","description":"Popped element."},{"type":"number","description":"Score."}]},{"type":"array","description":"List of popped elements and scores when 'COUNT' is specified.","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string","description":"Popped element."},{"type":"number","description":"Score."}]}}]}},{"id":"ZRANDMEMBER","group":"sorted_set","since":"6.2.0","arity":-2,"summary":"Returns one or more random members from a sorted set.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"options","type":"block","optional":true,"arguments":[{"name":"count","type":"integer"},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"}]}],"reply":{"anyOf":[{"type":"null","description":"Key does not exist."},{"type":"string","description":"Randomly selected element when 'COUNT' is not used."},{"type":"array","description":"Randomly selected elements when 'COUNT' is used.","items":{"type":"string"}},{"type":"array","description":"Randomly selected elements when 'COUNT' and 'WITHSCORES' modifiers are used.","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string","description":"Element."},{"type":"number","description":"Score."}]}}]}},{"id":"ZRANGE","group":"sorted_set","since":"1.2.0","arity":-4,"summary":"Returns members in a sorted set within a range of indexes.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"start","type":"string"},{"name":"stop","type":"string"},{"name":"sortby","type":"oneof","optional":true,"arguments":[{"name":"byscore","type":"pure-token","token":"BYSCORE"},{"name":"bylex","type":"pure-token","token":"BYLEX"}]},{"name":"rev","type":"pure-token","optional":true,"token":"REV"},{"name":"limit","type":"block","optional":true,"token":"LIMIT","arguments":[{"name":"offset","type":"integer"},{"name":"count","type":"integer"}]},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"}],"reply":{"anyOf":[{"description":"A list of member elements","type":"array","uniqueItems":true,"items":{"type":"string"}},{"description":"Members and their scores. Returned in case `WITHSCORES` was used. In RESP2 this is returned as a flat array","type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"Member","type":"string"},{"description":"Score","type":"number"}]}}]}},{"id":"ZRANGEBYLEX","group":"sorted_set","since":"2.8.9","arity":-4,"summary":"Returns members in a sorted set within a lexicographical range.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"min","type":"string"},{"name":"max","type":"string"},{"name":"limit","type":"block","optional":true,"token":"LIMIT","arguments":[{"name":"offset","type":"integer"},{"name":"count","type":"integer"}]}],"reply":{"type":"array","description":"List of elements in the specified score range.","uniqueItems":true,"items":{"type":"string"}}},{"id":"ZRANGEBYSCORE","group":"sorted_set","since":"1.0.5","arity":-4,"summary":"Returns members in a sorted set within a range of scores.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"min","type":"double"},{"name":"max","type":"double"},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"},{"name":"limit","type":"block","optional":true,"token":"LIMIT","arguments":[{"name":"offset","type":"integer"},{"name":"count","type":"integer"}]}],"reply":{"anyOf":[{"type":"array","description":"List of the elements in the specified score range, as not WITHSCORES","uniqueItems":true,"items":{"type":"string","description":"Element"}},{"type":"array","description":"List of the elements and their scores in the specified score range, as WITHSCORES used","uniqueItems":true,"items":{"type":"array","description":"Tuple of element and its score","minItems":2,"maxItems":2,"items":[{"description":"element","type":"string"},{"description":"score","type":"number"}]}}]}},{"id":"ZRANGESTORE","group":"sorted_set","since":"6.2.0","arity":-5,"summary":"Stores a range of members from sorted set in a key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"dst","type":"key"},{"name":"src","type":"key"},{"name":"min","type":"string"},{"name":"max","type":"string"},{"name":"sortby","type":"oneof","optional":true,"arguments":[{"name":"byscore","type":"pure-token","token":"BYSCORE"},{"name":"bylex","type":"pure-token","token":"BYLEX"}]},{"name":"rev","type":"pure-token","optional":true,"token":"REV"},{"name":"limit","type":"block","optional":true,"token":"LIMIT","arguments":[{"name":"offset","type":"integer"},{"name":"count","type":"integer"}]}],"reply":{"type":"integer","description":"Number of elements in the resulting sorted set."}},{"id":"ZRANK","group":"sorted_set","since":"2.0.0","arity":-3,"summary":"Returns the index of a member in a sorted set ordered by ascending scores.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string"},{"name":"withscore","type":"pure-token","optional":true,"token":"WITHSCORE"}],"reply":{"oneOf":[{"type":"null","description":"Key does not exist or the member does not exist in the sorted set."},{"type":"integer","description":"The rank of the member when 'WITHSCORE' is not used."},{"type":"array","description":"The rank and score of the member when 'WITHSCORE' is used.","minItems":2,"maxItems":2,"items":[{"type":"integer"},{"type":"number"}]}]}},{"id":"ZREM","group":"sorted_set","since":"1.2.0","arity":-3,"summary":"Removes one or more members from a sorted set. Deletes the sorted set if all members were removed.","flags":["WRITE","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string","multiple":true}],"reply":{"description":"The number of members removed from the sorted set, not including non existing members.","type":"integer","minimum":0}},{"id":"ZREMRANGEBYLEX","group":"sorted_set","since":"2.8.9","arity":4,"summary":"Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed.","flags":["WRITE"],"arguments":[{"name":"key","type":"key"},{"name":"min","type":"string"},{"name":"max","type":"string"}],"reply":{"type":"integer","description":"Number of elements removed."}},{"id":"ZREMRANGEBYRANK","group":"sorted_set","since":"2.0.0","arity":4,"summary":"Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed.","flags":["WRITE"],"arguments":[{"name":"key","type":"key"},{"name":"start","type":"integer"},{"name":"stop","type":"integer"}],"reply":{"type":"integer","description":"Number of elements removed."}},{"id":"ZREMRANGEBYSCORE","group":"sorted_set","since":"1.2.0","arity":4,"summary":"Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed.","flags":["WRITE"],"arguments":[{"name":"key","type":"key"},{"name":"min","type":"double"},{"name":"max","type":"double"}],"reply":{"type":"integer","description":"Number of elements removed."}},{"id":"ZREVRANGE","group":"sorted_set","since":"1.2.0","arity":-4,"summary":"Returns members in a sorted set within a range of indexes in reverse order.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"start","type":"integer"},{"name":"stop","type":"integer"},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"}],"reply":{"anyOf":[{"description":"List of member elements.","type":"array","uniqueItems":true,"items":{"type":"string"}},{"description":"List of the members and their scores. Returned in case `WITHSCORES` was used.","type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"description":"member","type":"string"},{"description":"score","type":"number"}]}}]}},{"id":"ZREVRANGEBYLEX","group":"sorted_set","since":"2.8.9","arity":-4,"summary":"Returns members in a sorted set within a lexicographical range in reverse order.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"max","type":"string"},{"name":"min","type":"string"},{"name":"limit","type":"block","optional":true,"token":"LIMIT","arguments":[{"name":"offset","type":"integer"},{"name":"count","type":"integer"}]}],"reply":{"type":"array","description":"List of the elements in the specified score range.","uniqueItems":true,"items":{"type":"string"}}},{"id":"ZREVRANGEBYSCORE","group":"sorted_set","since":"2.2.0","arity":-4,"summary":"Returns members in a sorted set within a range of scores in reverse order.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"max","type":"double"},{"name":"min","type":"double"},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"},{"name":"limit","type":"block","optional":true,"token":"LIMIT","arguments":[{"name":"offset","type":"integer"},{"name":"count","type":"integer"}]}],"reply":{"anyOf":[{"type":"array","description":"List of the elements in the specified score range, as not WITHSCORES","uniqueItems":true,"items":{"type":"string","description":"Element"}},{"type":"array","description":"List of the elements and their scores in the specified score range, as WITHSCORES used","uniqueItems":true,"items":{"type":"array","description":"Tuple of element and its score","minItems":2,"maxItems":2,"items":[{"type":"string","description":"element"},{"type":"number","description":"score"}]}}]}},{"id":"ZREVRANK","group":"sorted_set","since":"2.0.0","arity":-3,"summary":"Returns the index of a member in a sorted set ordered by descending scores.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string"},{"name":"withscore","type":"pure-token","optional":true,"token":"WITHSCORE"}],"reply":{"oneOf":[{"type":"null","description":"Key does not exist or the member does not exist in the sorted set."},{"type":"integer","description":"The rank of the member when 'WITHSCORE' is not used."},{"type":"array","description":"The rank and score of the member when 'WITHSCORE' is used.","minItems":2,"maxItems":2,"items":[{"type":"integer"},{"type":"number"}]}]}},{"id":"ZSCAN","group":"sorted_set","since":"2.8.0","arity":-3,"summary":"Iterates over members and scores of a sorted set.","flags":["READONLY"],"arguments":[{"name":"key","type":"key"},{"name":"cursor","type":"integer"},{"name":"pattern","type":"pattern","optional":true,"token":"MATCH"},{"name":"count","type":"integer","optional":true,"token":"COUNT"}],"reply":{"description":"cursor and scan response in array form","type":"array","minItems":2,"maxItems":2,"items":[{"description":"cursor","type":"string"},{"description":"list of elements of the sorted set, where each even element is the member, and each odd value is its associated score","type":"array","items":{"type":"string"}}]}},{"id":"ZSCORE","group":"sorted_set","since":"1.2.0","arity":3,"summary":"Returns the score of a member in a sorted set.","flags":["READONLY","FAST"],"arguments":[{"name":"key","type":"key"},{"name":"member","type":"string"}],"reply":{"oneOf":[{"type":"number","description":"The score of the member (a double precision floating point number). In RESP2, this is returned as string."},{"type":"null","description":"Member does not exist in the sorted set, or key does not exist."}]}},{"id":"ZUNION","group":"sorted_set","since":"6.2.0","arity":-3,"summary":"Returns the union of multiple sorted sets.","flags":["READONLY"],"arguments":[{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"weight","type":"integer","optional":true,"multiple":true,"token":"WEIGHTS"},{"name":"aggregate","type":"oneof","optional":true,"token":"AGGREGATE","arguments":[{"name":"sum","type":"pure-token","token":"SUM"},{"name":"min","type":"pure-token","token":"MIN"},{"name":"max","type":"pure-token","token":"MAX"}]},{"name":"withscores","type":"pure-token","optional":true,"token":"WITHSCORES"}],"reply":{"anyOf":[{"description":"The result of union when 'WITHSCORES' is not used.","type":"array","uniqueItems":true,"items":{"type":"string"}},{"description":"The result of union when 'WITHSCORES' is used.","type":"array","uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"number"}]}}]}},{"id":"ZUNIONSTORE","group":"sorted_set","since":"2.0.0","arity":-4,"summary":"Stores the union of multiple sorted sets in a key.","flags":["WRITE","DENYOOM"],"arguments":[{"name":"destination","type":"key"},{"name":"numkeys","type":"integer"},{"name":"key","type":"key","multiple":true},{"name":"weight","type":"integer","optional":true,"multiple":true,"token":"WEIGHTS"},{"name":"aggregate","type":"oneof","optional":true,"token":"AGGREGATE","arguments":[{"name":"sum","type":"pure-token","token":"SUM"},{"name":"min","type":"pure-token","token":"MIN"},{"name":"max","type":"pure-token","token":"MAX"}]}],"reply":{"description":"The number of elements in the resulting sorted set.","type":"integer"}}]}