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