@eventmodelers/node-kit 0.0.2

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 (546) hide show
  1. package/README.md +66 -0
  2. package/package.json +36 -0
  3. package/src/cli.js +176 -0
  4. package/templates/.claude/skills/connect/SKILL.md +169 -0
  5. package/templates/.claude/skills/load-slice/SKILL.md +86 -0
  6. package/templates/realtime-agent/node_modules/.package-lock.json +107 -0
  7. package/templates/realtime-agent/node_modules/@supabase/auth-js/LICENSE +21 -0
  8. package/templates/realtime-agent/node_modules/@supabase/auth-js/README.md +190 -0
  9. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts +4 -0
  10. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts.map +1 -0
  11. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js +7 -0
  12. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js.map +1 -0
  13. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts +4 -0
  14. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts.map +1 -0
  15. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js +7 -0
  16. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js.map +1 -0
  17. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts +716 -0
  18. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts.map +1 -0
  19. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js +1108 -0
  20. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js.map +1 -0
  21. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts +2473 -0
  22. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts.map +1 -0
  23. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js +5217 -0
  24. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js.map +1 -0
  25. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts +9 -0
  26. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts.map +1 -0
  27. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js +20 -0
  28. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js.map +1 -0
  29. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts +76 -0
  30. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts.map +1 -0
  31. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js +269 -0
  32. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js.map +1 -0
  33. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts +26 -0
  34. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts.map +1 -0
  35. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js +31 -0
  36. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js.map +1 -0
  37. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts +7 -0
  38. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts.map +1 -0
  39. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js +3 -0
  40. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js.map +1 -0
  41. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts +258 -0
  42. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts.map +1 -0
  43. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js +290 -0
  44. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js.map +1 -0
  45. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts +54 -0
  46. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts.map +1 -0
  47. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js +200 -0
  48. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js.map +1 -0
  49. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts +94 -0
  50. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts.map +1 -0
  51. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js +406 -0
  52. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js.map +1 -0
  53. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts +9 -0
  54. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts.map +1 -0
  55. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js +21 -0
  56. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js.map +1 -0
  57. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts +107 -0
  58. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts.map +1 -0
  59. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js +349 -0
  60. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js.map +1 -0
  61. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts +5 -0
  62. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts.map +1 -0
  63. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js +29 -0
  64. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js.map +1 -0
  65. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts +2498 -0
  66. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts.map +1 -0
  67. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js +23 -0
  68. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js.map +1 -0
  69. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts +2 -0
  70. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts.map +1 -0
  71. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js +11 -0
  72. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js.map +1 -0
  73. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts +96 -0
  74. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts.map +1 -0
  75. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js +66 -0
  76. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js.map +1 -0
  77. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts +160 -0
  78. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts.map +1 -0
  79. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js +4 -0
  80. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js.map +1 -0
  81. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts +284 -0
  82. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts.map +1 -0
  83. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts +583 -0
  84. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts.map +1 -0
  85. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js +4 -0
  86. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js.map +1 -0
  87. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts +85 -0
  88. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts.map +1 -0
  89. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js +272 -0
  90. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js.map +1 -0
  91. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js +707 -0
  92. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js.map +1 -0
  93. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts +4 -0
  94. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts.map +1 -0
  95. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js +4 -0
  96. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js.map +1 -0
  97. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts +4 -0
  98. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts.map +1 -0
  99. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js +4 -0
  100. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js.map +1 -0
  101. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts +716 -0
  102. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts.map +1 -0
  103. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js +1105 -0
  104. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js.map +1 -0
  105. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts +2473 -0
  106. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts.map +1 -0
  107. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js +5214 -0
  108. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js.map +1 -0
  109. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts +9 -0
  110. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts.map +1 -0
  111. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js +9 -0
  112. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js.map +1 -0
  113. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts +76 -0
  114. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts.map +1 -0
  115. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js +257 -0
  116. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js.map +1 -0
  117. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts +26 -0
  118. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts.map +1 -0
  119. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js +28 -0
  120. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js.map +1 -0
  121. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts +7 -0
  122. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts.map +1 -0
  123. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js +2 -0
  124. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js.map +1 -0
  125. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts +258 -0
  126. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts.map +1 -0
  127. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js +267 -0
  128. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js.map +1 -0
  129. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts +54 -0
  130. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts.map +1 -0
  131. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js +190 -0
  132. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js.map +1 -0
  133. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts +94 -0
  134. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts.map +1 -0
  135. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js +378 -0
  136. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js.map +1 -0
  137. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts +9 -0
  138. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts.map +1 -0
  139. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js +18 -0
  140. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js.map +1 -0
  141. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts +107 -0
  142. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts.map +1 -0
  143. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js +341 -0
  144. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js.map +1 -0
  145. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts +5 -0
  146. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts.map +1 -0
  147. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js +26 -0
  148. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js.map +1 -0
  149. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts +2498 -0
  150. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts.map +1 -0
  151. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js +20 -0
  152. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js.map +1 -0
  153. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts +2 -0
  154. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts.map +1 -0
  155. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js +8 -0
  156. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js.map +1 -0
  157. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts +96 -0
  158. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts.map +1 -0
  159. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js +60 -0
  160. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js.map +1 -0
  161. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts +160 -0
  162. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts.map +1 -0
  163. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js +3 -0
  164. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js.map +1 -0
  165. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts +284 -0
  166. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts.map +1 -0
  167. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts +583 -0
  168. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts.map +1 -0
  169. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js +3 -0
  170. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js.map +1 -0
  171. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts +85 -0
  172. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts.map +1 -0
  173. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js +264 -0
  174. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js.map +1 -0
  175. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js +689 -0
  176. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js.map +1 -0
  177. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.module.tsbuildinfo +1 -0
  178. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.tsbuildinfo +1 -0
  179. package/templates/realtime-agent/node_modules/@supabase/auth-js/package.json +44 -0
  180. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthAdminApi.ts +5 -0
  181. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthClient.ts +5 -0
  182. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueAdminApi.ts +1267 -0
  183. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueClient.ts +6360 -0
  184. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/index.ts +13 -0
  185. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/base64url.ts +308 -0
  186. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/constants.ts +34 -0
  187. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/error-codes.ts +90 -0
  188. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/errors.ts +359 -0
  189. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/fetch.ts +320 -0
  190. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/helpers.ts +476 -0
  191. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/local-storage.ts +21 -0
  192. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/locks.ts +420 -0
  193. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/polyfills.ts +23 -0
  194. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/types.ts +2917 -0
  195. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/version.ts +7 -0
  196. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/ethereum.ts +184 -0
  197. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/solana.ts +186 -0
  198. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.dom.ts +636 -0
  199. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.errors.ts +329 -0
  200. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.ts +946 -0
  201. package/templates/realtime-agent/node_modules/@supabase/functions-js/README.md +134 -0
  202. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts +177 -0
  203. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts.map +1 -0
  204. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js +309 -0
  205. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js.map +1 -0
  206. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts +3 -0
  207. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts.map +1 -0
  208. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js +11 -0
  209. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js.map +1 -0
  210. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts +3 -0
  211. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts.map +1 -0
  212. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js +12 -0
  213. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js.map +1 -0
  214. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts +122 -0
  215. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts.map +1 -0
  216. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js +98 -0
  217. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js.map +1 -0
  218. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts +2 -0
  219. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts.map +1 -0
  220. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js +11 -0
  221. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js.map +1 -0
  222. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts +177 -0
  223. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts.map +1 -0
  224. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js +305 -0
  225. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js.map +1 -0
  226. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts +3 -0
  227. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts.map +1 -0
  228. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js +7 -0
  229. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js.map +1 -0
  230. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts +3 -0
  231. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts.map +1 -0
  232. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js +3 -0
  233. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js.map +1 -0
  234. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts +122 -0
  235. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts.map +1 -0
  236. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js +91 -0
  237. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js.map +1 -0
  238. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts +2 -0
  239. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts.map +1 -0
  240. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js +8 -0
  241. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js.map +1 -0
  242. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.module.tsbuildinfo +1 -0
  243. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.tsbuildinfo +1 -0
  244. package/templates/realtime-agent/node_modules/@supabase/functions-js/package.json +52 -0
  245. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/FunctionsClient.ts +335 -0
  246. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/edge-runtime.d.ts +214 -0
  247. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/helper.ts +8 -0
  248. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/index.ts +10 -0
  249. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/types.ts +146 -0
  250. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/version.ts +7 -0
  251. package/templates/realtime-agent/node_modules/@supabase/phoenix/LICENSE.md +22 -0
  252. package/templates/realtime-agent/node_modules/@supabase/phoenix/README.md +121 -0
  253. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/ajax.js +116 -0
  254. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/channel.js +331 -0
  255. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/constants.js +35 -0
  256. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/index.js +212 -0
  257. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/longpoll.js +192 -0
  258. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/presence.js +208 -0
  259. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/push.js +134 -0
  260. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/serializer.js +133 -0
  261. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/socket.js +756 -0
  262. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/timer.js +48 -0
  263. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/types.js +184 -0
  264. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/utils.js +16 -0
  265. package/templates/realtime-agent/node_modules/@supabase/phoenix/package.json +58 -0
  266. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/favicon.ico +0 -0
  267. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix-orange.png +0 -0
  268. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js +1825 -0
  269. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js.map +7 -0
  270. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.js +1847 -0
  271. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.min.js +2 -0
  272. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs +1802 -0
  273. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs.map +7 -0
  274. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.png +0 -0
  275. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts +10 -0
  276. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts.map +1 -0
  277. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts +167 -0
  278. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts.map +1 -0
  279. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts +36 -0
  280. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts.map +1 -0
  281. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts +10 -0
  282. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts.map +1 -0
  283. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts +29 -0
  284. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts.map +1 -0
  285. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts +107 -0
  286. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts.map +1 -0
  287. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts +70 -0
  288. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts.map +1 -0
  289. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts +74 -0
  290. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts.map +1 -0
  291. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts +291 -0
  292. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts.map +1 -0
  293. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts +36 -0
  294. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts.map +1 -0
  295. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts +280 -0
  296. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts.map +1 -0
  297. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts +2 -0
  298. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts.map +1 -0
  299. package/templates/realtime-agent/node_modules/@supabase/phoenix/tsconfig.json +20 -0
  300. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/README.md +213 -0
  301. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs +5025 -0
  302. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs.map +1 -0
  303. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts +3828 -0
  304. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts.map +1 -0
  305. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts +3828 -0
  306. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts.map +1 -0
  307. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs +5017 -0
  308. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs.map +1 -0
  309. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/package.json +69 -0
  310. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestBuilder.ts +688 -0
  311. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestClient.ts +447 -0
  312. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestError.ts +41 -0
  313. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestFilterBuilder.ts +2137 -0
  314. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestQueryBuilder.ts +1703 -0
  315. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestTransformBuilder.ts +981 -0
  316. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/constants.ts +2 -0
  317. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/index.ts +34 -0
  318. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/parser.ts +476 -0
  319. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/result.ts +550 -0
  320. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/types.ts +129 -0
  321. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/utils.ts +704 -0
  322. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/common.ts +83 -0
  323. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/rpc.ts +148 -0
  324. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/feature-flags.ts +17 -0
  325. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/types.ts +161 -0
  326. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/version.ts +7 -0
  327. package/templates/realtime-agent/node_modules/@supabase/realtime-js/README.md +326 -0
  328. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts +442 -0
  329. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts.map +1 -0
  330. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js +719 -0
  331. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js.map +1 -0
  332. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts +275 -0
  333. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts.map +1 -0
  334. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js +697 -0
  335. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js.map +1 -0
  336. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts +62 -0
  337. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts.map +1 -0
  338. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js +43 -0
  339. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js.map +1 -0
  340. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts +6 -0
  341. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts.map +1 -0
  342. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js +18 -0
  343. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js.map +1 -0
  344. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts +43 -0
  345. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts.map +1 -0
  346. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js +43 -0
  347. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js.map +1 -0
  348. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts +10 -0
  349. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts.map +1 -0
  350. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js +29 -0
  351. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js.map +1 -0
  352. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts +33 -0
  353. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts.map +1 -0
  354. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js +155 -0
  355. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js.map +1 -0
  356. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts +109 -0
  357. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts.map +1 -0
  358. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js +241 -0
  359. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js.map +1 -0
  360. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts +2 -0
  361. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts.map +1 -0
  362. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js +11 -0
  363. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js.map +1 -0
  364. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts +82 -0
  365. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts.map +1 -0
  366. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js +130 -0
  367. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js.map +1 -0
  368. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts +32 -0
  369. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts.map +1 -0
  370. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js +103 -0
  371. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js.map +1 -0
  372. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts +53 -0
  373. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts.map +1 -0
  374. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js +93 -0
  375. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js.map +1 -0
  376. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts +38 -0
  377. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts.map +1 -0
  378. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js +114 -0
  379. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js.map +1 -0
  380. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts +5 -0
  381. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts.map +1 -0
  382. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js +3 -0
  383. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js.map +1 -0
  384. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts +442 -0
  385. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts.map +1 -0
  386. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js +714 -0
  387. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js.map +1 -0
  388. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts +275 -0
  389. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts.map +1 -0
  390. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js +693 -0
  391. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js.map +1 -0
  392. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts +62 -0
  393. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts.map +1 -0
  394. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js +38 -0
  395. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js.map +1 -0
  396. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts +6 -0
  397. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts.map +1 -0
  398. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js +6 -0
  399. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js.map +1 -0
  400. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts +43 -0
  401. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts.map +1 -0
  402. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js +40 -0
  403. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js.map +1 -0
  404. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts +10 -0
  405. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts.map +1 -0
  406. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js +26 -0
  407. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js.map +1 -0
  408. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts +33 -0
  409. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts.map +1 -0
  410. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js +152 -0
  411. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js.map +1 -0
  412. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts +109 -0
  413. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts.map +1 -0
  414. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js +229 -0
  415. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js.map +1 -0
  416. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts +2 -0
  417. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts.map +1 -0
  418. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js +8 -0
  419. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js.map +1 -0
  420. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts +82 -0
  421. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts.map +1 -0
  422. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js +126 -0
  423. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js.map +1 -0
  424. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts +32 -0
  425. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts.map +1 -0
  426. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js +100 -0
  427. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js.map +1 -0
  428. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts +53 -0
  429. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts.map +1 -0
  430. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js +90 -0
  431. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js.map +1 -0
  432. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts +38 -0
  433. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts.map +1 -0
  434. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js +111 -0
  435. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js.map +1 -0
  436. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts +5 -0
  437. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts.map +1 -0
  438. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js +2 -0
  439. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js.map +1 -0
  440. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.module.tsbuildinfo +1 -0
  441. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.tsbuildinfo +1 -0
  442. package/templates/realtime-agent/node_modules/@supabase/realtime-js/package.json +58 -0
  443. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeChannel.ts +1118 -0
  444. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeClient.ts +868 -0
  445. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimePresence.ts +71 -0
  446. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/index.ts +53 -0
  447. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/constants.ts +62 -0
  448. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/normalizeChannelError.ts +30 -0
  449. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/serializer.ts +203 -0
  450. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/transformers.ts +270 -0
  451. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/version.ts +7 -0
  452. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/websocket-factory.ts +204 -0
  453. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/channelAdapter.ts +149 -0
  454. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/presenceAdapter.ts +116 -0
  455. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/socketAdapter.ts +168 -0
  456. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/types.ts +32 -0
  457. package/templates/realtime-agent/node_modules/@supabase/storage-js/README.md +1262 -0
  458. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs +2995 -0
  459. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs.map +1 -0
  460. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts +2956 -0
  461. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts.map +1 -0
  462. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts +2956 -0
  463. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts.map +1 -0
  464. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs +2979 -0
  465. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs.map +1 -0
  466. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/umd/supabase.js +1 -0
  467. package/templates/realtime-agent/node_modules/@supabase/storage-js/package.json +62 -0
  468. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/StorageClient.ts +98 -0
  469. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/index.ts +19 -0
  470. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/BaseApiClient.ts +104 -0
  471. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/errors.ts +160 -0
  472. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/fetch.ts +303 -0
  473. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/headers.ts +43 -0
  474. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/helpers.ts +146 -0
  475. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/constants.ts +4 -0
  476. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/types.ts +654 -0
  477. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/version.ts +7 -0
  478. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/BlobDownloadBuilder.ts +62 -0
  479. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageAnalyticsClient.ts +420 -0
  480. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageBucketApi.ts +414 -0
  481. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageFileApi.ts +1423 -0
  482. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageVectorsClient.ts +644 -0
  483. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StreamDownloadBuilder.ts +39 -0
  484. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorBucketApi.ts +73 -0
  485. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorDataApi.ts +98 -0
  486. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorIndexApi.ts +90 -0
  487. package/templates/realtime-agent/node_modules/@supabase/supabase-js/README.md +238 -0
  488. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs +89 -0
  489. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs.map +1 -0
  490. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts +58 -0
  491. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts.map +1 -0
  492. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts +58 -0
  493. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts.map +1 -0
  494. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs +88 -0
  495. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs.map +1 -0
  496. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs +660 -0
  497. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs.map +1 -0
  498. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts +616 -0
  499. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts.map +1 -0
  500. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts +616 -0
  501. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts.map +1 -0
  502. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs +607 -0
  503. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs.map +1 -0
  504. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/umd/supabase.js +24 -0
  505. package/templates/realtime-agent/node_modules/@supabase/supabase-js/package.json +122 -0
  506. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/SupabaseClient.ts +625 -0
  507. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/cors.ts +84 -0
  508. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/index.ts +106 -0
  509. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/SupabaseAuthClient.ts +8 -0
  510. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/constants.ts +35 -0
  511. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/fetch.ts +36 -0
  512. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/helpers.ts +98 -0
  513. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/common.ts +93 -0
  514. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/rpc.ts +158 -0
  515. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/types.ts +196 -0
  516. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/version.ts +7 -0
  517. package/templates/realtime-agent/node_modules/iceberg-js/LICENSE +21 -0
  518. package/templates/realtime-agent/node_modules/iceberg-js/README.md +439 -0
  519. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs +596 -0
  520. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs.map +1 -0
  521. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.cts +547 -0
  522. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.ts +547 -0
  523. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs +587 -0
  524. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs.map +1 -0
  525. package/templates/realtime-agent/node_modules/iceberg-js/package.json +77 -0
  526. package/templates/realtime-agent/node_modules/tslib/CopyrightNotice.txt +15 -0
  527. package/templates/realtime-agent/node_modules/tslib/LICENSE.txt +12 -0
  528. package/templates/realtime-agent/node_modules/tslib/README.md +164 -0
  529. package/templates/realtime-agent/node_modules/tslib/SECURITY.md +41 -0
  530. package/templates/realtime-agent/node_modules/tslib/modules/index.d.ts +38 -0
  531. package/templates/realtime-agent/node_modules/tslib/modules/index.js +70 -0
  532. package/templates/realtime-agent/node_modules/tslib/modules/package.json +3 -0
  533. package/templates/realtime-agent/node_modules/tslib/package.json +47 -0
  534. package/templates/realtime-agent/node_modules/tslib/tslib.d.ts +460 -0
  535. package/templates/realtime-agent/node_modules/tslib/tslib.es6.html +1 -0
  536. package/templates/realtime-agent/node_modules/tslib/tslib.es6.js +402 -0
  537. package/templates/realtime-agent/node_modules/tslib/tslib.es6.mjs +401 -0
  538. package/templates/realtime-agent/node_modules/tslib/tslib.html +1 -0
  539. package/templates/realtime-agent/node_modules/tslib/tslib.js +484 -0
  540. package/templates/realtime-agent/package-lock.json +114 -0
  541. package/templates/realtime-agent/package.json +11 -0
  542. package/templates/realtime-agent/src/index.js +152 -0
  543. package/templates/root/AGENT.md +37 -0
  544. package/templates/root/model.md +1 -0
  545. package/templates/root/prompt.md +91 -0
  546. package/templates/root/ralph.sh +47 -0
