@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,1703 @@
1
+ import PostgrestFilterBuilder from './PostgrestFilterBuilder'
2
+ import { GetResult } from './select-query-parser/result'
3
+ import {
4
+ ClientServerOptions,
5
+ Fetch,
6
+ GenericSchema,
7
+ GenericTable,
8
+ GenericView,
9
+ } from './types/common/common'
10
+ import { RejectExcessProperties } from './types/types'
11
+
12
+ export default class PostgrestQueryBuilder<
13
+ ClientOptions extends ClientServerOptions,
14
+ Schema extends GenericSchema,
15
+ Relation extends GenericTable | GenericView,
16
+ RelationName = unknown,
17
+ Relationships = Relation extends { Relationships: infer R } ? R : unknown,
18
+ > {
19
+ url: URL
20
+ headers: Headers
21
+ schema?: string
22
+ signal?: AbortSignal
23
+ fetch?: Fetch
24
+ urlLengthLimit: number
25
+
26
+ /**
27
+ * Enable or disable automatic retries for transient errors.
28
+ * When enabled, idempotent requests (GET/HEAD/OPTIONS) that fail with network
29
+ * errors or HTTP 503/520 responses are automatically retried with exponential
30
+ * backoff (1s, 2s, 4s, up to 3 attempts). Defaults to `true` when not specified.
31
+ */
32
+ retry?: boolean
33
+
34
+ /**
35
+ * Creates a query builder scoped to a Postgres table or view.
36
+ *
37
+ * @category Database
38
+ *
39
+ * @param url - The URL for the query
40
+ * @param options - Named parameters
41
+ * @param options.headers - Custom headers
42
+ * @param options.schema - Postgres schema to use
43
+ * @param options.fetch - Custom fetch implementation
44
+ * @param options.urlLengthLimit - Maximum URL length before warning
45
+ * @param options.retry - Enable automatic retries for transient errors (default: true)
46
+ *
47
+ * @example Using supabase-js (recommended)
48
+ * ```ts
49
+ * import { createClient } from '@supabase/supabase-js'
50
+ *
51
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
52
+ * const { data, error } = await supabase.from('users').select('*')
53
+ * ```
54
+ *
55
+ * @example Standalone import for bundle-sensitive environments
56
+ * ```ts
57
+ * import { PostgrestQueryBuilder } from '@supabase/postgrest-js'
58
+ *
59
+ * const query = new PostgrestQueryBuilder(
60
+ * new URL('https://xyzcompany.supabase.co/rest/v1/users'),
61
+ * { headers: { apikey: 'your-publishable-key' }, retry: true }
62
+ * )
63
+ * ```
64
+ */
65
+ constructor(
66
+ url: URL,
67
+ {
68
+ headers = {},
69
+ schema,
70
+ fetch,
71
+ urlLengthLimit = 8000,
72
+ retry,
73
+ }: {
74
+ headers?: HeadersInit
75
+ schema?: string
76
+ fetch?: Fetch
77
+ urlLengthLimit?: number
78
+ retry?: boolean
79
+ }
80
+ ) {
81
+ this.url = url
82
+ this.headers = new Headers(headers)
83
+ this.schema = schema
84
+ this.fetch = fetch
85
+ this.urlLengthLimit = urlLengthLimit
86
+ this.retry = retry
87
+ }
88
+
89
+ /**
90
+ * Clone URL and headers to prevent shared state between operations.
91
+ */
92
+ private cloneRequestState(): { url: URL; headers: Headers } {
93
+ return {
94
+ url: new URL(this.url.toString()),
95
+ headers: new Headers(this.headers),
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Perform a SELECT query on the table or view.
101
+ *
102
+ * @param columns - The columns to retrieve, separated by commas. Columns can be renamed when returned with `customName:columnName`
103
+ *
104
+ * @param options - Named parameters
105
+ *
106
+ * @param options.head - When set to `true`, `data` will not be returned.
107
+ * Useful if you only need the count.
108
+ *
109
+ * @param options.count - Count algorithm to use to count rows in the table or view.
110
+ *
111
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
112
+ * hood.
113
+ *
114
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
115
+ * statistics under the hood.
116
+ *
117
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
118
+ * numbers.
119
+ *
120
+ * @remarks
121
+ * When using `count` with `.range()` or `.limit()`, the returned `count` is the total number of rows
122
+ * that match your filters, not the number of rows in the current page. Use this to build pagination UI.
123
+
124
+ * - By default, Supabase projects return a maximum of 1,000 rows. This setting can be changed in your project's [API settings](/dashboard/project/_/settings/api). It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data.
125
+ * - `select()` can be combined with [Filters](/docs/reference/javascript/using-filters)
126
+ * - `select()` can be combined with [Modifiers](/docs/reference/javascript/using-modifiers)
127
+ * - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/platform) and [should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). *
128
+ * @category Database
129
+ *
130
+ * @example Getting your data
131
+ * ```js
132
+ * const { data, error } = await supabase
133
+ * .from('characters')
134
+ * .select()
135
+ * ```
136
+ *
137
+ * @exampleSql Getting your data
138
+ * ```sql
139
+ * create table
140
+ * characters (id int8 primary key, name text);
141
+ *
142
+ * insert into
143
+ * characters (id, name)
144
+ * values
145
+ * (1, 'Harry'),
146
+ * (2, 'Frodo'),
147
+ * (3, 'Katniss');
148
+ * ```
149
+ *
150
+ * @exampleResponse Getting your data
151
+ * ```json
152
+ * {
153
+ * "data": [
154
+ * {
155
+ * "id": 1,
156
+ * "name": "Harry"
157
+ * },
158
+ * {
159
+ * "id": 2,
160
+ * "name": "Frodo"
161
+ * },
162
+ * {
163
+ * "id": 3,
164
+ * "name": "Katniss"
165
+ * }
166
+ * ],
167
+ * "status": 200,
168
+ * "statusText": "OK"
169
+ * }
170
+ * ```
171
+ *
172
+ * @example Selecting specific columns
173
+ * ```js
174
+ * const { data, error } = await supabase
175
+ * .from('characters')
176
+ * .select('name')
177
+ * ```
178
+ *
179
+ * @exampleSql Selecting specific columns
180
+ * ```sql
181
+ * create table
182
+ * characters (id int8 primary key, name text);
183
+ *
184
+ * insert into
185
+ * characters (id, name)
186
+ * values
187
+ * (1, 'Frodo'),
188
+ * (2, 'Harry'),
189
+ * (3, 'Katniss');
190
+ * ```
191
+ *
192
+ * @exampleResponse Selecting specific columns
193
+ * ```json
194
+ * {
195
+ * "data": [
196
+ * {
197
+ * "name": "Frodo"
198
+ * },
199
+ * {
200
+ * "name": "Harry"
201
+ * },
202
+ * {
203
+ * "name": "Katniss"
204
+ * }
205
+ * ],
206
+ * "status": 200,
207
+ * "statusText": "OK"
208
+ * }
209
+ * ```
210
+ *
211
+ * @exampleDescription Query referenced tables
212
+ * If your database has foreign key relationships, you can query related tables too.
213
+ *
214
+ * @example Query referenced tables
215
+ * ```js
216
+ * const { data, error } = await supabase
217
+ * .from('orchestral_sections')
218
+ * .select(`
219
+ * name,
220
+ * instruments (
221
+ * name
222
+ * )
223
+ * `)
224
+ * ```
225
+ *
226
+ * @exampleSql Query referenced tables
227
+ * ```sql
228
+ * create table
229
+ * orchestral_sections (id int8 primary key, name text);
230
+ * create table
231
+ * instruments (
232
+ * id int8 primary key,
233
+ * section_id int8 not null references orchestral_sections,
234
+ * name text
235
+ * );
236
+ *
237
+ * insert into
238
+ * orchestral_sections (id, name)
239
+ * values
240
+ * (1, 'strings'),
241
+ * (2, 'woodwinds');
242
+ * insert into
243
+ * instruments (id, section_id, name)
244
+ * values
245
+ * (1, 2, 'flute'),
246
+ * (2, 1, 'violin');
247
+ * ```
248
+ *
249
+ * @exampleResponse Query referenced tables
250
+ * ```json
251
+ * {
252
+ * "data": [
253
+ * {
254
+ * "name": "strings",
255
+ * "instruments": [
256
+ * {
257
+ * "name": "violin"
258
+ * }
259
+ * ]
260
+ * },
261
+ * {
262
+ * "name": "woodwinds",
263
+ * "instruments": [
264
+ * {
265
+ * "name": "flute"
266
+ * }
267
+ * ]
268
+ * }
269
+ * ],
270
+ * "status": 200,
271
+ * "statusText": "OK"
272
+ * }
273
+ * ```
274
+ *
275
+ * @exampleDescription Query referenced tables with spaces in their names
276
+ * If your table name contains spaces, you must use double quotes in the `select` statement to reference the table.
277
+ *
278
+ * @example Query referenced tables with spaces in their names
279
+ * ```js
280
+ * const { data, error } = await supabase
281
+ * .from('orchestral sections')
282
+ * .select(`
283
+ * name,
284
+ * "musical instruments" (
285
+ * name
286
+ * )
287
+ * `)
288
+ * ```
289
+ *
290
+ * @exampleSql Query referenced tables with spaces in their names
291
+ * ```sql
292
+ * create table
293
+ * "orchestral sections" (id int8 primary key, name text);
294
+ * create table
295
+ * "musical instruments" (
296
+ * id int8 primary key,
297
+ * section_id int8 not null references "orchestral sections",
298
+ * name text
299
+ * );
300
+ *
301
+ * insert into
302
+ * "orchestral sections" (id, name)
303
+ * values
304
+ * (1, 'strings'),
305
+ * (2, 'woodwinds');
306
+ * insert into
307
+ * "musical instruments" (id, section_id, name)
308
+ * values
309
+ * (1, 2, 'flute'),
310
+ * (2, 1, 'violin');
311
+ * ```
312
+ *
313
+ * @exampleResponse Query referenced tables with spaces in their names
314
+ * ```json
315
+ * {
316
+ * "data": [
317
+ * {
318
+ * "name": "strings",
319
+ * "musical instruments": [
320
+ * {
321
+ * "name": "violin"
322
+ * }
323
+ * ]
324
+ * },
325
+ * {
326
+ * "name": "woodwinds",
327
+ * "musical instruments": [
328
+ * {
329
+ * "name": "flute"
330
+ * }
331
+ * ]
332
+ * }
333
+ * ],
334
+ * "status": 200,
335
+ * "statusText": "OK"
336
+ * }
337
+ * ```
338
+ *
339
+ * @exampleDescription Query referenced tables through a join table
340
+ * If you're in a situation where your tables are **NOT** directly
341
+ * related, but instead are joined by a _join table_, you can still use
342
+ * the `select()` method to query the related data. The join table needs
343
+ * to have the foreign keys as part of its composite primary key.
344
+ *
345
+ * @example Query referenced tables through a join table
346
+ * ```ts
347
+ * const { data, error } = await supabase
348
+ * .from('users')
349
+ * .select(`
350
+ * name,
351
+ * teams (
352
+ * name
353
+ * )
354
+ * `)
355
+ *
356
+ * ```
357
+ *
358
+ * @exampleSql Query referenced tables through a join table
359
+ * ```sql
360
+ * create table
361
+ * users (
362
+ * id int8 primary key,
363
+ * name text
364
+ * );
365
+ * create table
366
+ * teams (
367
+ * id int8 primary key,
368
+ * name text
369
+ * );
370
+ * -- join table
371
+ * create table
372
+ * users_teams (
373
+ * user_id int8 not null references users,
374
+ * team_id int8 not null references teams,
375
+ * -- both foreign keys must be part of a composite primary key
376
+ * primary key (user_id, team_id)
377
+ * );
378
+ *
379
+ * insert into
380
+ * users (id, name)
381
+ * values
382
+ * (1, 'Kiran'),
383
+ * (2, 'Evan');
384
+ * insert into
385
+ * teams (id, name)
386
+ * values
387
+ * (1, 'Green'),
388
+ * (2, 'Blue');
389
+ * insert into
390
+ * users_teams (user_id, team_id)
391
+ * values
392
+ * (1, 1),
393
+ * (1, 2),
394
+ * (2, 2);
395
+ * ```
396
+ *
397
+ * @exampleResponse Query referenced tables through a join table
398
+ * ```json
399
+ * {
400
+ * "data": [
401
+ * {
402
+ * "name": "Kiran",
403
+ * "teams": [
404
+ * {
405
+ * "name": "Green"
406
+ * },
407
+ * {
408
+ * "name": "Blue"
409
+ * }
410
+ * ]
411
+ * },
412
+ * {
413
+ * "name": "Evan",
414
+ * "teams": [
415
+ * {
416
+ * "name": "Blue"
417
+ * }
418
+ * ]
419
+ * }
420
+ * ],
421
+ * "status": 200,
422
+ * "statusText": "OK"
423
+ * }
424
+ *
425
+ * ```
426
+ *
427
+ * @exampleDescription Query the same referenced table multiple times
428
+ * If you need to query the same referenced table twice, use the name of the
429
+ * joined column to identify which join to use. You can also give each
430
+ * column an alias.
431
+ *
432
+ * @example Query the same referenced table multiple times
433
+ * ```ts
434
+ * const { data, error } = await supabase
435
+ * .from('messages')
436
+ * .select(`
437
+ * content,
438
+ * from:sender_id(name),
439
+ * to:receiver_id(name)
440
+ * `)
441
+ *
442
+ * // To infer types, use the name of the table (in this case `users`) and
443
+ * // the name of the foreign key constraint.
444
+ * const { data, error } = await supabase
445
+ * .from('messages')
446
+ * .select(`
447
+ * content,
448
+ * from:users!messages_sender_id_fkey(name),
449
+ * to:users!messages_receiver_id_fkey(name)
450
+ * `)
451
+ * ```
452
+ *
453
+ * @exampleSql Query the same referenced table multiple times
454
+ * ```sql
455
+ * create table
456
+ * users (id int8 primary key, name text);
457
+ *
458
+ * create table
459
+ * messages (
460
+ * sender_id int8 not null references users,
461
+ * receiver_id int8 not null references users,
462
+ * content text
463
+ * );
464
+ *
465
+ * insert into
466
+ * users (id, name)
467
+ * values
468
+ * (1, 'Kiran'),
469
+ * (2, 'Evan');
470
+ *
471
+ * insert into
472
+ * messages (sender_id, receiver_id, content)
473
+ * values
474
+ * (1, 2, '👋');
475
+ * ```
476
+ * ```
477
+ *
478
+ * @exampleResponse Query the same referenced table multiple times
479
+ * ```json
480
+ * {
481
+ * "data": [
482
+ * {
483
+ * "content": "👋",
484
+ * "from": {
485
+ * "name": "Kiran"
486
+ * },
487
+ * "to": {
488
+ * "name": "Evan"
489
+ * }
490
+ * }
491
+ * ],
492
+ * "status": 200,
493
+ * "statusText": "OK"
494
+ * }
495
+ * ```
496
+ *
497
+ * @exampleDescription Query nested foreign tables through a join table
498
+ * You can use the result of a joined table to gather data in
499
+ * another foreign table. With multiple references to the same foreign
500
+ * table you must specify the column on which to conduct the join.
501
+ *
502
+ * @example Query nested foreign tables through a join table
503
+ * ```ts
504
+ * const { data, error } = await supabase
505
+ * .from('games')
506
+ * .select(`
507
+ * game_id:id,
508
+ * away_team:teams!games_away_team_fkey (
509
+ * users (
510
+ * id,
511
+ * name
512
+ * )
513
+ * )
514
+ * `)
515
+ *
516
+ * ```
517
+ *
518
+ * @exampleSql Query nested foreign tables through a join table
519
+ * ```sql
520
+ * ```sql
521
+ * create table
522
+ * users (
523
+ * id int8 primary key,
524
+ * name text
525
+ * );
526
+ * create table
527
+ * teams (
528
+ * id int8 primary key,
529
+ * name text
530
+ * );
531
+ * -- join table
532
+ * create table
533
+ * users_teams (
534
+ * user_id int8 not null references users,
535
+ * team_id int8 not null references teams,
536
+ *
537
+ * primary key (user_id, team_id)
538
+ * );
539
+ * create table
540
+ * games (
541
+ * id int8 primary key,
542
+ * home_team int8 not null references teams,
543
+ * away_team int8 not null references teams,
544
+ * name text
545
+ * );
546
+ *
547
+ * insert into users (id, name)
548
+ * values
549
+ * (1, 'Kiran'),
550
+ * (2, 'Evan');
551
+ * insert into
552
+ * teams (id, name)
553
+ * values
554
+ * (1, 'Green'),
555
+ * (2, 'Blue');
556
+ * insert into
557
+ * users_teams (user_id, team_id)
558
+ * values
559
+ * (1, 1),
560
+ * (1, 2),
561
+ * (2, 2);
562
+ * insert into
563
+ * games (id, home_team, away_team, name)
564
+ * values
565
+ * (1, 1, 2, 'Green vs Blue'),
566
+ * (2, 2, 1, 'Blue vs Green');
567
+ * ```
568
+ *
569
+ * @exampleResponse Query nested foreign tables through a join table
570
+ * ```json
571
+ * {
572
+ * "data": [
573
+ * {
574
+ * "game_id": 1,
575
+ * "away_team": {
576
+ * "users": [
577
+ * {
578
+ * "id": 1,
579
+ * "name": "Kiran"
580
+ * },
581
+ * {
582
+ * "id": 2,
583
+ * "name": "Evan"
584
+ * }
585
+ * ]
586
+ * }
587
+ * },
588
+ * {
589
+ * "game_id": 2,
590
+ * "away_team": {
591
+ * "users": [
592
+ * {
593
+ * "id": 1,
594
+ * "name": "Kiran"
595
+ * }
596
+ * ]
597
+ * }
598
+ * }
599
+ * ],
600
+ * "status": 200,
601
+ * "statusText": "OK"
602
+ * }
603
+ *
604
+ * ```
605
+ *
606
+ * @exampleDescription Filtering through referenced tables
607
+ * If the filter on a referenced table's column is not satisfied, the referenced
608
+ * table returns `[]` or `null` but the parent table is not filtered out.
609
+ * If you want to filter out the parent table rows, use the `!inner` hint
610
+ *
611
+ * @example Filtering through referenced tables
612
+ * ```ts
613
+ * const { data, error } = await supabase
614
+ * .from('instruments')
615
+ * .select('name, orchestral_sections(*)')
616
+ * .eq('orchestral_sections.name', 'percussion')
617
+ * ```
618
+ *
619
+ * @exampleSql Filtering through referenced tables
620
+ * ```sql
621
+ * create table
622
+ * orchestral_sections (id int8 primary key, name text);
623
+ * create table
624
+ * instruments (
625
+ * id int8 primary key,
626
+ * section_id int8 not null references orchestral_sections,
627
+ * name text
628
+ * );
629
+ *
630
+ * insert into
631
+ * orchestral_sections (id, name)
632
+ * values
633
+ * (1, 'strings'),
634
+ * (2, 'woodwinds');
635
+ * insert into
636
+ * instruments (id, section_id, name)
637
+ * values
638
+ * (1, 2, 'flute'),
639
+ * (2, 1, 'violin');
640
+ * ```
641
+ *
642
+ * @exampleResponse Filtering through referenced tables
643
+ * ```json
644
+ * {
645
+ * "data": [
646
+ * {
647
+ * "name": "flute",
648
+ * "orchestral_sections": null
649
+ * },
650
+ * {
651
+ * "name": "violin",
652
+ * "orchestral_sections": null
653
+ * }
654
+ * ],
655
+ * "status": 200,
656
+ * "statusText": "OK"
657
+ * }
658
+ * ```
659
+ *
660
+ * @exampleDescription Querying referenced table with count
661
+ * You can get the number of rows in a related table by using the
662
+ * **count** property.
663
+ *
664
+ * @example Querying referenced table with count
665
+ * ```ts
666
+ * const { data, error } = await supabase
667
+ * .from('orchestral_sections')
668
+ * .select(`*, instruments(count)`)
669
+ * ```
670
+ *
671
+ * @exampleSql Querying referenced table with count
672
+ * ```sql
673
+ * create table orchestral_sections (
674
+ * "id" "uuid" primary key default "extensions"."uuid_generate_v4"() not null,
675
+ * "name" text
676
+ * );
677
+ *
678
+ * create table characters (
679
+ * "id" "uuid" primary key default "extensions"."uuid_generate_v4"() not null,
680
+ * "name" text,
681
+ * "section_id" "uuid" references public.orchestral_sections on delete cascade
682
+ * );
683
+ *
684
+ * with section as (
685
+ * insert into orchestral_sections (name)
686
+ * values ('strings') returning id
687
+ * )
688
+ * insert into instruments (name, section_id) values
689
+ * ('violin', (select id from section)),
690
+ * ('viola', (select id from section)),
691
+ * ('cello', (select id from section)),
692
+ * ('double bass', (select id from section));
693
+ * ```
694
+ *
695
+ * @exampleResponse Querying referenced table with count
696
+ * ```json
697
+ * [
698
+ * {
699
+ * "id": "693694e7-d993-4360-a6d7-6294e325d9b6",
700
+ * "name": "strings",
701
+ * "instruments": [
702
+ * {
703
+ * "count": 4
704
+ * }
705
+ * ]
706
+ * }
707
+ * ]
708
+ * ```
709
+ *
710
+ * @exampleDescription Querying with count option
711
+ * You can get the number of rows by using the
712
+ * [count](/docs/reference/javascript/select#parameters) option.
713
+ *
714
+ * @example Querying with count option
715
+ * ```ts
716
+ * const { count, error } = await supabase
717
+ * .from('characters')
718
+ * .select('*', { count: 'exact', head: true })
719
+ * ```
720
+ *
721
+ * @exampleSql Querying with count option
722
+ * ```sql
723
+ * create table
724
+ * characters (id int8 primary key, name text);
725
+ *
726
+ * insert into
727
+ * characters (id, name)
728
+ * values
729
+ * (1, 'Luke'),
730
+ * (2, 'Leia'),
731
+ * (3, 'Han');
732
+ * ```
733
+ *
734
+ * @exampleResponse Querying with count option
735
+ * ```json
736
+ * {
737
+ * "count": 3,
738
+ * "status": 200,
739
+ * "statusText": "OK"
740
+ * }
741
+ * ```
742
+ *
743
+ * @exampleDescription Querying JSON data
744
+ * You can select and filter data inside of
745
+ * [JSON](/docs/guides/database/json) columns. Postgres offers some
746
+ * [operators](/docs/guides/database/json#query-the-jsonb-data) for
747
+ * querying JSON data.
748
+ *
749
+ * @example Querying JSON data
750
+ * ```ts
751
+ * const { data, error } = await supabase
752
+ * .from('users')
753
+ * .select(`
754
+ * id, name,
755
+ * address->city
756
+ * `)
757
+ * ```
758
+ *
759
+ * @exampleSql Querying JSON data
760
+ * ```sql
761
+ * create table
762
+ * users (
763
+ * id int8 primary key,
764
+ * name text,
765
+ * address jsonb
766
+ * );
767
+ *
768
+ * insert into
769
+ * users (id, name, address)
770
+ * values
771
+ * (1, 'Frodo', '{"city":"Hobbiton"}');
772
+ * ```
773
+ *
774
+ * @exampleResponse Querying JSON data
775
+ * ```json
776
+ * {
777
+ * "data": [
778
+ * {
779
+ * "id": 1,
780
+ * "name": "Frodo",
781
+ * "city": "Hobbiton"
782
+ * }
783
+ * ],
784
+ * "status": 200,
785
+ * "statusText": "OK"
786
+ * }
787
+ * ```
788
+ *
789
+ * @exampleDescription Querying referenced table with inner join
790
+ * If you don't want to return the referenced table contents, you can leave the parenthesis empty.
791
+ * Like `.select('name, orchestral_sections!inner()')`.
792
+ *
793
+ * @example Querying referenced table with inner join
794
+ * ```ts
795
+ * const { data, error } = await supabase
796
+ * .from('instruments')
797
+ * .select('name, orchestral_sections!inner(name)')
798
+ * .eq('orchestral_sections.name', 'woodwinds')
799
+ * .limit(1)
800
+ * ```
801
+ *
802
+ * @exampleSql Querying referenced table with inner join
803
+ * ```sql
804
+ * create table orchestral_sections (
805
+ * "id" "uuid" primary key default "extensions"."uuid_generate_v4"() not null,
806
+ * "name" text
807
+ * );
808
+ *
809
+ * create table instruments (
810
+ * "id" "uuid" primary key default "extensions"."uuid_generate_v4"() not null,
811
+ * "name" text,
812
+ * "section_id" "uuid" references public.orchestral_sections on delete cascade
813
+ * );
814
+ *
815
+ * with section as (
816
+ * insert into orchestral_sections (name)
817
+ * values ('woodwinds') returning id
818
+ * )
819
+ * insert into instruments (name, section_id) values
820
+ * ('flute', (select id from section)),
821
+ * ('clarinet', (select id from section)),
822
+ * ('bassoon', (select id from section)),
823
+ * ('piccolo', (select id from section));
824
+ * ```
825
+ *
826
+ * @exampleResponse Querying referenced table with inner join
827
+ * ```json
828
+ * {
829
+ * "data": [
830
+ * {
831
+ * "name": "flute",
832
+ * "orchestral_sections": {"name": "woodwinds"}
833
+ * }
834
+ * ],
835
+ * "status": 200,
836
+ * "statusText": "OK"
837
+ * }
838
+ * ```
839
+ *
840
+ * @exampleDescription Switching schemas per query
841
+ * In addition to setting the schema during initialization, you can also switch schemas on a per-query basis.
842
+ * Make sure you've set up your [database privileges and API settings](/docs/guides/api/using-custom-schemas).
843
+ *
844
+ * @example Switching schemas per query
845
+ * ```ts
846
+ * const { data, error } = await supabase
847
+ * .schema('myschema')
848
+ * .from('mytable')
849
+ * .select()
850
+ * ```
851
+ *
852
+ * @exampleSql Switching schemas per query
853
+ * ```sql
854
+ * create schema myschema;
855
+ *
856
+ * create table myschema.mytable (
857
+ * id uuid primary key default gen_random_uuid(),
858
+ * data text
859
+ * );
860
+ *
861
+ * insert into myschema.mytable (data) values ('mydata');
862
+ * ```
863
+ *
864
+ * @exampleResponse Switching schemas per query
865
+ * ```json
866
+ * {
867
+ * "data": [
868
+ * {
869
+ * "id": "4162e008-27b0-4c0f-82dc-ccaeee9a624d",
870
+ * "data": "mydata"
871
+ * }
872
+ * ],
873
+ * "status": 200,
874
+ * "statusText": "OK"
875
+ * }
876
+ * ```
877
+ */
878
+ select<
879
+ Query extends string = '*',
880
+ ResultOne = GetResult<
881
+ Schema,
882
+ Relation['Row'],
883
+ RelationName,
884
+ Relationships,
885
+ Query,
886
+ ClientOptions
887
+ >,
888
+ >(
889
+ columns?: Query,
890
+ options?: {
891
+ head?: boolean
892
+ count?: 'exact' | 'planned' | 'estimated' | (string & {})
893
+ }
894
+ ): PostgrestFilterBuilder<
895
+ ClientOptions,
896
+ Schema,
897
+ Relation['Row'],
898
+ ResultOne[],
899
+ RelationName,
900
+ Relationships,
901
+ 'GET'
902
+ > {
903
+ const { head = false, count } = options ?? {}
904
+
905
+ const method = head ? 'HEAD' : 'GET'
906
+ // Remove whitespaces except when quoted
907
+ let quoted = false
908
+ const cleanedColumns = (columns ?? '*')
909
+ .split('')
910
+ .map((c) => {
911
+ if (/\s/.test(c) && !quoted) {
912
+ return ''
913
+ }
914
+ if (c === '"') {
915
+ quoted = !quoted
916
+ }
917
+ return c
918
+ })
919
+ .join('')
920
+
921
+ const { url, headers } = this.cloneRequestState()
922
+ url.searchParams.set('select', cleanedColumns)
923
+
924
+ if (count) {
925
+ headers.append('Prefer', `count=${count}`)
926
+ }
927
+
928
+ return new PostgrestFilterBuilder({
929
+ method,
930
+ url,
931
+ headers,
932
+ schema: this.schema,
933
+ fetch: this.fetch,
934
+ urlLengthLimit: this.urlLengthLimit,
935
+ retry: this.retry,
936
+ })
937
+ }
938
+
939
+ /**
940
+ * Perform an INSERT into the table or view.
941
+ *
942
+ * By default, inserted rows are not returned. To return it, chain the call
943
+ * with `.select()`.
944
+ *
945
+ * @param values - The values to insert. Pass an object to insert a single row
946
+ * or an array to insert multiple rows.
947
+ *
948
+ * @param options - Named parameters
949
+ *
950
+ * @param options.count - Count algorithm to use to count inserted rows.
951
+ *
952
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
953
+ * hood.
954
+ *
955
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
956
+ * statistics under the hood.
957
+ *
958
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
959
+ * numbers.
960
+ *
961
+ * @param options.defaultToNull - Make missing fields default to `null`.
962
+ * Otherwise, use the default value for the column. Only applies for bulk
963
+ * inserts.
964
+ *
965
+ * @category Database
966
+ *
967
+ * @example Create a record
968
+ * ```ts
969
+ * const { error } = await supabase
970
+ * .from('countries')
971
+ * .insert({ id: 1, name: 'Mordor' })
972
+ * ```
973
+ *
974
+ * @exampleSql Create a record
975
+ * ```sql
976
+ * create table
977
+ * countries (id int8 primary key, name text);
978
+ * ```
979
+ *
980
+ * @exampleResponse Create a record
981
+ * ```json
982
+ * {
983
+ * "status": 201,
984
+ * "statusText": "Created"
985
+ * }
986
+ * ```
987
+ *
988
+ * @example Create a record and return it
989
+ * ```ts
990
+ * const { data, error } = await supabase
991
+ * .from('countries')
992
+ * .insert({ id: 1, name: 'Mordor' })
993
+ * .select()
994
+ * ```
995
+ *
996
+ * @exampleSql Create a record and return it
997
+ * ```sql
998
+ * create table
999
+ * countries (id int8 primary key, name text);
1000
+ * ```
1001
+ *
1002
+ * @exampleResponse Create a record and return it
1003
+ * ```json
1004
+ * {
1005
+ * "data": [
1006
+ * {
1007
+ * "id": 1,
1008
+ * "name": "Mordor"
1009
+ * }
1010
+ * ],
1011
+ * "status": 201,
1012
+ * "statusText": "Created"
1013
+ * }
1014
+ * ```
1015
+ *
1016
+ * @exampleDescription Bulk create
1017
+ * A bulk create operation is handled in a single transaction.
1018
+ * If any of the inserts fail, none of the rows are inserted.
1019
+ *
1020
+ * @example Bulk create
1021
+ * ```ts
1022
+ * const { error } = await supabase
1023
+ * .from('countries')
1024
+ * .insert([
1025
+ * { id: 1, name: 'Mordor' },
1026
+ * { id: 1, name: 'The Shire' },
1027
+ * ])
1028
+ * ```
1029
+ *
1030
+ * @exampleSql Bulk create
1031
+ * ```sql
1032
+ * create table
1033
+ * countries (id int8 primary key, name text);
1034
+ * ```
1035
+ *
1036
+ * @exampleResponse Bulk create
1037
+ * ```json
1038
+ * {
1039
+ * "error": {
1040
+ * "code": "23505",
1041
+ * "details": "Key (id)=(1) already exists.",
1042
+ * "hint": null,
1043
+ * "message": "duplicate key value violates unique constraint \"countries_pkey\""
1044
+ * },
1045
+ * "status": 409,
1046
+ * "statusText": "Conflict"
1047
+ * }
1048
+ * ```
1049
+ */
1050
+ insert<Row extends Relation extends { Insert: unknown } ? Relation['Insert'] : never>(
1051
+ values:
1052
+ | RejectExcessProperties<
1053
+ Relation extends { Insert: unknown } ? Relation['Insert'] : never,
1054
+ Row
1055
+ >
1056
+ | RejectExcessProperties<
1057
+ Relation extends { Insert: unknown } ? Relation['Insert'] : never,
1058
+ Row
1059
+ >[],
1060
+ {
1061
+ count,
1062
+ defaultToNull = true,
1063
+ }: {
1064
+ count?: 'exact' | 'planned' | 'estimated' | (string & {})
1065
+ defaultToNull?: boolean
1066
+ } = {}
1067
+ ): PostgrestFilterBuilder<
1068
+ ClientOptions,
1069
+ Schema,
1070
+ Relation['Row'],
1071
+ null,
1072
+ RelationName,
1073
+ Relationships,
1074
+ 'POST'
1075
+ > {
1076
+ const method = 'POST'
1077
+ const { url, headers } = this.cloneRequestState()
1078
+
1079
+ if (count) {
1080
+ headers.append('Prefer', `count=${count}`)
1081
+ }
1082
+ if (!defaultToNull) {
1083
+ headers.append('Prefer', `missing=default`)
1084
+ }
1085
+
1086
+ if (Array.isArray(values)) {
1087
+ const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), [] as string[])
1088
+ if (columns.length > 0) {
1089
+ const uniqueColumns = [...new Set(columns)].map((column) => `"${column}"`)
1090
+ url.searchParams.set('columns', uniqueColumns.join(','))
1091
+ }
1092
+ }
1093
+
1094
+ return new PostgrestFilterBuilder({
1095
+ method,
1096
+ url,
1097
+ headers,
1098
+ schema: this.schema,
1099
+ body: values,
1100
+ fetch: this.fetch ?? fetch,
1101
+ urlLengthLimit: this.urlLengthLimit,
1102
+ retry: this.retry,
1103
+ })
1104
+ }
1105
+
1106
+ /**
1107
+ * Perform an UPSERT on the table or view. Depending on the column(s) passed
1108
+ * to `onConflict`, `.upsert()` allows you to perform the equivalent of
1109
+ * `.insert()` if a row with the corresponding `onConflict` columns doesn't
1110
+ * exist, or if it does exist, perform an alternative action depending on
1111
+ * `ignoreDuplicates`.
1112
+ *
1113
+ * By default, upserted rows are not returned. To return it, chain the call
1114
+ * with `.select()`.
1115
+ *
1116
+ * @param values - The values to upsert with. Pass an object to upsert a
1117
+ * single row or an array to upsert multiple rows.
1118
+ *
1119
+ * @param options - Named parameters
1120
+ *
1121
+ * @param options.onConflict - Comma-separated UNIQUE column(s) to specify how
1122
+ * duplicate rows are determined. Two rows are duplicates if all the
1123
+ * `onConflict` columns are equal.
1124
+ *
1125
+ * @param options.ignoreDuplicates - If `true`, duplicate rows are ignored. If
1126
+ * `false`, duplicate rows are merged with existing rows.
1127
+ *
1128
+ * @param options.count - Count algorithm to use to count upserted rows.
1129
+ *
1130
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
1131
+ * hood.
1132
+ *
1133
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
1134
+ * statistics under the hood.
1135
+ *
1136
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
1137
+ * numbers.
1138
+ *
1139
+ * @param options.defaultToNull - Make missing fields default to `null`.
1140
+ * Otherwise, use the default value for the column. This only applies when
1141
+ * inserting new rows, not when merging with existing rows under
1142
+ * `ignoreDuplicates: false`. This also only applies when doing bulk upserts.
1143
+ *
1144
+ * @example Upsert a single row using a unique key
1145
+ * ```ts
1146
+ * // Upserting a single row, overwriting based on the 'username' unique column
1147
+ * const { data, error } = await supabase
1148
+ * .from('users')
1149
+ * .upsert({ username: 'supabot' }, { onConflict: 'username' })
1150
+ *
1151
+ * // Example response:
1152
+ * // {
1153
+ * // data: [
1154
+ * // { id: 4, message: 'bar', username: 'supabot' }
1155
+ * // ],
1156
+ * // error: null
1157
+ * // }
1158
+ * ```
1159
+ *
1160
+ * @example Upsert with conflict resolution and exact row counting
1161
+ * ```ts
1162
+ * // Upserting and returning exact count
1163
+ * const { data, error, count } = await supabase
1164
+ * .from('users')
1165
+ * .upsert(
1166
+ * {
1167
+ * id: 3,
1168
+ * message: 'foo',
1169
+ * username: 'supabot'
1170
+ * },
1171
+ * {
1172
+ * onConflict: 'username',
1173
+ * count: 'exact'
1174
+ * }
1175
+ * )
1176
+ *
1177
+ * // Example response:
1178
+ * // {
1179
+ * // data: [
1180
+ * // {
1181
+ * // id: 42,
1182
+ * // handle: "saoirse",
1183
+ * // display_name: "Saoirse"
1184
+ * // }
1185
+ * // ],
1186
+ * // count: 1,
1187
+ * // error: null
1188
+ * // }
1189
+ * ```
1190
+ *
1191
+ * @category Database
1192
+ *
1193
+ * @remarks
1194
+ * - Primary keys must be included in `values` to use upsert.
1195
+ *
1196
+ * @example Upsert your data
1197
+ * ```ts
1198
+ * const { data, error } = await supabase
1199
+ * .from('instruments')
1200
+ * .upsert({ id: 1, name: 'piano' })
1201
+ * .select()
1202
+ * ```
1203
+ *
1204
+ * @exampleSql Upsert your data
1205
+ * ```sql
1206
+ * create table
1207
+ * instruments (id int8 primary key, name text);
1208
+ *
1209
+ * insert into
1210
+ * instruments (id, name)
1211
+ * values
1212
+ * (1, 'harpsichord');
1213
+ * ```
1214
+ *
1215
+ * @exampleResponse Upsert your data
1216
+ * ```json
1217
+ * {
1218
+ * "data": [
1219
+ * {
1220
+ * "id": 1,
1221
+ * "name": "piano"
1222
+ * }
1223
+ * ],
1224
+ * "status": 201,
1225
+ * "statusText": "Created"
1226
+ * }
1227
+ * ```
1228
+ *
1229
+ * @example Bulk Upsert your data
1230
+ * ```ts
1231
+ * const { data, error } = await supabase
1232
+ * .from('instruments')
1233
+ * .upsert([
1234
+ * { id: 1, name: 'piano' },
1235
+ * { id: 2, name: 'harp' },
1236
+ * ])
1237
+ * .select()
1238
+ * ```
1239
+ *
1240
+ * @exampleSql Bulk Upsert your data
1241
+ * ```sql
1242
+ * create table
1243
+ * instruments (id int8 primary key, name text);
1244
+ *
1245
+ * insert into
1246
+ * instruments (id, name)
1247
+ * values
1248
+ * (1, 'harpsichord');
1249
+ * ```
1250
+ *
1251
+ * @exampleResponse Bulk Upsert your data
1252
+ * ```json
1253
+ * {
1254
+ * "data": [
1255
+ * {
1256
+ * "id": 1,
1257
+ * "name": "piano"
1258
+ * },
1259
+ * {
1260
+ * "id": 2,
1261
+ * "name": "harp"
1262
+ * }
1263
+ * ],
1264
+ * "status": 201,
1265
+ * "statusText": "Created"
1266
+ * }
1267
+ * ```
1268
+ *
1269
+ * @exampleDescription Upserting into tables with constraints
1270
+ * In the following query, `upsert()` implicitly uses the `id`
1271
+ * (primary key) column to determine conflicts. If there is no existing
1272
+ * row with the same `id`, `upsert()` inserts a new row, which
1273
+ * will fail in this case as there is already a row with `handle` `"saoirse"`.
1274
+ * Using the `onConflict` option, you can instruct `upsert()` to use
1275
+ * another column with a unique constraint to determine conflicts.
1276
+ *
1277
+ * @example Upserting into tables with constraints
1278
+ * ```ts
1279
+ * const { data, error } = await supabase
1280
+ * .from('users')
1281
+ * .upsert({ id: 42, handle: 'saoirse', display_name: 'Saoirse' })
1282
+ * .select()
1283
+ * ```
1284
+ *
1285
+ * @exampleSql Upserting into tables with constraints
1286
+ * ```sql
1287
+ * create table
1288
+ * users (
1289
+ * id int8 generated by default as identity primary key,
1290
+ * handle text not null unique,
1291
+ * display_name text
1292
+ * );
1293
+ *
1294
+ * insert into
1295
+ * users (id, handle, display_name)
1296
+ * values
1297
+ * (1, 'saoirse', null);
1298
+ * ```
1299
+ *
1300
+ * @exampleResponse Upserting into tables with constraints
1301
+ * ```json
1302
+ * {
1303
+ * "error": {
1304
+ * "code": "23505",
1305
+ * "details": "Key (handle)=(saoirse) already exists.",
1306
+ * "hint": null,
1307
+ * "message": "duplicate key value violates unique constraint \"users_handle_key\""
1308
+ * },
1309
+ * "status": 409,
1310
+ * "statusText": "Conflict"
1311
+ * }
1312
+ * ```
1313
+ */
1314
+
1315
+ upsert<Row extends Relation extends { Insert: unknown } ? Relation['Insert'] : never>(
1316
+ values:
1317
+ | RejectExcessProperties<
1318
+ Relation extends { Insert: unknown } ? Relation['Insert'] : never,
1319
+ Row
1320
+ >
1321
+ | RejectExcessProperties<
1322
+ Relation extends { Insert: unknown } ? Relation['Insert'] : never,
1323
+ Row
1324
+ >[],
1325
+ {
1326
+ onConflict,
1327
+ ignoreDuplicates = false,
1328
+ count,
1329
+ defaultToNull = true,
1330
+ }: {
1331
+ onConflict?: string
1332
+ ignoreDuplicates?: boolean
1333
+ count?: 'exact' | 'planned' | 'estimated' | (string & {})
1334
+ defaultToNull?: boolean
1335
+ } = {}
1336
+ ): PostgrestFilterBuilder<
1337
+ ClientOptions,
1338
+ Schema,
1339
+ Relation['Row'],
1340
+ null,
1341
+ RelationName,
1342
+ Relationships,
1343
+ 'POST'
1344
+ > {
1345
+ const method = 'POST'
1346
+ const { url, headers } = this.cloneRequestState()
1347
+
1348
+ headers.append('Prefer', `resolution=${ignoreDuplicates ? 'ignore' : 'merge'}-duplicates`)
1349
+
1350
+ if (onConflict !== undefined) url.searchParams.set('on_conflict', onConflict)
1351
+ if (count) {
1352
+ headers.append('Prefer', `count=${count}`)
1353
+ }
1354
+ if (!defaultToNull) {
1355
+ headers.append('Prefer', 'missing=default')
1356
+ }
1357
+
1358
+ if (Array.isArray(values)) {
1359
+ const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), [] as string[])
1360
+ if (columns.length > 0) {
1361
+ const uniqueColumns = [...new Set(columns)].map((column) => `"${column}"`)
1362
+ url.searchParams.set('columns', uniqueColumns.join(','))
1363
+ }
1364
+ }
1365
+
1366
+ return new PostgrestFilterBuilder({
1367
+ method,
1368
+ url,
1369
+ headers,
1370
+ schema: this.schema,
1371
+ body: values,
1372
+ fetch: this.fetch ?? fetch,
1373
+ urlLengthLimit: this.urlLengthLimit,
1374
+ retry: this.retry,
1375
+ })
1376
+ }
1377
+
1378
+ /**
1379
+ * Perform an UPDATE on the table or view.
1380
+ *
1381
+ * By default, updated rows are not returned. To return it, chain the call
1382
+ * with `.select()` after filters.
1383
+ *
1384
+ * @param values - The values to update with
1385
+ *
1386
+ * @param options - Named parameters
1387
+ *
1388
+ * @param options.count - Count algorithm to use to count updated rows.
1389
+ *
1390
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
1391
+ * hood.
1392
+ *
1393
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
1394
+ * statistics under the hood.
1395
+ *
1396
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
1397
+ * numbers.
1398
+ *
1399
+ * @category Database
1400
+ *
1401
+ * @remarks
1402
+ * - `update()` should always be combined with [Filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to update.
1403
+ *
1404
+ * @example Updating your data
1405
+ * ```ts
1406
+ * const { error } = await supabase
1407
+ * .from('instruments')
1408
+ * .update({ name: 'piano' })
1409
+ * .eq('id', 1)
1410
+ * ```
1411
+ *
1412
+ * @exampleSql Updating your data
1413
+ * ```sql
1414
+ * create table
1415
+ * instruments (id int8 primary key, name text);
1416
+ *
1417
+ * insert into
1418
+ * instruments (id, name)
1419
+ * values
1420
+ * (1, 'harpsichord');
1421
+ * ```
1422
+ *
1423
+ * @exampleResponse Updating your data
1424
+ * ```json
1425
+ * {
1426
+ * "status": 204,
1427
+ * "statusText": "No Content"
1428
+ * }
1429
+ * ```
1430
+ *
1431
+ * @example Update a record and return it
1432
+ * ```ts
1433
+ * const { data, error } = await supabase
1434
+ * .from('instruments')
1435
+ * .update({ name: 'piano' })
1436
+ * .eq('id', 1)
1437
+ * .select()
1438
+ * ```
1439
+ *
1440
+ * @exampleSql Update a record and return it
1441
+ * ```sql
1442
+ * create table
1443
+ * instruments (id int8 primary key, name text);
1444
+ *
1445
+ * insert into
1446
+ * instruments (id, name)
1447
+ * values
1448
+ * (1, 'harpsichord');
1449
+ * ```
1450
+ *
1451
+ * @exampleResponse Update a record and return it
1452
+ * ```json
1453
+ * {
1454
+ * "data": [
1455
+ * {
1456
+ * "id": 1,
1457
+ * "name": "piano"
1458
+ * }
1459
+ * ],
1460
+ * "status": 200,
1461
+ * "statusText": "OK"
1462
+ * }
1463
+ * ```
1464
+ *
1465
+ * @exampleDescription Updating JSON data
1466
+ * Postgres offers some
1467
+ * [operators](/docs/guides/database/json#query-the-jsonb-data) for
1468
+ * working with JSON data. Currently, it is only possible to update the entire JSON document.
1469
+ *
1470
+ * @example Updating JSON data
1471
+ * ```ts
1472
+ * const { data, error } = await supabase
1473
+ * .from('users')
1474
+ * .update({
1475
+ * address: {
1476
+ * street: 'Melrose Place',
1477
+ * postcode: 90210
1478
+ * }
1479
+ * })
1480
+ * .eq('address->postcode', 90210)
1481
+ * .select()
1482
+ * ```
1483
+ *
1484
+ * @exampleSql Updating JSON data
1485
+ * ```sql
1486
+ * create table
1487
+ * users (
1488
+ * id int8 primary key,
1489
+ * name text,
1490
+ * address jsonb
1491
+ * );
1492
+ *
1493
+ * insert into
1494
+ * users (id, name, address)
1495
+ * values
1496
+ * (1, 'Michael', '{ "postcode": 90210 }');
1497
+ * ```
1498
+ *
1499
+ * @exampleResponse Updating JSON data
1500
+ * ```json
1501
+ * {
1502
+ * "data": [
1503
+ * {
1504
+ * "id": 1,
1505
+ * "name": "Michael",
1506
+ * "address": {
1507
+ * "street": "Melrose Place",
1508
+ * "postcode": 90210
1509
+ * }
1510
+ * }
1511
+ * ],
1512
+ * "status": 200,
1513
+ * "statusText": "OK"
1514
+ * }
1515
+ * ```
1516
+ */
1517
+ update<Row extends Relation extends { Update: unknown } ? Relation['Update'] : never>(
1518
+ values: RejectExcessProperties<
1519
+ Relation extends { Update: unknown } ? Relation['Update'] : never,
1520
+ Row
1521
+ >,
1522
+ {
1523
+ count,
1524
+ }: {
1525
+ count?: 'exact' | 'planned' | 'estimated' | (string & {})
1526
+ } = {}
1527
+ ): PostgrestFilterBuilder<
1528
+ ClientOptions,
1529
+ Schema,
1530
+ Relation['Row'],
1531
+ null,
1532
+ RelationName,
1533
+ Relationships,
1534
+ 'PATCH'
1535
+ > {
1536
+ const method = 'PATCH'
1537
+ const { url, headers } = this.cloneRequestState()
1538
+
1539
+ if (count) {
1540
+ headers.append('Prefer', `count=${count}`)
1541
+ }
1542
+
1543
+ return new PostgrestFilterBuilder({
1544
+ method,
1545
+ url,
1546
+ headers,
1547
+ schema: this.schema,
1548
+ body: values,
1549
+ fetch: this.fetch ?? fetch,
1550
+ urlLengthLimit: this.urlLengthLimit,
1551
+ retry: this.retry,
1552
+ })
1553
+ }
1554
+
1555
+ /**
1556
+ * Perform a DELETE on the table or view.
1557
+ *
1558
+ * By default, deleted rows are not returned. To return it, chain the call
1559
+ * with `.select()` after filters.
1560
+ *
1561
+ * @param options - Named parameters
1562
+ *
1563
+ * @param options.count - Count algorithm to use to count deleted rows.
1564
+ *
1565
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
1566
+ * hood.
1567
+ *
1568
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
1569
+ * statistics under the hood.
1570
+ *
1571
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
1572
+ * numbers.
1573
+ *
1574
+ * @category Database
1575
+ *
1576
+ * @remarks
1577
+ * - `delete()` should always be combined with [filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to delete.
1578
+ * - If you use `delete()` with filters and you have
1579
+ * [RLS](/docs/learn/auth-deep-dive/auth-row-level-security) enabled, only
1580
+ * rows visible through `SELECT` policies are deleted. Note that by default
1581
+ * no rows are visible, so you need at least one `SELECT`/`ALL` policy that
1582
+ * makes the rows visible.
1583
+ * - When using `delete().in()`, specify an array of values to target multiple rows with a single query. This is particularly useful for batch deleting entries that share common criteria, such as deleting users by their IDs. Ensure that the array you provide accurately represents all records you intend to delete to avoid unintended data removal.
1584
+ *
1585
+ * @example Delete a single record
1586
+ * ```ts
1587
+ * const response = await supabase
1588
+ * .from('countries')
1589
+ * .delete()
1590
+ * .eq('id', 1)
1591
+ * ```
1592
+ *
1593
+ * @exampleSql Delete a single record
1594
+ * ```sql
1595
+ * create table
1596
+ * countries (id int8 primary key, name text);
1597
+ *
1598
+ * insert into
1599
+ * countries (id, name)
1600
+ * values
1601
+ * (1, 'Mordor');
1602
+ * ```
1603
+ *
1604
+ * @exampleResponse Delete a single record
1605
+ * ```json
1606
+ * {
1607
+ * "status": 204,
1608
+ * "statusText": "No Content"
1609
+ * }
1610
+ * ```
1611
+ *
1612
+ * @example Delete a record and return it
1613
+ * ```ts
1614
+ * const { data, error } = await supabase
1615
+ * .from('countries')
1616
+ * .delete()
1617
+ * .eq('id', 1)
1618
+ * .select()
1619
+ * ```
1620
+ *
1621
+ * @exampleSql Delete a record and return it
1622
+ * ```sql
1623
+ * create table
1624
+ * countries (id int8 primary key, name text);
1625
+ *
1626
+ * insert into
1627
+ * countries (id, name)
1628
+ * values
1629
+ * (1, 'Mordor');
1630
+ * ```
1631
+ *
1632
+ * @exampleResponse Delete a record and return it
1633
+ * ```json
1634
+ * {
1635
+ * "data": [
1636
+ * {
1637
+ * "id": 1,
1638
+ * "name": "Mordor"
1639
+ * }
1640
+ * ],
1641
+ * "status": 200,
1642
+ * "statusText": "OK"
1643
+ * }
1644
+ * ```
1645
+ *
1646
+ * @example Delete multiple records
1647
+ * ```ts
1648
+ * const response = await supabase
1649
+ * .from('countries')
1650
+ * .delete()
1651
+ * .in('id', [1, 2, 3])
1652
+ * ```
1653
+ *
1654
+ * @exampleSql Delete multiple records
1655
+ * ```sql
1656
+ * create table
1657
+ * countries (id int8 primary key, name text);
1658
+ *
1659
+ * insert into
1660
+ * countries (id, name)
1661
+ * values
1662
+ * (1, 'Rohan'), (2, 'The Shire'), (3, 'Mordor');
1663
+ * ```
1664
+ *
1665
+ * @exampleResponse Delete multiple records
1666
+ * ```json
1667
+ * {
1668
+ * "status": 204,
1669
+ * "statusText": "No Content"
1670
+ * }
1671
+ * ```
1672
+ */
1673
+ delete({
1674
+ count,
1675
+ }: {
1676
+ count?: 'exact' | 'planned' | 'estimated' | (string & {})
1677
+ } = {}): PostgrestFilterBuilder<
1678
+ ClientOptions,
1679
+ Schema,
1680
+ Relation['Row'],
1681
+ null,
1682
+ RelationName,
1683
+ Relationships,
1684
+ 'DELETE'
1685
+ > {
1686
+ const method = 'DELETE'
1687
+ const { url, headers } = this.cloneRequestState()
1688
+
1689
+ if (count) {
1690
+ headers.append('Prefer', `count=${count}`)
1691
+ }
1692
+
1693
+ return new PostgrestFilterBuilder({
1694
+ method,
1695
+ url,
1696
+ headers,
1697
+ schema: this.schema,
1698
+ fetch: this.fetch ?? fetch,
1699
+ urlLengthLimit: this.urlLengthLimit,
1700
+ retry: this.retry,
1701
+ })
1702
+ }
1703
+ }