@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,1108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const fetch_1 = require("./lib/fetch");
5
+ const helpers_1 = require("./lib/helpers");
6
+ const types_1 = require("./lib/types");
7
+ const errors_1 = require("./lib/errors");
8
+ class GoTrueAdminApi {
9
+ /**
10
+ * Creates an admin API client that can be used to manage users and OAuth clients.
11
+ *
12
+ * @example Using supabase-js (recommended)
13
+ * ```ts
14
+ * import { createClient } from '@supabase/supabase-js'
15
+ *
16
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-secret-key')
17
+ * const { data, error } = await supabase.auth.admin.listUsers()
18
+ * ```
19
+ *
20
+ * @example Standalone import for bundle-sensitive environments
21
+ * ```ts
22
+ * import { GoTrueAdminApi } from '@supabase/auth-js'
23
+ *
24
+ * const admin = new GoTrueAdminApi({
25
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
26
+ * headers: { Authorization: `Bearer ${process.env.SUPABASE_SECRET_KEY}` },
27
+ * })
28
+ * ```
29
+ */
30
+ constructor({ url = '', headers = {}, fetch, experimental, }) {
31
+ this.url = url;
32
+ this.headers = headers;
33
+ this.fetch = (0, helpers_1.resolveFetch)(fetch);
34
+ this.experimental = experimental !== null && experimental !== void 0 ? experimental : {};
35
+ this.mfa = {
36
+ listFactors: this._listFactors.bind(this),
37
+ deleteFactor: this._deleteFactor.bind(this),
38
+ };
39
+ this.oauth = {
40
+ listClients: this._listOAuthClients.bind(this),
41
+ createClient: this._createOAuthClient.bind(this),
42
+ getClient: this._getOAuthClient.bind(this),
43
+ updateClient: this._updateOAuthClient.bind(this),
44
+ deleteClient: this._deleteOAuthClient.bind(this),
45
+ regenerateClientSecret: this._regenerateOAuthClientSecret.bind(this),
46
+ };
47
+ this.customProviders = {
48
+ listProviders: this._listCustomProviders.bind(this),
49
+ createProvider: this._createCustomProvider.bind(this),
50
+ getProvider: this._getCustomProvider.bind(this),
51
+ updateProvider: this._updateCustomProvider.bind(this),
52
+ deleteProvider: this._deleteCustomProvider.bind(this),
53
+ };
54
+ this.passkey = {
55
+ listPasskeys: this._adminListPasskeys.bind(this),
56
+ deletePasskey: this._adminDeletePasskey.bind(this),
57
+ };
58
+ }
59
+ /**
60
+ * Removes a logged-in session.
61
+ * @param jwt A valid, logged-in JWT.
62
+ * @param scope The logout sope.
63
+ *
64
+ * @category Auth
65
+ * @subcategory Auth Admin
66
+ */
67
+ async signOut(jwt, scope = types_1.SIGN_OUT_SCOPES[0]) {
68
+ if (types_1.SIGN_OUT_SCOPES.indexOf(scope) < 0) {
69
+ throw new Error(`@supabase/auth-js: Parameter scope must be one of ${types_1.SIGN_OUT_SCOPES.join(', ')}`);
70
+ }
71
+ try {
72
+ await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/logout?scope=${scope}`, {
73
+ headers: this.headers,
74
+ jwt,
75
+ noResolveJson: true,
76
+ });
77
+ return { data: null, error: null };
78
+ }
79
+ catch (error) {
80
+ if ((0, errors_1.isAuthError)(error)) {
81
+ return { data: null, error };
82
+ }
83
+ throw error;
84
+ }
85
+ }
86
+ /**
87
+ * Sends an invite link to an email address.
88
+ * @param email The email address of the user.
89
+ * @param options Additional options to be included when inviting.
90
+ *
91
+ * @category Auth
92
+ * @subcategory Auth Admin
93
+ *
94
+ * @remarks
95
+ * - Sends an invite link to the user's email address.
96
+ * - The `inviteUserByEmail()` method is typically used by administrators to invite users to join the application.
97
+ * - Note that PKCE is not supported when using `inviteUserByEmail`. This is because the browser initiating the invite is often different from the browser accepting the invite which makes it difficult to provide the security guarantees required of the PKCE flow.
98
+ *
99
+ * @example Invite a user
100
+ * ```js
101
+ * const { data, error } = await supabase.auth.admin.inviteUserByEmail('email@example.com')
102
+ * ```
103
+ *
104
+ * @exampleResponse Invite a user
105
+ * ```json
106
+ * {
107
+ * "data": {
108
+ * "user": {
109
+ * "id": "11111111-1111-1111-1111-111111111111",
110
+ * "aud": "authenticated",
111
+ * "role": "authenticated",
112
+ * "email": "example@email.com",
113
+ * "invited_at": "2024-01-01T00:00:00Z",
114
+ * "phone": "",
115
+ * "confirmation_sent_at": "2024-01-01T00:00:00Z",
116
+ * "app_metadata": {
117
+ * "provider": "email",
118
+ * "providers": [
119
+ * "email"
120
+ * ]
121
+ * },
122
+ * "user_metadata": {},
123
+ * "identities": [
124
+ * {
125
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
126
+ * "id": "11111111-1111-1111-1111-111111111111",
127
+ * "user_id": "11111111-1111-1111-1111-111111111111",
128
+ * "identity_data": {
129
+ * "email": "example@email.com",
130
+ * "email_verified": false,
131
+ * "phone_verified": false,
132
+ * "sub": "11111111-1111-1111-1111-111111111111"
133
+ * },
134
+ * "provider": "email",
135
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
136
+ * "created_at": "2024-01-01T00:00:00Z",
137
+ * "updated_at": "2024-01-01T00:00:00Z",
138
+ * "email": "example@email.com"
139
+ * }
140
+ * ],
141
+ * "created_at": "2024-01-01T00:00:00Z",
142
+ * "updated_at": "2024-01-01T00:00:00Z",
143
+ * "is_anonymous": false
144
+ * }
145
+ * },
146
+ * "error": null
147
+ * }
148
+ * ```
149
+ */
150
+ async inviteUserByEmail(email, options = {}) {
151
+ try {
152
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/invite`, {
153
+ body: { email, data: options.data },
154
+ headers: this.headers,
155
+ redirectTo: options.redirectTo,
156
+ xform: fetch_1._userResponse,
157
+ });
158
+ }
159
+ catch (error) {
160
+ if ((0, errors_1.isAuthError)(error)) {
161
+ return { data: { user: null }, error };
162
+ }
163
+ throw error;
164
+ }
165
+ }
166
+ /**
167
+ * Generates email links and OTPs to be sent via a custom email provider.
168
+ * @param email The user's email.
169
+ * @param options.password User password. For signup only.
170
+ * @param options.data Optional user metadata. For signup only.
171
+ * @param options.redirectTo The redirect url which should be appended to the generated link
172
+ *
173
+ * @category Auth
174
+ * @subcategory Auth Admin
175
+ *
176
+ * @remarks
177
+ * - The following types can be passed into `generateLink()`: `signup`, `magiclink`, `invite`, `recovery`, `email_change_current`, `email_change_new`, `phone_change`.
178
+ * - `generateLink()` only generates the email link for `email_change_email` if the **Secure email change** is enabled in your project's [email auth provider settings](/dashboard/project/_/auth/providers).
179
+ * - `generateLink()` handles the creation of the user for `signup`, `invite` and `magiclink`.
180
+ *
181
+ * @example Generate a signup link
182
+ * ```js
183
+ * const { data, error } = await supabase.auth.admin.generateLink({
184
+ * type: 'signup',
185
+ * email: 'email@example.com',
186
+ * password: 'secret'
187
+ * })
188
+ * ```
189
+ *
190
+ * @exampleResponse Generate a signup link
191
+ * ```json
192
+ * {
193
+ * "data": {
194
+ * "properties": {
195
+ * "action_link": "<LINK_TO_SEND_TO_USER>",
196
+ * "email_otp": "999999",
197
+ * "hashed_token": "<HASHED_TOKEN",
198
+ * "redirect_to": "<REDIRECT_URL>",
199
+ * "verification_type": "signup"
200
+ * },
201
+ * "user": {
202
+ * "id": "11111111-1111-1111-1111-111111111111",
203
+ * "aud": "authenticated",
204
+ * "role": "authenticated",
205
+ * "email": "email@example.com",
206
+ * "phone": "",
207
+ * "confirmation_sent_at": "2024-01-01T00:00:00Z",
208
+ * "app_metadata": {
209
+ * "provider": "email",
210
+ * "providers": [
211
+ * "email"
212
+ * ]
213
+ * },
214
+ * "user_metadata": {},
215
+ * "identities": [
216
+ * {
217
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
218
+ * "id": "11111111-1111-1111-1111-111111111111",
219
+ * "user_id": "11111111-1111-1111-1111-111111111111",
220
+ * "identity_data": {
221
+ * "email": "email@example.com",
222
+ * "email_verified": false,
223
+ * "phone_verified": false,
224
+ * "sub": "11111111-1111-1111-1111-111111111111"
225
+ * },
226
+ * "provider": "email",
227
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
228
+ * "created_at": "2024-01-01T00:00:00Z",
229
+ * "updated_at": "2024-01-01T00:00:00Z",
230
+ * "email": "email@example.com"
231
+ * }
232
+ * ],
233
+ * "created_at": "2024-01-01T00:00:00Z",
234
+ * "updated_at": "2024-01-01T00:00:00Z",
235
+ * "is_anonymous": false
236
+ * }
237
+ * },
238
+ * "error": null
239
+ * }
240
+ * ```
241
+ *
242
+ * @example Generate an invite link
243
+ * ```js
244
+ * const { data, error } = await supabase.auth.admin.generateLink({
245
+ * type: 'invite',
246
+ * email: 'email@example.com'
247
+ * })
248
+ * ```
249
+ *
250
+ * @example Generate a magic link
251
+ * ```js
252
+ * const { data, error } = await supabase.auth.admin.generateLink({
253
+ * type: 'magiclink',
254
+ * email: 'email@example.com'
255
+ * })
256
+ * ```
257
+ *
258
+ * @example Generate a recovery link
259
+ * ```js
260
+ * const { data, error } = await supabase.auth.admin.generateLink({
261
+ * type: 'recovery',
262
+ * email: 'email@example.com'
263
+ * })
264
+ * ```
265
+ *
266
+ * @example Generate links to change current email address
267
+ * ```js
268
+ * // generate an email change link to be sent to the current email address
269
+ * const { data, error } = await supabase.auth.admin.generateLink({
270
+ * type: 'email_change_current',
271
+ * email: 'current.email@example.com',
272
+ * newEmail: 'new.email@example.com'
273
+ * })
274
+ *
275
+ * // generate an email change link to be sent to the new email address
276
+ * const { data, error } = await supabase.auth.admin.generateLink({
277
+ * type: 'email_change_new',
278
+ * email: 'current.email@example.com',
279
+ * newEmail: 'new.email@example.com'
280
+ * })
281
+ * ```
282
+ */
283
+ async generateLink(params) {
284
+ try {
285
+ const { options } = params, rest = tslib_1.__rest(params, ["options"]);
286
+ const body = Object.assign(Object.assign({}, rest), options);
287
+ if ('newEmail' in rest) {
288
+ // replace newEmail with new_email in request body
289
+ body.new_email = rest === null || rest === void 0 ? void 0 : rest.newEmail;
290
+ delete body['newEmail'];
291
+ }
292
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/generate_link`, {
293
+ body: body,
294
+ headers: this.headers,
295
+ xform: fetch_1._generateLinkResponse,
296
+ redirectTo: options === null || options === void 0 ? void 0 : options.redirectTo,
297
+ });
298
+ }
299
+ catch (error) {
300
+ if ((0, errors_1.isAuthError)(error)) {
301
+ return {
302
+ data: {
303
+ properties: null,
304
+ user: null,
305
+ },
306
+ error,
307
+ };
308
+ }
309
+ throw error;
310
+ }
311
+ }
312
+ // User Admin API
313
+ /**
314
+ * Creates a new user.
315
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
316
+ *
317
+ * @category Auth
318
+ * @subcategory Auth Admin
319
+ *
320
+ * @remarks
321
+ * - To confirm the user's email address or phone number, set `email_confirm` or `phone_confirm` to true. Both arguments default to false.
322
+ * - `createUser()` will not send a confirmation email to the user. You can use [`inviteUserByEmail()`](/docs/reference/javascript/auth-admin-inviteuserbyemail) if you want to send them an email invite instead.
323
+ * - If you are sure that the created user's email or phone number is legitimate and verified, you can set the `email_confirm` or `phone_confirm` param to `true`.
324
+ *
325
+ * @example With custom user metadata
326
+ * ```js
327
+ * const { data, error } = await supabase.auth.admin.createUser({
328
+ * email: 'user@email.com',
329
+ * password: 'password',
330
+ * user_metadata: { name: 'Yoda' }
331
+ * })
332
+ * ```
333
+ *
334
+ * @exampleResponse With custom user metadata
335
+ * ```json
336
+ * {
337
+ * data: {
338
+ * user: {
339
+ * id: '1',
340
+ * aud: 'authenticated',
341
+ * role: 'authenticated',
342
+ * email: 'example@email.com',
343
+ * email_confirmed_at: '2024-01-01T00:00:00Z',
344
+ * phone: '',
345
+ * confirmation_sent_at: '2024-01-01T00:00:00Z',
346
+ * confirmed_at: '2024-01-01T00:00:00Z',
347
+ * last_sign_in_at: '2024-01-01T00:00:00Z',
348
+ * app_metadata: {},
349
+ * user_metadata: {},
350
+ * identities: [
351
+ * {
352
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
353
+ * "id": "1",
354
+ * "user_id": "1",
355
+ * "identity_data": {
356
+ * "email": "example@email.com",
357
+ * "email_verified": true,
358
+ * "phone_verified": false,
359
+ * "sub": "1"
360
+ * },
361
+ * "provider": "email",
362
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
363
+ * "created_at": "2024-01-01T00:00:00Z",
364
+ * "updated_at": "2024-01-01T00:00:00Z",
365
+ * "email": "email@example.com"
366
+ * },
367
+ * ],
368
+ * created_at: '2024-01-01T00:00:00Z',
369
+ * updated_at: '2024-01-01T00:00:00Z',
370
+ * is_anonymous: false,
371
+ * }
372
+ * }
373
+ * error: null
374
+ * }
375
+ * ```
376
+ *
377
+ * @example Auto-confirm the user's email
378
+ * ```js
379
+ * const { data, error } = await supabase.auth.admin.createUser({
380
+ * email: 'user@email.com',
381
+ * email_confirm: true
382
+ * })
383
+ * ```
384
+ *
385
+ * @example Auto-confirm the user's phone number
386
+ * ```js
387
+ * const { data, error } = await supabase.auth.admin.createUser({
388
+ * phone: '1234567890',
389
+ * phone_confirm: true
390
+ * })
391
+ * ```
392
+ */
393
+ async createUser(attributes) {
394
+ try {
395
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/users`, {
396
+ body: attributes,
397
+ headers: this.headers,
398
+ xform: fetch_1._userResponse,
399
+ });
400
+ }
401
+ catch (error) {
402
+ if ((0, errors_1.isAuthError)(error)) {
403
+ return { data: { user: null }, error };
404
+ }
405
+ throw error;
406
+ }
407
+ }
408
+ /**
409
+ * Get a list of users.
410
+ *
411
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
412
+ * @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
413
+ *
414
+ * @category Auth
415
+ * @subcategory Auth Admin
416
+ *
417
+ * @remarks
418
+ * - Defaults to return 50 users per page.
419
+ *
420
+ * @example Get a page of users
421
+ * ```js
422
+ * const { data: { users }, error } = await supabase.auth.admin.listUsers()
423
+ * ```
424
+ *
425
+ * @example Paginated list of users
426
+ * ```js
427
+ * const { data: { users }, error } = await supabase.auth.admin.listUsers({
428
+ * page: 1,
429
+ * perPage: 1000
430
+ * })
431
+ * ```
432
+ */
433
+ async listUsers(params) {
434
+ var _a, _b, _c, _d, _e, _f, _g;
435
+ try {
436
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
437
+ const response = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users`, {
438
+ headers: this.headers,
439
+ noResolveJson: true,
440
+ query: {
441
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
442
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
443
+ },
444
+ xform: fetch_1._noResolveJsonResponse,
445
+ });
446
+ if (response.error)
447
+ throw response.error;
448
+ const users = await response.json();
449
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
450
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
451
+ if (links.length > 0) {
452
+ links.forEach((link) => {
453
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
454
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
455
+ pagination[`${rel}Page`] = page;
456
+ });
457
+ pagination.total = parseInt(total);
458
+ }
459
+ return { data: Object.assign(Object.assign({}, users), pagination), error: null };
460
+ }
461
+ catch (error) {
462
+ if ((0, errors_1.isAuthError)(error)) {
463
+ return { data: { users: [] }, error };
464
+ }
465
+ throw error;
466
+ }
467
+ }
468
+ /**
469
+ * Get user by id.
470
+ *
471
+ * @param uid The user's unique identifier
472
+ *
473
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
474
+ *
475
+ * @category Auth
476
+ * @subcategory Auth Admin
477
+ *
478
+ * @remarks
479
+ * - Fetches the user object from the database based on the user's id.
480
+ * - The `getUserById()` method requires the user's id which maps to the `auth.users.id` column.
481
+ *
482
+ * @example Fetch the user object using the access_token jwt
483
+ * ```js
484
+ * const { data, error } = await supabase.auth.admin.getUserById(1)
485
+ * ```
486
+ *
487
+ * @exampleResponse Fetch the user object using the access_token jwt
488
+ * ```json
489
+ * {
490
+ * data: {
491
+ * user: {
492
+ * id: '1',
493
+ * aud: 'authenticated',
494
+ * role: 'authenticated',
495
+ * email: 'example@email.com',
496
+ * email_confirmed_at: '2024-01-01T00:00:00Z',
497
+ * phone: '',
498
+ * confirmation_sent_at: '2024-01-01T00:00:00Z',
499
+ * confirmed_at: '2024-01-01T00:00:00Z',
500
+ * last_sign_in_at: '2024-01-01T00:00:00Z',
501
+ * app_metadata: {},
502
+ * user_metadata: {},
503
+ * identities: [
504
+ * {
505
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
506
+ * "id": "1",
507
+ * "user_id": "1",
508
+ * "identity_data": {
509
+ * "email": "example@email.com",
510
+ * "email_verified": true,
511
+ * "phone_verified": false,
512
+ * "sub": "1"
513
+ * },
514
+ * "provider": "email",
515
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
516
+ * "created_at": "2024-01-01T00:00:00Z",
517
+ * "updated_at": "2024-01-01T00:00:00Z",
518
+ * "email": "email@example.com"
519
+ * },
520
+ * ],
521
+ * created_at: '2024-01-01T00:00:00Z',
522
+ * updated_at: '2024-01-01T00:00:00Z',
523
+ * is_anonymous: false,
524
+ * }
525
+ * }
526
+ * error: null
527
+ * }
528
+ * ```
529
+ */
530
+ async getUserById(uid) {
531
+ (0, helpers_1.validateUUID)(uid);
532
+ try {
533
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${uid}`, {
534
+ headers: this.headers,
535
+ xform: fetch_1._userResponse,
536
+ });
537
+ }
538
+ catch (error) {
539
+ if ((0, errors_1.isAuthError)(error)) {
540
+ return { data: { user: null }, error };
541
+ }
542
+ throw error;
543
+ }
544
+ }
545
+ /**
546
+ * Updates the user data. Changes are applied directly without confirmation flows.
547
+ *
548
+ * @param uid The user's unique identifier
549
+ * @param attributes The data you want to update.
550
+ *
551
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
552
+ *
553
+ * @remarks
554
+ * **Important:** This is a server-side operation and does **not** trigger client-side
555
+ * `onAuthStateChange` listeners. The admin API has no connection to client state.
556
+ *
557
+ * To sync changes to the client after calling this method:
558
+ * 1. On the client, call `supabase.auth.refreshSession()` to fetch the updated user data
559
+ * 2. This will trigger the `TOKEN_REFRESHED` event and notify all listeners
560
+ *
561
+ * @example
562
+ * ```typescript
563
+ * // Server-side (Edge Function)
564
+ * const { data, error } = await supabase.auth.admin.updateUserById(
565
+ * userId,
566
+ * { user_metadata: { preferences: { theme: 'dark' } } }
567
+ * )
568
+ *
569
+ * // Client-side (to sync the changes)
570
+ * const { data, error } = await supabase.auth.refreshSession()
571
+ * // onAuthStateChange listeners will now be notified with updated user
572
+ * ```
573
+ *
574
+ * @see {@link GoTrueClient.refreshSession} for syncing admin changes to the client
575
+ * @see {@link GoTrueClient.updateUser} for client-side user updates (triggers listeners automatically)
576
+ *
577
+ * @category Auth
578
+ * @subcategory Auth Admin
579
+ *
580
+ * @example Updates a user's email
581
+ * ```js
582
+ * const { data: user, error } = await supabase.auth.admin.updateUserById(
583
+ * '11111111-1111-1111-1111-111111111111',
584
+ * { email: 'new@email.com' }
585
+ * )
586
+ * ```
587
+ *
588
+ * @exampleResponse Updates a user's email
589
+ * ```json
590
+ * {
591
+ * "data": {
592
+ * "user": {
593
+ * "id": "11111111-1111-1111-1111-111111111111",
594
+ * "aud": "authenticated",
595
+ * "role": "authenticated",
596
+ * "email": "new@email.com",
597
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
598
+ * "phone": "",
599
+ * "confirmed_at": "2024-01-01T00:00:00Z",
600
+ * "recovery_sent_at": "2024-01-01T00:00:00Z",
601
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
602
+ * "app_metadata": {
603
+ * "provider": "email",
604
+ * "providers": [
605
+ * "email"
606
+ * ]
607
+ * },
608
+ * "user_metadata": {
609
+ * "email": "example@email.com",
610
+ * "email_verified": false,
611
+ * "phone_verified": false,
612
+ * "sub": "11111111-1111-1111-1111-111111111111"
613
+ * },
614
+ * "identities": [
615
+ * {
616
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
617
+ * "id": "11111111-1111-1111-1111-111111111111",
618
+ * "user_id": "11111111-1111-1111-1111-111111111111",
619
+ * "identity_data": {
620
+ * "email": "example@email.com",
621
+ * "email_verified": false,
622
+ * "phone_verified": false,
623
+ * "sub": "11111111-1111-1111-1111-111111111111"
624
+ * },
625
+ * "provider": "email",
626
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
627
+ * "created_at": "2024-01-01T00:00:00Z",
628
+ * "updated_at": "2024-01-01T00:00:00Z",
629
+ * "email": "example@email.com"
630
+ * }
631
+ * ],
632
+ * "created_at": "2024-01-01T00:00:00Z",
633
+ * "updated_at": "2024-01-01T00:00:00Z",
634
+ * "is_anonymous": false
635
+ * }
636
+ * },
637
+ * "error": null
638
+ * }
639
+ * ```
640
+ *
641
+ * @example Updates a user's password
642
+ * ```js
643
+ * const { data: user, error } = await supabase.auth.admin.updateUserById(
644
+ * '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
645
+ * { password: 'new_password' }
646
+ * )
647
+ * ```
648
+ *
649
+ * @example Updates a user's metadata
650
+ * ```js
651
+ * const { data: user, error } = await supabase.auth.admin.updateUserById(
652
+ * '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
653
+ * { user_metadata: { hello: 'world' } }
654
+ * )
655
+ * ```
656
+ *
657
+ * @example Updates a user's app_metadata
658
+ * ```js
659
+ * const { data: user, error } = await supabase.auth.admin.updateUserById(
660
+ * '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
661
+ * { app_metadata: { plan: 'trial' } }
662
+ * )
663
+ * ```
664
+ *
665
+ * @example Confirms a user's email address
666
+ * ```js
667
+ * const { data: user, error } = await supabase.auth.admin.updateUserById(
668
+ * '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
669
+ * { email_confirm: true }
670
+ * )
671
+ * ```
672
+ *
673
+ * @example Confirms a user's phone number
674
+ * ```js
675
+ * const { data: user, error } = await supabase.auth.admin.updateUserById(
676
+ * '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
677
+ * { phone_confirm: true }
678
+ * )
679
+ * ```
680
+ *
681
+ * @example Ban a user for 100 years
682
+ * ```js
683
+ * const { data: user, error } = await supabase.auth.admin.updateUserById(
684
+ * '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
685
+ * { ban_duration: '876000h' }
686
+ * )
687
+ * ```
688
+ */
689
+ async updateUserById(uid, attributes) {
690
+ (0, helpers_1.validateUUID)(uid);
691
+ try {
692
+ return await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/admin/users/${uid}`, {
693
+ body: attributes,
694
+ headers: this.headers,
695
+ xform: fetch_1._userResponse,
696
+ });
697
+ }
698
+ catch (error) {
699
+ if ((0, errors_1.isAuthError)(error)) {
700
+ return { data: { user: null }, error };
701
+ }
702
+ throw error;
703
+ }
704
+ }
705
+ /**
706
+ * Delete a user. Requires a `service_role` key.
707
+ *
708
+ * @param id The user id you want to remove.
709
+ * @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
710
+ * Defaults to false for backward compatibility.
711
+ *
712
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
713
+ *
714
+ * @category Auth
715
+ * @subcategory Auth Admin
716
+ *
717
+ * @remarks
718
+ * - The `deleteUser()` method requires the user's ID, which maps to the `auth.users.id` column.
719
+ *
720
+ * @example Removes a user
721
+ * ```js
722
+ * const { data, error } = await supabase.auth.admin.deleteUser(
723
+ * '715ed5db-f090-4b8c-a067-640ecee36aa0'
724
+ * )
725
+ * ```
726
+ *
727
+ * @exampleResponse Removes a user
728
+ * ```json
729
+ * {
730
+ * "data": {
731
+ * "user": {}
732
+ * },
733
+ * "error": null
734
+ * }
735
+ * ```
736
+ */
737
+ async deleteUser(id, shouldSoftDelete = false) {
738
+ (0, helpers_1.validateUUID)(id);
739
+ try {
740
+ return await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${id}`, {
741
+ headers: this.headers,
742
+ body: {
743
+ should_soft_delete: shouldSoftDelete,
744
+ },
745
+ xform: fetch_1._userResponse,
746
+ });
747
+ }
748
+ catch (error) {
749
+ if ((0, errors_1.isAuthError)(error)) {
750
+ return { data: { user: null }, error };
751
+ }
752
+ throw error;
753
+ }
754
+ }
755
+ async _listFactors(params) {
756
+ (0, helpers_1.validateUUID)(params.userId);
757
+ try {
758
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${params.userId}/factors`, {
759
+ headers: this.headers,
760
+ xform: (factors) => {
761
+ return { data: { factors }, error: null };
762
+ },
763
+ });
764
+ return { data, error };
765
+ }
766
+ catch (error) {
767
+ if ((0, errors_1.isAuthError)(error)) {
768
+ return { data: null, error };
769
+ }
770
+ throw error;
771
+ }
772
+ }
773
+ async _deleteFactor(params) {
774
+ (0, helpers_1.validateUUID)(params.userId);
775
+ (0, helpers_1.validateUUID)(params.id);
776
+ try {
777
+ const data = await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${params.userId}/factors/${params.id}`, {
778
+ headers: this.headers,
779
+ });
780
+ return { data, error: null };
781
+ }
782
+ catch (error) {
783
+ if ((0, errors_1.isAuthError)(error)) {
784
+ return { data: null, error };
785
+ }
786
+ throw error;
787
+ }
788
+ }
789
+ /**
790
+ * Lists all OAuth clients with optional pagination.
791
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
792
+ *
793
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
794
+ */
795
+ async _listOAuthClients(params) {
796
+ var _a, _b, _c, _d, _e, _f, _g;
797
+ try {
798
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
799
+ const response = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/oauth/clients`, {
800
+ headers: this.headers,
801
+ noResolveJson: true,
802
+ query: {
803
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
804
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
805
+ },
806
+ xform: fetch_1._noResolveJsonResponse,
807
+ });
808
+ if (response.error)
809
+ throw response.error;
810
+ const clients = await response.json();
811
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
812
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
813
+ if (links.length > 0) {
814
+ links.forEach((link) => {
815
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
816
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
817
+ pagination[`${rel}Page`] = page;
818
+ });
819
+ pagination.total = parseInt(total);
820
+ }
821
+ return { data: Object.assign(Object.assign({}, clients), pagination), error: null };
822
+ }
823
+ catch (error) {
824
+ if ((0, errors_1.isAuthError)(error)) {
825
+ return { data: { clients: [] }, error };
826
+ }
827
+ throw error;
828
+ }
829
+ }
830
+ /**
831
+ * Creates a new OAuth client.
832
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
833
+ *
834
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
835
+ */
836
+ async _createOAuthClient(params) {
837
+ try {
838
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/oauth/clients`, {
839
+ body: params,
840
+ headers: this.headers,
841
+ xform: (client) => {
842
+ return { data: client, error: null };
843
+ },
844
+ });
845
+ }
846
+ catch (error) {
847
+ if ((0, errors_1.isAuthError)(error)) {
848
+ return { data: null, error };
849
+ }
850
+ throw error;
851
+ }
852
+ }
853
+ /**
854
+ * Gets details of a specific OAuth client.
855
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
856
+ *
857
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
858
+ */
859
+ async _getOAuthClient(clientId) {
860
+ try {
861
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/oauth/clients/${clientId}`, {
862
+ headers: this.headers,
863
+ xform: (client) => {
864
+ return { data: client, error: null };
865
+ },
866
+ });
867
+ }
868
+ catch (error) {
869
+ if ((0, errors_1.isAuthError)(error)) {
870
+ return { data: null, error };
871
+ }
872
+ throw error;
873
+ }
874
+ }
875
+ /**
876
+ * Updates an existing OAuth client.
877
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
878
+ *
879
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
880
+ */
881
+ async _updateOAuthClient(clientId, params) {
882
+ try {
883
+ return await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/admin/oauth/clients/${clientId}`, {
884
+ body: params,
885
+ headers: this.headers,
886
+ xform: (client) => {
887
+ return { data: client, error: null };
888
+ },
889
+ });
890
+ }
891
+ catch (error) {
892
+ if ((0, errors_1.isAuthError)(error)) {
893
+ return { data: null, error };
894
+ }
895
+ throw error;
896
+ }
897
+ }
898
+ /**
899
+ * Deletes an OAuth client.
900
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
901
+ *
902
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
903
+ */
904
+ async _deleteOAuthClient(clientId) {
905
+ try {
906
+ await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/oauth/clients/${clientId}`, {
907
+ headers: this.headers,
908
+ noResolveJson: true,
909
+ });
910
+ return { data: null, error: null };
911
+ }
912
+ catch (error) {
913
+ if ((0, errors_1.isAuthError)(error)) {
914
+ return { data: null, error };
915
+ }
916
+ throw error;
917
+ }
918
+ }
919
+ /**
920
+ * Regenerates the secret for an OAuth client.
921
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
922
+ *
923
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
924
+ */
925
+ async _regenerateOAuthClientSecret(clientId) {
926
+ try {
927
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/oauth/clients/${clientId}/regenerate_secret`, {
928
+ headers: this.headers,
929
+ xform: (client) => {
930
+ return { data: client, error: null };
931
+ },
932
+ });
933
+ }
934
+ catch (error) {
935
+ if ((0, errors_1.isAuthError)(error)) {
936
+ return { data: null, error };
937
+ }
938
+ throw error;
939
+ }
940
+ }
941
+ /**
942
+ * Lists all custom providers with optional type filter.
943
+ *
944
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
945
+ */
946
+ async _listCustomProviders(params) {
947
+ try {
948
+ const query = {};
949
+ if (params === null || params === void 0 ? void 0 : params.type) {
950
+ query.type = params.type;
951
+ }
952
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/custom-providers`, {
953
+ headers: this.headers,
954
+ query,
955
+ xform: (data) => {
956
+ var _a;
957
+ return { data: { providers: (_a = data === null || data === void 0 ? void 0 : data.providers) !== null && _a !== void 0 ? _a : [] }, error: null };
958
+ },
959
+ });
960
+ }
961
+ catch (error) {
962
+ if ((0, errors_1.isAuthError)(error)) {
963
+ return { data: { providers: [] }, error };
964
+ }
965
+ throw error;
966
+ }
967
+ }
968
+ /**
969
+ * Creates a new custom OIDC/OAuth provider.
970
+ *
971
+ * For OIDC providers, the server fetches and validates the OpenID Connect discovery document
972
+ * from the issuer's well-known endpoint (or the provided `discovery_url`) at creation time.
973
+ * This may return a validation error (`error_code: "validation_failed"`) if the discovery
974
+ * document is unreachable, not valid JSON, missing required fields, or if the issuer
975
+ * in the document does not match the expected issuer.
976
+ *
977
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
978
+ */
979
+ async _createCustomProvider(params) {
980
+ try {
981
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/custom-providers`, {
982
+ body: params,
983
+ headers: this.headers,
984
+ xform: (provider) => {
985
+ return { data: provider, error: null };
986
+ },
987
+ });
988
+ }
989
+ catch (error) {
990
+ if ((0, errors_1.isAuthError)(error)) {
991
+ return { data: null, error };
992
+ }
993
+ throw error;
994
+ }
995
+ }
996
+ /**
997
+ * Gets details of a specific custom provider by identifier.
998
+ *
999
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1000
+ */
1001
+ async _getCustomProvider(identifier) {
1002
+ try {
1003
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/custom-providers/${identifier}`, {
1004
+ headers: this.headers,
1005
+ xform: (provider) => {
1006
+ return { data: provider, error: null };
1007
+ },
1008
+ });
1009
+ }
1010
+ catch (error) {
1011
+ if ((0, errors_1.isAuthError)(error)) {
1012
+ return { data: null, error };
1013
+ }
1014
+ throw error;
1015
+ }
1016
+ }
1017
+ /**
1018
+ * Updates an existing custom provider.
1019
+ *
1020
+ * When `issuer` or `discovery_url` is changed on an OIDC provider, the server re-fetches and
1021
+ * validates the discovery document before persisting. This may return a validation error
1022
+ * (`error_code: "validation_failed"`) if the discovery document is unreachable, invalid, or
1023
+ * the issuer does not match.
1024
+ *
1025
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1026
+ */
1027
+ async _updateCustomProvider(identifier, params) {
1028
+ try {
1029
+ return await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/admin/custom-providers/${identifier}`, {
1030
+ body: params,
1031
+ headers: this.headers,
1032
+ xform: (provider) => {
1033
+ return { data: provider, error: null };
1034
+ },
1035
+ });
1036
+ }
1037
+ catch (error) {
1038
+ if ((0, errors_1.isAuthError)(error)) {
1039
+ return { data: null, error };
1040
+ }
1041
+ throw error;
1042
+ }
1043
+ }
1044
+ /**
1045
+ * Deletes a custom provider.
1046
+ *
1047
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1048
+ */
1049
+ async _deleteCustomProvider(identifier) {
1050
+ try {
1051
+ await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/custom-providers/${identifier}`, {
1052
+ headers: this.headers,
1053
+ noResolveJson: true,
1054
+ });
1055
+ return { data: null, error: null };
1056
+ }
1057
+ catch (error) {
1058
+ if ((0, errors_1.isAuthError)(error)) {
1059
+ return { data: null, error };
1060
+ }
1061
+ throw error;
1062
+ }
1063
+ }
1064
+ /**
1065
+ * Lists all passkeys for a user.
1066
+ *
1067
+ * This function should only be called on a server. Never expose your secret key in the browser.
1068
+ *
1069
+ * Requires `auth.experimental.passkey: true`.
1070
+ */
1071
+ async _adminListPasskeys(params) {
1072
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
1073
+ (0, helpers_1.validateUUID)(params.userId);
1074
+ try {
1075
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${params.userId}/passkeys`, { headers: this.headers, xform: (data) => ({ data, error: null }) });
1076
+ }
1077
+ catch (error) {
1078
+ if ((0, errors_1.isAuthError)(error)) {
1079
+ return { data: null, error };
1080
+ }
1081
+ throw error;
1082
+ }
1083
+ }
1084
+ /**
1085
+ * Deletes a user's passkey.
1086
+ *
1087
+ * This function should only be called on a server. Never expose your secret key in the browser.
1088
+ *
1089
+ * Requires `auth.experimental.passkey: true`.
1090
+ */
1091
+ async _adminDeletePasskey(params) {
1092
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
1093
+ (0, helpers_1.validateUUID)(params.userId);
1094
+ (0, helpers_1.validateUUID)(params.passkeyId);
1095
+ try {
1096
+ await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${params.userId}/passkeys/${params.passkeyId}`, { headers: this.headers, noResolveJson: true });
1097
+ return { data: null, error: null };
1098
+ }
1099
+ catch (error) {
1100
+ if ((0, errors_1.isAuthError)(error)) {
1101
+ return { data: null, error };
1102
+ }
1103
+ throw error;
1104
+ }
1105
+ }
1106
+ }
1107
+ exports.default = GoTrueAdminApi;
1108
+ //# sourceMappingURL=GoTrueAdminApi.js.map