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