@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,704 @@
1
+ import { Ast } from './parser'
2
+ import {
3
+ AggregateFunctions,
4
+ ContainsNull,
5
+ GenericRelationship,
6
+ GenericSchema,
7
+ GenericTable,
8
+ IsNonEmptyArray,
9
+ TablesAndViews,
10
+ UnionToArray,
11
+ GenericFunction,
12
+ GenericSetofOption,
13
+ } from './types'
14
+
15
+ export type IsAny<T> = 0 extends 1 & T ? true : false
16
+
17
+ export type SelectQueryError<Message extends string> = { error: true } & Message
18
+
19
+ /*
20
+ ** Because of pg-meta types generation there is some cases where a same relationship can be duplicated
21
+ ** if the relation is across schemas and views this ensure that we dedup those relations and treat them
22
+ ** as postgrest would.
23
+ ** This is no longer the case and has been patched here: https://github.com/supabase/postgres-meta/pull/809
24
+ ** But we still need this for retro-compatibilty with older generated types
25
+ ** TODO: Remove this in next major version
26
+ */
27
+ export type DeduplicateRelationships<T extends readonly unknown[]> = T extends readonly [
28
+ infer First,
29
+ ...infer Rest,
30
+ ]
31
+ ? First extends Rest[number]
32
+ ? DeduplicateRelationships<Rest extends readonly unknown[] ? Rest : []>
33
+ : [First, ...DeduplicateRelationships<Rest extends readonly unknown[] ? Rest : []>]
34
+ : T
35
+
36
+ export type GetFieldNodeResultName<Field extends Ast.FieldNode> = Field['alias'] extends string
37
+ ? Field['alias']
38
+ : Field['aggregateFunction'] extends AggregateFunctions
39
+ ? Field['aggregateFunction']
40
+ : Field['name']
41
+
42
+ type FilterRelationNodes<Nodes extends Ast.Node[]> = UnionToArray<
43
+ {
44
+ [K in keyof Nodes]: Nodes[K] extends Ast.SpreadNode
45
+ ? Nodes[K]['target']
46
+ : Nodes[K] extends Ast.FieldNode
47
+ ? IsNonEmptyArray<Nodes[K]['children']> extends true
48
+ ? Nodes[K]
49
+ : never
50
+ : never
51
+ }[number]
52
+ >
53
+
54
+ type ResolveRelationships<
55
+ Schema extends GenericSchema,
56
+ RelationName extends string,
57
+ Relationships extends GenericRelationship[],
58
+ Nodes extends Ast.FieldNode[],
59
+ > = UnionToArray<{
60
+ [K in keyof Nodes]: Nodes[K] extends Ast.FieldNode
61
+ ? ResolveRelationship<Schema, Relationships, Nodes[K], RelationName> extends infer Relation
62
+ ? Relation extends {
63
+ relation: {
64
+ referencedRelation: string
65
+ foreignKeyName: string
66
+ match: string
67
+ }
68
+ from: string
69
+ }
70
+ ? {
71
+ referencedTable: Relation['relation']['referencedRelation']
72
+ fkName: Relation['relation']['foreignKeyName']
73
+ from: Relation['from']
74
+ match: Relation['relation']['match']
75
+ fieldName: GetFieldNodeResultName<Nodes[K]>
76
+ }
77
+ : Relation
78
+ : never
79
+ : never
80
+ }>[0]
81
+
82
+ /**
83
+ * Checks if a relation is implicitly referenced twice, requiring disambiguation
84
+ */
85
+ type IsDoubleReference<T, U> = T extends {
86
+ referencedTable: infer RT
87
+ fieldName: infer FN
88
+ match: infer M
89
+ }
90
+ ? M extends 'col' | 'refrel'
91
+ ? U extends { referencedTable: RT; fieldName: FN; match: M }
92
+ ? true
93
+ : false
94
+ : false
95
+ : false
96
+
97
+ /**
98
+ * Compares one element with all other elements in the array to find duplicates
99
+ */
100
+ type CheckDuplicates<Arr extends any[], Current> = Arr extends [infer Head, ...infer Tail]
101
+ ? IsDoubleReference<Current, Head> extends true
102
+ ? Head | CheckDuplicates<Tail, Current> // Return the Head if duplicate
103
+ : CheckDuplicates<Tail, Current> // Otherwise, continue checking
104
+ : never
105
+
106
+ /**
107
+ * Iterates over the elements of the array to find duplicates
108
+ */
109
+ type FindDuplicatesWithinDeduplicated<Arr extends any[]> = Arr extends [infer Head, ...infer Tail]
110
+ ? CheckDuplicates<Tail, Head> | FindDuplicatesWithinDeduplicated<Tail>
111
+ : never
112
+
113
+ type FindDuplicates<Arr extends any[]> = FindDuplicatesWithinDeduplicated<
114
+ DeduplicateRelationships<Arr>
115
+ >
116
+
117
+ export type CheckDuplicateEmbededReference<
118
+ Schema extends GenericSchema,
119
+ RelationName extends string,
120
+ Relationships extends GenericRelationship[],
121
+ Nodes extends Ast.Node[],
122
+ > =
123
+ FilterRelationNodes<Nodes> extends infer RelationsNodes
124
+ ? RelationsNodes extends Ast.FieldNode[]
125
+ ? ResolveRelationships<
126
+ Schema,
127
+ RelationName,
128
+ Relationships,
129
+ RelationsNodes
130
+ > extends infer ResolvedRels
131
+ ? ResolvedRels extends unknown[]
132
+ ? FindDuplicates<ResolvedRels> extends infer Duplicates
133
+ ? Duplicates extends never
134
+ ? false
135
+ : Duplicates extends { fieldName: infer FieldName }
136
+ ? FieldName extends string
137
+ ? {
138
+ [K in FieldName]: SelectQueryError<`table "${RelationName}" specified more than once use hinting for desambiguation`>
139
+ }
140
+ : false
141
+ : false
142
+ : false
143
+ : false
144
+ : false
145
+ : false
146
+ : false
147
+
148
+ /**
149
+ * Returns a boolean representing whether there is a foreign key referencing
150
+ * a given relation.
151
+ */
152
+ type HasFKeyToFRel<FRelName, Relationships> = Relationships extends [infer R]
153
+ ? R extends { referencedRelation: FRelName }
154
+ ? true
155
+ : false
156
+ : Relationships extends [infer R, ...infer Rest]
157
+ ? HasFKeyToFRel<FRelName, [R]> extends true
158
+ ? true
159
+ : HasFKeyToFRel<FRelName, Rest>
160
+ : false
161
+ /**
162
+ * Checks if there is more than one relation to a given foreign relation name in the Relationships.
163
+ */
164
+ type HasMultipleFKeysToFRelDeduplicated<FRelName, Relationships> = Relationships extends [
165
+ infer R,
166
+ ...infer Rest,
167
+ ]
168
+ ? R extends { referencedRelation: FRelName }
169
+ ? HasFKeyToFRel<FRelName, Rest> extends true
170
+ ? true
171
+ : HasMultipleFKeysToFRelDeduplicated<FRelName, Rest>
172
+ : HasMultipleFKeysToFRelDeduplicated<FRelName, Rest>
173
+ : false
174
+
175
+ type HasMultipleFKeysToFRel<
176
+ FRelName,
177
+ Relationships extends unknown[],
178
+ > = HasMultipleFKeysToFRelDeduplicated<FRelName, DeduplicateRelationships<Relationships>>
179
+
180
+ type CheckRelationshipError<
181
+ Schema extends GenericSchema,
182
+ Relationships extends GenericRelationship[],
183
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
184
+ FoundRelation,
185
+ > =
186
+ FoundRelation extends SelectQueryError<string>
187
+ ? FoundRelation
188
+ : // If the relation is a reverse relation with no hint (matching by name)
189
+ FoundRelation extends {
190
+ relation: {
191
+ referencedRelation: infer RelatedRelationName
192
+ name: string
193
+ }
194
+ direction: 'reverse'
195
+ }
196
+ ? RelatedRelationName extends string
197
+ ? // We check if there is possible confusion with other relations with this table
198
+ HasMultipleFKeysToFRel<RelatedRelationName, Relationships> extends true
199
+ ? // If there is, postgrest will fail at runtime, and require desambiguation via hinting
200
+ SelectQueryError<`Could not embed because more than one relationship was found for '${RelatedRelationName}' and '${CurrentTableOrView}' you need to hint the column with ${RelatedRelationName}!<columnName> ?`>
201
+ : FoundRelation
202
+ : never
203
+ : // Same check for forward relationships, but we must gather the relationships from the found relation
204
+ FoundRelation extends {
205
+ relation: {
206
+ referencedRelation: infer RelatedRelationName
207
+ name: string
208
+ }
209
+ direction: 'forward'
210
+ from: infer From
211
+ }
212
+ ? RelatedRelationName extends string
213
+ ? From extends keyof TablesAndViews<Schema> & string
214
+ ? HasMultipleFKeysToFRel<
215
+ RelatedRelationName,
216
+ TablesAndViews<Schema>[From]['Relationships']
217
+ > extends true
218
+ ? SelectQueryError<`Could not embed because more than one relationship was found for '${From}' and '${RelatedRelationName}' you need to hint the column with ${From}!<columnName> ?`>
219
+ : FoundRelation
220
+ : never
221
+ : never
222
+ : FoundRelation
223
+ /**
224
+ * Resolves relationships for embedded resources and retrieves the referenced Table
225
+ */
226
+ export type ResolveRelationship<
227
+ Schema extends GenericSchema,
228
+ Relationships extends GenericRelationship[],
229
+ Field extends Ast.FieldNode,
230
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
231
+ > =
232
+ ResolveReverseRelationship<
233
+ Schema,
234
+ Relationships,
235
+ Field,
236
+ CurrentTableOrView
237
+ > extends infer ReverseRelationship
238
+ ? ReverseRelationship extends false
239
+ ? CheckRelationshipError<
240
+ Schema,
241
+ Relationships,
242
+ CurrentTableOrView,
243
+ ResolveForwardRelationship<Schema, Field, CurrentTableOrView>
244
+ >
245
+ : CheckRelationshipError<Schema, Relationships, CurrentTableOrView, ReverseRelationship>
246
+ : never
247
+
248
+ /**
249
+ * Resolves reverse relationships (from children to parent)
250
+ */
251
+ type ResolveReverseRelationship<
252
+ Schema extends GenericSchema,
253
+ Relationships extends GenericRelationship[],
254
+ Field extends Ast.FieldNode,
255
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
256
+ > =
257
+ FindFieldMatchingRelationships<Schema, Relationships, Field> extends infer FoundRelation
258
+ ? FoundRelation extends never
259
+ ? false
260
+ : FoundRelation extends { referencedRelation: infer RelatedRelationName }
261
+ ? RelatedRelationName extends string
262
+ ? RelatedRelationName extends keyof TablesAndViews<Schema>
263
+ ? // If the relation was found via hinting we just return it without any more checks
264
+ FoundRelation extends { hint: string }
265
+ ? {
266
+ referencedTable: TablesAndViews<Schema>[RelatedRelationName]
267
+ relation: FoundRelation
268
+ direction: 'reverse'
269
+ from: CurrentTableOrView
270
+ }
271
+ : // If the relation was found via implicit relation naming, we must ensure there is no conflicting matches
272
+ HasMultipleFKeysToFRel<RelatedRelationName, Relationships> extends true
273
+ ? SelectQueryError<`Could not embed because more than one relationship was found for '${RelatedRelationName}' and '${CurrentTableOrView}' you need to hint the column with ${RelatedRelationName}!<columnName> ?`>
274
+ : {
275
+ referencedTable: TablesAndViews<Schema>[RelatedRelationName]
276
+ relation: FoundRelation
277
+ direction: 'reverse'
278
+ from: CurrentTableOrView
279
+ }
280
+ : SelectQueryError<`Relation '${RelatedRelationName}' not found in schema.`>
281
+ : false
282
+ : false
283
+ : false
284
+
285
+ export type FindMatchingTableRelationships<
286
+ Schema extends GenericSchema,
287
+ Relationships extends GenericRelationship[],
288
+ value extends string,
289
+ > = Relationships extends [infer R, ...infer Rest]
290
+ ? Rest extends GenericRelationship[]
291
+ ? R extends { referencedRelation: infer ReferencedRelation }
292
+ ? ReferencedRelation extends keyof Schema['Tables']
293
+ ? R extends { foreignKeyName: value }
294
+ ? R & { match: 'fkname' }
295
+ : R extends { referencedRelation: value }
296
+ ? R & { match: 'refrel' }
297
+ : R extends { columns: [value] }
298
+ ? R & { match: 'col' }
299
+ : FindMatchingTableRelationships<Schema, Rest, value>
300
+ : FindMatchingTableRelationships<Schema, Rest, value>
301
+ : false
302
+ : false
303
+ : false
304
+
305
+ export type FindMatchingViewRelationships<
306
+ Schema extends GenericSchema,
307
+ Relationships extends GenericRelationship[],
308
+ value extends string,
309
+ > = Relationships extends [infer R, ...infer Rest]
310
+ ? Rest extends GenericRelationship[]
311
+ ? R extends { referencedRelation: infer ReferencedRelation }
312
+ ? ReferencedRelation extends keyof Schema['Views']
313
+ ? R extends { foreignKeyName: value }
314
+ ? R & { match: 'fkname' }
315
+ : R extends { referencedRelation: value }
316
+ ? R & { match: 'refrel' }
317
+ : R extends { columns: [value] }
318
+ ? R & { match: 'col' }
319
+ : FindMatchingViewRelationships<Schema, Rest, value>
320
+ : FindMatchingViewRelationships<Schema, Rest, value>
321
+ : false
322
+ : false
323
+ : false
324
+
325
+ export type FindMatchingHintTableRelationships<
326
+ Schema extends GenericSchema,
327
+ Relationships extends GenericRelationship[],
328
+ hint extends string,
329
+ name extends string,
330
+ > = Relationships extends [infer R, ...infer Rest]
331
+ ? Rest extends GenericRelationship[]
332
+ ? R extends { referencedRelation: infer ReferencedRelation }
333
+ ? ReferencedRelation extends name
334
+ ? R extends { foreignKeyName: hint }
335
+ ? R & { match: 'fkname' }
336
+ : R extends { referencedRelation: hint }
337
+ ? R & { match: 'refrel' }
338
+ : R extends { columns: [hint] }
339
+ ? R & { match: 'col' }
340
+ : FindMatchingHintTableRelationships<Schema, Rest, hint, name>
341
+ : FindMatchingHintTableRelationships<Schema, Rest, hint, name>
342
+ : false
343
+ : false
344
+ : false
345
+ export type FindMatchingHintViewRelationships<
346
+ Schema extends GenericSchema,
347
+ Relationships extends GenericRelationship[],
348
+ hint extends string,
349
+ name extends string,
350
+ > = Relationships extends [infer R, ...infer Rest]
351
+ ? Rest extends GenericRelationship[]
352
+ ? R extends { referencedRelation: infer ReferencedRelation }
353
+ ? ReferencedRelation extends name
354
+ ? R extends { foreignKeyName: hint }
355
+ ? R & { match: 'fkname' }
356
+ : R extends { referencedRelation: hint }
357
+ ? R & { match: 'refrel' }
358
+ : R extends { columns: [hint] }
359
+ ? R & { match: 'col' }
360
+ : FindMatchingHintViewRelationships<Schema, Rest, hint, name>
361
+ : FindMatchingHintViewRelationships<Schema, Rest, hint, name>
362
+ : false
363
+ : false
364
+ : false
365
+
366
+ type IsColumnsNullable<
367
+ Table extends Pick<GenericTable, 'Row'>,
368
+ Columns extends (keyof Table['Row'])[],
369
+ > = Columns extends [infer Column, ...infer Rest]
370
+ ? Column extends keyof Table['Row']
371
+ ? ContainsNull<Table['Row'][Column]> extends true
372
+ ? true
373
+ : IsColumnsNullable<Table, Rest extends (keyof Table['Row'])[] ? Rest : []>
374
+ : false
375
+ : false
376
+
377
+ // Check weither or not a 1-1 relation is nullable by checking against the type of the columns
378
+ export type IsRelationNullable<
379
+ Table extends GenericTable,
380
+ Relation extends GenericRelationship,
381
+ > = IsColumnsNullable<Table, Relation['columns']>
382
+
383
+ type TableForwardRelationships<
384
+ Schema extends GenericSchema,
385
+ TName,
386
+ > = TName extends keyof TablesAndViews<Schema>
387
+ ? UnionToArray<
388
+ RecursivelyFindRelationships<Schema, TName, keyof TablesAndViews<Schema>>
389
+ > extends infer R
390
+ ? R extends (GenericRelationship & { from: keyof TablesAndViews<Schema> })[]
391
+ ? R
392
+ : []
393
+ : []
394
+ : []
395
+
396
+ type RecursivelyFindRelationships<
397
+ Schema extends GenericSchema,
398
+ TName,
399
+ Keys extends keyof TablesAndViews<Schema>,
400
+ > = Keys extends infer K
401
+ ? K extends keyof TablesAndViews<Schema>
402
+ ? FilterRelationships<TablesAndViews<Schema>[K]['Relationships'], TName, K> extends never
403
+ ? RecursivelyFindRelationships<Schema, TName, Exclude<Keys, K>>
404
+ :
405
+ | FilterRelationships<TablesAndViews<Schema>[K]['Relationships'], TName, K>
406
+ | RecursivelyFindRelationships<Schema, TName, Exclude<Keys, K>>
407
+ : false
408
+ : false
409
+
410
+ type FilterRelationships<R, TName, From> = R extends readonly (infer Rel)[]
411
+ ? Rel extends { referencedRelation: TName }
412
+ ? Rel & { from: From }
413
+ : never
414
+ : never
415
+
416
+ export type ResolveForwardRelationship<
417
+ Schema extends GenericSchema,
418
+ Field extends Ast.FieldNode,
419
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
420
+ > =
421
+ FindFieldMatchingRelationships<
422
+ Schema,
423
+ TablesAndViews<Schema>[Field['name']]['Relationships'],
424
+ Ast.FieldNode & { name: CurrentTableOrView; hint: Field['hint'] }
425
+ > extends infer FoundByName
426
+ ? FoundByName extends GenericRelationship
427
+ ? {
428
+ referencedTable: TablesAndViews<Schema>[Field['name']]
429
+ relation: FoundByName
430
+ direction: 'forward'
431
+ from: Field['name']
432
+ type: 'found-by-name'
433
+ }
434
+ : FindFieldMatchingRelationships<
435
+ Schema,
436
+ TableForwardRelationships<Schema, CurrentTableOrView>,
437
+ Field
438
+ > extends infer FoundByMatch
439
+ ? FoundByMatch extends GenericRelationship & {
440
+ from: keyof TablesAndViews<Schema>
441
+ }
442
+ ? {
443
+ referencedTable: TablesAndViews<Schema>[FoundByMatch['from']]
444
+ relation: FoundByMatch
445
+ direction: 'forward'
446
+ from: CurrentTableOrView
447
+ type: 'found-by-match'
448
+ }
449
+ : FindJoinTableRelationship<
450
+ Schema,
451
+ CurrentTableOrView,
452
+ Field['name']
453
+ > extends infer FoundByJoinTable
454
+ ? FoundByJoinTable extends GenericRelationship
455
+ ? {
456
+ referencedTable: TablesAndViews<Schema>[FoundByJoinTable['referencedRelation']]
457
+ relation: FoundByJoinTable & { match: 'refrel' }
458
+ direction: 'forward'
459
+ from: CurrentTableOrView
460
+ type: 'found-by-join-table'
461
+ }
462
+ : ResolveEmbededFunctionJoinTableRelationship<
463
+ Schema,
464
+ CurrentTableOrView,
465
+ Field['name']
466
+ > extends infer FoundEmbededFunctionJoinTableRelation
467
+ ? FoundEmbededFunctionJoinTableRelation extends GenericFunction
468
+ ? FoundEmbededFunctionJoinTableRelation['SetofOptions'] extends GenericSetofOption
469
+ ? FoundEmbededFunctionJoinTableRelation['SetofOptions']['to'] extends ''
470
+ ? // Scalar computed column: function returns a primitive (not a table row).
471
+ // `to` is '' because there is no target table — the value is returned directly.
472
+ {
473
+ referencedTable: { Row: Record<string, never>; Relationships: [] }
474
+ relation: {
475
+ foreignKeyName: `${Field['name']}_${CurrentTableOrView}_scalar_forward`
476
+ columns: []
477
+ isOneToOne: false
478
+ referencedColumns: []
479
+ referencedRelation: ''
480
+ } & {
481
+ match: 'func'
482
+ isNotNullable: FoundEmbededFunctionJoinTableRelation['SetofOptions']['isNotNullable'] extends true
483
+ ? true
484
+ : FoundEmbededFunctionJoinTableRelation['SetofOptions']['isSetofReturn'] extends true
485
+ ? false
486
+ : true
487
+ isSetofReturn: FoundEmbededFunctionJoinTableRelation['SetofOptions']['isSetofReturn']
488
+ }
489
+ scalarType: FoundEmbededFunctionJoinTableRelation['Returns']
490
+ direction: 'forward'
491
+ from: CurrentTableOrView
492
+ type: 'found-by-embeded-scalar-function'
493
+ }
494
+ : // Table-valued function: `to` names the target table/view.
495
+ {
496
+ referencedTable: TablesAndViews<Schema>[FoundEmbededFunctionJoinTableRelation['SetofOptions']['to']]
497
+ relation: {
498
+ foreignKeyName: `${Field['name']}_${CurrentTableOrView}_${FoundEmbededFunctionJoinTableRelation['SetofOptions']['to']}_forward`
499
+ columns: []
500
+ isOneToOne: FoundEmbededFunctionJoinTableRelation['SetofOptions']['isOneToOne'] extends true
501
+ ? true
502
+ : false
503
+ referencedColumns: []
504
+ referencedRelation: FoundEmbededFunctionJoinTableRelation['SetofOptions']['to']
505
+ } & {
506
+ match: 'func'
507
+ isNotNullable: FoundEmbededFunctionJoinTableRelation['SetofOptions']['isNotNullable'] extends true
508
+ ? true
509
+ : FoundEmbededFunctionJoinTableRelation['SetofOptions']['isSetofReturn'] extends true
510
+ ? false
511
+ : true
512
+ isSetofReturn: FoundEmbededFunctionJoinTableRelation['SetofOptions']['isSetofReturn']
513
+ }
514
+ direction: 'forward'
515
+ from: CurrentTableOrView
516
+ type: 'found-by-embeded-function'
517
+ }
518
+ : SelectQueryError<`could not find the relation between ${CurrentTableOrView} and ${Field['name']}`>
519
+ : SelectQueryError<`could not find the relation between ${CurrentTableOrView} and ${Field['name']}`>
520
+ : SelectQueryError<`could not find the relation between ${CurrentTableOrView} and ${Field['name']}`>
521
+ : SelectQueryError<`could not find the relation between ${CurrentTableOrView} and ${Field['name']}`>
522
+ : SelectQueryError<`could not find the relation between ${CurrentTableOrView} and ${Field['name']}`>
523
+ : SelectQueryError<`could not find the relation between ${CurrentTableOrView} and ${Field['name']}`>
524
+
525
+ /**
526
+ * Given a CurrentTableOrView, finds all join tables to this relation.
527
+ * For example, if products and categories are linked via product_categories table:
528
+ *
529
+ * @example Find join table relationship
530
+ * Given:
531
+ * - CurrentTableView = 'products'
532
+ * - FieldName = "categories"
533
+ *
534
+ * It should return this relationship from product_categories:
535
+ * {
536
+ * foreignKeyName: "product_categories_category_id_fkey",
537
+ * columns: ["category_id"],
538
+ * isOneToOne: false,
539
+ * referencedRelation: "categories",
540
+ * referencedColumns: ["id"]
541
+ * }
542
+ */
543
+ type ResolveJoinTableRelationship<
544
+ Schema extends GenericSchema,
545
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
546
+ FieldName extends string,
547
+ > = {
548
+ [TableName in keyof TablesAndViews<Schema>]: DeduplicateRelationships<
549
+ TablesAndViews<Schema>[TableName]['Relationships']
550
+ > extends readonly (infer Rel)[]
551
+ ? Rel extends { referencedRelation: CurrentTableOrView }
552
+ ? DeduplicateRelationships<
553
+ TablesAndViews<Schema>[TableName]['Relationships']
554
+ > extends readonly (infer OtherRel)[]
555
+ ? OtherRel extends { referencedRelation: FieldName }
556
+ ? OtherRel
557
+ : never
558
+ : never
559
+ : never
560
+ : never
561
+ }[keyof TablesAndViews<Schema>]
562
+
563
+ type ResolveEmbededFunctionJoinTableRelationship<
564
+ Schema extends GenericSchema,
565
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
566
+ FieldName extends string,
567
+ > =
568
+ FindMatchingFunctionBySetofFrom<
569
+ Schema['Functions'][FieldName],
570
+ CurrentTableOrView
571
+ > extends infer Fn
572
+ ? Fn extends GenericFunction
573
+ ? Fn
574
+ : false
575
+ : false
576
+
577
+ export type FindJoinTableRelationship<
578
+ Schema extends GenericSchema,
579
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
580
+ FieldName extends string,
581
+ > =
582
+ ResolveJoinTableRelationship<Schema, CurrentTableOrView, FieldName> extends infer Result
583
+ ? [Result] extends [never]
584
+ ? false
585
+ : Result
586
+ : never
587
+ /**
588
+ * Finds a matching relationship based on the FieldNode's name and optional hint.
589
+ */
590
+ export type FindFieldMatchingRelationships<
591
+ Schema extends GenericSchema,
592
+ Relationships extends GenericRelationship[],
593
+ Field extends Ast.FieldNode,
594
+ > = Field extends { hint: string }
595
+ ? FindMatchingHintTableRelationships<
596
+ Schema,
597
+ Relationships,
598
+ Field['hint'],
599
+ Field['name']
600
+ > extends GenericRelationship
601
+ ? FindMatchingHintTableRelationships<Schema, Relationships, Field['hint'], Field['name']> & {
602
+ branch: 'found-in-table-via-hint'
603
+ hint: Field['hint']
604
+ }
605
+ : FindMatchingHintViewRelationships<
606
+ Schema,
607
+ Relationships,
608
+ Field['hint'],
609
+ Field['name']
610
+ > extends GenericRelationship
611
+ ? FindMatchingHintViewRelationships<Schema, Relationships, Field['hint'], Field['name']> & {
612
+ branch: 'found-in-view-via-hint'
613
+ hint: Field['hint']
614
+ }
615
+ : SelectQueryError<'Failed to find matching relation via hint'>
616
+ : FindMatchingTableRelationships<Schema, Relationships, Field['name']> extends GenericRelationship
617
+ ? FindMatchingTableRelationships<Schema, Relationships, Field['name']> & {
618
+ branch: 'found-in-table-via-name'
619
+ name: Field['name']
620
+ }
621
+ : FindMatchingViewRelationships<
622
+ Schema,
623
+ Relationships,
624
+ Field['name']
625
+ > extends GenericRelationship
626
+ ? FindMatchingViewRelationships<Schema, Relationships, Field['name']> & {
627
+ branch: 'found-in-view-via-name'
628
+ name: Field['name']
629
+ }
630
+ : SelectQueryError<'Failed to find matching relation via name'>
631
+
632
+ export type JsonPathToAccessor<Path extends string> = Path extends `${infer P1}->${infer P2}`
633
+ ? P2 extends `>${infer Rest}` // Handle ->> operator
634
+ ? JsonPathToAccessor<`${P1}.${Rest}`>
635
+ : P2 extends string // Handle -> operator
636
+ ? JsonPathToAccessor<`${P1}.${P2}`>
637
+ : Path
638
+ : Path extends `>${infer Rest}` // Clean up any remaining > characters
639
+ ? JsonPathToAccessor<Rest>
640
+ : Path extends `${infer P1}::${infer _}` // Handle type casting
641
+ ? JsonPathToAccessor<P1>
642
+ : Path extends `${infer P1}${')' | ','}${infer _}` // Handle closing parenthesis and comma
643
+ ? P1
644
+ : Path
645
+
646
+ export type JsonPathToType<T, Path extends string> = Path extends ''
647
+ ? T
648
+ : ContainsNull<T> extends true
649
+ ? JsonPathToType<Exclude<T, null>, Path>
650
+ : Path extends `${infer Key}.${infer Rest}`
651
+ ? Key extends keyof T
652
+ ? JsonPathToType<T[Key], Rest>
653
+ : never
654
+ : Path extends keyof T
655
+ ? T[Path]
656
+ : never
657
+
658
+ export type IsStringUnion<T> = string extends T
659
+ ? false
660
+ : T extends string
661
+ ? [T] extends [never]
662
+ ? false
663
+ : true
664
+ : false
665
+
666
+ type MatchingFunctionBySetofFrom<
667
+ Fn extends GenericFunction,
668
+ TableName extends string,
669
+ > = Fn['SetofOptions'] extends GenericSetofOption
670
+ ? TableName extends Fn['SetofOptions']['from']
671
+ ? Fn
672
+ : never
673
+ : false
674
+
675
+ type FindMatchingFunctionBySetofFrom<
676
+ FnUnion,
677
+ TableName extends string,
678
+ > = FnUnion extends infer Fn extends GenericFunction
679
+ ? MatchingFunctionBySetofFrom<Fn, TableName>
680
+ : false
681
+
682
+ type ComputedField<
683
+ Schema extends GenericSchema,
684
+ RelationName extends keyof TablesAndViews<Schema>,
685
+ FieldName extends keyof TablesAndViews<Schema>[RelationName]['Row'],
686
+ > = FieldName extends keyof Schema['Functions']
687
+ ? [Schema['Functions'][FieldName]['Args']] extends [never]
688
+ ? never
689
+ : Schema['Functions'][FieldName] extends {
690
+ Args: { '': TablesAndViews<Schema>[RelationName]['Row'] }
691
+ Returns: any
692
+ }
693
+ ? FieldName
694
+ : never
695
+ : never
696
+
697
+ // Given a relation name (Table or View) extract all the "computed fields" based on the Row
698
+ // object, and the schema functions definitions
699
+ export type GetComputedFields<
700
+ Schema extends GenericSchema,
701
+ RelationName extends keyof TablesAndViews<Schema>,
702
+ > = {
703
+ [K in keyof TablesAndViews<Schema>[RelationName]['Row']]: ComputedField<Schema, RelationName, K>
704
+ }[keyof TablesAndViews<Schema>[RelationName]['Row']]