@@ -0,0 +1,2137 @@
1
+ import PostgrestTransformBuilder from './PostgrestTransformBuilder'
2
+ import { JsonPathToAccessor, JsonPathToType } from './select-query-parser/utils'
3
+ import { ClientServerOptions, GenericSchema } from './types/common/common'
4
+
5
+ type FilterOperator =
6
+ | 'eq'
7
+ | 'neq'
8
+ | 'gt'
9
+ | 'gte'
10
+ | 'lt'
11
+ | 'lte'
12
+ | 'like'
13
+ | 'ilike'
14
+ | 'is'
15
+ | 'isdistinct'
16
+ | 'in'
17
+ | 'cs'
18
+ | 'cd'
19
+ | 'sl'
20
+ | 'sr'
21
+ | 'nxl'
22
+ | 'nxr'
23
+ | 'adj'
24
+ | 'ov'
25
+ | 'fts'
26
+ | 'plfts'
27
+ | 'phfts'
28
+ | 'wfts'
29
+ | 'match'
30
+ | 'imatch'
31
+
32
+ export type IsStringOperator<Path extends string> = Path extends `${string}->>${string}`
33
+ ? true
34
+ : false
35
+
36
+ const PostgrestReservedCharsRegexp = new RegExp('[,()]')
37
+
38
+ // Match relationship filters with `table.column` syntax and resolve underlying
39
+ // column value. If not matched, fallback to generic type.
40
+ // TODO: Validate the relationship itself ala select-query-parser. Currently we
41
+ // assume that all tables have valid relationships to each other, despite
42
+ // nonexistent foreign keys.
43
+ type ResolveFilterValue<
44
+ Schema extends GenericSchema,
45
+ Row extends Record<string, unknown>,
46
+ ColumnName extends string,
47
+ > = ColumnName extends `${infer RelationshipTable}.${infer Remainder}`
48
+ ? Remainder extends `${infer _}.${infer _}`
49
+ ? ResolveFilterValue<Schema, Row, Remainder>
50
+ : ResolveFilterRelationshipValue<Schema, RelationshipTable, Remainder>
51
+ : ColumnName extends keyof Row
52
+ ? Row[ColumnName]
53
+ : // If the column selection is a jsonpath like `data->value` or `data->>value` we attempt to match
54
+ // the expected type with the parsed custom json type
55
+ IsStringOperator<ColumnName> extends true
56
+ ? string
57
+ : JsonPathToType<Row, JsonPathToAccessor<ColumnName>> extends infer JsonPathValue
58
+ ? JsonPathValue extends never
59
+ ? never
60
+ : JsonPathValue
61
+ : never
62
+
63
+ type ResolveFilterRelationshipValue<
64
+ Schema extends GenericSchema,
65
+ RelationshipTable extends string,
66
+ RelationshipColumn extends string,
67
+ > = Schema['Tables'] & Schema['Views'] extends infer TablesAndViews
68
+ ? RelationshipTable extends keyof TablesAndViews
69
+ ? 'Row' extends keyof TablesAndViews[RelationshipTable]
70
+ ? RelationshipColumn extends keyof TablesAndViews[RelationshipTable]['Row']
71
+ ? TablesAndViews[RelationshipTable]['Row'][RelationshipColumn]
72
+ : unknown
73
+ : unknown
74
+ : unknown
75
+ : never
76
+
77
+ export type InvalidMethodError<S extends string> = { Error: S }
78
+
79
+ type NonNullableColumn<T extends Record<string, unknown>, Col extends string> = Col extends keyof T
80
+ ? { [K in keyof T]: K extends Col ? NonNullable<T[K]> : T[K] }
81
+ : T
82
+
83
+ type NarrowResultColumn<T, Col extends string> = T extends (infer Item)[]
84
+ ? Item extends Record<string, unknown>
85
+ ? Col extends keyof Item
86
+ ? { [K in keyof Item]: K extends Col ? NonNullable<Item[K]> : Item[K] }[]
87
+ : T
88
+ : T
89
+ : T extends Record<string, unknown>
90
+ ? Col extends keyof T
91
+ ? { [K in keyof T]: K extends Col ? NonNullable<T[K]> : T[K] }
92
+ : T
93
+ : T
94
+
95
+ export default class PostgrestFilterBuilder<
96
+ ClientOptions extends ClientServerOptions,
97
+ Schema extends GenericSchema,
98
+ Row extends Record<string, unknown>,
99
+ Result,
100
+ RelationName = unknown,
101
+ Relationships = unknown,
102
+ Method = unknown,
103
+ > extends PostgrestTransformBuilder<
104
+ ClientOptions,
105
+ Schema,
106
+ Row,
107
+ Result,
108
+ RelationName,
109
+ Relationships,
110
+ Method
111
+ > {
112
+ /**
113
+ * Match only rows where `column` is equal to `value`.
114
+ *
115
+ * To check if the value of `column` is NULL, you should use `.is()` instead.
116
+ *
117
+ * @param column - The column to filter on
118
+ * @param value - The value to filter with
119
+ *
120
+ * @category Database
121
+ * @subcategory Using filters
122
+ *
123
+ * @example With `select()`
124
+ * ```ts
125
+ * const { data, error } = await supabase
126
+ * .from('characters')
127
+ * .select()
128
+ * .eq('name', 'Leia')
129
+ * ```
130
+ *
131
+ * @exampleSql With `select()`
132
+ * ```sql
133
+ * create table
134
+ * characters (id int8 primary key, name text);
135
+ *
136
+ * insert into
137
+ * characters (id, name)
138
+ * values
139
+ * (1, 'Luke'),
140
+ * (2, 'Leia'),
141
+ * (3, 'Han');
142
+ * ```
143
+ *
144
+ * @exampleResponse With `select()`
145
+ * ```json
146
+ * {
147
+ * "data": [
148
+ * {
149
+ * "id": 2,
150
+ * "name": "Leia"
151
+ * }
152
+ * ],
153
+ * "status": 200,
154
+ * "statusText": "OK"
155
+ * }
156
+ * ```
157
+ */
158
+ eq<ColumnName extends string>(
159
+ column: ColumnName extends keyof Row
160
+ ? ColumnName
161
+ : ColumnName extends `${string}.${string}` | `${string}->${string}`
162
+ ? ColumnName
163
+ : string extends ColumnName
164
+ ? string
165
+ : keyof Row,
166
+ value: ResolveFilterValue<Schema, Row, ColumnName> extends never
167
+ ? NonNullable<unknown>
168
+ : ResolveFilterValue<Schema, Row, ColumnName> extends infer ResolvedFilterValue
169
+ ? NonNullable<ResolvedFilterValue>
170
+ : never
171
+ ): this {
172
+ this.url.searchParams.append(column as string, `eq.${value}`)
173
+ return this
174
+ }
175
+
176
+ /**
177
+ * Match only rows where `column` is not equal to `value`.
178
+ *
179
+ * @param column - The column to filter on
180
+ * @param value - The value to filter with
181
+ *
182
+ * @category Database
183
+ * @subcategory Using filters
184
+ *
185
+ * @example With `select()`
186
+ * ```ts
187
+ * const { data, error } = await supabase
188
+ * .from('characters')
189
+ * .select()
190
+ * .neq('name', 'Leia')
191
+ * ```
192
+ *
193
+ * @exampleSql With `select()`
194
+ * ```sql
195
+ * create table
196
+ * characters (id int8 primary key, name text);
197
+ *
198
+ * insert into
199
+ * characters (id, name)
200
+ * values
201
+ * (1, 'Luke'),
202
+ * (2, 'Leia'),
203
+ * (3, 'Han');
204
+ * ```
205
+ *
206
+ * @exampleResponse With `select()`
207
+ * ```json
208
+ * {
209
+ * "data": [
210
+ * {
211
+ * "id": 1,
212
+ * "name": "Luke"
213
+ * },
214
+ * {
215
+ * "id": 3,
216
+ * "name": "Han"
217
+ * }
218
+ * ],
219
+ * "status": 200,
220
+ * "statusText": "OK"
221
+ * }
222
+ * ```
223
+ */
224
+ neq<ColumnName extends string>(
225
+ column: ColumnName extends keyof Row
226
+ ? ColumnName
227
+ : ColumnName extends `${string}.${string}` | `${string}->${string}`
228
+ ? ColumnName
229
+ : string extends ColumnName
230
+ ? string
231
+ : keyof Row,
232
+ value: ResolveFilterValue<Schema, Row, ColumnName> extends never
233
+ ? unknown
234
+ : ResolveFilterValue<Schema, Row, ColumnName> extends infer Resolved
235
+ ? Resolved
236
+ : never
237
+ ): this {
238
+ this.url.searchParams.append(column as string, `neq.${value}`)
239
+ return this
240
+ }
241
+
242
+ gt<ColumnName extends string & keyof Row>(column: ColumnName, value: Row[ColumnName]): this
243
+ gt(column: string, value: unknown): this
244
+ /**
245
+ * Match only rows where `column` is greater than `value`.
246
+ *
247
+ * @param column - The column to filter on
248
+ * @param value - The value to filter with
249
+ *
250
+ * @category Database
251
+ * @subcategory Using filters
252
+ *
253
+ * @exampleDescription With `select()`
254
+ * When using [reserved words](https://www.postgresql.org/docs/current/sql-keywords-appendix.html) for column names you need
255
+ * to add double quotes e.g. `.gt('"order"', 2)`
256
+ *
257
+ * @example With `select()`
258
+ * ```ts
259
+ * const { data, error } = await supabase
260
+ * .from('characters')
261
+ * .select()
262
+ * .gt('id', 2)
263
+ * ```
264
+ *
265
+ * @exampleSql With `select()`
266
+ * ```sql
267
+ * create table
268
+ * characters (id int8 primary key, name text);
269
+ *
270
+ * insert into
271
+ * characters (id, name)
272
+ * values
273
+ * (1, 'Luke'),
274
+ * (2, 'Leia'),
275
+ * (3, 'Han');
276
+ * ```
277
+ *
278
+ * @exampleResponse With `select()`
279
+ * ```json
280
+ * {
281
+ * "data": [
282
+ * {
283
+ * "id": 3,
284
+ * "name": "Han"
285
+ * }
286
+ * ],
287
+ * "status": 200,
288
+ * "statusText": "OK"
289
+ * }
290
+ * ```
291
+ */
292
+ gt(column: string, value: unknown): this {
293
+ this.url.searchParams.append(column, `gt.${value}`)
294
+ return this
295
+ }
296
+
297
+ gte<ColumnName extends string & keyof Row>(column: ColumnName, value: Row[ColumnName]): this
298
+ gte(column: string, value: unknown): this
299
+ /**
300
+ * Match only rows where `column` is greater than or equal to `value`.
301
+ *
302
+ * @param column - The column to filter on
303
+ * @param value - The value to filter with
304
+ *
305
+ * @category Database
306
+ * @subcategory Using filters
307
+ *
308
+ * @example With `select()`
309
+ * ```ts
310
+ * const { data, error } = await supabase
311
+ * .from('characters')
312
+ * .select()
313
+ * .gte('id', 2)
314
+ * ```
315
+ *
316
+ * @exampleSql With `select()`
317
+ * ```sql
318
+ * create table
319
+ * characters (id int8 primary key, name text);
320
+ *
321
+ * insert into
322
+ * characters (id, name)
323
+ * values
324
+ * (1, 'Luke'),
325
+ * (2, 'Leia'),
326
+ * (3, 'Han');
327
+ * ```
328
+ *
329
+ * @exampleResponse With `select()`
330
+ * ```json
331
+ * {
332
+ * "data": [
333
+ * {
334
+ * "id": 2,
335
+ * "name": "Leia"
336
+ * },
337
+ * {
338
+ * "id": 3,
339
+ * "name": "Han"
340
+ * }
341
+ * ],
342
+ * "status": 200,
343
+ * "statusText": "OK"
344
+ * }
345
+ * ```
346
+ */
347
+ gte(column: string, value: unknown): this {
348
+ this.url.searchParams.append(column, `gte.${value}`)
349
+ return this
350
+ }
351
+
352
+ lt<ColumnName extends string & keyof Row>(column: ColumnName, value: Row[ColumnName]): this
353
+ lt(column: string, value: unknown): this
354
+ /**
355
+ * Match only rows where `column` is less than `value`.
356
+ *
357
+ * @param column - The column to filter on
358
+ * @param value - The value to filter with
359
+ *
360
+ * @category Database
361
+ * @subcategory Using filters
362
+ *
363
+ * @example With `select()`
364
+ * ```ts
365
+ * const { data, error } = await supabase
366
+ * .from('characters')
367
+ * .select()
368
+ * .lt('id', 2)
369
+ * ```
370
+ *
371
+ * @exampleSql With `select()`
372
+ * ```sql
373
+ * create table
374
+ * characters (id int8 primary key, name text);
375
+ *
376
+ * insert into
377
+ * characters (id, name)
378
+ * values
379
+ * (1, 'Luke'),
380
+ * (2, 'Leia'),
381
+ * (3, 'Han');
382
+ * ```
383
+ *
384
+ * @exampleResponse With `select()`
385
+ * ```json
386
+ * {
387
+ * "data": [
388
+ * {
389
+ * "id": 1,
390
+ * "name": "Luke"
391
+ * }
392
+ * ],
393
+ * "status": 200,
394
+ * "statusText": "OK"
395
+ * }
396
+ * ```
397
+ */
398
+ lt(column: string, value: unknown): this {
399
+ this.url.searchParams.append(column, `lt.${value}`)
400
+ return this
401
+ }
402
+
403
+ lte<ColumnName extends string & keyof Row>(column: ColumnName, value: Row[ColumnName]): this
404
+ lte(column: string, value: unknown): this
405
+ /**
406
+ * Match only rows where `column` is less than or equal to `value`.
407
+ *
408
+ * @param column - The column to filter on
409
+ * @param value - The value to filter with
410
+ *
411
+ * @category Database
412
+ * @subcategory Using filters
413
+ *
414
+ * @example With `select()`
415
+ * ```ts
416
+ * const { data, error } = await supabase
417
+ * .from('characters')
418
+ * .select()
419
+ * .lte('id', 2)
420
+ * ```
421
+ *
422
+ * @exampleSql With `select()`
423
+ * ```sql
424
+ * create table
425
+ * characters (id int8 primary key, name text);
426
+ *
427
+ * insert into
428
+ * characters (id, name)
429
+ * values
430
+ * (1, 'Luke'),
431
+ * (2, 'Leia'),
432
+ * (3, 'Han');
433
+ * ```
434
+ *
435
+ * @exampleResponse With `select()`
436
+ * ```json
437
+ * {
438
+ * "data": [
439
+ * {
440
+ * "id": 1,
441
+ * "name": "Luke"
442
+ * },
443
+ * {
444
+ * "id": 2,
445
+ * "name": "Leia"
446
+ * }
447
+ * ],
448
+ * "status": 200,
449
+ * "statusText": "OK"
450
+ * }
451
+ * ```
452
+ */
453
+ lte(column: string, value: unknown): this {
454
+ this.url.searchParams.append(column, `lte.${value}`)
455
+ return this
456
+ }
457
+
458
+ like<ColumnName extends string & keyof Row>(column: ColumnName, pattern: string): this
459
+ like(column: string, pattern: string): this
460
+ /**
461
+ * Match only rows where `column` matches `pattern` case-sensitively.
462
+ *
463
+ * @param column - The column to filter on
464
+ * @param pattern - The pattern to match with
465
+ *
466
+ * @category Database
467
+ * @subcategory Using filters
468
+ *
469
+ * @example With `select()`
470
+ * ```ts
471
+ * const { data, error } = await supabase
472
+ * .from('characters')
473
+ * .select()
474
+ * .like('name', '%Lu%')
475
+ * ```
476
+ *
477
+ * @exampleSql With `select()`
478
+ * ```sql
479
+ * create table
480
+ * characters (id int8 primary key, name text);
481
+ *
482
+ * insert into
483
+ * characters (id, name)
484
+ * values
485
+ * (1, 'Luke'),
486
+ * (2, 'Leia'),
487
+ * (3, 'Han');
488
+ * ```
489
+ *
490
+ * @exampleResponse With `select()`
491
+ * ```json
492
+ * {
493
+ * "data": [
494
+ * {
495
+ * "id": 1,
496
+ * "name": "Luke"
497
+ * }
498
+ * ],
499
+ * "status": 200,
500
+ * "statusText": "OK"
501
+ * }
502
+ * ```
503
+ */
504
+ like(column: string, pattern: string): this {
505
+ this.url.searchParams.append(column, `like.${pattern}`)
506
+ return this
507
+ }
508
+
509
+ likeAllOf<ColumnName extends string & keyof Row>(
510
+ column: ColumnName,
511
+ patterns: readonly string[]
512
+ ): this
513
+ likeAllOf(column: string, patterns: readonly string[]): this
514
+ /**
515
+ * Match only rows where `column` matches all of `patterns` case-sensitively.
516
+ *
517
+ * @param column - The column to filter on
518
+ * @param patterns - The patterns to match with
519
+ *
520
+ * @category Database
521
+ * @subcategory Using filters
522
+ */
523
+ likeAllOf(column: string, patterns: readonly string[]): this {
524
+ this.url.searchParams.append(column, `like(all).{${patterns.join(',')}}`)
525
+ return this
526
+ }
527
+
528
+ likeAnyOf<ColumnName extends string & keyof Row>(
529
+ column: ColumnName,
530
+ patterns: readonly string[]
531
+ ): this
532
+ likeAnyOf(column: string, patterns: readonly string[]): this
533
+ /**
534
+ * Match only rows where `column` matches any of `patterns` case-sensitively.
535
+ *
536
+ * @param column - The column to filter on
537
+ * @param patterns - The patterns to match with
538
+ *
539
+ * @category Database
540
+ * @subcategory Using filters
541
+ */
542
+ likeAnyOf(column: string, patterns: readonly string[]): this {
543
+ this.url.searchParams.append(column, `like(any).{${patterns.join(',')}}`)
544
+ return this
545
+ }
546
+
547
+ ilike<ColumnName extends string & keyof Row>(column: ColumnName, pattern: string): this
548
+ ilike(column: string, pattern: string): this
549
+ /**
550
+ * Match only rows where `column` matches `pattern` case-insensitively.
551
+ *
552
+ * @param column - The column to filter on
553
+ * @param pattern - The pattern to match with
554
+ *
555
+ * @category Database
556
+ * @subcategory Using filters
557
+ *
558
+ * @example With `select()`
559
+ * ```ts
560
+ * const { data, error } = await supabase
561
+ * .from('characters')
562
+ * .select()
563
+ * .ilike('name', '%lu%')
564
+ * ```
565
+ *
566
+ * @exampleSql With `select()`
567
+ * ```sql
568
+ * create table
569
+ * characters (id int8 primary key, name text);
570
+ *
571
+ * insert into
572
+ * characters (id, name)
573
+ * values
574
+ * (1, 'Luke'),
575
+ * (2, 'Leia'),
576
+ * (3, 'Han');
577
+ * ```
578
+ *
579
+ * @exampleResponse With `select()`
580
+ * ```json
581
+ * {
582
+ * "data": [
583
+ * {
584
+ * "id": 1,
585
+ * "name": "Luke"
586
+ * }
587
+ * ],
588
+ * "status": 200,
589
+ * "statusText": "OK"
590
+ * }
591
+ * ```
592
+ */
593
+ ilike(column: string, pattern: string): this {
594
+ this.url.searchParams.append(column, `ilike.${pattern}`)
595
+ return this
596
+ }
597
+
598
+ ilikeAllOf<ColumnName extends string & keyof Row>(
599
+ column: ColumnName,
600
+ patterns: readonly string[]
601
+ ): this
602
+ ilikeAllOf(column: string, patterns: readonly string[]): this
603
+ /**
604
+ * Match only rows where `column` matches all of `patterns` case-insensitively.
605
+ *
606
+ * @param column - The column to filter on
607
+ * @param patterns - The patterns to match with
608
+ *
609
+ * @category Database
610
+ * @subcategory Using filters
611
+ */
612
+ ilikeAllOf(column: string, patterns: readonly string[]): this {
613
+ this.url.searchParams.append(column, `ilike(all).{${patterns.join(',')}}`)
614
+ return this
615
+ }
616
+
617
+ ilikeAnyOf<ColumnName extends string & keyof Row>(
618
+ column: ColumnName,
619
+ patterns: readonly string[]
620
+ ): this
621
+ ilikeAnyOf(column: string, patterns: readonly string[]): this
622
+ /**
623
+ * Match only rows where `column` matches any of `patterns` case-insensitively.
624
+ *
625
+ * @param column - The column to filter on
626
+ * @param patterns - The patterns to match with
627
+ *
628
+ * @category Database
629
+ * @subcategory Using filters
630
+ */
631
+ ilikeAnyOf(column: string, patterns: readonly string[]): this {
632
+ this.url.searchParams.append(column, `ilike(any).{${patterns.join(',')}}`)
633
+ return this
634
+ }
635
+
636
+ regexMatch<ColumnName extends string & keyof Row>(column: ColumnName, pattern: string): this
637
+ regexMatch(column: string, pattern: string): this
638
+ /**
639
+ * Match only rows where `column` matches the PostgreSQL regex `pattern`
640
+ * case-sensitively (using the `~` operator).
641
+ *
642
+ * @param column - The column to filter on
643
+ * @param pattern - The PostgreSQL regular expression pattern to match with
644
+ */
645
+ regexMatch(column: string, pattern: string): this {
646
+ this.url.searchParams.append(column, `match.${pattern}`)
647
+ return this
648
+ }
649
+
650
+ regexIMatch<ColumnName extends string & keyof Row>(column: ColumnName, pattern: string): this
651
+ regexIMatch(column: string, pattern: string): this
652
+ /**
653
+ * Match only rows where `column` matches the PostgreSQL regex `pattern`
654
+ * case-insensitively (using the `~*` operator).
655
+ *
656
+ * @param column - The column to filter on
657
+ * @param pattern - The PostgreSQL regular expression pattern to match with
658
+ */
659
+ regexIMatch(column: string, pattern: string): this {
660
+ this.url.searchParams.append(column, `imatch.${pattern}`)
661
+ return this
662
+ }
663
+
664
+ is<ColumnName extends string & keyof Row>(
665
+ column: ColumnName,
666
+ value: Row[ColumnName] & (boolean | null)
667
+ ): this
668
+ is(column: string, value: boolean | null): this
669
+ /**
670
+ * Match only rows where `column` IS `value`.
671
+ *
672
+ * For non-boolean columns, this is only relevant for checking if the value of
673
+ * `column` is NULL by setting `value` to `null`.
674
+ *
675
+ * For boolean columns, you can also set `value` to `true` or `false` and it
676
+ * will behave the same way as `.eq()`.
677
+ *
678
+ * @param column - The column to filter on
679
+ * @param value - The value to filter with
680
+ *
681
+ * @category Database
682
+ * @subcategory Using filters
683
+ *
684
+ * @exampleDescription Checking for nullness, true or false
685
+ * Using the `eq()` filter doesn't work when filtering for `null`.
686
+ *
687
+ * Instead, you need to use `is()`.
688
+ *
689
+ * @example Checking for nullness, true or false
690
+ * ```ts
691
+ * const { data, error } = await supabase
692
+ * .from('countries')
693
+ * .select()
694
+ * .is('name', null)
695
+ * ```
696
+ *
697
+ * @exampleSql Checking for nullness, true or false
698
+ * ```sql
699
+ * create table
700
+ * countries (id int8 primary key, name text);
701
+ *
702
+ * insert into
703
+ * countries (id, name)
704
+ * values
705
+ * (1, 'null'),
706
+ * (2, null);
707
+ * ```
708
+ *
709
+ * @exampleResponse Checking for nullness, true or false
710
+ * ```json
711
+ * {
712
+ * "data": [
713
+ * {
714
+ * "id": 2,
715
+ * "name": "null"
716
+ * }
717
+ * ],
718
+ * "status": 200,
719
+ * "statusText": "OK"
720
+ * }
721
+ * ```
722
+ */
723
+ is(column: string, value: boolean | null): this {
724
+ this.url.searchParams.append(column, `is.${value}`)
725
+ return this
726
+ }
727
+
728
+ /**
729
+ * Match only rows where `column` IS DISTINCT FROM `value`.
730
+ *
731
+ * Unlike `.neq()`, this treats `NULL` as a comparable value. Two `NULL` values
732
+ * are considered equal (not distinct), and comparing `NULL` with any non-NULL
733
+ * value returns true (distinct).
734
+ *
735
+ * @param column - The column to filter on
736
+ * @param value - The value to filter with
737
+ */
738
+ isDistinct<ColumnName extends string>(
739
+ column: ColumnName,
740
+ value: ResolveFilterValue<Schema, Row, ColumnName> extends never
741
+ ? unknown
742
+ : ResolveFilterValue<Schema, Row, ColumnName> extends infer ResolvedFilterValue
743
+ ? ResolvedFilterValue
744
+ : never
745
+ ): this {
746
+ this.url.searchParams.append(column, `isdistinct.${value}`)
747
+ return this
748
+ }
749
+
750
+ /**
751
+ * Match only rows where `column` is included in the `values` array.
752
+ *
753
+ * @param column - The column to filter on
754
+ * @param values - The values array to filter with
755
+ *
756
+ * @category Database
757
+ * @subcategory Using filters
758
+ *
759
+ * @example With `select()`
760
+ * ```ts
761
+ * const { data, error } = await supabase
762
+ * .from('characters')
763
+ * .select()
764
+ * .in('name', ['Leia', 'Han'])
765
+ * ```
766
+ *
767
+ * @exampleSql With `select()`
768
+ * ```sql
769
+ * create table
770
+ * characters (id int8 primary key, name text);
771
+ *
772
+ * insert into
773
+ * characters (id, name)
774
+ * values
775
+ * (1, 'Luke'),
776
+ * (2, 'Leia'),
777
+ * (3, 'Han');
778
+ * ```
779
+ *
780
+ * @exampleResponse With `select()`
781
+ * ```json
782
+ * {
783
+ * "data": [
784
+ * {
785
+ * "id": 2,
786
+ * "name": "Leia"
787
+ * },
788
+ * {
789
+ * "id": 3,
790
+ * "name": "Han"
791
+ * }
792
+ * ],
793
+ * "status": 200,
794
+ * "statusText": "OK"
795
+ * }
796
+ * ```
797
+ */
798
+ in<ColumnName extends string>(
799
+ column: ColumnName,
800
+ values: ReadonlyArray<
801
+ ResolveFilterValue<Schema, Row, ColumnName> extends never
802
+ ? unknown
803
+ : // We want to infer the type before wrapping it into a `NonNullable` to avoid too deep
804
+ // type resolution error
805
+ ResolveFilterValue<Schema, Row, ColumnName> extends infer ResolvedFilterValue
806
+ ? ResolvedFilterValue
807
+ : // We should never enter this case as all the branches are covered above
808
+ never
809
+ >
810
+ ): this {
811
+ const cleanedValues = Array.from(new Set(values))
812
+ .map((s) => {
813
+ // handle postgrest reserved characters
814
+ // https://postgrest.org/en/v7.0.0/api.html#reserved-characters
815
+ if (typeof s === 'string' && PostgrestReservedCharsRegexp.test(s)) return `"${s}"`
816
+ else return `${s}`
817
+ })
818
+ .join(',')
819
+ this.url.searchParams.append(column, `in.(${cleanedValues})`)
820
+ return this
821
+ }
822
+
823
+ /**
824
+ * Match only rows where `column` is NOT included in the `values` array.
825
+ *
826
+ * @param column - The column to filter on
827
+ * @param values - The values array to filter with
828
+ */
829
+ notIn<ColumnName extends string>(
830
+ column: ColumnName,
831
+ values: ReadonlyArray<
832
+ ResolveFilterValue<Schema, Row, ColumnName> extends never
833
+ ? unknown
834
+ : ResolveFilterValue<Schema, Row, ColumnName> extends infer ResolvedFilterValue
835
+ ? ResolvedFilterValue
836
+ : never
837
+ >
838
+ ): this {
839
+ const cleanedValues = Array.from(new Set(values))
840
+ .map((s) => {
841
+ // handle postgrest reserved characters
842
+ // https://postgrest.org/en/v7.0.0/api.html#reserved-characters
843
+ if (typeof s === 'string' && PostgrestReservedCharsRegexp.test(s)) return `"${s}"`
844
+ else return `${s}`
845
+ })
846
+ .join(',')
847
+ this.url.searchParams.append(column, `not.in.(${cleanedValues})`)
848
+ return this
849
+ }
850
+
851
+ contains<ColumnName extends string & keyof Row>(
852
+ column: ColumnName,
853
+ value: string | ReadonlyArray<Row[ColumnName]> | Record<string, unknown>
854
+ ): this
855
+ contains(column: string, value: string | readonly unknown[] | Record<string, unknown>): this
856
+ /**
857
+ * Only relevant for jsonb, array, and range columns. Match only rows where
858
+ * `column` contains every element appearing in `value`.
859
+ *
860
+ * @param column - The jsonb, array, or range column to filter on
861
+ * @param value - The jsonb, array, or range value to filter with
862
+ *
863
+ * @category Database
864
+ * @subcategory Using filters
865
+ *
866
+ * @example On array columns
867
+ * ```ts
868
+ * const { data, error } = await supabase
869
+ * .from('issues')
870
+ * .select()
871
+ * .contains('tags', ['is:open', 'priority:low'])
872
+ * ```
873
+ *
874
+ * @exampleSql On array columns
875
+ * ```sql
876
+ * create table
877
+ * issues (
878
+ * id int8 primary key,
879
+ * title text,
880
+ * tags text[]
881
+ * );
882
+ *
883
+ * insert into
884
+ * issues (id, title, tags)
885
+ * values
886
+ * (1, 'Cache invalidation is not working', array['is:open', 'severity:high', 'priority:low']),
887
+ * (2, 'Use better names', array['is:open', 'severity:low', 'priority:medium']);
888
+ * ```
889
+ *
890
+ * @exampleResponse On array columns
891
+ * ```json
892
+ * {
893
+ * "data": [
894
+ * {
895
+ * "title": "Cache invalidation is not working"
896
+ * }
897
+ * ],
898
+ * "status": 200,
899
+ * "statusText": "OK"
900
+ * }
901
+ * ```
902
+ *
903
+ * @exampleDescription On range columns
904
+ * Postgres supports a number of [range
905
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
906
+ * can filter on range columns using the string representation of range
907
+ * values.
908
+ *
909
+ * @example On range columns
910
+ * ```ts
911
+ * const { data, error } = await supabase
912
+ * .from('reservations')
913
+ * .select()
914
+ * .contains('during', '[2000-01-01 13:00, 2000-01-01 13:30)')
915
+ * ```
916
+ *
917
+ * @exampleSql On range columns
918
+ * ```sql
919
+ * create table
920
+ * reservations (
921
+ * id int8 primary key,
922
+ * room_name text,
923
+ * during tsrange
924
+ * );
925
+ *
926
+ * insert into
927
+ * reservations (id, room_name, during)
928
+ * values
929
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
930
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
931
+ * ```
932
+ *
933
+ * @exampleResponse On range columns
934
+ * ```json
935
+ * {
936
+ * "data": [
937
+ * {
938
+ * "id": 1,
939
+ * "room_name": "Emerald",
940
+ * "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")"
941
+ * }
942
+ * ],
943
+ * "status": 200,
944
+ * "statusText": "OK"
945
+ * }
946
+ * ```
947
+ *
948
+ * @example On `jsonb` columns
949
+ * ```ts
950
+ * const { data, error } = await supabase
951
+ * .from('users')
952
+ * .select('name')
953
+ * .contains('address', { postcode: 90210 })
954
+ * ```
955
+ *
956
+ * @exampleSql On `jsonb` columns
957
+ * ```sql
958
+ * create table
959
+ * users (
960
+ * id int8 primary key,
961
+ * name text,
962
+ * address jsonb
963
+ * );
964
+ *
965
+ * insert into
966
+ * users (id, name, address)
967
+ * values
968
+ * (1, 'Michael', '{ "postcode": 90210, "street": "Melrose Place" }'),
969
+ * (2, 'Jane', '{}');
970
+ * ```
971
+ *
972
+ * @exampleResponse On `jsonb` columns
973
+ * ```json
974
+ * {
975
+ * "data": [
976
+ * {
977
+ * "name": "Michael"
978
+ * }
979
+ * ],
980
+ * "status": 200,
981
+ * "statusText": "OK"
982
+ * }
983
+ * ```
984
+ */
985
+ contains(column: string, value: string | readonly unknown[] | Record<string, unknown>): this {
986
+ if (typeof value === 'string') {
987
+ // range types can be inclusive '[', ']' or exclusive '(', ')' so just
988
+ // keep it simple and accept a string
989
+ this.url.searchParams.append(column, `cs.${value}`)
990
+ } else if (Array.isArray(value)) {
991
+ // array
992
+ this.url.searchParams.append(column, `cs.{${value.join(',')}}`)
993
+ } else {
994
+ // json
995
+ this.url.searchParams.append(column, `cs.${JSON.stringify(value)}`)
996
+ }
997
+ return this
998
+ }
999
+
1000
+ containedBy<ColumnName extends string & keyof Row>(
1001
+ column: ColumnName,
1002
+ value: string | ReadonlyArray<Row[ColumnName]> | Record<string, unknown>
1003
+ ): this
1004
+ containedBy(column: string, value: string | readonly unknown[] | Record<string, unknown>): this
1005
+ /**
1006
+ * Only relevant for jsonb, array, and range columns. Match only rows where
1007
+ * every element appearing in `column` is contained by `value`.
1008
+ *
1009
+ * @param column - The jsonb, array, or range column to filter on
1010
+ * @param value - The jsonb, array, or range value to filter with
1011
+ *
1012
+ * @category Database
1013
+ * @subcategory Using filters
1014
+ *
1015
+ * @example On array columns
1016
+ * ```ts
1017
+ * const { data, error } = await supabase
1018
+ * .from('classes')
1019
+ * .select('name')
1020
+ * .containedBy('days', ['monday', 'tuesday', 'wednesday', 'friday'])
1021
+ * ```
1022
+ *
1023
+ * @exampleSql On array columns
1024
+ * ```sql
1025
+ * create table
1026
+ * classes (
1027
+ * id int8 primary key,
1028
+ * name text,
1029
+ * days text[]
1030
+ * );
1031
+ *
1032
+ * insert into
1033
+ * classes (id, name, days)
1034
+ * values
1035
+ * (1, 'Chemistry', array['monday', 'friday']),
1036
+ * (2, 'History', array['monday', 'wednesday', 'thursday']);
1037
+ * ```
1038
+ *
1039
+ * @exampleResponse On array columns
1040
+ * ```json
1041
+ * {
1042
+ * "data": [
1043
+ * {
1044
+ * "name": "Chemistry"
1045
+ * }
1046
+ * ],
1047
+ * "status": 200,
1048
+ * "statusText": "OK"
1049
+ * }
1050
+ * ```
1051
+ *
1052
+ * @exampleDescription On range columns
1053
+ * Postgres supports a number of [range
1054
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
1055
+ * can filter on range columns using the string representation of range
1056
+ * values.
1057
+ *
1058
+ * @example On range columns
1059
+ * ```ts
1060
+ * const { data, error } = await supabase
1061
+ * .from('reservations')
1062
+ * .select()
1063
+ * .containedBy('during', '[2000-01-01 00:00, 2000-01-01 23:59)')
1064
+ * ```
1065
+ *
1066
+ * @exampleSql On range columns
1067
+ * ```sql
1068
+ * create table
1069
+ * reservations (
1070
+ * id int8 primary key,
1071
+ * room_name text,
1072
+ * during tsrange
1073
+ * );
1074
+ *
1075
+ * insert into
1076
+ * reservations (id, room_name, during)
1077
+ * values
1078
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
1079
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
1080
+ * ```
1081
+ *
1082
+ * @exampleResponse On range columns
1083
+ * ```json
1084
+ * {
1085
+ * "data": [
1086
+ * {
1087
+ * "id": 1,
1088
+ * "room_name": "Emerald",
1089
+ * "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")"
1090
+ * }
1091
+ * ],
1092
+ * "status": 200,
1093
+ * "statusText": "OK"
1094
+ * }
1095
+ * ```
1096
+ *
1097
+ * @example On `jsonb` columns
1098
+ * ```ts
1099
+ * const { data, error } = await supabase
1100
+ * .from('users')
1101
+ * .select('name')
1102
+ * .containedBy('address', {})
1103
+ * ```
1104
+ *
1105
+ * @exampleSql On `jsonb` columns
1106
+ * ```sql
1107
+ * create table
1108
+ * users (
1109
+ * id int8 primary key,
1110
+ * name text,
1111
+ * address jsonb
1112
+ * );
1113
+ *
1114
+ * insert into
1115
+ * users (id, name, address)
1116
+ * values
1117
+ * (1, 'Michael', '{ "postcode": 90210, "street": "Melrose Place" }'),
1118
+ * (2, 'Jane', '{}');
1119
+ * ```
1120
+ *
1121
+ * @exampleResponse On `jsonb` columns
1122
+ * ```json
1123
+ * {
1124
+ * "data": [
1125
+ * {
1126
+ * "name": "Jane"
1127
+ * }
1128
+ * ],
1129
+ * "status": 200,
1130
+ * "statusText": "OK"
1131
+ * }
1132
+ *
1133
+ * ```
1134
+ */
1135
+ containedBy(column: string, value: string | readonly unknown[] | Record<string, unknown>): this {
1136
+ if (typeof value === 'string') {
1137
+ // range
1138
+ this.url.searchParams.append(column, `cd.${value}`)
1139
+ } else if (Array.isArray(value)) {
1140
+ // array
1141
+ this.url.searchParams.append(column, `cd.{${value.join(',')}}`)
1142
+ } else {
1143
+ // json
1144
+ this.url.searchParams.append(column, `cd.${JSON.stringify(value)}`)
1145
+ }
1146
+ return this
1147
+ }
1148
+
1149
+ rangeGt<ColumnName extends string & keyof Row>(column: ColumnName, range: string): this
1150
+ rangeGt(column: string, range: string): this
1151
+ /**
1152
+ * Only relevant for range columns. Match only rows where every element in
1153
+ * `column` is greater than any element in `range`.
1154
+ *
1155
+ * @param column - The range column to filter on
1156
+ * @param range - The range to filter with
1157
+ *
1158
+ * @category Database
1159
+ * @subcategory Using filters
1160
+ *
1161
+ * @exampleDescription With `select()`
1162
+ * Postgres supports a number of [range
1163
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
1164
+ * can filter on range columns using the string representation of range
1165
+ * values.
1166
+ *
1167
+ * @example With `select()`
1168
+ * ```ts
1169
+ * const { data, error } = await supabase
1170
+ * .from('reservations')
1171
+ * .select()
1172
+ * .rangeGt('during', '[2000-01-02 08:00, 2000-01-02 09:00)')
1173
+ * ```
1174
+ *
1175
+ * @exampleSql With `select()`
1176
+ * ```sql
1177
+ * create table
1178
+ * reservations (
1179
+ * id int8 primary key,
1180
+ * room_name text,
1181
+ * during tsrange
1182
+ * );
1183
+ *
1184
+ * insert into
1185
+ * reservations (id, room_name, during)
1186
+ * values
1187
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
1188
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
1189
+ * ```
1190
+ *
1191
+ * @exampleResponse With `select()`
1192
+ * ```json
1193
+ * {
1194
+ * "data": [
1195
+ * {
1196
+ * "id": 2,
1197
+ * "room_name": "Topaz",
1198
+ * "during": "[\"2000-01-02 09:00:00\",\"2000-01-02 10:00:00\")"
1199
+ * }
1200
+ * ],
1201
+ * "status": 200,
1202
+ * "statusText": "OK"
1203
+ * }
1204
+ *
1205
+ * ```
1206
+ */
1207
+ rangeGt(column: string, range: string): this {
1208
+ this.url.searchParams.append(column, `sr.${range}`)
1209
+ return this
1210
+ }
1211
+
1212
+ rangeGte<ColumnName extends string & keyof Row>(column: ColumnName, range: string): this
1213
+ rangeGte(column: string, range: string): this
1214
+ /**
1215
+ * Only relevant for range columns. Match only rows where every element in
1216
+ * `column` is either contained in `range` or greater than any element in
1217
+ * `range`.
1218
+ *
1219
+ * @param column - The range column to filter on
1220
+ * @param range - The range to filter with
1221
+ *
1222
+ * @category Database
1223
+ * @subcategory Using filters
1224
+ *
1225
+ * @exampleDescription With `select()`
1226
+ * Postgres supports a number of [range
1227
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
1228
+ * can filter on range columns using the string representation of range
1229
+ * values.
1230
+ *
1231
+ * @example With `select()`
1232
+ * ```ts
1233
+ * const { data, error } = await supabase
1234
+ * .from('reservations')
1235
+ * .select()
1236
+ * .rangeGte('during', '[2000-01-02 08:30, 2000-01-02 09:30)')
1237
+ * ```
1238
+ *
1239
+ * @exampleSql With `select()`
1240
+ * ```sql
1241
+ * create table
1242
+ * reservations (
1243
+ * id int8 primary key,
1244
+ * room_name text,
1245
+ * during tsrange
1246
+ * );
1247
+ *
1248
+ * insert into
1249
+ * reservations (id, room_name, during)
1250
+ * values
1251
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
1252
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
1253
+ * ```
1254
+ *
1255
+ * @exampleResponse With `select()`
1256
+ * ```json
1257
+ * {
1258
+ * "data": [
1259
+ * {
1260
+ * "id": 2,
1261
+ * "room_name": "Topaz",
1262
+ * "during": "[\"2000-01-02 09:00:00\",\"2000-01-02 10:00:00\")"
1263
+ * }
1264
+ * ],
1265
+ * "status": 200,
1266
+ * "statusText": "OK"
1267
+ * }
1268
+ *
1269
+ * ```
1270
+ */
1271
+ rangeGte(column: string, range: string): this {
1272
+ this.url.searchParams.append(column, `nxl.${range}`)
1273
+ return this
1274
+ }
1275
+
1276
+ rangeLt<ColumnName extends string & keyof Row>(column: ColumnName, range: string): this
1277
+ rangeLt(column: string, range: string): this
1278
+ /**
1279
+ * Only relevant for range columns. Match only rows where every element in
1280
+ * `column` is less than any element in `range`.
1281
+ *
1282
+ * @param column - The range column to filter on
1283
+ * @param range - The range to filter with
1284
+ *
1285
+ * @category Database
1286
+ * @subcategory Using filters
1287
+ *
1288
+ * @exampleDescription With `select()`
1289
+ * Postgres supports a number of [range
1290
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
1291
+ * can filter on range columns using the string representation of range
1292
+ * values.
1293
+ *
1294
+ * @example With `select()`
1295
+ * ```ts
1296
+ * const { data, error } = await supabase
1297
+ * .from('reservations')
1298
+ * .select()
1299
+ * .rangeLt('during', '[2000-01-01 15:00, 2000-01-01 16:00)')
1300
+ * ```
1301
+ *
1302
+ * @exampleSql With `select()`
1303
+ * ```sql
1304
+ * create table
1305
+ * reservations (
1306
+ * id int8 primary key,
1307
+ * room_name text,
1308
+ * during tsrange
1309
+ * );
1310
+ *
1311
+ * insert into
1312
+ * reservations (id, room_name, during)
1313
+ * values
1314
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
1315
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
1316
+ * ```
1317
+ *
1318
+ * @exampleResponse With `select()`
1319
+ * ```json
1320
+ * {
1321
+ * "data": [
1322
+ * {
1323
+ * "id": 1,
1324
+ * "room_name": "Emerald",
1325
+ * "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")"
1326
+ * }
1327
+ * ],
1328
+ * "status": 200,
1329
+ * "statusText": "OK"
1330
+ * }
1331
+ * ```
1332
+ */
1333
+ rangeLt(column: string, range: string): this {
1334
+ this.url.searchParams.append(column, `sl.${range}`)
1335
+ return this
1336
+ }
1337
+
1338
+ rangeLte<ColumnName extends string & keyof Row>(column: ColumnName, range: string): this
1339
+ rangeLte(column: string, range: string): this
1340
+ /**
1341
+ * Only relevant for range columns. Match only rows where every element in
1342
+ * `column` is either contained in `range` or less than any element in
1343
+ * `range`.
1344
+ *
1345
+ * @param column - The range column to filter on
1346
+ * @param range - The range to filter with
1347
+ *
1348
+ * @category Database
1349
+ * @subcategory Using filters
1350
+ *
1351
+ * @exampleDescription With `select()`
1352
+ * Postgres supports a number of [range
1353
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
1354
+ * can filter on range columns using the string representation of range
1355
+ * values.
1356
+ *
1357
+ * @example With `select()`
1358
+ * ```ts
1359
+ * const { data, error } = await supabase
1360
+ * .from('reservations')
1361
+ * .select()
1362
+ * .rangeLte('during', '[2000-01-01 14:00, 2000-01-01 16:00)')
1363
+ * ```
1364
+ *
1365
+ * @exampleSql With `select()`
1366
+ * ```sql
1367
+ * create table
1368
+ * reservations (
1369
+ * id int8 primary key,
1370
+ * room_name text,
1371
+ * during tsrange
1372
+ * );
1373
+ *
1374
+ * insert into
1375
+ * reservations (id, room_name, during)
1376
+ * values
1377
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
1378
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
1379
+ * ```
1380
+ *
1381
+ * @exampleResponse With `select()`
1382
+ * ```json
1383
+ * {
1384
+ * "data": [
1385
+ * {
1386
+ * "id": 1,
1387
+ * "room_name": "Emerald",
1388
+ * "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")"
1389
+ * }
1390
+ * ],
1391
+ * "status": 200,
1392
+ * "statusText": "OK"
1393
+ * }
1394
+ *
1395
+ * ```
1396
+ */
1397
+ rangeLte(column: string, range: string): this {
1398
+ this.url.searchParams.append(column, `nxr.${range}`)
1399
+ return this
1400
+ }
1401
+
1402
+ rangeAdjacent<ColumnName extends string & keyof Row>(column: ColumnName, range: string): this
1403
+ rangeAdjacent(column: string, range: string): this
1404
+ /**
1405
+ * Only relevant for range columns. Match only rows where `column` is
1406
+ * mutually exclusive to `range` and there can be no element between the two
1407
+ * ranges.
1408
+ *
1409
+ * @param column - The range column to filter on
1410
+ * @param range - The range to filter with
1411
+ *
1412
+ * @category Database
1413
+ * @subcategory Using filters
1414
+ *
1415
+ * @exampleDescription With `select()`
1416
+ * Postgres supports a number of [range
1417
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
1418
+ * can filter on range columns using the string representation of range
1419
+ * values.
1420
+ *
1421
+ * @example With `select()`
1422
+ * ```ts
1423
+ * const { data, error } = await supabase
1424
+ * .from('reservations')
1425
+ * .select()
1426
+ * .rangeAdjacent('during', '[2000-01-01 12:00, 2000-01-01 13:00)')
1427
+ * ```
1428
+ *
1429
+ * @exampleSql With `select()`
1430
+ * ```sql
1431
+ * create table
1432
+ * reservations (
1433
+ * id int8 primary key,
1434
+ * room_name text,
1435
+ * during tsrange
1436
+ * );
1437
+ *
1438
+ * insert into
1439
+ * reservations (id, room_name, during)
1440
+ * values
1441
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
1442
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
1443
+ * ```
1444
+ *
1445
+ * @exampleResponse With `select()`
1446
+ * ```json
1447
+ * {
1448
+ * "data": [
1449
+ * {
1450
+ * "id": 1,
1451
+ * "room_name": "Emerald",
1452
+ * "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")"
1453
+ * }
1454
+ * ],
1455
+ * "status": 200,
1456
+ * "statusText": "OK"
1457
+ * }
1458
+ * ```
1459
+ */
1460
+ rangeAdjacent(column: string, range: string): this {
1461
+ this.url.searchParams.append(column, `adj.${range}`)
1462
+ return this
1463
+ }
1464
+
1465
+ overlaps<ColumnName extends string & keyof Row>(
1466
+ column: ColumnName,
1467
+ value: string | ReadonlyArray<Row[ColumnName]>
1468
+ ): this
1469
+ overlaps(column: string, value: string | readonly unknown[]): this
1470
+ /**
1471
+ * Only relevant for array and range columns. Match only rows where
1472
+ * `column` and `value` have an element in common.
1473
+ *
1474
+ * @param column - The array or range column to filter on
1475
+ * @param value - The array or range value to filter with
1476
+ *
1477
+ * @category Database
1478
+ * @subcategory Using filters
1479
+ *
1480
+ * @example On array columns
1481
+ * ```ts
1482
+ * const { data, error } = await supabase
1483
+ * .from('issues')
1484
+ * .select('title')
1485
+ * .overlaps('tags', ['is:closed', 'severity:high'])
1486
+ * ```
1487
+ *
1488
+ * @exampleSql On array columns
1489
+ * ```sql
1490
+ * create table
1491
+ * issues (
1492
+ * id int8 primary key,
1493
+ * title text,
1494
+ * tags text[]
1495
+ * );
1496
+ *
1497
+ * insert into
1498
+ * issues (id, title, tags)
1499
+ * values
1500
+ * (1, 'Cache invalidation is not working', array['is:open', 'severity:high', 'priority:low']),
1501
+ * (2, 'Use better names', array['is:open', 'severity:low', 'priority:medium']);
1502
+ * ```
1503
+ *
1504
+ * @exampleResponse On array columns
1505
+ * ```json
1506
+ * {
1507
+ * "data": [
1508
+ * {
1509
+ * "title": "Cache invalidation is not working"
1510
+ * }
1511
+ * ],
1512
+ * "status": 200,
1513
+ * "statusText": "OK"
1514
+ * }
1515
+ * ```
1516
+ *
1517
+ * @exampleDescription On range columns
1518
+ * Postgres supports a number of [range
1519
+ * types](https://www.postgresql.org/docs/current/rangetypes.html). You
1520
+ * can filter on range columns using the string representation of range
1521
+ * values.
1522
+ *
1523
+ * @example On range columns
1524
+ * ```ts
1525
+ * const { data, error } = await supabase
1526
+ * .from('reservations')
1527
+ * .select()
1528
+ * .overlaps('during', '[2000-01-01 12:45, 2000-01-01 13:15)')
1529
+ * ```
1530
+ *
1531
+ * @exampleSql On range columns
1532
+ * ```sql
1533
+ * create table
1534
+ * reservations (
1535
+ * id int8 primary key,
1536
+ * room_name text,
1537
+ * during tsrange
1538
+ * );
1539
+ *
1540
+ * insert into
1541
+ * reservations (id, room_name, during)
1542
+ * values
1543
+ * (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
1544
+ * (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');
1545
+ * ```
1546
+ *
1547
+ * @exampleResponse On range columns
1548
+ * ```json
1549
+ * {
1550
+ * "data": [
1551
+ * {
1552
+ * "id": 1,
1553
+ * "room_name": "Emerald",
1554
+ * "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")"
1555
+ * }
1556
+ * ],
1557
+ * "status": 200,
1558
+ * "statusText": "OK"
1559
+ * }
1560
+ * ```
1561
+ */
1562
+ overlaps(column: string, value: string | readonly unknown[]): this {
1563
+ if (typeof value === 'string') {
1564
+ // range
1565
+ this.url.searchParams.append(column, `ov.${value}`)
1566
+ } else {
1567
+ // array
1568
+ this.url.searchParams.append(column, `ov.{${value.join(',')}}`)
1569
+ }
1570
+ return this
1571
+ }
1572
+
1573
+ textSearch<ColumnName extends string & keyof Row>(
1574
+ column: ColumnName,
1575
+ query: string,
1576
+ options?: { config?: string; type?: 'plain' | 'phrase' | 'websearch' }
1577
+ ): this
1578
+ textSearch(
1579
+ column: string,
1580
+ query: string,
1581
+ options?: { config?: string; type?: 'plain' | 'phrase' | 'websearch' }
1582
+ ): this
1583
+ /**
1584
+ * Only relevant for text and tsvector columns. Match only rows where
1585
+ * `column` matches the query string in `query`.
1586
+ *
1587
+ * @param column - The text or tsvector column to filter on
1588
+ * @param query - The query text to match with
1589
+ * @param options - Named parameters
1590
+ * @param options.config - The text search configuration to use
1591
+ * @param options.type - Change how the `query` text is interpreted
1592
+ *
1593
+ * @category Database
1594
+ * @subcategory Using filters
1595
+ *
1596
+ * @remarks
1597
+ * - For more information, see [Postgres full text search](/docs/guides/database/full-text-search).
1598
+ *
1599
+ * @example Text search
1600
+ * ```ts
1601
+ * const result = await supabase
1602
+ * .from("texts")
1603
+ * .select("content")
1604
+ * .textSearch("content", `'eggs' & 'ham'`, {
1605
+ * config: "english",
1606
+ * });
1607
+ * ```
1608
+ *
1609
+ * @exampleSql Text search
1610
+ * ```sql
1611
+ * create table texts (
1612
+ * id bigint
1613
+ * primary key
1614
+ * generated always as identity,
1615
+ * content text
1616
+ * );
1617
+ *
1618
+ * insert into texts (content) values
1619
+ * ('Four score and seven years ago'),
1620
+ * ('The road goes ever on and on'),
1621
+ * ('Green eggs and ham')
1622
+ * ;
1623
+ * ```
1624
+ *
1625
+ * @exampleResponse Text search
1626
+ * ```json
1627
+ * {
1628
+ * "data": [
1629
+ * {
1630
+ * "content": "Green eggs and ham"
1631
+ * }
1632
+ * ],
1633
+ * "status": 200,
1634
+ * "statusText": "OK"
1635
+ * }
1636
+ * ```
1637
+ *
1638
+ * @exampleDescription Basic normalization
1639
+ * Uses PostgreSQL's `plainto_tsquery` function.
1640
+ *
1641
+ * @example Basic normalization
1642
+ * ```ts
1643
+ * const { data, error } = await supabase
1644
+ * .from('quotes')
1645
+ * .select('catchphrase')
1646
+ * .textSearch('catchphrase', `'fat' & 'cat'`, {
1647
+ * type: 'plain',
1648
+ * config: 'english'
1649
+ * })
1650
+ * ```
1651
+ *
1652
+ * @exampleDescription Full normalization
1653
+ * Uses PostgreSQL's `phraseto_tsquery` function.
1654
+ *
1655
+ * @example Full normalization
1656
+ * ```ts
1657
+ * const { data, error } = await supabase
1658
+ * .from('quotes')
1659
+ * .select('catchphrase')
1660
+ * .textSearch('catchphrase', `'fat' & 'cat'`, {
1661
+ * type: 'phrase',
1662
+ * config: 'english'
1663
+ * })
1664
+ * ```
1665
+ *
1666
+ * @exampleDescription Websearch
1667
+ * Uses PostgreSQL's `websearch_to_tsquery` function.
1668
+ * This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be used
1669
+ * with advanced operators.
1670
+ *
1671
+ * - `unquoted text`: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.
1672
+ * - `"quoted text"`: text inside quote marks will be converted to terms separated by `<->` operators, as if processed by phraseto_tsquery.
1673
+ * - `OR`: the word “or” will be converted to the | operator.
1674
+ * - `-`: a dash will be converted to the ! operator.
1675
+ *
1676
+ * @example Websearch
1677
+ * ```ts
1678
+ * const { data, error } = await supabase
1679
+ * .from('quotes')
1680
+ * .select('catchphrase')
1681
+ * .textSearch('catchphrase', `'fat or cat'`, {
1682
+ * type: 'websearch',
1683
+ * config: 'english'
1684
+ * })
1685
+ * ```
1686
+ */
1687
+ textSearch(
1688
+ column: string,
1689
+ query: string,
1690
+ { config, type }: { config?: string; type?: 'plain' | 'phrase' | 'websearch' } = {}
1691
+ ): this {
1692
+ let typePart = ''
1693
+ if (type === 'plain') {
1694
+ typePart = 'pl'
1695
+ } else if (type === 'phrase') {
1696
+ typePart = 'ph'
1697
+ } else if (type === 'websearch') {
1698
+ typePart = 'w'
1699
+ }
1700
+ const configPart = config === undefined ? '' : `(${config})`
1701
+ this.url.searchParams.append(column, `${typePart}fts${configPart}.${query}`)
1702
+ return this
1703
+ }
1704
+
1705
+ match<ColumnName extends string & keyof Row>(query: Record<ColumnName, Row[ColumnName]>): this
1706
+ match(query: Record<string, unknown>): this
1707
+ /**
1708
+ * Match only rows where each column in `query` keys is equal to its
1709
+ * associated value. Shorthand for multiple `.eq()`s.
1710
+ *
1711
+ * @param query - The object to filter with, with column names as keys mapped
1712
+ * to their filter values
1713
+ *
1714
+ * @category Database
1715
+ * @subcategory Using filters
1716
+ *
1717
+ * @example With `select()`
1718
+ * ```ts
1719
+ * const { data, error } = await supabase
1720
+ * .from('characters')
1721
+ * .select('name')
1722
+ * .match({ id: 2, name: 'Leia' })
1723
+ * ```
1724
+ *
1725
+ * @exampleSql With `select()`
1726
+ * ```sql
1727
+ * create table
1728
+ * characters (id int8 primary key, name text);
1729
+ *
1730
+ * insert into
1731
+ * characters (id, name)
1732
+ * values
1733
+ * (1, 'Luke'),
1734
+ * (2, 'Leia'),
1735
+ * (3, 'Han');
1736
+ * ```
1737
+ *
1738
+ * @exampleResponse With `select()`
1739
+ * ```json
1740
+ * {
1741
+ * "data": [
1742
+ * {
1743
+ * "name": "Leia"
1744
+ * }
1745
+ * ],
1746
+ * "status": 200,
1747
+ * "statusText": "OK"
1748
+ * }
1749
+ * ```
1750
+ */
1751
+ match(query: Record<string, unknown>): this {
1752
+ Object.entries(query)
1753
+ // columns with `undefined` value needs to be filtered out, otherwise it'll
1754
+ // show up as `?column=eq.undefined`
1755
+ .filter(([_, value]) => value !== undefined)
1756
+ .forEach(([column, value]) => {
1757
+ this.url.searchParams.append(column, `eq.${value}`)
1758
+ })
1759
+ return this
1760
+ }
1761
+
1762
+ not<ColumnName extends string & keyof Row>(
1763
+ column: ColumnName,
1764
+ operator: 'is',
1765
+ value: null
1766
+ ): PostgrestFilterBuilder<
1767
+ ClientOptions,
1768
+ Schema,
1769
+ NonNullableColumn<Row, ColumnName>,
1770
+ NarrowResultColumn<Result, ColumnName>,
1771
+ RelationName,
1772
+ Relationships,
1773
+ Method
1774
+ > &
1775
+ this
1776
+ not<ColumnName extends string & keyof Row>(
1777
+ column: ColumnName,
1778
+ operator: FilterOperator,
1779
+ value: Row[ColumnName]
1780
+ ): this
1781
+ not(column: string, operator: string, value: unknown): this
1782
+ /**
1783
+ * Match only rows which doesn't satisfy the filter.
1784
+ *
1785
+ * Unlike most filters, `opearator` and `value` are used as-is and need to
1786
+ * follow [PostgREST
1787
+ * syntax](https://postgrest.org/en/stable/api.html#operators). You also need
1788
+ * to make sure they are properly sanitized.
1789
+ *
1790
+ * @param column - The column to filter on
1791
+ * @param operator - The operator to be negated to filter with, following
1792
+ * PostgREST syntax
1793
+ * @param value - The value to filter with, following PostgREST syntax
1794
+ *
1795
+ * @category Database
1796
+ * @subcategory Using filters
1797
+ *
1798
+ * @remarks
1799
+ * not() expects you to use the raw PostgREST syntax for the filter values.
1800
+ *
1801
+ * ```ts
1802
+ * .not('id', 'in', '(5,6,7)') // Use `()` for `in` filter
1803
+ * .not('arraycol', 'cs', '{"a","b"}') // Use `cs` for `contains()`, `{}` for array values
1804
+ * ```
1805
+ *
1806
+ * @example With `select()`
1807
+ * ```ts
1808
+ * const { data, error } = await supabase
1809
+ * .from('countries')
1810
+ * .select()
1811
+ * .not('name', 'is', null)
1812
+ * ```
1813
+ *
1814
+ * @exampleSql With `select()`
1815
+ * ```sql
1816
+ * create table
1817
+ * countries (id int8 primary key, name text);
1818
+ *
1819
+ * insert into
1820
+ * countries (id, name)
1821
+ * values
1822
+ * (1, 'null'),
1823
+ * (2, null);
1824
+ * ```
1825
+ *
1826
+ * @exampleResponse With `select()`
1827
+ * ```json
1828
+ * {
1829
+ * "data": [
1830
+ * {
1831
+ * "id": 1,
1832
+ * "name": "null"
1833
+ * }
1834
+ * ],
1835
+ * "status": 200,
1836
+ * "statusText": "OK"
1837
+ * }
1838
+ *
1839
+ * ```
1840
+ */
1841
+ not(
1842
+ column: string,
1843
+ operator: string,
1844
+ value: unknown
1845
+ ): PostgrestFilterBuilder<ClientOptions, Schema, any, any, RelationName, Relationships, Method> &
1846
+ this {
1847
+ this.url.searchParams.append(column, `not.${operator}.${value}`)
1848
+ return this as any
1849
+ }
1850
+
1851
+ /**
1852
+ * Match only rows which satisfy at least one of the filters.
1853
+ *
1854
+ * Unlike most filters, `filters` is used as-is and needs to follow [PostgREST
1855
+ * syntax](https://postgrest.org/en/stable/api.html#operators). You also need
1856
+ * to make sure it's properly sanitized.
1857
+ *
1858
+ * It's currently not possible to do an `.or()` filter across multiple tables.
1859
+ *
1860
+ * @param filters - The filters to use, following PostgREST syntax
1861
+ * @param options - Named parameters
1862
+ * @param options.referencedTable - Set this to filter on referenced tables
1863
+ * instead of the parent table
1864
+ * @param options.foreignTable - Deprecated, use `referencedTable` instead
1865
+ *
1866
+ * @category Database
1867
+ * @subcategory Using filters
1868
+ *
1869
+ * @remarks
1870
+ * or() expects you to use the raw PostgREST syntax for the filter names and values.
1871
+ *
1872
+ * ```ts
1873
+ * .or('id.in.(5,6,7), arraycol.cs.{"a","b"}') // Use `()` for `in` filter, `{}` for array values and `cs` for `contains()`.
1874
+ * .or('id.in.(5,6,7), arraycol.cd.{"a","b"}') // Use `cd` for `containedBy()`
1875
+ * ```
1876
+ *
1877
+ * @example With `select()`
1878
+ * ```ts
1879
+ * const { data, error } = await supabase
1880
+ * .from('characters')
1881
+ * .select('name')
1882
+ * .or('id.eq.2,name.eq.Han')
1883
+ * ```
1884
+ *
1885
+ * @exampleSql With `select()`
1886
+ * ```sql
1887
+ * create table
1888
+ * characters (id int8 primary key, name text);
1889
+ *
1890
+ * insert into
1891
+ * characters (id, name)
1892
+ * values
1893
+ * (1, 'Luke'),
1894
+ * (2, 'Leia'),
1895
+ * (3, 'Han');
1896
+ * ```
1897
+ *
1898
+ * @exampleResponse With `select()`
1899
+ * ```json
1900
+ * {
1901
+ * "data": [
1902
+ * {
1903
+ * "name": "Leia"
1904
+ * },
1905
+ * {
1906
+ * "name": "Han"
1907
+ * }
1908
+ * ],
1909
+ * "status": 200,
1910
+ * "statusText": "OK"
1911
+ * }
1912
+ * ```
1913
+ *
1914
+ * @example Use `or` with `and`
1915
+ * ```ts
1916
+ * const { data, error } = await supabase
1917
+ * .from('characters')
1918
+ * .select('name')
1919
+ * .or('id.gt.3,and(id.eq.1,name.eq.Luke)')
1920
+ * ```
1921
+ *
1922
+ * @exampleSql Use `or` with `and`
1923
+ * ```sql
1924
+ * create table
1925
+ * characters (id int8 primary key, name text);
1926
+ *
1927
+ * insert into
1928
+ * characters (id, name)
1929
+ * values
1930
+ * (1, 'Luke'),
1931
+ * (2, 'Leia'),
1932
+ * (3, 'Han');
1933
+ * ```
1934
+ *
1935
+ * @exampleResponse Use `or` with `and`
1936
+ * ```json
1937
+ * {
1938
+ * "data": [
1939
+ * {
1940
+ * "name": "Luke"
1941
+ * }
1942
+ * ],
1943
+ * "status": 200,
1944
+ * "statusText": "OK"
1945
+ * }
1946
+ * ```
1947
+ *
1948
+ * @example Use `or` on referenced tables
1949
+ * ```ts
1950
+ * const { data, error } = await supabase
1951
+ * .from('orchestral_sections')
1952
+ * .select(`
1953
+ * name,
1954
+ * instruments!inner (
1955
+ * name
1956
+ * )
1957
+ * `)
1958
+ * .or('section_id.eq.1,name.eq.guzheng', { referencedTable: 'instruments' })
1959
+ * ```
1960
+ *
1961
+ * @exampleSql Use `or` on referenced tables
1962
+ * ```sql
1963
+ * create table
1964
+ * orchestral_sections (id int8 primary key, name text);
1965
+ * create table
1966
+ * instruments (
1967
+ * id int8 primary key,
1968
+ * section_id int8 not null references orchestral_sections,
1969
+ * name text
1970
+ * );
1971
+ *
1972
+ * insert into
1973
+ * orchestral_sections (id, name)
1974
+ * values
1975
+ * (1, 'strings'),
1976
+ * (2, 'woodwinds');
1977
+ * insert into
1978
+ * instruments (id, section_id, name)
1979
+ * values
1980
+ * (1, 2, 'flute'),
1981
+ * (2, 1, 'violin');
1982
+ * ```
1983
+ *
1984
+ * @exampleResponse Use `or` on referenced tables
1985
+ * ```json
1986
+ * {
1987
+ * "data": [
1988
+ * {
1989
+ * "name": "strings",
1990
+ * "instruments": [
1991
+ * {
1992
+ * "name": "violin"
1993
+ * }
1994
+ * ]
1995
+ * }
1996
+ * ],
1997
+ * "status": 200,
1998
+ * "statusText": "OK"
1999
+ * }
2000
+ * ```
2001
+ */
2002
+ or(
2003
+ filters: string,
2004
+ {
2005
+ foreignTable,
2006
+ referencedTable = foreignTable,
2007
+ }: { foreignTable?: string; referencedTable?: string } = {}
2008
+ ): this {
2009
+ const key = referencedTable ? `${referencedTable}.or` : 'or'
2010
+ this.url.searchParams.append(key, `(${filters})`)
2011
+ return this
2012
+ }
2013
+
2014
+ filter<ColumnName extends string & keyof Row>(
2015
+ column: ColumnName,
2016
+ operator: `${'' | 'not.'}${FilterOperator}`,
2017
+ value: unknown
2018
+ ): this
2019
+ filter(column: string, operator: string, value: unknown): this
2020
+ /**
2021
+ * Match only rows which satisfy the filter. This is an escape hatch - you
2022
+ * should use the specific filter methods wherever possible.
2023
+ *
2024
+ * Unlike most filters, `opearator` and `value` are used as-is and need to
2025
+ * follow [PostgREST
2026
+ * syntax](https://postgrest.org/en/stable/api.html#operators). You also need
2027
+ * to make sure they are properly sanitized.
2028
+ *
2029
+ * @param column - The column to filter on
2030
+ * @param operator - The operator to filter with, following PostgREST syntax
2031
+ * @param value - The value to filter with, following PostgREST syntax
2032
+ *
2033
+ * @category Database
2034
+ * @subcategory Using filters
2035
+ *
2036
+ * @remarks
2037
+ * filter() expects you to use the raw PostgREST syntax for the filter values.
2038
+ *
2039
+ * ```ts
2040
+ * .filter('id', 'in', '(5,6,7)') // Use `()` for `in` filter
2041
+ * .filter('arraycol', 'cs', '{"a","b"}') // Use `cs` for `contains()`, `{}` for array values
2042
+ * ```
2043
+ *
2044
+ * @example With `select()`
2045
+ * ```ts
2046
+ * const { data, error } = await supabase
2047
+ * .from('characters')
2048
+ * .select()
2049
+ * .filter('name', 'in', '("Han","Yoda")')
2050
+ * ```
2051
+ *
2052
+ * @exampleSql With `select()`
2053
+ * ```sql
2054
+ * create table
2055
+ * characters (id int8 primary key, name text);
2056
+ *
2057
+ * insert into
2058
+ * characters (id, name)
2059
+ * values
2060
+ * (1, 'Luke'),
2061
+ * (2, 'Leia'),
2062
+ * (3, 'Han');
2063
+ * ```
2064
+ *
2065
+ * @exampleResponse With `select()`
2066
+ * ```json
2067
+ * {
2068
+ * "data": [
2069
+ * {
2070
+ * "id": 3,
2071
+ * "name": "Han"
2072
+ * }
2073
+ * ],
2074
+ * "status": 200,
2075
+ * "statusText": "OK"
2076
+ * }
2077
+ * ```
2078
+ *
2079
+ * @example On a referenced table
2080
+ * ```ts
2081
+ * const { data, error } = await supabase
2082
+ * .from('orchestral_sections')
2083
+ * .select(`
2084
+ * name,
2085
+ * instruments!inner (
2086
+ * name
2087
+ * )
2088
+ * `)
2089
+ * .filter('instruments.name', 'eq', 'flute')
2090
+ * ```
2091
+ *
2092
+ * @exampleSql On a referenced table
2093
+ * ```sql
2094
+ * create table
2095
+ * orchestral_sections (id int8 primary key, name text);
2096
+ * create table
2097
+ * instruments (
2098
+ * id int8 primary key,
2099
+ * section_id int8 not null references orchestral_sections,
2100
+ * name text
2101
+ * );
2102
+ *
2103
+ * insert into
2104
+ * orchestral_sections (id, name)
2105
+ * values
2106
+ * (1, 'strings'),
2107
+ * (2, 'woodwinds');
2108
+ * insert into
2109
+ * instruments (id, section_id, name)
2110
+ * values
2111
+ * (1, 2, 'flute'),
2112
+ * (2, 1, 'violin');
2113
+ * ```
2114
+ *
2115
+ * @exampleResponse On a referenced table
2116
+ * ```json
2117
+ * {
2118
+ * "data": [
2119
+ * {
2120
+ * "name": "woodwinds",
2121
+ * "instruments": [
2122
+ * {
2123
+ * "name": "flute"
2124
+ * }
2125
+ * ]
2126
+ * }
2127
+ * ],
2128
+ * "status": 200,
2129
+ * "statusText": "OK"
2130
+ * }
2131
+ * ```
2132
+ */
2133
+ filter(column: string, operator: string, value: unknown): this {
2134
+ this.url.searchParams.append(column, `${operator}.${value}`)
2135
+ return this
2136
+ }
2137
+ }