diff --git a/.gitignore b/.gitignore
index a547bf36..34f1134e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
+.env
# Editor directories and files
.vscode/*
@@ -21,4 +22,4 @@ dist-ssr
*.ntvs*
*.njsproj
*.sln
-*.sw?
+*.sw?
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 23f03589..00000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Lama Dev AI Chat Bot App Starter Setup
-
-This template provides a minimal setup to get React 19 working in Vite with HMR and some ESLint rules.
\ No newline at end of file
diff --git a/backend/.env b/backend/.env
new file mode 100644
index 00000000..11f25fce
--- /dev/null
+++ b/backend/.env
@@ -0,0 +1,9 @@
+IMAGE_KIT_ENDPOINT=https://ik.imagekit.io/ula6wme9r
+IMAGE_KIT_PUBLIC_KEY=public_FsV5vybnkOY0YhDMsT/8MTXGfDk=
+IMAGE_KIT_PRIVATE_KEY=private_1Sxplsxl+jLklEdO6ZrBDiYDsfU=
+
+CLIENT_URL=http://localhost:5173
+MONGO=mongodb+srv://adim806:adim806@cluster0.l3boy.mongodb.net/aichat?retryWrites=true&w=majority&appName=Cluster0
+
+CLERK_PUBLISHABLE_KEY=pk_test_ZnVua3ktZ29iYmxlci0zMS5jbGVyay5hY2NvdW50cy5kZXYk
+CLERK_SECRET_KEY=sk_test_Jdg1ofwlGhOCiOjYsGKNBarOBUXlP3aPD9zSCJe24T
diff --git a/backend/.gitignore b/backend/.gitignore
new file mode 100644
index 00000000..5c07500f
--- /dev/null
+++ b/backend/.gitignore
@@ -0,0 +1,26 @@
+
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+.env
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/backend/index.js b/backend/index.js
new file mode 100644
index 00000000..b87de80c
--- /dev/null
+++ b/backend/index.js
@@ -0,0 +1,154 @@
+import express from "express";
+import cors from "cors";
+import ImageKit from "imagekit";
+import mongoose from "mongoose";
+import Chat from "./models/chat.js";
+import UserChats from "./models/userChats.js";
+import { ClerkExpressRequireAuth } from "@clerk/clerk-sdk-node";
+
+const port = process.env.PORT || 3000; // Define server port
+const app = express(); // Create Express application
+
+// Enable CORS with credentials, restricting origins to CLIENT_URL environment variable
+app.use(
+ cors({
+ origin: process.env.CLIENT_URL,
+ credentials: true,
+ })
+);
+
+app.use(express.json()); // Parse JSON request bodies
+
+// Connect to MongoDB
+const connect = async () => {
+ try {
+ await mongoose.connect(process.env.MONGO); // Connect to MongoDB using the MONGO environment variable
+ console.log("Connected to mongoDB!");
+ } catch (err) {
+ console.log(err); // Log connection errors
+ }
+};
+
+// Configure ImageKit for image handling and authentication
+const imagekit = new ImageKit({
+ urlEndpoint: process.env.IMAGE_KIT_ENDPOINT, // ImageKit URL endpoint
+ publicKey: process.env.IMAGE_KIT_PUBLIC_KEY, // ImageKit public key
+ privateKey: process.env.IMAGE_KIT_PRIVATE_KEY, // ImageKit private key
+});
+
+// Endpoint to provide ImageKit authentication parameters
+app.get("/api/upload", (req, res) => {
+ const result = imagekit.getAuthenticationParameters(); // Generate authentication parameters
+ res.send(result);
+});
+
+// Endpoint to create a new chat
+app.post("/api/chats", ClerkExpressRequireAuth(), async (req, res) => {
+ const userId = req.auth.userId; // Get authenticated user ID
+ const { text } = req.body; // Get text from request body
+
+ try {
+ // Create a new chat document
+ const newChat = new Chat({
+ userId: userId,
+ history: [{ role: "user", parts: [{ text }] }],
+ });
+ const savedChat = await newChat.save(); // Save chat to database
+
+ // Check if the user already has chats stored
+ const userChats = await UserChats.find({ userId: userId });
+
+ if (!userChats.length) {
+ // If user has no existing chats, create a new UserChats document
+ const newUserChats = new UserChats({
+ userId: userId,
+ chats: [{ _id: savedChat._id, title: text.substring(0, 40) }],
+ });
+ await newUserChats.save();
+ } else {
+ // If user has existing chats, append the new chat to the chats array
+ await UserChats.updateOne(
+ { userId: userId },
+ {
+ $push: {
+ chats: {
+ _id: savedChat._id,
+ title: text.substring(0, 40),
+ },
+ },
+ }
+ );
+ }
+ res.status(201).send(newChat._id); // Respond with new chat ID
+ } catch (error) {
+ console.error(error);
+ res.status(500).send("Error creating chats!"); // Send error response if chat creation fails
+ }
+});
+
+// Endpoint to get user’s chat list
+app.get("/api/userchats", ClerkExpressRequireAuth(), async (req, res) => {
+ const userId = req.auth.userId; // Get authenticated user ID
+ try {
+ const userChats = await UserChats.find({ userId: userId }); // Retrieve user's chats
+ res.status(200).send(userChats[0].chats); // Send chat list in response
+ } catch (error) {
+ console.error(error);
+ res.status(500).send("Error fetching userchats"); // Error handling
+ }
+});
+
+// Endpoint to get chat history by chat ID
+app.get("/api/chats/:id", ClerkExpressRequireAuth(), async (req, res) => {
+ const userId = req.auth.userId; // Get authenticated user ID
+ try {
+ const chat = await Chat.findOne({ _id: req.params.id, userId: userId }); // Find chat by ID
+ res.status(200).send(chat); // Send chat details in response
+ } catch (error) {
+ console.error(error);
+ res.status(500).send("Error fetching chat"); // Error handling
+ }
+});
+
+// Endpoint to update chat history with a new conversation
+app.put("/api/chats/:id", ClerkExpressRequireAuth(), async (req, res) => {
+ const userId = req.auth.userId; // Get authenticated user ID
+ const { question, answer, img } = req.body; // Get conversation details from request body
+
+ // Prepare new conversation items based on question, answer, and optional image
+ const newItems = [
+ ...(question
+ ? [{ role: "user", parts: [{ text: question }], ...(img && { img }) }]
+ : []),
+ { role: "model", parts: [{ text: answer }] },
+ ];
+
+ try {
+ const updatedChat = await Chat.updateOne(
+ { _id: req.params.id, userId }, // Update specific chat by ID and user
+ {
+ $push: {
+ history: {
+ $each: newItems, // Append new conversation items to chat history
+ },
+ },
+ }
+ );
+ res.status(200).send(updatedChat); // Send updated chat in response
+ } catch (err) {
+ console.log(err);
+ res.status(500).send("Error adding conversation!"); // Error handling
+ }
+});
+
+// Global error handler for unauthenticated access
+app.use((err, req, res, next) => {
+ console.error(err.stack);
+ res.status(401).send("Unauthenticated!");
+});
+
+// Start server and initiate MongoDB connection
+app.listen(port, () => {
+ connect();
+ console.log("Server running on 3000");
+});
diff --git a/backend/models/chat.js b/backend/models/chat.js
new file mode 100644
index 00000000..ef73fd5b
--- /dev/null
+++ b/backend/models/chat.js
@@ -0,0 +1,34 @@
+import mongoose from "mongoose";
+
+const chatSchema = new mongoose.Schema(
+ {
+ userId: {
+ type: String,
+ required: true,
+ },
+ history: [
+ {
+ role: {
+ type: String,
+ enum: ["user", "model"],
+ required: true,
+ },
+ parts: [
+ {
+ text: {
+ type: String,
+ required: true,
+ },
+ },
+ ],
+ img: {
+ type: String,
+ required: false,
+ },
+ },
+ ],
+ },
+ { timestamps: true }
+);
+
+export default mongoose.models.chat || mongoose.model("chat", chatSchema);
diff --git a/backend/models/userChats.js b/backend/models/userChats.js
new file mode 100644
index 00000000..155129d6
--- /dev/null
+++ b/backend/models/userChats.js
@@ -0,0 +1,30 @@
+import mongoose from "mongoose";
+
+const userChatsSchema = new mongoose.Schema(
+ {
+ userId: {
+ type: String,
+ required: true,
+ },
+ chats: [
+ {
+ _id: {
+ type: String,
+ required: true,
+ },
+ title: {
+ type: String,
+ required: true,
+ },
+ createdAt: {
+ type: Date,
+ default: Date.now,
+ },
+ },
+ ],
+ },
+ { timestamps: true }
+);
+
+export default mongoose.models.userchats ||
+ mongoose.model("userchats", userChatsSchema);
diff --git a/backend/node_modules/.bin/loose-envify b/backend/node_modules/.bin/loose-envify
new file mode 100644
index 00000000..076f91b1
--- /dev/null
+++ b/backend/node_modules/.bin/loose-envify
@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*)
+ if command -v cygpath > /dev/null 2>&1; then
+ basedir=`cygpath -w "$basedir"`
+ fi
+ ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../loose-envify/cli.js" "$@"
+else
+ exec node "$basedir/../loose-envify/cli.js" "$@"
+fi
diff --git a/backend/node_modules/.bin/loose-envify.cmd b/backend/node_modules/.bin/loose-envify.cmd
new file mode 100644
index 00000000..599576f9
--- /dev/null
+++ b/backend/node_modules/.bin/loose-envify.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\loose-envify\cli.js" %*
diff --git a/backend/node_modules/.bin/loose-envify.ps1 b/backend/node_modules/.bin/loose-envify.ps1
new file mode 100644
index 00000000..eb866fca
--- /dev/null
+++ b/backend/node_modules/.bin/loose-envify.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../loose-envify/cli.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../loose-envify/cli.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../loose-envify/cli.js" $args
+ } else {
+ & "node$exe" "$basedir/../loose-envify/cli.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/backend/node_modules/.bin/nodemon b/backend/node_modules/.bin/nodemon
new file mode 100644
index 00000000..c477a189
--- /dev/null
+++ b/backend/node_modules/.bin/nodemon
@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*)
+ if command -v cygpath > /dev/null 2>&1; then
+ basedir=`cygpath -w "$basedir"`
+ fi
+ ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@"
+else
+ exec node "$basedir/../nodemon/bin/nodemon.js" "$@"
+fi
diff --git a/backend/node_modules/.bin/nodemon.cmd b/backend/node_modules/.bin/nodemon.cmd
new file mode 100644
index 00000000..55acf8a4
--- /dev/null
+++ b/backend/node_modules/.bin/nodemon.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nodemon\bin\nodemon.js" %*
diff --git a/backend/node_modules/.bin/nodemon.ps1 b/backend/node_modules/.bin/nodemon.ps1
new file mode 100644
index 00000000..d4e3f5d4
--- /dev/null
+++ b/backend/node_modules/.bin/nodemon.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../nodemon/bin/nodemon.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../nodemon/bin/nodemon.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../nodemon/bin/nodemon.js" $args
+ } else {
+ & "node$exe" "$basedir/../nodemon/bin/nodemon.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/backend/node_modules/.bin/nodetouch b/backend/node_modules/.bin/nodetouch
new file mode 100644
index 00000000..3e146b41
--- /dev/null
+++ b/backend/node_modules/.bin/nodetouch
@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*)
+ if command -v cygpath > /dev/null 2>&1; then
+ basedir=`cygpath -w "$basedir"`
+ fi
+ ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../touch/bin/nodetouch.js" "$@"
+else
+ exec node "$basedir/../touch/bin/nodetouch.js" "$@"
+fi
diff --git a/backend/node_modules/.bin/nodetouch.cmd b/backend/node_modules/.bin/nodetouch.cmd
new file mode 100644
index 00000000..8298b918
--- /dev/null
+++ b/backend/node_modules/.bin/nodetouch.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\touch\bin\nodetouch.js" %*
diff --git a/backend/node_modules/.bin/nodetouch.ps1 b/backend/node_modules/.bin/nodetouch.ps1
new file mode 100644
index 00000000..5f68b4cb
--- /dev/null
+++ b/backend/node_modules/.bin/nodetouch.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../touch/bin/nodetouch.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../touch/bin/nodetouch.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../touch/bin/nodetouch.js" $args
+ } else {
+ & "node$exe" "$basedir/../touch/bin/nodetouch.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/backend/node_modules/.bin/semver b/backend/node_modules/.bin/semver
new file mode 100644
index 00000000..97c53279
--- /dev/null
+++ b/backend/node_modules/.bin/semver
@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*)
+ if command -v cygpath > /dev/null 2>&1; then
+ basedir=`cygpath -w "$basedir"`
+ fi
+ ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
+else
+ exec node "$basedir/../semver/bin/semver.js" "$@"
+fi
diff --git a/backend/node_modules/.bin/semver.cmd b/backend/node_modules/.bin/semver.cmd
new file mode 100644
index 00000000..9913fa9d
--- /dev/null
+++ b/backend/node_modules/.bin/semver.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
diff --git a/backend/node_modules/.bin/semver.ps1 b/backend/node_modules/.bin/semver.ps1
new file mode 100644
index 00000000..314717ad
--- /dev/null
+++ b/backend/node_modules/.bin/semver.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
+ } else {
+ & "node$exe" "$basedir/../semver/bin/semver.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/backend/node_modules/.bin/uuid b/backend/node_modules/.bin/uuid
new file mode 100644
index 00000000..0c2d4696
--- /dev/null
+++ b/backend/node_modules/.bin/uuid
@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*|*MINGW*|*MSYS*)
+ if command -v cygpath > /dev/null 2>&1; then
+ basedir=`cygpath -w "$basedir"`
+ fi
+ ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@"
+else
+ exec node "$basedir/../uuid/dist/bin/uuid" "$@"
+fi
diff --git a/backend/node_modules/.bin/uuid.cmd b/backend/node_modules/.bin/uuid.cmd
new file mode 100644
index 00000000..0f2376ea
--- /dev/null
+++ b/backend/node_modules/.bin/uuid.cmd
@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+ SET "_prog=%dp0%\node.exe"
+) ELSE (
+ SET "_prog=node"
+ SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %*
diff --git a/backend/node_modules/.bin/uuid.ps1 b/backend/node_modules/.bin/uuid.ps1
new file mode 100644
index 00000000..78046284
--- /dev/null
+++ b/backend/node_modules/.bin/uuid.ps1
@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+ # Fix case when both the Windows and Linux builds of Node
+ # are installed in the same directory
+ $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ } else {
+ & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret
diff --git a/backend/node_modules/.package-lock.json b/backend/node_modules/.package-lock.json
new file mode 100644
index 00000000..c256c76e
--- /dev/null
+++ b/backend/node_modules/.package-lock.json
@@ -0,0 +1,887 @@
+{
+ "name": "backend",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@clerk/backend": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-1.14.1.tgz",
+ "integrity": "sha512-YlKMpiVo4UITw3sgA+9QrAFRILVOz5hgB1Zw180Y2LEZ5a+MdpX668vJKGh7riSweMN7JQvU2jlsKGRO+1bXDw==",
+ "dependencies": {
+ "@clerk/shared": "2.9.2",
+ "@clerk/types": "4.26.0",
+ "cookie": "0.7.0",
+ "snakecase-keys": "5.4.4",
+ "tslib": "2.4.1"
+ },
+ "engines": {
+ "node": ">=18.17.0"
+ }
+ },
+ "node_modules/@clerk/backend/node_modules/tslib": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
+ },
+ "node_modules/@clerk/clerk-sdk-node": {
+ "version": "5.0.52",
+ "resolved": "https://registry.npmjs.org/@clerk/clerk-sdk-node/-/clerk-sdk-node-5.0.52.tgz",
+ "integrity": "sha512-GqtHYB4LyvTAx85nfkIZ1pbS0TQWvk8v70AW4XN+GeWU1QLW1ngvrGJaXFaKeOykWD3wRL2QC/mlyznXk5DprA==",
+ "dependencies": {
+ "@clerk/backend": "1.14.1",
+ "@clerk/shared": "2.9.2",
+ "@clerk/types": "4.26.0",
+ "tslib": "2.4.1"
+ },
+ "engines": {
+ "node": ">=18.17.0"
+ }
+ },
+ "node_modules/@clerk/clerk-sdk-node/node_modules/tslib": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
+ },
+ "node_modules/@clerk/shared": {
+ "version": "2.9.2",
+ "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-2.9.2.tgz",
+ "integrity": "sha512-vRMDj13Pv9n8Pf+f8P40AvqJ8QEq348qUxUVIf17vn9R3/toicrQOY/Q6qsrAS8KXY9+ZnyTafJa+VFK+6iEFA==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "@clerk/types": "4.26.0",
+ "glob-to-regexp": "0.4.1",
+ "js-cookie": "3.0.5",
+ "std-env": "^3.7.0",
+ "swr": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=18.17.0"
+ },
+ "peerDependencies": {
+ "react": ">=18 || >=19.0.0-beta",
+ "react-dom": ">=18 || >=19.0.0-beta"
+ },
+ "peerDependenciesMeta": {
+ "react": {
+ "optional": true
+ },
+ "react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@clerk/types": {
+ "version": "4.26.0",
+ "resolved": "https://registry.npmjs.org/@clerk/types/-/types-4.26.0.tgz",
+ "integrity": "sha512-VGcrQz/XpCiGbpIIzKVwWw4nLorzKnIP1IAemj1xt/80ULcdEZCncwhas6PoYBBsl1W55A1SwP9B/pEs0nmkCw==",
+ "dependencies": {
+ "csstype": "3.1.1"
+ },
+ "engines": {
+ "node": ">=18.17.0"
+ }
+ },
+ "node_modules/@mongodb-js/saslprep": {
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.9.tgz",
+ "integrity": "sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==",
+ "dependencies": {
+ "sparse-bitfield": "^3.0.3"
+ }
+ },
+ "node_modules/@types/webidl-conversions": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
+ "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="
+ },
+ "node_modules/@types/whatwg-url": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",
+ "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",
+ "dependencies": {
+ "@types/webidl-conversions": "*"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ },
+ "node_modules/axios": {
+ "version": "1.7.7",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
+ "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
+ "dependencies": {
+ "follow-redirects": "^1.15.6",
+ "form-data": "^4.0.0",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/bson": {
+ "version": "6.8.0",
+ "resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz",
+ "integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ==",
+ "engines": {
+ "node": ">=16.20.1"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/client-only": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
+ },
+ "node_modules/cookie": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.0.tgz",
+ "integrity": "sha512-qCf+V4dtlNhSRXGAZatc1TasyFO6GjohcOul807YOb5ik3+kQSnb4d7iajeCL8QHaJ4uZEjCgiCJerKXwdRVlQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cors": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
+ "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="
+ },
+ "node_modules/debug": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+ "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/dot-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
+ "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
+ "dependencies": {
+ "no-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
+ "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
+ },
+ "node_modules/hamming-distance": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/hamming-distance/-/hamming-distance-1.0.0.tgz",
+ "integrity": "sha512-hYz2IIKtyuZGfOqCs7skNiFEATf+v9IUNSOaQSr6Ll4JOxxWhOvXvc3mIdCW82Z3xW+zUoto7N/ssD4bDxAWoA=="
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ignore-by-default": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="
+ },
+ "node_modules/imagekit": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/imagekit/-/imagekit-5.2.0.tgz",
+ "integrity": "sha512-gq3tJ/pdO/LyaDtNmROERm7DE6oVOI9u7UOBFnoNA0JAEKnQzGh31/LKlFgho2BYonVViw7mZMo2H0KLO68Rww==",
+ "dependencies": {
+ "axios": "^1.6.5",
+ "form-data": "^4.0.0",
+ "hamming-distance": "^1.0.0",
+ "lodash": "^4.17.15",
+ "tslib": "^2.4.0",
+ "uuid": "^8.3.2"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/js-cookie": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
+ "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "peer": true
+ },
+ "node_modules/kareem": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz",
+ "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ },
+ "node_modules/loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "peer": true,
+ "dependencies": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "loose-envify": "cli.js"
+ }
+ },
+ "node_modules/lower-case": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
+ "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
+ "dependencies": {
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/map-obj": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
+ "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/memory-pager": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
+ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/mongodb": {
+ "version": "6.9.0",
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.9.0.tgz",
+ "integrity": "sha512-UMopBVx1LmEUbW/QE0Hw18u583PEDVQmUmVzzBRH0o/xtE9DBRA5ZYLOjpLIa03i8FXjzvQECJcqoMvCXftTUA==",
+ "dependencies": {
+ "@mongodb-js/saslprep": "^1.1.5",
+ "bson": "^6.7.0",
+ "mongodb-connection-string-url": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "peerDependencies": {
+ "@aws-sdk/credential-providers": "^3.188.0",
+ "@mongodb-js/zstd": "^1.1.0",
+ "gcp-metadata": "^5.2.0",
+ "kerberos": "^2.0.1",
+ "mongodb-client-encryption": ">=6.0.0 <7",
+ "snappy": "^7.2.2",
+ "socks": "^2.7.1"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/credential-providers": {
+ "optional": true
+ },
+ "@mongodb-js/zstd": {
+ "optional": true
+ },
+ "gcp-metadata": {
+ "optional": true
+ },
+ "kerberos": {
+ "optional": true
+ },
+ "mongodb-client-encryption": {
+ "optional": true
+ },
+ "snappy": {
+ "optional": true
+ },
+ "socks": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mongodb-connection-string-url": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz",
+ "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==",
+ "dependencies": {
+ "@types/whatwg-url": "^11.0.2",
+ "whatwg-url": "^13.0.0"
+ }
+ },
+ "node_modules/mongoose": {
+ "version": "8.7.2",
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.2.tgz",
+ "integrity": "sha512-Ok4VzMds9p5G3ZSUhmvBm1GdxanbzhS29jpSn02SPj+IXEVFnIdfwAlHHXWkyNscZKlcn8GuMi68FH++jo0flg==",
+ "dependencies": {
+ "bson": "^6.7.0",
+ "kareem": "2.6.3",
+ "mongodb": "6.9.0",
+ "mpath": "0.9.0",
+ "mquery": "5.0.0",
+ "ms": "2.1.3",
+ "sift": "17.1.3"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mongoose"
+ }
+ },
+ "node_modules/mpath": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
+ "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/mquery": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
+ "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
+ "dependencies": {
+ "debug": "4.x"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/no-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
+ "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
+ "dependencies": {
+ "lower-case": "^2.0.2",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/nodemon": {
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz",
+ "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==",
+ "dependencies": {
+ "chokidar": "^3.5.2",
+ "debug": "^4",
+ "ignore-by-default": "^1.0.1",
+ "minimatch": "^3.1.2",
+ "pstree.remy": "^1.1.8",
+ "semver": "^7.5.3",
+ "simple-update-notifier": "^2.0.0",
+ "supports-color": "^5.5.0",
+ "touch": "^3.1.0",
+ "undefsafe": "^2.0.5"
+ },
+ "bin": {
+ "nodemon": "bin/nodemon.js"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/nodemon"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+ },
+ "node_modules/pstree.remy": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/react": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
+ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
+ "peer": true,
+ "dependencies": {
+ "loose-envify": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.6.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
+ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sift": {
+ "version": "17.1.3",
+ "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz",
+ "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ=="
+ },
+ "node_modules/simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "dependencies": {
+ "semver": "^7.5.3"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/snake-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz",
+ "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==",
+ "dependencies": {
+ "dot-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/snakecase-keys": {
+ "version": "5.4.4",
+ "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-5.4.4.tgz",
+ "integrity": "sha512-YTywJG93yxwHLgrYLZjlC75moVEX04LZM4FHfihjHe1FCXm+QaLOFfSf535aXOAd0ArVQMWUAe8ZPm4VtWyXaA==",
+ "dependencies": {
+ "map-obj": "^4.1.0",
+ "snake-case": "^3.0.4",
+ "type-fest": "^2.5.2"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/sparse-bitfield": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
+ "dependencies": {
+ "memory-pager": "^1.0.2"
+ }
+ },
+ "node_modules/std-env": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz",
+ "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg=="
+ },
+ "node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/swr": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.5.tgz",
+ "integrity": "sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==",
+ "dependencies": {
+ "client-only": "^0.0.1",
+ "use-sync-external-store": "^1.2.0"
+ },
+ "peerDependencies": {
+ "react": "^16.11.0 || ^17.0.0 || ^18.0.0"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/touch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
+ "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
+ "bin": {
+ "nodetouch": "bin/nodetouch.js"
+ }
+ },
+ "node_modules/tr46": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
+ "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
+ "dependencies": {
+ "punycode": "^2.3.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz",
+ "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA=="
+ },
+ "node_modules/type-fest": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
+ "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/undefsafe": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
+ },
+ "node_modules/use-sync-external-store": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz",
+ "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz",
+ "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==",
+ "dependencies": {
+ "tr46": "^4.1.1",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ }
+ }
+}
diff --git a/backend/node_modules/@clerk/backend/LICENSE b/backend/node_modules/@clerk/backend/LICENSE
new file mode 100644
index 00000000..66914b6a
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Clerk, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/backend/node_modules/@clerk/backend/README.md b/backend/node_modules/@clerk/backend/README.md
new file mode 100644
index 00000000..d21c0957
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/README.md
@@ -0,0 +1,70 @@
+
+
+
+
+
+
@clerk/backend
+
+
+
+
+[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://clerk.com/discord)
+[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.com/docs?utm_source=github&utm_medium=clerk_backend)
+[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)
+
+[Changelog](https://github.com/clerk/javascript/blob/main/packages/backend/CHANGELOG.md)
+·
+[Report a Bug](https://github.com/clerk/javascript/issues/new?assignees=&labels=needs-triage&projects=&template=BUG_REPORT.yml)
+·
+[Request a Feature](https://feedback.clerk.com/roadmap)
+·
+[Get help](https://clerk.com/contact/support?utm_source=github&utm_medium=clerk_backend)
+
+
+
+## Getting Started
+
+[Clerk's](https://clerk.com/?utm_source=github&utm_medium=clerk_backend) JavaScript Backend SDK exposes [Clerk's Backend API](https://clerk.com/docs/reference/backend-api) resources and low-level authentication utilities **for JavaScript environments**.
+
+### Prerequisites
+
+- Node.js `>=18.17.0` (or later) or any V8 isolates runtime
+- An existing Clerk application. [Create your account for free](https://dashboard.clerk.com/sign-up?utm_source=github&utm_medium=clerk_backend).
+
+### Installation
+
+The fastest way to get started with `@clerk/backend` is by following the [JavaScript Backend SDK reference documentation](https://clerk.com/docs/references/backend/overview?utm_source=github&utm_medium=clerk_backend).
+
+You'll learn how to install `@clerk/backend` and how to use `createClerkClient()`.
+
+## Usage
+
+For further information, guides, and examples visit the [JavaScript Backend SDK reference documentation](https://clerk.com/docs/references/backend/overview?utm_source=github&utm_medium=clerk_backend). It lists all the available APIs and methods.
+
+## Support
+
+You can get in touch with us in any of the following ways:
+
+- Join our official community [Discord server](https://clerk.com/discord)
+- On [our support page](https://clerk.com/contact/support?utm_source=github&utm_medium=clerk_backend)
+
+## Contributing
+
+We're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md) and [code of conduct](https://github.com/clerk/javascript/blob/main/docs/CODE_OF_CONDUCT.md).
+
+## Security
+
+`@clerk/backend` follows good practices of security, but 100% security cannot be assured.
+
+`@clerk/backend` is provided **"as is"** without any **warranty**. Use at your own risk.
+
+_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerk/javascript/blob/main/docs/SECURITY.md)._
+
+## License
+
+This project is licensed under the **MIT license**.
+
+See [LICENSE](https://github.com/clerk/javascript/blob/main/packages/backend/LICENSE) for more information.
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/AbstractApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/AbstractApi.d.ts
new file mode 100644
index 00000000..861fa119
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/AbstractApi.d.ts
@@ -0,0 +1,7 @@
+import type { RequestFunction } from '../request';
+export declare abstract class AbstractAPI {
+ protected request: RequestFunction;
+ constructor(request: RequestFunction);
+ protected requireId(id: string): void;
+}
+//# sourceMappingURL=AbstractApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/AbstractApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/AbstractApi.d.ts.map
new file mode 100644
index 00000000..e8e0e0ce
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/AbstractApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AbstractApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/AbstractApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,8BAAsB,WAAW;IACnB,SAAS,CAAC,OAAO,EAAE,eAAe;gBAAxB,OAAO,EAAE,eAAe;IAE9C,SAAS,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM;CAK/B"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/AllowlistIdentifierApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/AllowlistIdentifierApi.d.ts
new file mode 100644
index 00000000..fdf100ec
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/AllowlistIdentifierApi.d.ts
@@ -0,0 +1,14 @@
+import type { AllowlistIdentifier } from '../resources/AllowlistIdentifier';
+import type { PaginatedResourceResponse } from '../resources/Deserializer';
+import { AbstractAPI } from './AbstractApi';
+type AllowlistIdentifierCreateParams = {
+ identifier: string;
+ notify: boolean;
+};
+export declare class AllowlistIdentifierAPI extends AbstractAPI {
+ getAllowlistIdentifierList(): Promise>;
+ createAllowlistIdentifier(params: AllowlistIdentifierCreateParams): Promise;
+ deleteAllowlistIdentifier(allowlistIdentifierId: string): Promise;
+}
+export {};
+//# sourceMappingURL=AllowlistIdentifierApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/AllowlistIdentifierApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/AllowlistIdentifierApi.d.ts.map
new file mode 100644
index 00000000..b7357280
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/AllowlistIdentifierApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AllowlistIdentifierApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/AllowlistIdentifierApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,+BAA+B,GAAG;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,qBAAa,sBAAuB,SAAQ,WAAW;IACxC,0BAA0B;IAQ1B,yBAAyB,CAAC,MAAM,EAAE,+BAA+B;IAQjE,yBAAyB,CAAC,qBAAqB,EAAE,MAAM;CAOrE"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/ClientApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/ClientApi.d.ts
new file mode 100644
index 00000000..0dbe881e
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/ClientApi.d.ts
@@ -0,0 +1,10 @@
+import type { ClerkPaginationRequest } from '@clerk/types';
+import type { Client } from '../resources/Client';
+import type { PaginatedResourceResponse } from '../resources/Deserializer';
+import { AbstractAPI } from './AbstractApi';
+export declare class ClientAPI extends AbstractAPI {
+ getClientList(params?: ClerkPaginationRequest): Promise>;
+ getClient(clientId: string): Promise;
+ verifyClient(token: string): Promise;
+}
+//# sourceMappingURL=ClientApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/ClientApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/ClientApi.d.ts.map
new file mode 100644
index 00000000..49bd804c
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/ClientApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ClientApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/ClientApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,qBAAa,SAAU,SAAQ,WAAW;IAC3B,aAAa,CAAC,MAAM,GAAE,sBAA2B;IAQjD,SAAS,CAAC,QAAQ,EAAE,MAAM;IAQhC,YAAY,CAAC,KAAK,EAAE,MAAM;CAOlC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/DomainApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/DomainApi.d.ts
new file mode 100644
index 00000000..c669574a
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/DomainApi.d.ts
@@ -0,0 +1,6 @@
+import type { DeletedObject } from '../resources/DeletedObject';
+import { AbstractAPI } from './AbstractApi';
+export declare class DomainAPI extends AbstractAPI {
+ deleteDomain(id: string): Promise;
+}
+//# sourceMappingURL=DomainApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/DomainApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/DomainApi.d.ts.map
new file mode 100644
index 00000000..7c3afb84
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/DomainApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"DomainApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/DomainApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,qBAAa,SAAU,SAAQ,WAAW;IAC3B,YAAY,CAAC,EAAE,EAAE,MAAM;CAMrC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/EmailAddressApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/EmailAddressApi.d.ts
new file mode 100644
index 00000000..f9bab3aa
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/EmailAddressApi.d.ts
@@ -0,0 +1,20 @@
+import type { DeletedObject, EmailAddress } from '../resources';
+import { AbstractAPI } from './AbstractApi';
+type CreateEmailAddressParams = {
+ userId: string;
+ emailAddress: string;
+ verified?: boolean;
+ primary?: boolean;
+};
+type UpdateEmailAddressParams = {
+ verified?: boolean;
+ primary?: boolean;
+};
+export declare class EmailAddressAPI extends AbstractAPI {
+ getEmailAddress(emailAddressId: string): Promise;
+ createEmailAddress(params: CreateEmailAddressParams): Promise;
+ updateEmailAddress(emailAddressId: string, params?: UpdateEmailAddressParams): Promise;
+ deleteEmailAddress(emailAddressId: string): Promise;
+}
+export {};
+//# sourceMappingURL=EmailAddressApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/EmailAddressApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/EmailAddressApi.d.ts.map
new file mode 100644
index 00000000..00f51a3b
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/EmailAddressApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"EmailAddressApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/EmailAddressApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qBAAa,eAAgB,SAAQ,WAAW;IACjC,eAAe,CAAC,cAAc,EAAE,MAAM;IAStC,kBAAkB,CAAC,MAAM,EAAE,wBAAwB;IAQnD,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,GAAE,wBAA6B;IAUhF,kBAAkB,CAAC,cAAc,EAAE,MAAM;CAQvD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/InvitationApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/InvitationApi.d.ts
new file mode 100644
index 00000000..008f6a34
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/InvitationApi.d.ts
@@ -0,0 +1,32 @@
+import type { ClerkPaginationRequest } from '@clerk/types';
+import type { PaginatedResourceResponse } from '../resources/Deserializer';
+import type { Invitation } from '../resources/Invitation';
+import { AbstractAPI } from './AbstractApi';
+type CreateParams = {
+ emailAddress: string;
+ redirectUrl?: string;
+ publicMetadata?: UserPublicMetadata;
+ notify?: boolean;
+ ignoreExisting?: boolean;
+};
+type GetInvitationListParams = ClerkPaginationRequest<{
+ /**
+ * Filters invitations based on their status(accepted, pending, revoked).
+ *
+ * @example
+ * get all revoked invitations
+ *
+ * import { createClerkClient } from '@clerk/backend';
+ * const clerkClient = createClerkClient(...)
+ * await clerkClient.invitations.getInvitationList({ status: 'revoked })
+ *
+ */
+ status?: 'accepted' | 'pending' | 'revoked';
+}>;
+export declare class InvitationAPI extends AbstractAPI {
+ getInvitationList(params?: GetInvitationListParams): Promise>;
+ createInvitation(params: CreateParams): Promise;
+ revokeInvitation(invitationId: string): Promise;
+}
+export {};
+//# sourceMappingURL=InvitationApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/InvitationApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/InvitationApi.d.ts.map
new file mode 100644
index 00000000..726cd76f
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/InvitationApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"InvitationApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/InvitationApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,YAAY,GAAG;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,KAAK,uBAAuB,GAAG,sBAAsB,CAAC;IACpD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;CAC7C,CAAC,CAAC;AAEH,qBAAa,aAAc,SAAQ,WAAW;IAC/B,iBAAiB,CAAC,MAAM,GAAE,uBAA4B;IAQtD,gBAAgB,CAAC,MAAM,EAAE,YAAY;IAQrC,gBAAgB,CAAC,YAAY,EAAE,MAAM;CAOnD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationApi.d.ts
new file mode 100644
index 00000000..2bff5e7d
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationApi.d.ts
@@ -0,0 +1,121 @@
+import type { ClerkPaginationRequest, OrganizationEnrollmentMode } from '@clerk/types';
+import type { Organization, OrganizationDomain, OrganizationInvitation, OrganizationInvitationStatus, OrganizationMembership } from '../resources';
+import type { PaginatedResourceResponse } from '../resources/Deserializer';
+import type { OrganizationMembershipRole } from '../resources/Enums';
+import { AbstractAPI } from './AbstractApi';
+import type { WithSign } from './util-types';
+type MetadataParams = {
+ publicMetadata?: TPublic;
+ privateMetadata?: TPrivate;
+};
+type GetOrganizationListParams = ClerkPaginationRequest<{
+ includeMembersCount?: boolean;
+ query?: string;
+ orderBy?: WithSign<'name' | 'created_at' | 'members_count'>;
+}>;
+type CreateParams = {
+ name: string;
+ slug?: string;
+ createdBy: string;
+ maxAllowedMemberships?: number;
+} & MetadataParams;
+type GetOrganizationParams = ({
+ organizationId: string;
+} | {
+ slug: string;
+}) & {
+ includeMembersCount?: boolean;
+};
+type UpdateParams = {
+ name?: string;
+ slug?: string;
+ maxAllowedMemberships?: number;
+} & MetadataParams;
+type UpdateLogoParams = {
+ file: Blob | File;
+ uploaderUserId?: string;
+};
+type UpdateMetadataParams = MetadataParams;
+type GetOrganizationMembershipListParams = ClerkPaginationRequest<{
+ organizationId: string;
+ orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>;
+}>;
+type CreateOrganizationMembershipParams = {
+ organizationId: string;
+ userId: string;
+ role: OrganizationMembershipRole;
+};
+type UpdateOrganizationMembershipParams = CreateOrganizationMembershipParams;
+type UpdateOrganizationMembershipMetadataParams = {
+ organizationId: string;
+ userId: string;
+} & MetadataParams;
+type DeleteOrganizationMembershipParams = {
+ organizationId: string;
+ userId: string;
+};
+type CreateOrganizationInvitationParams = {
+ organizationId: string;
+ inviterUserId: string;
+ emailAddress: string;
+ role: OrganizationMembershipRole;
+ redirectUrl?: string;
+ publicMetadata?: OrganizationInvitationPublicMetadata;
+};
+type GetOrganizationInvitationListParams = ClerkPaginationRequest<{
+ organizationId: string;
+ status?: OrganizationInvitationStatus[];
+}>;
+type GetOrganizationInvitationParams = {
+ organizationId: string;
+ invitationId: string;
+};
+type RevokeOrganizationInvitationParams = {
+ organizationId: string;
+ invitationId: string;
+ requestingUserId: string;
+};
+type GetOrganizationDomainListParams = {
+ organizationId: string;
+ limit?: number;
+ offset?: number;
+};
+type CreateOrganizationDomainParams = {
+ organizationId: string;
+ name: string;
+ enrollmentMode: OrganizationEnrollmentMode;
+ verified?: boolean;
+};
+type UpdateOrganizationDomainParams = {
+ organizationId: string;
+ domainId: string;
+} & Partial;
+type DeleteOrganizationDomainParams = {
+ organizationId: string;
+ domainId: string;
+};
+export declare class OrganizationAPI extends AbstractAPI {
+ getOrganizationList(params?: GetOrganizationListParams): Promise>;
+ createOrganization(params: CreateParams): Promise;
+ getOrganization(params: GetOrganizationParams): Promise;
+ updateOrganization(organizationId: string, params: UpdateParams): Promise;
+ updateOrganizationLogo(organizationId: string, params: UpdateLogoParams): Promise;
+ deleteOrganizationLogo(organizationId: string): Promise;
+ updateOrganizationMetadata(organizationId: string, params: UpdateMetadataParams): Promise;
+ deleteOrganization(organizationId: string): Promise;
+ getOrganizationMembershipList(params: GetOrganizationMembershipListParams): Promise>;
+ createOrganizationMembership(params: CreateOrganizationMembershipParams): Promise;
+ updateOrganizationMembership(params: UpdateOrganizationMembershipParams): Promise;
+ updateOrganizationMembershipMetadata(params: UpdateOrganizationMembershipMetadataParams): Promise;
+ deleteOrganizationMembership(params: DeleteOrganizationMembershipParams): Promise;
+ getOrganizationInvitationList(params: GetOrganizationInvitationListParams): Promise>;
+ createOrganizationInvitation(params: CreateOrganizationInvitationParams): Promise;
+ getOrganizationInvitation(params: GetOrganizationInvitationParams): Promise;
+ revokeOrganizationInvitation(params: RevokeOrganizationInvitationParams): Promise;
+ getOrganizationDomainList(params: GetOrganizationDomainListParams): Promise>;
+ createOrganizationDomain(params: CreateOrganizationDomainParams): Promise;
+ updateOrganizationDomain(params: UpdateOrganizationDomainParams): Promise;
+ deleteOrganizationDomain(params: DeleteOrganizationDomainParams): Promise;
+}
+export {};
+//# sourceMappingURL=OrganizationApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationApi.d.ts.map
new file mode 100644
index 00000000..25746d57
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"OrganizationApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/OrganizationApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAIvF,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI7C,KAAK,cAAc,CAAC,OAAO,GAAG,0BAA0B,EAAE,QAAQ,GAAG,2BAA2B,IAAI;IAClG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B,CAAC;AAEF,KAAK,yBAAyB,GAAG,sBAAsB,CAAC;IACtD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,YAAY,GAAG,eAAe,CAAC,CAAC;CAC7D,CAAC,CAAC;AAEH,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG,cAAc,CAAC;AAEnB,KAAK,qBAAqB,GAAG,CAAC;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,G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BvE,sBAAsB,CAAC,cAAc,EAAE,MAAM;IAS7C,0BAA0B,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB;IAU/E,kBAAkB,CAAC,cAAc,EAAE,MAAM;IAOzC,6BAA6B,CAAC,MAAM,EAAE,mCAAmC;IAWzE,4BAA4B,CAAC,MAAM,EAAE,kCAAkC;IAcvE,4BAA4B,CAAC,MAAM,EAAE,kCAAkC;IAavE,oCAAoC,CAAC,MAAM,EAAE,0CAA0C;IAavF,4BAA4B,CAAC,MAAM,EAAE,kCAAkC;IAUvE,6BAA6B,CAAC,MAAM,EAAE,mCAAmC;IAWzE,4BAA4B,CAAC,MAAM,EAAE,kCAAkC;IAWvE,yBAAyB,CAAC,MAAM,EAAE,+BAA+B;IAWjE,4BAA4B,CAAC,MAAM,EAAE,kCAAkC;IAavE,yBAAyB,CAAC,MAAM,EAAE,+BAA+B;IAWjE,wBAAwB,CAAC,MAAM,EAAE,8BAA8B;IAe/D,wBAAwB,CAAC,MAAM,EAAE,8BAA8B;IAY/D,wBAAwB,CAAC,MAAM,EAAE,8BAA8B;CAU7E"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationPermissionApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationPermissionApi.d.ts
new file mode 100644
index 00000000..6f92ee6d
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationPermissionApi.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=OrganizationPermissionApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationPermissionApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationPermissionApi.d.ts.map
new file mode 100644
index 00000000..a0ffa364
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationPermissionApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"OrganizationPermissionApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/OrganizationPermissionApi.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationRoleApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationRoleApi.d.ts
new file mode 100644
index 00000000..6433c42a
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationRoleApi.d.ts
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=OrganizationRoleApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationRoleApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationRoleApi.d.ts.map
new file mode 100644
index 00000000..d4983741
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/OrganizationRoleApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"OrganizationRoleApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/OrganizationRoleApi.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/PhoneNumberApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/PhoneNumberApi.d.ts
new file mode 100644
index 00000000..f8e907c2
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/PhoneNumberApi.d.ts
@@ -0,0 +1,20 @@
+import type { DeletedObject, PhoneNumber } from '../resources';
+import { AbstractAPI } from './AbstractApi';
+type CreatePhoneNumberParams = {
+ userId: string;
+ phoneNumber: string;
+ verified?: boolean;
+ primary?: boolean;
+};
+type UpdatePhoneNumberParams = {
+ verified?: boolean;
+ primary?: boolean;
+};
+export declare class PhoneNumberAPI extends AbstractAPI {
+ getPhoneNumber(phoneNumberId: string): Promise;
+ createPhoneNumber(params: CreatePhoneNumberParams): Promise;
+ updatePhoneNumber(phoneNumberId: string, params?: UpdatePhoneNumberParams): Promise;
+ deletePhoneNumber(phoneNumberId: string): Promise;
+}
+export {};
+//# sourceMappingURL=PhoneNumberApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/PhoneNumberApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/PhoneNumberApi.d.ts.map
new file mode 100644
index 00000000..03bfd97d
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/PhoneNumberApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"PhoneNumberApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/PhoneNumberApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,uBAAuB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qBAAa,cAAe,SAAQ,WAAW;IAChC,cAAc,CAAC,aAAa,EAAE,MAAM;IASpC,iBAAiB,CAAC,MAAM,EAAE,uBAAuB;IAQjD,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,GAAE,uBAA4B;IAU7E,iBAAiB,CAAC,aAAa,EAAE,MAAM;CAQrD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/RedirectUrlApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/RedirectUrlApi.d.ts
new file mode 100644
index 00000000..5fa401bb
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/RedirectUrlApi.d.ts
@@ -0,0 +1,14 @@
+import type { PaginatedResourceResponse } from '../resources/Deserializer';
+import type { RedirectUrl } from '../resources/RedirectUrl';
+import { AbstractAPI } from './AbstractApi';
+type CreateRedirectUrlParams = {
+ url: string;
+};
+export declare class RedirectUrlAPI extends AbstractAPI {
+ getRedirectUrlList(): Promise>;
+ getRedirectUrl(redirectUrlId: string): Promise;
+ createRedirectUrl(params: CreateRedirectUrlParams): Promise;
+ deleteRedirectUrl(redirectUrlId: string): Promise;
+}
+export {};
+//# sourceMappingURL=RedirectUrlApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/RedirectUrlApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/RedirectUrlApi.d.ts.map
new file mode 100644
index 00000000..cb6b9b16
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/RedirectUrlApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"RedirectUrlApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/RedirectUrlApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,qBAAa,cAAe,SAAQ,WAAW;IAChC,kBAAkB;IAQlB,cAAc,CAAC,aAAa,EAAE,MAAM;IAQpC,iBAAiB,CAAC,MAAM,EAAE,uBAAuB;IAQjD,iBAAiB,CAAC,aAAa,EAAE,MAAM;CAOrD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/SamlConnectionApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/SamlConnectionApi.d.ts
new file mode 100644
index 00000000..a60d126e
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/SamlConnectionApi.d.ts
@@ -0,0 +1,52 @@
+import type { SamlIdpSlug } from '@clerk/types';
+import type { SamlConnection } from '../resources';
+import { AbstractAPI } from './AbstractApi';
+type SamlConnectionListParams = {
+ limit?: number;
+ offset?: number;
+};
+type CreateSamlConnectionParams = {
+ name: string;
+ provider: SamlIdpSlug;
+ domain: string;
+ idpEntityId?: string;
+ idpSsoUrl?: string;
+ idpCertificate?: string;
+ idpMetadataUrl?: string;
+ idpMetadata?: string;
+ attributeMapping?: {
+ emailAddress?: string;
+ firstName?: string;
+ lastName?: string;
+ userId?: string;
+ };
+};
+type UpdateSamlConnectionParams = {
+ name?: string;
+ provider?: SamlIdpSlug;
+ domain?: string;
+ idpEntityId?: string;
+ idpSsoUrl?: string;
+ idpCertificate?: string;
+ idpMetadataUrl?: string;
+ idpMetadata?: string;
+ attributeMapping?: {
+ emailAddress?: string;
+ firstName?: string;
+ lastName?: string;
+ userId?: string;
+ };
+ active?: boolean;
+ syncUserAttributes?: boolean;
+ allowSubdomains?: boolean;
+ allowIdpInitiated?: boolean;
+};
+export declare class SamlConnectionAPI extends AbstractAPI {
+ getSamlConnectionList(params?: SamlConnectionListParams): Promise;
+ createSamlConnection(params: CreateSamlConnectionParams): Promise;
+ getSamlConnection(samlConnectionId: string): Promise;
+ updateSamlConnection(samlConnectionId: string, params?: UpdateSamlConnectionParams): Promise;
+ deleteSamlConnection(samlConnectionId: string): Promise;
+}
+export {};
+//# sourceMappingURL=SamlConnectionApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/SamlConnectionApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/SamlConnectionApi.d.ts.map
new file mode 100644
index 00000000..d9855823
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/SamlConnectionApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"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AAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,qBAAa,iBAAkB,SAAQ,WAAW;IACnC,qBAAqB,CAAC,MAAM,GAAE,wBAA6B;IAQ3D,oBAAoB,CAAC,MAAM,EAAE,0BAA0B;IAQvD,iBAAiB,CAAC,gBAAgB,EAAE,MAAM;IAQ1C,oBAAoB,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAE,0BAA+B;IAStF,oBAAoB,CAAC,gBAAgB,EAAE,MAAM;CAO3D"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/SessionApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/SessionApi.d.ts
new file mode 100644
index 00000000..a4521c01
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/SessionApi.d.ts
@@ -0,0 +1,27 @@
+import type { ClerkPaginationRequest, SessionStatus } from '@clerk/types';
+import type { PaginatedResourceResponse } from '../resources/Deserializer';
+import type { Session } from '../resources/Session';
+import type { Token } from '../resources/Token';
+import { AbstractAPI } from './AbstractApi';
+type SessionListParams = ClerkPaginationRequest<{
+ clientId?: string;
+ userId?: string;
+ status?: SessionStatus;
+}>;
+type RefreshTokenParams = {
+ expired_token: string;
+ refresh_token: string;
+ request_origin: string;
+ request_originating_ip?: string;
+ request_headers?: Record;
+};
+export declare class SessionAPI extends AbstractAPI {
+ getSessionList(params?: SessionListParams): Promise>;
+ getSession(sessionId: string): Promise;
+ revokeSession(sessionId: string): Promise;
+ verifySession(sessionId: string, token: string): Promise;
+ getToken(sessionId: string, template: string): Promise;
+ refreshSession(sessionId: string, params: RefreshTokenParams): Promise;
+}
+export {};
+//# sourceMappingURL=SessionApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/SessionApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/SessionApi.d.ts.map
new file mode 100644
index 00000000..4d8261cb
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/SessionApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"SessionApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/SessionApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,KAAK,iBAAiB,GAAG,sBAAsB,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB,CAAC,CAAC;AAEH,KAAK,kBAAkB,GAAG;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC5C,CAAC;AAEF,qBAAa,UAAW,SAAQ,WAAW;IAC5B,cAAc,CAAC,MAAM,GAAE,iBAAsB;IAQ7C,UAAU,CAAC,SAAS,EAAE,MAAM;IAQ5B,aAAa,CAAC,SAAS,EAAE,MAAM;IAQ/B,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAS9C,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAQ5C,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB;CAQ1E"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/SignInTokenApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/SignInTokenApi.d.ts
new file mode 100644
index 00000000..5d2c57e8
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/SignInTokenApi.d.ts
@@ -0,0 +1,12 @@
+import type { SignInToken } from '../resources/SignInTokens';
+import { AbstractAPI } from './AbstractApi';
+type CreateSignInTokensParams = {
+ userId: string;
+ expiresInSeconds: number;
+};
+export declare class SignInTokenAPI extends AbstractAPI {
+ createSignInToken(params: CreateSignInTokensParams): Promise;
+ revokeSignInToken(signInTokenId: string): Promise;
+}
+export {};
+//# sourceMappingURL=SignInTokenApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/SignInTokenApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/SignInTokenApi.d.ts.map
new file mode 100644
index 00000000..5568edbf
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/SignInTokenApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"SignInTokenApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/SignInTokenApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAIF,qBAAa,cAAe,SAAQ,WAAW;IAChC,iBAAiB,CAAC,MAAM,EAAE,wBAAwB;IAQlD,iBAAiB,CAAC,aAAa,EAAE,MAAM;CAOrD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/TestingTokenApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/TestingTokenApi.d.ts
new file mode 100644
index 00000000..6b16501e
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/TestingTokenApi.d.ts
@@ -0,0 +1,6 @@
+import type { TestingToken } from '../resources/TestingToken';
+import { AbstractAPI } from './AbstractApi';
+export declare class TestingTokenAPI extends AbstractAPI {
+ createTestingToken(): Promise;
+}
+//# sourceMappingURL=TestingTokenApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/TestingTokenApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/TestingTokenApi.d.ts.map
new file mode 100644
index 00000000..25105069
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/TestingTokenApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"TestingTokenApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/TestingTokenApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,qBAAa,eAAgB,SAAQ,WAAW;IACjC,kBAAkB;CAMhC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/UserApi.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/UserApi.d.ts
new file mode 100644
index 00000000..714eba4e
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/UserApi.d.ts
@@ -0,0 +1,102 @@
+import type { ClerkPaginationRequest, OAuthProvider } from '@clerk/types';
+import type { OauthAccessToken, OrganizationMembership, User } from '../resources';
+import type { PaginatedResourceResponse } from '../resources/Deserializer';
+import { AbstractAPI } from './AbstractApi';
+import type { WithSign } from './util-types';
+type UserCountParams = {
+ emailAddress?: string[];
+ phoneNumber?: string[];
+ username?: string[];
+ web3Wallet?: string[];
+ query?: string;
+ userId?: string[];
+ externalId?: string[];
+};
+type UserListParams = ClerkPaginationRequest;
+ last_active_at_since?: number;
+ organizationId?: string[];
+}>;
+type UserMetadataParams = {
+ publicMetadata?: UserPublicMetadata;
+ privateMetadata?: UserPrivateMetadata;
+ unsafeMetadata?: UserUnsafeMetadata;
+};
+type PasswordHasher = 'argon2i' | 'argon2id' | 'awscognito' | 'bcrypt' | 'bcrypt_sha256_django' | 'md5' | 'pbkdf2_sha256' | 'pbkdf2_sha256_django' | 'pbkdf2_sha1' | 'phpass' | 'scrypt_firebase' | 'scrypt_werkzeug' | 'sha256';
+type UserPasswordHashingParams = {
+ passwordDigest: string;
+ passwordHasher: PasswordHasher;
+};
+type CreateUserParams = {
+ externalId?: string;
+ emailAddress?: string[];
+ phoneNumber?: string[];
+ username?: string;
+ password?: string;
+ firstName?: string;
+ lastName?: string;
+ skipPasswordChecks?: boolean;
+ skipPasswordRequirement?: boolean;
+ totpSecret?: string;
+ backupCodes?: string[];
+ createdAt?: Date;
+} & UserMetadataParams & (UserPasswordHashingParams | object);
+type UpdateUserParams = {
+ firstName?: string;
+ lastName?: string;
+ username?: string;
+ password?: string;
+ skipPasswordChecks?: boolean;
+ signOutOfOtherSessions?: boolean;
+ primaryEmailAddressID?: string;
+ primaryPhoneNumberID?: string;
+ primaryWeb3WalletID?: string;
+ profileImageID?: string;
+ totpSecret?: string;
+ backupCodes?: string[];
+ externalId?: string;
+ createdAt?: Date;
+ deleteSelfEnabled?: boolean;
+ createOrganizationEnabled?: boolean;
+ createOrganizationsLimit?: number;
+} & UserMetadataParams & (UserPasswordHashingParams | object);
+type GetOrganizationMembershipListParams = ClerkPaginationRequest<{
+ userId: string;
+}>;
+type VerifyPasswordParams = {
+ userId: string;
+ password: string;
+};
+type VerifyTOTPParams = {
+ userId: string;
+ code: string;
+};
+export declare class UserAPI extends AbstractAPI {
+ getUserList(params?: UserListParams): Promise>;
+ getUser(userId: string): Promise;
+ createUser(params: CreateUserParams): Promise;
+ updateUser(userId: string, params?: UpdateUserParams): Promise;
+ updateUserProfileImage(userId: string, params: {
+ file: Blob | File;
+ }): Promise;
+ updateUserMetadata(userId: string, params: UserMetadataParams): Promise;
+ deleteUser(userId: string): Promise;
+ getCount(params?: UserCountParams): Promise;
+ getUserOauthAccessToken(userId: string, provider: `oauth_${OAuthProvider}`): Promise>;
+ disableUserMFA(userId: string): Promise;
+ getOrganizationMembershipList(params: GetOrganizationMembershipListParams): Promise>;
+ verifyPassword(params: VerifyPasswordParams): Promise<{
+ verified: true;
+ }>;
+ verifyTOTP(params: VerifyTOTPParams): Promise<{
+ verified: true;
+ code_type: "totp";
+ }>;
+ banUser(userId: string): Promise;
+ unbanUser(userId: string): Promise;
+ lockUser(userId: string): Promise;
+ unlockUser(userId: string): Promise;
+ deleteUserProfileImage(userId: string): Promise;
+}
+export {};
+//# sourceMappingURL=UserApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/UserApi.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/UserApi.d.ts.map
new file mode 100644
index 00000000..bc7d1c64
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/UserApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"UserApi.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/UserApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe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/dist/api/endpoints/index.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/index.d.ts
new file mode 100644
index 00000000..cfe0b167
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/index.d.ts
@@ -0,0 +1,15 @@
+export * from './AbstractApi';
+export * from './AllowlistIdentifierApi';
+export * from './ClientApi';
+export * from './DomainApi';
+export * from './EmailAddressApi';
+export * from './InvitationApi';
+export * from './OrganizationApi';
+export * from './PhoneNumberApi';
+export * from './RedirectUrlApi';
+export * from './SessionApi';
+export * from './SignInTokenApi';
+export * from './UserApi';
+export * from './SamlConnectionApi';
+export * from './TestingTokenApi';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/index.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/index.d.ts.map
new file mode 100644
index 00000000..9b5f8853
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/util-types.d.ts b/backend/node_modules/@clerk/backend/dist/api/endpoints/util-types.d.ts
new file mode 100644
index 00000000..e1826a00
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/util-types.d.ts
@@ -0,0 +1,2 @@
+export type WithSign = `+${T}` | `-${T}` | T;
+//# sourceMappingURL=util-types.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/endpoints/util-types.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/endpoints/util-types.d.ts.map
new file mode 100644
index 00000000..82ad2ffe
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/endpoints/util-types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"util-types.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/util-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/factory.d.ts b/backend/node_modules/@clerk/backend/dist/api/factory.d.ts
new file mode 100644
index 00000000..212340af
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/factory.d.ts
@@ -0,0 +1,20 @@
+import { AllowlistIdentifierAPI, ClientAPI, DomainAPI, EmailAddressAPI, InvitationAPI, OrganizationAPI, PhoneNumberAPI, RedirectUrlAPI, SamlConnectionAPI, SessionAPI, SignInTokenAPI, TestingTokenAPI, UserAPI } from './endpoints';
+import { buildRequest } from './request';
+export type CreateBackendApiOptions = Parameters[0];
+export type ApiClient = ReturnType;
+export declare function createBackendApiClient(options: CreateBackendApiOptions): {
+ allowlistIdentifiers: AllowlistIdentifierAPI;
+ clients: ClientAPI;
+ emailAddresses: EmailAddressAPI;
+ invitations: InvitationAPI;
+ organizations: OrganizationAPI;
+ phoneNumbers: PhoneNumberAPI;
+ redirectUrls: RedirectUrlAPI;
+ sessions: SessionAPI;
+ signInTokens: SignInTokenAPI;
+ users: UserAPI;
+ domains: DomainAPI;
+ samlConnections: SamlConnectionAPI;
+ testingTokens: TestingTokenAPI;
+};
+//# sourceMappingURL=factory.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/factory.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/factory.d.ts.map
new file mode 100644
index 00000000..43a42aaf
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/factory.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/api/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,SAAS,EACT,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,eAAe,EACf,OAAO,EACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzE,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAElE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB;;;;;;;;;;;;;;EAkBtE"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/index.d.ts b/backend/node_modules/@clerk/backend/dist/api/index.d.ts
new file mode 100644
index 00000000..8abb1250
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/index.d.ts
@@ -0,0 +1,3 @@
+export * from './factory';
+export * from './resources';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/index.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/index.d.ts.map
new file mode 100644
index 00000000..c950cae6
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/request.d.ts b/backend/node_modules/@clerk/backend/dist/api/request.d.ts
new file mode 100644
index 00000000..a652b3ae
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/request.d.ts
@@ -0,0 +1,37 @@
+import type { ClerkAPIError } from '@clerk/types';
+export type ClerkBackendApiRequestOptions = {
+ method: 'GET' | 'POST' | 'PATCH' | 'DELETE' | 'PUT';
+ queryParams?: Record;
+ headerParams?: Record;
+ bodyParams?: object;
+ formData?: FormData;
+} & ({
+ url: string;
+ path?: string;
+} | {
+ url?: string;
+ path: string;
+});
+export type ClerkBackendApiResponse = {
+ data: T;
+ errors: null;
+ totalCount?: number;
+} | {
+ data: null;
+ errors: ClerkAPIError[];
+ totalCount?: never;
+ clerkTraceId?: string;
+ status?: number;
+ statusText?: string;
+};
+export type RequestFunction = ReturnType;
+type BuildRequestOptions = {
+ secretKey?: string;
+ apiUrl?: string;
+ apiVersion?: string;
+ userAgent?: string;
+};
+export declare function buildRequest(options: BuildRequestOptions): LegacyRequestFunction;
+type LegacyRequestFunction = (requestOptions: ClerkBackendApiRequestOptions) => Promise;
+export {};
+//# sourceMappingURL=request.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/request.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/request.d.ts.map
new file mode 100644
index 00000000..fbbd4ba8
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/request.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/api/request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,cAAc,CAAC;AAWrE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,GAAG,CACA;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GACD;IACE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CACJ,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,CAAC,IACjC;IACE,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,IAAI,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GACD;IACE,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEN,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D,KAAK,mBAAmB,GAAG;IAEzB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,yBAiGxD;AAqBD,KAAK,qBAAqB,GAAG,CAAC,CAAC,EAAE,cAAc,EAAE,6BAA6B,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/AllowlistIdentifier.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/AllowlistIdentifier.d.ts
new file mode 100644
index 00000000..fc8133e8
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/AllowlistIdentifier.d.ts
@@ -0,0 +1,11 @@
+import type { AllowlistIdentifierJSON } from './JSON';
+export declare class AllowlistIdentifier {
+ readonly id: string;
+ readonly identifier: string;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly invitationId?: string | undefined;
+ constructor(id: string, identifier: string, createdAt: number, updatedAt: number, invitationId?: string | undefined);
+ static fromJSON(data: AllowlistIdentifierJSON): AllowlistIdentifier;
+}
+//# sourceMappingURL=AllowlistIdentifier.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/AllowlistIdentifier.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/AllowlistIdentifier.d.ts.map
new file mode 100644
index 00000000..acff9c12
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/AllowlistIdentifier.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AllowlistIdentifier.d.ts","sourceRoot":"","sources":["../../../src/api/resources/AllowlistIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEtD,qBAAa,mBAAmB;IAE5B,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM;gBAJrB,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,YAAA;IAGhC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,uBAAuB,GAAG,mBAAmB;CAGpE"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Client.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Client.d.ts
new file mode 100644
index 00000000..6b23fc1b
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Client.d.ts
@@ -0,0 +1,15 @@
+import type { ClientJSON } from './JSON';
+import { Session } from './Session';
+export declare class Client {
+ readonly id: string;
+ readonly sessionIds: string[];
+ readonly sessions: Session[];
+ readonly signInId: string | null;
+ readonly signUpId: string | null;
+ readonly lastActiveSessionId: string | null;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ constructor(id: string, sessionIds: string[], sessions: Session[], signInId: string | null, signUpId: string | null, lastActiveSessionId: string | null, createdAt: number, updatedAt: number);
+ static fromJSON(data: ClientJSON): Client;
+}
+//# sourceMappingURL=Client.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Client.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Client.d.ts.map
new file mode 100644
index 00000000..64801c00
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Client.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,MAAM;IAEf,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAPjB,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,EAAE,EACpB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,mBAAmB,EAAE,MAAM,GAAG,IAAI,EAClC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAG5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;CAY1C"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/DeletedObject.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/DeletedObject.d.ts
new file mode 100644
index 00000000..8aa45e6a
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/DeletedObject.d.ts
@@ -0,0 +1,10 @@
+import type { DeletedObjectJSON } from './JSON';
+export declare class DeletedObject {
+ readonly object: string;
+ readonly id: string | null;
+ readonly slug: string | null;
+ readonly deleted: boolean;
+ constructor(object: string, id: string | null, slug: string | null, deleted: boolean);
+ static fromJSON(data: DeletedObjectJSON): DeletedObject;
+}
+//# sourceMappingURL=DeletedObject.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/DeletedObject.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/DeletedObject.d.ts.map
new file mode 100644
index 00000000..90508aba
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/DeletedObject.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"DeletedObject.d.ts","sourceRoot":"","sources":["../../../src/api/resources/DeletedObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEhD,qBAAa,aAAa;IAEtB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO;gBAHhB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,GAAG,IAAI,EACjB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,OAAO,EAAE,OAAO;IAG3B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,iBAAiB;CAGxC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Deserializer.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Deserializer.d.ts
new file mode 100644
index 00000000..1d2162ca
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Deserializer.d.ts
@@ -0,0 +1,9 @@
+type ResourceResponse = {
+ data: T;
+};
+export type PaginatedResourceResponse = ResourceResponse & {
+ totalCount: number;
+};
+export declare function deserialize(payload: unknown): PaginatedResourceResponse | ResourceResponse;
+export {};
+//# sourceMappingURL=Deserializer.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Deserializer.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Deserializer.d.ts.map
new file mode 100644
index 00000000..12c4f8b9
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Deserializer.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Deserializer.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Deserializer.ts"],"names":[],"mappings":"AAsBA,KAAK,gBAAgB,CAAC,CAAC,IAAI;IACzB,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAC/D,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,OAAO,GAAG,yBAAyB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAczG"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Email.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Email.d.ts
new file mode 100644
index 00000000..6cf2b051
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Email.d.ts
@@ -0,0 +1,17 @@
+import type { EmailJSON } from './JSON';
+export declare class Email {
+ readonly id: string;
+ readonly fromEmailName: string;
+ readonly emailAddressId: string | null;
+ readonly toEmailAddress?: string | undefined;
+ readonly subject?: string | undefined;
+ readonly body?: string | undefined;
+ readonly bodyPlain?: (string | null) | undefined;
+ readonly status?: string | undefined;
+ readonly slug?: (string | null) | undefined;
+ readonly data?: (Record | null) | undefined;
+ readonly deliveredByClerk?: boolean | undefined;
+ constructor(id: string, fromEmailName: string, emailAddressId: string | null, toEmailAddress?: string | undefined, subject?: string | undefined, body?: string | undefined, bodyPlain?: (string | null) | undefined, status?: string | undefined, slug?: (string | null) | undefined, data?: (Record | null) | undefined, deliveredByClerk?: boolean | undefined);
+ static fromJSON(data: EmailJSON): Email;
+}
+//# sourceMappingURL=Email.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Email.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Email.d.ts.map
new file mode 100644
index 00000000..f017b96c
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Email.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,qBAAa,KAAK;IAEd,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM;IACtB,QAAQ,CAAC,SAAS,CAAC,GAAE,MAAM,GAAG,IAAI;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;IACxB,QAAQ,CAAC,IAAI,CAAC,GAAE,MAAM,GAAG,IAAI;IAC7B,QAAQ,CAAC,IAAI,CAAC,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAC1C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO;gBAV1B,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,cAAc,CAAC,EAAE,MAAM,YAAA,EACvB,OAAO,CAAC,EAAE,MAAM,YAAA,EAChB,IAAI,CAAC,EAAE,MAAM,YAAA,EACb,SAAS,CAAC,GAAE,MAAM,GAAG,IAAI,aAAA,EACzB,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,IAAI,CAAC,GAAE,MAAM,GAAG,IAAI,aAAA,EACpB,IAAI,CAAC,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,aAAA,EACjC,gBAAgB,CAAC,EAAE,OAAO,YAAA;IAGrC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK;CAexC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/EmailAddress.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/EmailAddress.d.ts
new file mode 100644
index 00000000..b2f6663e
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/EmailAddress.d.ts
@@ -0,0 +1,12 @@
+import { IdentificationLink } from './IdentificationLink';
+import type { EmailAddressJSON } from './JSON';
+import { Verification } from './Verification';
+export declare class EmailAddress {
+ readonly id: string;
+ readonly emailAddress: string;
+ readonly verification: Verification | null;
+ readonly linkedTo: IdentificationLink[];
+ constructor(id: string, emailAddress: string, verification: Verification | null, linkedTo: IdentificationLink[]);
+ static fromJSON(data: EmailAddressJSON): EmailAddress;
+}
+//# sourceMappingURL=EmailAddress.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/EmailAddress.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/EmailAddress.d.ts.map
new file mode 100644
index 00000000..792d0fb4
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/EmailAddress.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"EmailAddress.d.ts","sourceRoot":"","sources":["../../../src/api/resources/EmailAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAAa,YAAY;IAErB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAC1C,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,EAAE;gBAH9B,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,YAAY,GAAG,IAAI,EACjC,QAAQ,EAAE,kBAAkB,EAAE;IAGzC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY;CAQtD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Enums.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Enums.d.ts
new file mode 100644
index 00000000..2e0e3049
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Enums.d.ts
@@ -0,0 +1,9 @@
+import type { OrganizationCustomRoleKey } from '@clerk/types';
+export type OAuthProvider = 'facebook' | 'google' | 'hubspot' | 'github' | 'tiktok' | 'gitlab' | 'discord' | 'twitter' | 'twitch' | 'linkedin' | 'linkedin_oidc' | 'dropbox' | 'bitbucket' | 'microsoft' | 'notion' | 'apple' | 'x';
+export type OAuthStrategy = `oauth_${OAuthProvider}`;
+export type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked';
+export type OrganizationMembershipRole = OrganizationCustomRoleKey;
+export type SignInStatus = 'needs_identifier' | 'needs_factor_one' | 'needs_factor_two' | 'complete';
+export type SignUpStatus = 'missing_requirements' | 'complete' | 'abandoned';
+export type InvitationStatus = 'pending' | 'accepted' | 'revoked';
+//# sourceMappingURL=Enums.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Enums.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Enums.d.ts.map
new file mode 100644
index 00000000..522ba435
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Enums.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Enums.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,UAAU,GACV,eAAe,GACf,SAAS,GACT,WAAW,GACX,WAAW,GACX,QAAQ,GACR,OAAO,GACP,GAAG,CAAC;AAER,MAAM,MAAM,aAAa,GAAG,SAAS,aAAa,EAAE,CAAC;AAErD,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAE9E,MAAM,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AAEnE,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,UAAU,CAAC;AAErG,MAAM,MAAM,YAAY,GAAG,sBAAsB,GAAG,UAAU,GAAG,WAAW,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/ExternalAccount.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/ExternalAccount.d.ts
new file mode 100644
index 00000000..428c5898
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/ExternalAccount.d.ts
@@ -0,0 +1,20 @@
+import type { ExternalAccountJSON } from './JSON';
+import { Verification } from './Verification';
+export declare class ExternalAccount {
+ readonly id: string;
+ readonly provider: string;
+ readonly identificationId: string;
+ readonly externalId: string;
+ readonly approvedScopes: string;
+ readonly emailAddress: string;
+ readonly firstName: string;
+ readonly lastName: string;
+ readonly imageUrl: string;
+ readonly username: string | null;
+ readonly publicMetadata: Record | null;
+ readonly label: string | null;
+ readonly verification: Verification | null;
+ constructor(id: string, provider: string, identificationId: string, externalId: string, approvedScopes: string, emailAddress: string, firstName: string, lastName: string, imageUrl: string, username: string | null, publicMetadata: (Record | null) | undefined, label: string | null, verification: Verification | null);
+ static fromJSON(data: ExternalAccountJSON): ExternalAccount;
+}
+//# sourceMappingURL=ExternalAccount.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/ExternalAccount.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/ExternalAccount.d.ts.map
new file mode 100644
index 00000000..7b11999e
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/ExternalAccount.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ExternalAccount.d.ts","sourceRoot":"","sources":["../../../src/api/resources/ExternalAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAAa,eAAe;IAExB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,gBAAgB,EAAE,MAAM;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAC7B,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;gBAZjC,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,cAAc,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,aAAK,EACnD,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,YAAY,EAAE,YAAY,GAAG,IAAI;IAG5C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,eAAe;CAiB5D"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/IdentificationLink.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/IdentificationLink.d.ts
new file mode 100644
index 00000000..19b019a3
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/IdentificationLink.d.ts
@@ -0,0 +1,8 @@
+import type { IdentificationLinkJSON } from './JSON';
+export declare class IdentificationLink {
+ readonly id: string;
+ readonly type: string;
+ constructor(id: string, type: string);
+ static fromJSON(data: IdentificationLinkJSON): IdentificationLink;
+}
+//# sourceMappingURL=IdentificationLink.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/IdentificationLink.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/IdentificationLink.d.ts.map
new file mode 100644
index 00000000..25a14219
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/IdentificationLink.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"IdentificationLink.d.ts","sourceRoot":"","sources":["../../../src/api/resources/IdentificationLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAErD,qBAAa,kBAAkB;IAE3B,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM;gBADZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM;IAGvB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,GAAG,kBAAkB;CAGlE"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Invitation.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Invitation.d.ts
new file mode 100644
index 00000000..be8b74cc
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Invitation.d.ts
@@ -0,0 +1,15 @@
+import type { InvitationStatus } from './Enums';
+import type { InvitationJSON } from './JSON';
+export declare class Invitation {
+ readonly id: string;
+ readonly emailAddress: string;
+ readonly publicMetadata: Record | null;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly status: InvitationStatus;
+ readonly url?: string | undefined;
+ readonly revoked?: boolean | undefined;
+ constructor(id: string, emailAddress: string, publicMetadata: Record | null, createdAt: number, updatedAt: number, status: InvitationStatus, url?: string | undefined, revoked?: boolean | undefined);
+ static fromJSON(data: InvitationJSON): Invitation;
+}
+//# sourceMappingURL=Invitation.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Invitation.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Invitation.d.ts.map
new file mode 100644
index 00000000..33607fd1
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Invitation.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Invitation.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Invitation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,qBAAa,UAAU;IAEnB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IACvD,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,MAAM,EAAE,gBAAgB;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO;gBAPjB,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EAC9C,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,gBAAgB,EACxB,GAAG,CAAC,EAAE,MAAM,YAAA,EACZ,OAAO,CAAC,EAAE,OAAO,YAAA;IAG5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU;CAYlD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/JSON.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/JSON.d.ts
new file mode 100644
index 00000000..8bea9142
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/JSON.d.ts
@@ -0,0 +1,374 @@
+import type { InvitationStatus, OrganizationInvitationStatus, OrganizationMembershipRole, SignInStatus, SignUpStatus } from './Enums';
+export declare const ObjectType: {
+ readonly AllowlistIdentifier: "allowlist_identifier";
+ readonly Client: "client";
+ readonly Email: "email";
+ readonly EmailAddress: "email_address";
+ readonly ExternalAccount: "external_account";
+ readonly FacebookAccount: "facebook_account";
+ readonly GoogleAccount: "google_account";
+ readonly Invitation: "invitation";
+ readonly OauthAccessToken: "oauth_access_token";
+ readonly Organization: "organization";
+ readonly OrganizationInvitation: "organization_invitation";
+ readonly OrganizationMembership: "organization_membership";
+ readonly PhoneNumber: "phone_number";
+ readonly RedirectUrl: "redirect_url";
+ readonly SamlAccount: "saml_account";
+ readonly Session: "session";
+ readonly SignInAttempt: "sign_in_attempt";
+ readonly SignInToken: "sign_in_token";
+ readonly SignUpAttempt: "sign_up_attempt";
+ readonly SmsMessage: "sms_message";
+ readonly User: "user";
+ readonly Web3Wallet: "web3_wallet";
+ readonly Token: "token";
+ readonly TotalCount: "total_count";
+ readonly TestingToken: "testing_token";
+ readonly Role: "role";
+ readonly Permission: "permission";
+};
+export type ObjectType = (typeof ObjectType)[keyof typeof ObjectType];
+export interface ClerkResourceJSON {
+ object: ObjectType;
+ id: string;
+}
+export interface TokenJSON {
+ object: typeof ObjectType.Token;
+ jwt: string;
+}
+export interface AllowlistIdentifierJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.AllowlistIdentifier;
+ identifier: string;
+ created_at: number;
+ updated_at: number;
+ invitation_id?: string;
+}
+export interface ClientJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Client;
+ session_ids: string[];
+ sessions: SessionJSON[];
+ sign_in_id: string | null;
+ sign_up_id: string | null;
+ last_active_session_id: string | null;
+ created_at: number;
+ updated_at: number;
+}
+export interface EmailJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Email;
+ slug?: string | null;
+ from_email_name: string;
+ to_email_address?: string;
+ email_address_id: string | null;
+ user_id?: string | null;
+ subject?: string;
+ body?: string;
+ body_plain?: string | null;
+ status?: string;
+ data?: Record | null;
+ delivered_by_clerk: boolean;
+}
+export interface EmailAddressJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.EmailAddress;
+ email_address: string;
+ verification: VerificationJSON | null;
+ linked_to: IdentificationLinkJSON[];
+}
+export interface ExternalAccountJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.ExternalAccount;
+ provider: string;
+ identification_id: string;
+ provider_user_id: string;
+ approved_scopes: string;
+ email_address: string;
+ first_name: string;
+ last_name: string;
+ image_url?: string;
+ username: string | null;
+ public_metadata?: Record | null;
+ label: string | null;
+ verification: VerificationJSON | null;
+}
+export interface SamlAccountJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.SamlAccount;
+ provider: string;
+ provider_user_id: string | null;
+ active: boolean;
+ email_address: string;
+ first_name: string;
+ last_name: string;
+ verification: VerificationJSON | null;
+ saml_connection: SamlAccountConnectionJSON | null;
+}
+export interface IdentificationLinkJSON extends ClerkResourceJSON {
+ type: string;
+}
+export interface InvitationJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Invitation;
+ email_address: string;
+ public_metadata: Record | null;
+ revoked?: boolean;
+ status: InvitationStatus;
+ url?: string;
+ created_at: number;
+ updated_at: number;
+}
+export interface OauthAccessTokenJSON {
+ external_account_id: string;
+ object: typeof ObjectType.OauthAccessToken;
+ token: string;
+ provider: string;
+ public_metadata: Record;
+ label: string | null;
+ scopes?: string[];
+ token_secret?: string;
+}
+export interface OrganizationJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Organization;
+ name: string;
+ slug: string;
+ image_url?: string;
+ has_image: boolean;
+ members_count?: number;
+ pending_invitations_count?: number;
+ max_allowed_memberships: number;
+ admin_delete_enabled: boolean;
+ public_metadata: OrganizationPublicMetadata | null;
+ private_metadata?: OrganizationPrivateMetadata;
+ created_by: string;
+ created_at: number;
+ updated_at: number;
+}
+export interface OrganizationInvitationJSON extends ClerkResourceJSON {
+ email_address: string;
+ role: OrganizationMembershipRole;
+ organization_id: string;
+ public_organization_data?: PublicOrganizationDataJSON | null;
+ status?: OrganizationInvitationStatus;
+ public_metadata: OrganizationInvitationPublicMetadata;
+ private_metadata: OrganizationInvitationPrivateMetadata;
+ created_at: number;
+ updated_at: number;
+}
+export interface PublicOrganizationDataJSON extends ClerkResourceJSON {
+ name: string;
+ slug: string;
+ image_url?: string;
+ has_image: boolean;
+}
+export interface OrganizationMembershipJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.OrganizationMembership;
+ public_metadata: OrganizationMembershipPublicMetadata;
+ private_metadata?: OrganizationMembershipPrivateMetadata;
+ role: OrganizationMembershipRole;
+ permissions: string[];
+ created_at: number;
+ updated_at: number;
+ organization: OrganizationJSON;
+ public_user_data: OrganizationMembershipPublicUserDataJSON;
+}
+export interface OrganizationMembershipPublicUserDataJSON {
+ identifier: string;
+ first_name: string | null;
+ last_name: string | null;
+ image_url: string;
+ has_image: boolean;
+ user_id: string;
+}
+export interface PhoneNumberJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.PhoneNumber;
+ phone_number: string;
+ reserved_for_second_factor: boolean;
+ default_second_factor: boolean;
+ reserved: boolean;
+ verification: VerificationJSON | null;
+ linked_to: IdentificationLinkJSON[];
+ backup_codes: string[];
+}
+export interface RedirectUrlJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.RedirectUrl;
+ url: string;
+ created_at: number;
+ updated_at: number;
+}
+export interface SessionJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Session;
+ client_id: string;
+ user_id: string;
+ status: string;
+ last_active_organization_id?: string;
+ actor?: Record;
+ last_active_at: number;
+ expire_at: number;
+ abandon_at: number;
+ created_at: number;
+ updated_at: number;
+}
+export interface SignInJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.SignInToken;
+ status: SignInStatus;
+ identifier: string;
+ created_session_id: string | null;
+}
+export interface SignInTokenJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.SignInToken;
+ user_id: string;
+ token: string;
+ status: 'pending' | 'accepted' | 'revoked';
+ url: string;
+ created_at: number;
+ updated_at: number;
+}
+export interface SignUpJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.SignUpAttempt;
+ status: SignUpStatus;
+ username: string | null;
+ email_address: string | null;
+ phone_number: string | null;
+ web3_wallet: string | null;
+ web3_wallet_verification: VerificationJSON | null;
+ external_account: any;
+ has_password: boolean;
+ name_full: string | null;
+ created_session_id: string | null;
+ created_user_id: string | null;
+ abandon_at: number | null;
+}
+export interface SMSMessageJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.SmsMessage;
+ from_phone_number: string;
+ to_phone_number: string;
+ phone_number_id: string | null;
+ user_id?: string;
+ message: string;
+ status: string;
+ slug?: string | null;
+ data?: Record | null;
+ delivered_by_clerk: boolean;
+}
+export interface UserJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.User;
+ username: string | null;
+ first_name: string | null;
+ last_name: string | null;
+ image_url: string;
+ has_image: boolean;
+ primary_email_address_id: string | null;
+ primary_phone_number_id: string | null;
+ primary_web3_wallet_id: string | null;
+ password_enabled: boolean;
+ two_factor_enabled: boolean;
+ totp_enabled: boolean;
+ backup_code_enabled: boolean;
+ email_addresses: EmailAddressJSON[];
+ phone_numbers: PhoneNumberJSON[];
+ web3_wallets: Web3WalletJSON[];
+ organization_memberships: OrganizationMembershipJSON[] | null;
+ external_accounts: ExternalAccountJSON[];
+ saml_accounts: SamlAccountJSON[];
+ password_last_updated_at: number | null;
+ public_metadata: UserPublicMetadata;
+ private_metadata: UserPrivateMetadata;
+ unsafe_metadata: UserUnsafeMetadata;
+ external_id: string | null;
+ last_sign_in_at: number | null;
+ banned: boolean;
+ locked: boolean;
+ lockout_expires_in_seconds: number | null;
+ verification_attempts_remaining: number | null;
+ created_at: number;
+ updated_at: number;
+ last_active_at: number | null;
+ create_organization_enabled: boolean;
+ create_organizations_limit: number | null;
+ delete_self_enabled: boolean;
+}
+export interface VerificationJSON extends ClerkResourceJSON {
+ status: string;
+ strategy: string;
+ attempts: number | null;
+ expire_at: number | null;
+ verified_at_client?: string;
+ external_verification_redirect_url?: string | null;
+ nonce?: string | null;
+ message?: string | null;
+}
+export interface Web3WalletJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Web3Wallet;
+ web3_wallet: string;
+ verification: VerificationJSON | null;
+}
+export interface DeletedObjectJSON {
+ object: string;
+ id?: string;
+ slug?: string;
+ deleted: boolean;
+}
+export interface PaginatedResponseJSON {
+ data: object[];
+ total_count?: number;
+}
+export interface SamlConnectionJSON extends ClerkResourceJSON {
+ name: string;
+ domain: string;
+ idp_entity_id: string;
+ idp_sso_url: string;
+ idp_certificate: string;
+ idp_metadata_url: string;
+ idp_metadata: string;
+ acs_url: string;
+ sp_entity_id: string;
+ sp_metadata_url: string;
+ active: boolean;
+ provider: string;
+ user_count: number;
+ sync_user_attributes: boolean;
+ allow_subdomains: boolean;
+ allow_idp_initiated: boolean;
+ created_at: number;
+ updated_at: number;
+ attribute_mapping: AttributeMappingJSON;
+}
+export interface AttributeMappingJSON {
+ user_id: string;
+ email_address: string;
+ first_name: string;
+ last_name: string;
+}
+export interface TestingTokenJSON {
+ object: typeof ObjectType.TestingToken;
+ token: string;
+ expires_at: number;
+}
+export interface RoleJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Role;
+ key: string;
+ name: string;
+ description: string;
+ permissions: PermissionJSON[];
+ is_creator_eligible: boolean;
+ created_at: number;
+ updated_at: number;
+}
+export interface PermissionJSON extends ClerkResourceJSON {
+ object: typeof ObjectType.Permission;
+ key: string;
+ name: string;
+ description: string;
+ created_at: number;
+ updated_at: number;
+}
+export interface SamlAccountConnectionJSON extends ClerkResourceJSON {
+ id: string;
+ name: string;
+ domain: string;
+ active: boolean;
+ provider: string;
+ sync_user_attributes: boolean;
+ allow_subdomains: boolean;
+ allow_idp_initiated: boolean;
+ disable_additional_identifications: boolean;
+ created_at: number;
+ updated_at: number;
+}
+//# sourceMappingURL=JSON.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/JSON.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/JSON.d.ts.map
new file mode 100644
index 00000000..ca4d19c3
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/JSON.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"JSON.d.ts","sourceRoot":"","sources":["../../../src/api/resources/JSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,UAAU,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,MAAM,EAAE,OAAO,UAAU,CAAC,mBAAmB,CAAC;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IAC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node_modules/@clerk/backend/dist/api/resources/OauthAccessToken.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/OauthAccessToken.d.ts
new file mode 100644
index 00000000..2b9f85f6
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OauthAccessToken.d.ts
@@ -0,0 +1,13 @@
+import type { OauthAccessTokenJSON } from './JSON';
+export declare class OauthAccessToken {
+ readonly externalAccountId: string;
+ readonly provider: string;
+ readonly token: string;
+ readonly publicMetadata: Record;
+ readonly label: string;
+ readonly scopes?: string[] | undefined;
+ readonly tokenSecret?: string | undefined;
+ constructor(externalAccountId: string, provider: string, token: string, publicMetadata: Record | undefined, label: string, scopes?: string[] | undefined, tokenSecret?: string | undefined);
+ static fromJSON(data: OauthAccessTokenJSON): OauthAccessToken;
+}
+//# sourceMappingURL=OauthAccessToken.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/OauthAccessToken.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/OauthAccessToken.d.ts.map
new file mode 100644
index 00000000..b88fca41
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OauthAccessToken.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"OauthAccessToken.d.ts","sourceRoot":"","sources":["../../../src/api/resources/OauthAccessToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAEnD,qBAAa,gBAAgB;IAEzB,QAAQ,CAAC,iBAAiB,EAAE,MAAM;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM;gBANpB,iBAAiB,EAAE,MAAM,EACzB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAK,EAC5C,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,EAAE,YAAA,EACjB,WAAW,CAAC,EAAE,MAAM,YAAA;IAG/B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,oBAAoB;CAW3C"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Organization.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Organization.d.ts
new file mode 100644
index 00000000..1610d16c
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Organization.d.ts
@@ -0,0 +1,19 @@
+import type { OrganizationJSON } from './JSON';
+export declare class Organization {
+ readonly id: string;
+ readonly name: string;
+ readonly slug: string | null;
+ readonly imageUrl: string;
+ readonly hasImage: boolean;
+ readonly createdBy: string;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly publicMetadata: OrganizationPublicMetadata | null;
+ readonly privateMetadata: OrganizationPrivateMetadata;
+ readonly maxAllowedMemberships: number;
+ readonly adminDeleteEnabled: boolean;
+ readonly membersCount?: number | undefined;
+ constructor(id: string, name: string, slug: string | null, imageUrl: string, hasImage: boolean, createdBy: string, createdAt: number, updatedAt: number, publicMetadata: (OrganizationPublicMetadata | null) | undefined, privateMetadata: OrganizationPrivateMetadata | undefined, maxAllowedMemberships: number, adminDeleteEnabled: boolean, membersCount?: number | undefined);
+ static fromJSON(data: OrganizationJSON): Organization;
+}
+//# sourceMappingURL=Organization.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Organization.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Organization.d.ts.map
new file mode 100644
index 00000000..06431ec5
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Organization.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Organization.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Organization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,qBAAa,YAAY;IAErB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,cAAc,EAAE,0BAA0B,GAAG,IAAI;IAC1D,QAAQ,CAAC,eAAe,EAAE,2BAA2B;IACrD,QAAQ,CAAC,qBAAqB,EAAE,MAAM;IACtC,QAAQ,CAAC,kBAAkB,EAAE,OAAO;IACpC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM;gBAZrB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,cAAc,GAAE,0BAA0B,GAAG,IAAI,aAAK,EACtD,eAAe,EAAE,2BAA2B,YAAK,EACjD,qBAAqB,EAAE,MAAM,EAC7B,kBAAkB,EAAE,OAAO,EAC3B,YAAY,CAAC,EAAE,MAAM,YAAA;IAGhC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY;CAiBtD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationDomain.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationDomain.d.ts
new file mode 100644
index 00000000..273dad83
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationDomain.d.ts
@@ -0,0 +1,17 @@
+import type { OrganizationDomainJSON, OrganizationEnrollmentMode } from '@clerk/types';
+import { OrganizationDomainVerification } from './Verification';
+export declare class OrganizationDomain {
+ readonly id: string;
+ readonly organizationId: string;
+ readonly name: string;
+ readonly enrollmentMode: OrganizationEnrollmentMode;
+ readonly verification: OrganizationDomainVerification | null;
+ readonly totalPendingInvitations: number;
+ readonly totalPendingSuggestions: number;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly affiliationEmailAddress: string | null;
+ constructor(id: string, organizationId: string, name: string, enrollmentMode: OrganizationEnrollmentMode, verification: OrganizationDomainVerification | null, totalPendingInvitations: number, totalPendingSuggestions: number, createdAt: number, updatedAt: number, affiliationEmailAddress: string | null);
+ static fromJSON(data: OrganizationDomainJSON): OrganizationDomain;
+}
+//# sourceMappingURL=OrganizationDomain.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationDomain.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationDomain.d.ts.map
new file mode 100644
index 00000000..56d30aaf
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationDomain.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"OrganizationDomain.d.ts","sourceRoot":"","sources":["../../../src/api/resources/OrganizationDomain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAEvF,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEhE,qBAAa,kBAAkB;IAE3B,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,cAAc,EAAE,MAAM;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,cAAc,EAAE,0BAA0B;IACnD,QAAQ,CAAC,YAAY,EAAE,8BAA8B,GAAG,IAAI;IAC5D,QAAQ,CAAC,uBAAuB,EAAE,MAAM;IACxC,QAAQ,CAAC,uBAAuB,EAAE,MAAM;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,uBAAuB,EAAE,MAAM,GAAG,IAAI;gBATtC,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,0BAA0B,EAC1C,YAAY,EAAE,8BAA8B,GAAG,IAAI,EACnD,uBAAuB,EAAE,MAAM,EAC/B,uBAAuB,EAAE,MAAM,EAC/B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,uBAAuB,EAAE,MAAM,GAAG,IAAI;IAGjD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,sBAAsB;CAc7C"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationInvitation.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationInvitation.d.ts
new file mode 100644
index 00000000..dc621705
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationInvitation.d.ts
@@ -0,0 +1,16 @@
+import type { OrganizationInvitationStatus, OrganizationMembershipRole } from './Enums';
+import type { OrganizationInvitationJSON } from './JSON';
+export declare class OrganizationInvitation {
+ readonly id: string;
+ readonly emailAddress: string;
+ readonly role: OrganizationMembershipRole;
+ readonly organizationId: string;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly status?: OrganizationInvitationStatus | undefined;
+ readonly publicMetadata: OrganizationInvitationPublicMetadata;
+ readonly privateMetadata: OrganizationInvitationPrivateMetadata;
+ constructor(id: string, emailAddress: string, role: OrganizationMembershipRole, organizationId: string, createdAt: number, updatedAt: number, status?: OrganizationInvitationStatus | undefined, publicMetadata?: OrganizationInvitationPublicMetadata, privateMetadata?: OrganizationInvitationPrivateMetadata);
+ static fromJSON(data: OrganizationInvitationJSON): OrganizationInvitation;
+}
+//# sourceMappingURL=OrganizationInvitation.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationInvitation.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationInvitation.d.ts.map
new file mode 100644
index 00000000..1849fbc1
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationInvitation.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"OrganizationInvitation.d.ts","sourceRoot":"","sources":["../../../src/api/resources/OrganizationInvitation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AAEzD,qBAAa,sBAAsB;IAE/B,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,IAAI,EAAE,0BAA0B;IACzC,QAAQ,CAAC,cAAc,EAAE,MAAM;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,4BAA4B;IAC9C,QAAQ,CAAC,cAAc,EAAE,oCAAoC;IAC7D,QAAQ,CAAC,eAAe,EAAE,qCAAqC;gBARtD,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,0BAA0B,EAChC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,4BAA4B,YAAA,EACrC,cAAc,GAAE,oCAAyC,EACzD,eAAe,GAAE,qCAA0C;IAGtE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,0BAA0B;CAajD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationMembership.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationMembership.d.ts
new file mode 100644
index 00000000..bc096f34
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationMembership.d.ts
@@ -0,0 +1,27 @@
+import { Organization } from '../resources';
+import type { OrganizationMembershipRole } from './Enums';
+import type { OrganizationMembershipJSON, OrganizationMembershipPublicUserDataJSON } from './JSON';
+export declare class OrganizationMembership {
+ readonly id: string;
+ readonly role: OrganizationMembershipRole;
+ readonly permissions: string[];
+ readonly publicMetadata: OrganizationMembershipPublicMetadata;
+ readonly privateMetadata: OrganizationMembershipPrivateMetadata;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly organization: Organization;
+ readonly publicUserData?: (OrganizationMembershipPublicUserData | null) | undefined;
+ constructor(id: string, role: OrganizationMembershipRole, permissions: string[], publicMetadata: OrganizationMembershipPublicMetadata | undefined, privateMetadata: OrganizationMembershipPrivateMetadata | undefined, createdAt: number, updatedAt: number, organization: Organization, publicUserData?: (OrganizationMembershipPublicUserData | null) | undefined);
+ static fromJSON(data: OrganizationMembershipJSON): OrganizationMembership;
+}
+export declare class OrganizationMembershipPublicUserData {
+ readonly identifier: string;
+ readonly firstName: string | null;
+ readonly lastName: string | null;
+ readonly imageUrl: string;
+ readonly hasImage: boolean;
+ readonly userId: string;
+ constructor(identifier: string, firstName: string | null, lastName: string | null, imageUrl: string, hasImage: boolean, userId: string);
+ static fromJSON(data: OrganizationMembershipPublicUserDataJSON): OrganizationMembershipPublicUserData;
+}
+//# sourceMappingURL=OrganizationMembership.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationMembership.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationMembership.d.ts.map
new file mode 100644
index 00000000..bb4bdaac
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/OrganizationMembership.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"OrganizationMembership.d.ts","sourceRoot":"","sources":["../../../src/api/resources/OrganizationMembership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,wCAAwC,EAAE,MAAM,QAAQ,CAAC;AAEnG,qBAAa,sBAAsB;IAE/B,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,IAAI,EAAE,0BAA0B;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE;IAC9B,QAAQ,CAAC,cAAc,EAAE,oCAAoC;IAC7D,QAAQ,CAAC,eAAe,EAAE,qCAAqC;IAC/D,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,YAAY,EAAE,YAAY;IACnC,QAAQ,CAAC,cAAc,CAAC,GAAE,oCAAoC,GAAG,IAAI;gBAR5D,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,0BAA0B,EAChC,WAAW,EAAE,MAAM,EAAE,EACrB,cAAc,EAAE,oCAAoC,YAAK,EACzD,eAAe,EAAE,qCAAqC,YAAK,EAC3D,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAC1B,cAAc,CAAC,GAAE,oCAAoC,GAAG,IAAI,aAAA;IAGvE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,0BAA0B;CAajD;AAED,qBAAa,oCAAoC;IAE7C,QAAQ,CAAC,UAAU,EAAE,MAAM;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM;gBALd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM;IAGzB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,wCAAwC;CAU/D"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/PhoneNumber.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/PhoneNumber.d.ts
new file mode 100644
index 00000000..913be035
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/PhoneNumber.d.ts
@@ -0,0 +1,14 @@
+import { IdentificationLink } from './IdentificationLink';
+import type { PhoneNumberJSON } from './JSON';
+import { Verification } from './Verification';
+export declare class PhoneNumber {
+ readonly id: string;
+ readonly phoneNumber: string;
+ readonly reservedForSecondFactor: boolean;
+ readonly defaultSecondFactor: boolean;
+ readonly verification: Verification | null;
+ readonly linkedTo: IdentificationLink[];
+ constructor(id: string, phoneNumber: string, reservedForSecondFactor: boolean, defaultSecondFactor: boolean, verification: Verification | null, linkedTo: IdentificationLink[]);
+ static fromJSON(data: PhoneNumberJSON): PhoneNumber;
+}
+//# sourceMappingURL=PhoneNumber.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/PhoneNumber.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/PhoneNumber.d.ts.map
new file mode 100644
index 00000000..cd65f220
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/PhoneNumber.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"PhoneNumber.d.ts","sourceRoot":"","sources":["../../../src/api/resources/PhoneNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAAa,WAAW;IAEpB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM;IAC5B,QAAQ,CAAC,uBAAuB,EAAE,OAAO;IACzC,QAAQ,CAAC,mBAAmB,EAAE,OAAO;IACrC,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAC1C,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,EAAE;gBAL9B,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM,EACnB,uBAAuB,EAAE,OAAO,EAChC,mBAAmB,EAAE,OAAO,EAC5B,YAAY,EAAE,YAAY,GAAG,IAAI,EACjC,QAAQ,EAAE,kBAAkB,EAAE;IAGzC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW;CAUpD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/RedirectUrl.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/RedirectUrl.d.ts
new file mode 100644
index 00000000..51fccf79
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/RedirectUrl.d.ts
@@ -0,0 +1,10 @@
+import type { RedirectUrlJSON } from './JSON';
+export declare class RedirectUrl {
+ readonly id: string;
+ readonly url: string;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ constructor(id: string, url: string, createdAt: number, updatedAt: number);
+ static fromJSON(data: RedirectUrlJSON): RedirectUrl;
+}
+//# sourceMappingURL=RedirectUrl.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/RedirectUrl.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/RedirectUrl.d.ts.map
new file mode 100644
index 00000000..f3ff7529
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/RedirectUrl.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"RedirectUrl.d.ts","sourceRoot":"","sources":["../../../src/api/resources/RedirectUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,qBAAa,WAAW;IAEpB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAHjB,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAG5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW;CAGpD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SMSMessage.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/SMSMessage.d.ts
new file mode 100644
index 00000000..f8be9598
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SMSMessage.d.ts
@@ -0,0 +1,13 @@
+import type { SMSMessageJSON } from './JSON';
+export declare class SMSMessage {
+ readonly id: string;
+ readonly fromPhoneNumber: string;
+ readonly toPhoneNumber: string;
+ readonly message: string;
+ readonly status: string;
+ readonly phoneNumberId: string | null;
+ readonly data?: (Record | null) | undefined;
+ constructor(id: string, fromPhoneNumber: string, toPhoneNumber: string, message: string, status: string, phoneNumberId: string | null, data?: (Record | null) | undefined);
+ static fromJSON(data: SMSMessageJSON): SMSMessage;
+}
+//# sourceMappingURL=SMSMessage.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SMSMessage.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/SMSMessage.d.ts.map
new file mode 100644
index 00000000..3177575e
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SMSMessage.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"SMSMessage.d.ts","sourceRoot":"","sources":["../../../src/api/resources/SMSMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,qBAAa,UAAU;IAEnB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IACrC,QAAQ,CAAC,IAAI,CAAC,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;gBANjC,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,IAAI,CAAC,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,aAAA;IAG5C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU;CAWlD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SamlAccount.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/SamlAccount.d.ts
new file mode 100644
index 00000000..fd397716
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SamlAccount.d.ts
@@ -0,0 +1,17 @@
+import type { SamlAccountJSON } from './JSON';
+import { SamlAccountConnection } from './SamlConnection';
+import { Verification } from './Verification';
+export declare class SamlAccount {
+ readonly id: string;
+ readonly provider: string;
+ readonly providerUserId: string | null;
+ readonly active: boolean;
+ readonly emailAddress: string;
+ readonly firstName: string;
+ readonly lastName: string;
+ readonly verification: Verification | null;
+ readonly samlConnection: SamlAccountConnection | null;
+ constructor(id: string, provider: string, providerUserId: string | null, active: boolean, emailAddress: string, firstName: string, lastName: string, verification: Verification | null, samlConnection: SamlAccountConnection | null);
+ static fromJSON(data: SamlAccountJSON): SamlAccount;
+}
+//# sourceMappingURL=SamlAccount.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SamlAccount.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/SamlAccount.d.ts.map
new file mode 100644
index 00000000..61cfc278
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SamlAccount.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"SamlAccount.d.ts","sourceRoot":"","sources":["../../../src/api/resources/SamlAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAAa,WAAW;IAEpB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IACtC,QAAQ,CAAC,MAAM,EAAE,OAAO;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAC1C,QAAQ,CAAC,cAAc,EAAE,qBAAqB,GAAG,IAAI;gBAR5C,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,YAAY,GAAG,IAAI,EACjC,cAAc,EAAE,qBAAqB,GAAG,IAAI;IAGvD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW;CAapD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SamlConnection.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/SamlConnection.d.ts
new file mode 100644
index 00000000..f980c205
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SamlConnection.d.ts
@@ -0,0 +1,49 @@
+import type { AttributeMappingJSON, SamlAccountConnectionJSON, SamlConnectionJSON } from './JSON';
+export declare class SamlConnection {
+ readonly id: string;
+ readonly name: string;
+ readonly domain: string;
+ readonly idpEntityId: string | null;
+ readonly idpSsoUrl: string | null;
+ readonly idpCertificate: string | null;
+ readonly idpMetadataUrl: string | null;
+ readonly idpMetadata: string | null;
+ readonly acsUrl: string;
+ readonly spEntityId: string;
+ readonly spMetadataUrl: string;
+ readonly active: boolean;
+ readonly provider: string;
+ readonly userCount: number;
+ readonly syncUserAttributes: boolean;
+ readonly allowSubdomains: boolean;
+ readonly allowIdpInitiated: boolean;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly attributeMapping: AttributeMapping;
+ constructor(id: string, name: string, domain: string, idpEntityId: string | null, idpSsoUrl: string | null, idpCertificate: string | null, idpMetadataUrl: string | null, idpMetadata: string | null, acsUrl: string, spEntityId: string, spMetadataUrl: string, active: boolean, provider: string, userCount: number, syncUserAttributes: boolean, allowSubdomains: boolean, allowIdpInitiated: boolean, createdAt: number, updatedAt: number, attributeMapping: AttributeMapping);
+ static fromJSON(data: SamlConnectionJSON): SamlConnection;
+}
+export declare class SamlAccountConnection {
+ readonly id: string;
+ readonly name: string;
+ readonly domain: string;
+ readonly active: boolean;
+ readonly provider: string;
+ readonly syncUserAttributes: boolean;
+ readonly allowSubdomains: boolean;
+ readonly allowIdpInitiated: boolean;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ constructor(id: string, name: string, domain: string, active: boolean, provider: string, syncUserAttributes: boolean, allowSubdomains: boolean, allowIdpInitiated: boolean, createdAt: number, updatedAt: number);
+ static fromJSON(data: SamlAccountConnectionJSON): SamlAccountConnection;
+}
+declare class AttributeMapping {
+ readonly userId: string;
+ readonly emailAddress: string;
+ readonly firstName: string;
+ readonly lastName: string;
+ constructor(userId: string, emailAddress: string, firstName: string, lastName: string);
+ static fromJSON(data: AttributeMappingJSON): AttributeMapping;
+}
+export {};
+//# sourceMappingURL=SamlConnection.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SamlConnection.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/SamlConnection.d.ts.map
new file mode 100644
index 00000000..732cc695
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SamlConnection.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"SamlConnection.d.ts","sourceRoot":"","sources":["../../../src/api/resources/SamlConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAElG,qBAAa,cAAc;IAEvB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,U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Q,EAAE,MAAM;IACzB,QAAQ,CAAC,kBAAkB,EAAE,OAAO;IACpC,QAAQ,CAAC,eAAe,EAAE,OAAO;IACjC,QAAQ,CAAC,iBAAiB,EAAE,OAAO;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;gBATjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,OAAO,EACxB,iBAAiB,EAAE,OAAO,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAE5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,yBAAyB,GAAG,qBAAqB;CAcxE;AAED,cAAM,gBAAgB;IAElB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM;gBAHhB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM;IAG3B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,gBAAgB;CAG9D"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Session.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Session.d.ts
new file mode 100644
index 00000000..54c55e22
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Session.d.ts
@@ -0,0 +1,15 @@
+import type { SessionJSON } from './JSON';
+export declare class Session {
+ readonly id: string;
+ readonly clientId: string;
+ readonly userId: string;
+ readonly status: string;
+ readonly lastActiveAt: number;
+ readonly expireAt: number;
+ readonly abandonAt: number;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ constructor(id: string, clientId: string, userId: string, status: string, lastActiveAt: number, expireAt: number, abandonAt: number, createdAt: number, updatedAt: number);
+ static fromJSON(data: SessionJSON): Session;
+}
+//# sourceMappingURL=Session.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Session.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Session.d.ts.map
new file mode 100644
index 00000000..84f01b28
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Session.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,qBAAa,OAAO;IAEhB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;gBARjB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAG5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO;CAa5C"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SignInTokens.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/SignInTokens.d.ts
new file mode 100644
index 00000000..dd7006a1
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SignInTokens.d.ts
@@ -0,0 +1,13 @@
+import type { SignInTokenJSON } from './JSON';
+export declare class SignInToken {
+ readonly id: string;
+ readonly userId: string;
+ readonly token: string;
+ readonly status: string;
+ readonly url: string;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ constructor(id: string, userId: string, token: string, status: string, url: string, createdAt: number, updatedAt: number);
+ static fromJSON(data: SignInTokenJSON): SignInToken;
+}
+//# sourceMappingURL=SignInTokens.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/SignInTokens.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/SignInTokens.d.ts.map
new file mode 100644
index 00000000..bfadc4cf
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/SignInTokens.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"SignInTokens.d.ts","sourceRoot":"","sources":["../../../src/api/resources/SignInTokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,qBAAa,WAAW;IAEpB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM;gBANjB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAG5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW;CAGpD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/TestingToken.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/TestingToken.d.ts
new file mode 100644
index 00000000..fc28b4d7
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/TestingToken.d.ts
@@ -0,0 +1,8 @@
+import type { TestingTokenJSON } from './JSON';
+export declare class TestingToken {
+ readonly token: string;
+ readonly expiresAt: number;
+ constructor(token: string, expiresAt: number);
+ static fromJSON(data: TestingTokenJSON): TestingToken;
+}
+//# sourceMappingURL=TestingToken.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/TestingToken.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/TestingToken.d.ts.map
new file mode 100644
index 00000000..c6c43ce4
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/TestingToken.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"TestingToken.d.ts","sourceRoot":"","sources":["../../../src/api/resources/TestingToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,qBAAa,YAAY;IAErB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM;gBADjB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM;IAG5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY;CAGtD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Token.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Token.d.ts
new file mode 100644
index 00000000..dd49b539
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Token.d.ts
@@ -0,0 +1,7 @@
+import type { TokenJSON } from './JSON';
+export declare class Token {
+ readonly jwt: string;
+ constructor(jwt: string);
+ static fromJSON(data: TokenJSON): Token;
+}
+//# sourceMappingURL=Token.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Token.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Token.d.ts.map
new file mode 100644
index 00000000..80e84b3a
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Token.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Token.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,qBAAa,KAAK;IACJ,QAAQ,CAAC,GAAG,EAAE,MAAM;gBAAX,GAAG,EAAE,MAAM;IAEhC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK;CAGxC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/User.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/User.d.ts
new file mode 100644
index 00000000..f14d9a4a
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/User.d.ts
@@ -0,0 +1,46 @@
+import { EmailAddress } from './EmailAddress';
+import { ExternalAccount } from './ExternalAccount';
+import type { UserJSON } from './JSON';
+import { PhoneNumber } from './PhoneNumber';
+import { SamlAccount } from './SamlAccount';
+import { Web3Wallet } from './Web3Wallet';
+export declare class User {
+ readonly id: string;
+ readonly passwordEnabled: boolean;
+ readonly totpEnabled: boolean;
+ readonly backupCodeEnabled: boolean;
+ readonly twoFactorEnabled: boolean;
+ readonly banned: boolean;
+ readonly locked: boolean;
+ readonly createdAt: number;
+ readonly updatedAt: number;
+ readonly imageUrl: string;
+ readonly hasImage: boolean;
+ readonly primaryEmailAddressId: string | null;
+ readonly primaryPhoneNumberId: string | null;
+ readonly primaryWeb3WalletId: string | null;
+ readonly lastSignInAt: number | null;
+ readonly externalId: string | null;
+ readonly username: string | null;
+ readonly firstName: string | null;
+ readonly lastName: string | null;
+ readonly publicMetadata: UserPublicMetadata;
+ readonly privateMetadata: UserPrivateMetadata;
+ readonly unsafeMetadata: UserUnsafeMetadata;
+ readonly emailAddresses: EmailAddress[];
+ readonly phoneNumbers: PhoneNumber[];
+ readonly web3Wallets: Web3Wallet[];
+ readonly externalAccounts: ExternalAccount[];
+ readonly samlAccounts: SamlAccount[];
+ readonly lastActiveAt: number | null;
+ readonly createOrganizationEnabled: boolean;
+ readonly createOrganizationsLimit: number | null;
+ readonly deleteSelfEnabled: boolean;
+ constructor(id: string, passwordEnabled: boolean, totpEnabled: boolean, backupCodeEnabled: boolean, twoFactorEnabled: boolean, banned: boolean, locked: boolean, createdAt: number, updatedAt: number, imageUrl: string, hasImage: boolean, primaryEmailAddressId: string | null, primaryPhoneNumberId: string | null, primaryWeb3WalletId: string | null, lastSignInAt: number | null, externalId: string | null, username: string | null, firstName: string | null, lastName: string | null, publicMetadata: UserPublicMetadata | undefined, privateMetadata: UserPrivateMetadata | undefined, unsafeMetadata: UserUnsafeMetadata | undefined, emailAddresses: EmailAddress[] | undefined, phoneNumbers: PhoneNumber[] | undefined, web3Wallets: Web3Wallet[] | undefined, externalAccounts: ExternalAccount[] | undefined, samlAccounts: SamlAccount[] | undefined, lastActiveAt: number | null, createOrganizationEnabled: boolean, createOrganizationsLimit: (number | null) | undefined, deleteSelfEnabled: boolean);
+ static fromJSON(data: UserJSON): User;
+ get primaryEmailAddress(): EmailAddress | null;
+ get primaryPhoneNumber(): PhoneNumber | null;
+ get primaryWeb3Wallet(): Web3Wallet | null;
+ get fullName(): string | null;
+}
+//# sourceMappingURL=User.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/User.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/User.d.ts.map
new file mode 100644
index 00000000..cbf53ec0
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/User.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/api/resources/User.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U,EAAE,YAAK,EAC9B,gBAAgB,EAAE,eAAe,EAAE,YAAK,EACxC,YAAY,EAAE,WAAW,EAAE,YAAK,EAChC,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,yBAAyB,EAAE,OAAO,EAClC,wBAAwB,GAAE,MAAM,GAAG,IAAI,aAAO,EAC9C,iBAAiB,EAAE,OAAO;IAGrC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAoCrC,IAAI,mBAAmB,wBAEtB;IAED,IAAI,kBAAkB,uBAErB;IAED,IAAI,iBAAiB,sBAEpB;IAED,IAAI,QAAQ,kBAEX;CACF"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Verification.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Verification.d.ts
new file mode 100644
index 00000000..e114c847
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Verification.d.ts
@@ -0,0 +1,22 @@
+import type { OrganizationDomainVerificationJSON } from '@clerk/types';
+import type { VerificationJSON } from './JSON';
+export declare class Verification {
+ readonly status: string;
+ readonly strategy: string;
+ readonly externalVerificationRedirectURL: URL | null;
+ readonly attempts: number | null;
+ readonly expireAt: number | null;
+ readonly nonce: string | null;
+ readonly message: string | null;
+ constructor(status: string, strategy: string, externalVerificationRedirectURL?: URL | null, attempts?: number | null, expireAt?: number | null, nonce?: string | null, message?: string | null);
+ static fromJSON(data: VerificationJSON): Verification;
+}
+export declare class OrganizationDomainVerification {
+ readonly status: string;
+ readonly strategy: string;
+ readonly attempts: number | null;
+ readonly expireAt: number | null;
+ constructor(status: string, strategy: string, attempts?: number | null, expireAt?: number | null);
+ static fromJSON(data: OrganizationDomainVerificationJSON): OrganizationDomainVerification;
+}
+//# sourceMappingURL=Verification.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Verification.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Verification.d.ts.map
new file mode 100644
index 00000000..2f7351ac
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Verification.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Verification.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Verification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,qBAAa,YAAY;IAErB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,+BAA+B,EAAE,GAAG,GAAG,IAAI;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;gBANtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,+BAA+B,GAAE,GAAG,GAAG,IAAW,EAClD,QAAQ,GAAE,MAAM,GAAG,IAAW,EAC9B,QAAQ,GAAE,MAAM,GAAG,IAAW,EAC9B,KAAK,GAAE,MAAM,GAAG,IAAW,EAC3B,OAAO,GAAE,MAAM,GAAG,IAAW;IAGxC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY;CAUtD;AAED,qBAAa,8BAA8B;IAEvC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;gBAHvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,MAAM,GAAG,IAAW,EAC9B,QAAQ,GAAE,MAAM,GAAG,IAAW;IAGzC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,kCAAkC,GAAG,8BAA8B;CAG1F"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Web3Wallet.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Web3Wallet.d.ts
new file mode 100644
index 00000000..94d98541
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Web3Wallet.d.ts
@@ -0,0 +1,10 @@
+import type { Web3WalletJSON } from './JSON';
+import { Verification } from './Verification';
+export declare class Web3Wallet {
+ readonly id: string;
+ readonly web3Wallet: string;
+ readonly verification: Verification | null;
+ constructor(id: string, web3Wallet: string, verification: Verification | null);
+ static fromJSON(data: Web3WalletJSON): Web3Wallet;
+}
+//# sourceMappingURL=Web3Wallet.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Web3Wallet.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Web3Wallet.d.ts.map
new file mode 100644
index 00000000..02b05786
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Web3Wallet.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Web3Wallet.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Web3Wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAAa,UAAU;IAEnB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAC3B,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;gBAFjC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,GAAG,IAAI;IAG5C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU;CAGlD"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Webhooks.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/Webhooks.d.ts
new file mode 100644
index 00000000..91b188c0
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Webhooks.d.ts
@@ -0,0 +1,19 @@
+import type { DeletedObjectJSON, EmailJSON, OrganizationInvitationJSON, OrganizationJSON, OrganizationMembershipJSON, PermissionJSON, RoleJSON, SessionJSON, SMSMessageJSON, UserJSON } from './JSON';
+type Webhook = {
+ type: EvtType;
+ object: 'event';
+ data: Data;
+};
+export type UserWebhookEvent = Webhook<'user.created' | 'user.updated', UserJSON> | Webhook<'user.deleted', DeletedObjectJSON>;
+export type EmailWebhookEvent = Webhook<'email.created', EmailJSON>;
+export type SMSWebhookEvent = Webhook<'sms.created', SMSMessageJSON>;
+export type SessionWebhookEvent = Webhook<'session.created' | 'session.ended' | 'session.removed' | 'session.revoked', SessionJSON>;
+export type OrganizationWebhookEvent = Webhook<'organization.created' | 'organization.updated', OrganizationJSON> | Webhook<'organization.deleted', DeletedObjectJSON>;
+export type OrganizationMembershipWebhookEvent = Webhook<'organizationMembership.created' | 'organizationMembership.deleted' | 'organizationMembership.updated', OrganizationMembershipJSON>;
+export type OrganizationInvitationWebhookEvent = Webhook<'organizationInvitation.accepted' | 'organizationInvitation.created' | 'organizationInvitation.revoked', OrganizationInvitationJSON>;
+export type RoleWebhookEvent = Webhook<'role.created' | 'role.updated' | 'role.deleted', RoleJSON>;
+export type PermissionWebhookEvent = Webhook<'permission.created' | 'permission.updated' | 'permission.deleted', PermissionJSON>;
+export type WebhookEvent = UserWebhookEvent | SessionWebhookEvent | EmailWebhookEvent | SMSWebhookEvent | OrganizationWebhookEvent | OrganizationMembershipWebhookEvent | OrganizationInvitationWebhookEvent | RoleWebhookEvent | PermissionWebhookEvent;
+export type WebhookEventType = WebhookEvent['type'];
+export {};
+//# sourceMappingURL=Webhooks.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/Webhooks.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/Webhooks.d.ts.map
new file mode 100644
index 00000000..21239364
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/Webhooks.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Webhooks.d.ts","sourceRoot":"","sources":["../../../src/api/resources/Webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,0BAA0B,EAC1B,gBAAgB,EAChB,0BAA0B,EAC1B,cAAc,EACd,QAAQ,EACR,WAAW,EACX,cAAc,EACd,QAAQ,EACT,MAAM,QAAQ,CAAC;AAEhB,KAAK,OAAO,CAAC,OAAO,EAAE,IAAI,IAAI;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GACxB,OAAO,CAAC,cAAc,GAAG,cAAc,EAAE,QAAQ,CAAC,GAClD,OAAO,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC,iBAAiB,GAAG,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,EAC3E,WAAW,CACZ,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAChC,OAAO,CAAC,sBAAsB,GAAG,sBAAsB,EAAE,gBAAgB,CAAC,GAC1E,OAAO,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,CAAC;AAEvD,MAAM,MAAM,kCAAkC,GAAG,OAAO,CACtD,gCAAgC,GAAG,gCAAgC,GAAG,gCAAgC,EACtG,0BAA0B,CAC3B,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,OAAO,CACtD,iCAAiC,GAAG,gCAAgC,GAAG,gCAAgC,EACvG,0BAA0B,CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,cAAc,GAAG,cAAc,GAAG,cAAc,EAAE,QAAQ,CAAC,CAAC;AAEnG,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAC1C,oBAAoB,GAAG,oBAAoB,GAAG,oBAAoB,EAClE,cAAc,CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,eAAe,GACf,wBAAwB,GACxB,kCAAkC,GAClC,kCAAkC,GAClC,gBAAgB,GAChB,sBAAsB,CAAC;AAE3B,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/index.d.ts b/backend/node_modules/@clerk/backend/dist/api/resources/index.d.ts
new file mode 100644
index 00000000..841fe923
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/index.d.ts
@@ -0,0 +1,27 @@
+export * from './AllowlistIdentifier';
+export * from './Client';
+export * from './DeletedObject';
+export * from './Email';
+export * from './EmailAddress';
+export type { InvitationStatus, OAuthProvider, OAuthStrategy, OrganizationInvitationStatus, OrganizationMembershipRole, SignInStatus, SignUpStatus, } from './Enums';
+export * from './ExternalAccount';
+export * from './IdentificationLink';
+export * from './Invitation';
+export * from './JSON';
+export * from './OauthAccessToken';
+export * from './Organization';
+export * from './OrganizationInvitation';
+export * from './OrganizationMembership';
+export * from './PhoneNumber';
+export * from './RedirectUrl';
+export * from './Session';
+export * from './SignInTokens';
+export * from './SMSMessage';
+export * from './Token';
+export * from './User';
+export * from './Verification';
+export * from './SamlConnection';
+export * from './TestingToken';
+export type { EmailWebhookEvent, OrganizationInvitationWebhookEvent, OrganizationMembershipWebhookEvent, OrganizationWebhookEvent, SessionWebhookEvent, SMSWebhookEvent, UserWebhookEvent, WebhookEvent, WebhookEventType, } from './Webhooks';
+export * from './OrganizationDomain';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/api/resources/index.d.ts.map b/backend/node_modules/@clerk/backend/dist/api/resources/index.d.ts.map
new file mode 100644
index 00000000..a3547991
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/api/resources/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAE/B,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,4BAA4B,EAC5B,0BAA0B,EAC1B,YAAY,EACZ,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAE/B,YAAY,EACV,iBAAiB,EACjB,kCAAkC,EAClC,kCAAkC,EAClC,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,cAAc,sBAAsB,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/chunk-5JS2VYLU.mjs b/backend/node_modules/@clerk/backend/dist/chunk-5JS2VYLU.mjs
new file mode 100644
index 00000000..609bc138
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/chunk-5JS2VYLU.mjs
@@ -0,0 +1,55 @@
+// src/errors.ts
+var TokenVerificationErrorCode = {
+ InvalidSecretKey: "clerk_key_invalid"
+};
+var TokenVerificationErrorReason = {
+ TokenExpired: "token-expired",
+ TokenInvalid: "token-invalid",
+ TokenInvalidAlgorithm: "token-invalid-algorithm",
+ TokenInvalidAuthorizedParties: "token-invalid-authorized-parties",
+ TokenInvalidSignature: "token-invalid-signature",
+ TokenNotActiveYet: "token-not-active-yet",
+ TokenIatInTheFuture: "token-iat-in-the-future",
+ TokenVerificationFailed: "token-verification-failed",
+ InvalidSecretKey: "secret-key-invalid",
+ LocalJWKMissing: "jwk-local-missing",
+ RemoteJWKFailedToLoad: "jwk-remote-failed-to-load",
+ RemoteJWKInvalid: "jwk-remote-invalid",
+ RemoteJWKMissing: "jwk-remote-missing",
+ JWKFailedToResolve: "jwk-failed-to-resolve",
+ JWKKidMismatch: "jwk-kid-mismatch"
+};
+var TokenVerificationErrorAction = {
+ ContactSupport: "Contact support@clerk.com",
+ EnsureClerkJWT: "Make sure that this is a valid Clerk generate JWT.",
+ SetClerkJWTKey: "Set the CLERK_JWT_KEY environment variable.",
+ SetClerkSecretKey: "Set the CLERK_SECRET_KEY environment variable.",
+ EnsureClockSync: "Make sure your system clock is in sync (e.g. turn off and on automatic time synchronization)."
+};
+var TokenVerificationError = class _TokenVerificationError extends Error {
+ constructor({
+ action,
+ message,
+ reason
+ }) {
+ super(message);
+ Object.setPrototypeOf(this, _TokenVerificationError.prototype);
+ this.reason = reason;
+ this.message = message;
+ this.action = action;
+ }
+ getFullMessage() {
+ return `${[this.message, this.action].filter((m) => m).join(" ")} (reason=${this.reason}, token-carrier=${this.tokenCarrier})`;
+ }
+};
+var SignJWTError = class extends Error {
+};
+
+export {
+ TokenVerificationErrorCode,
+ TokenVerificationErrorReason,
+ TokenVerificationErrorAction,
+ TokenVerificationError,
+ SignJWTError
+};
+//# sourceMappingURL=chunk-5JS2VYLU.mjs.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/chunk-5JS2VYLU.mjs.map b/backend/node_modules/@clerk/backend/dist/chunk-5JS2VYLU.mjs.map
new file mode 100644
index 00000000..d03a0738
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/chunk-5JS2VYLU.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/errors.ts"],"sourcesContent":["export type TokenCarrier = 'header' | 'cookie';\n\nexport const TokenVerificationErrorCode = {\n InvalidSecretKey: 'clerk_key_invalid',\n};\n\nexport type TokenVerificationErrorCode = (typeof TokenVerificationErrorCode)[keyof typeof TokenVerificationErrorCode];\n\nexport const TokenVerificationErrorReason = {\n TokenExpired: 'token-expired',\n TokenInvalid: 'token-invalid',\n TokenInvalidAlgorithm: 'token-invalid-algorithm',\n TokenInvalidAuthorizedParties: 'token-invalid-authorized-parties',\n TokenInvalidSignature: 'token-invalid-signature',\n TokenNotActiveYet: 'token-not-active-yet',\n TokenIatInTheFuture: 'token-iat-in-the-future',\n TokenVerificationFailed: 'token-verification-failed',\n InvalidSecretKey: 'secret-key-invalid',\n LocalJWKMissing: 'jwk-local-missing',\n RemoteJWKFailedToLoad: 'jwk-remote-failed-to-load',\n RemoteJWKInvalid: 'jwk-remote-invalid',\n RemoteJWKMissing: 'jwk-remote-missing',\n JWKFailedToResolve: 'jwk-failed-to-resolve',\n JWKKidMismatch: 'jwk-kid-mismatch',\n};\n\nexport type TokenVerificationErrorReason =\n (typeof TokenVerificationErrorReason)[keyof typeof TokenVerificationErrorReason];\n\nexport const TokenVerificationErrorAction = {\n ContactSupport: 'Contact support@clerk.com',\n EnsureClerkJWT: 'Make sure that this is a valid Clerk generate JWT.',\n SetClerkJWTKey: 'Set the CLERK_JWT_KEY environment variable.',\n SetClerkSecretKey: 'Set the CLERK_SECRET_KEY environment variable.',\n EnsureClockSync: 'Make sure your system clock is in sync (e.g. turn off and on automatic time synchronization).',\n};\n\nexport type TokenVerificationErrorAction =\n (typeof TokenVerificationErrorAction)[keyof typeof TokenVerificationErrorAction];\n\nexport class TokenVerificationError extends Error {\n action?: TokenVerificationErrorAction;\n reason: TokenVerificationErrorReason;\n tokenCarrier?: TokenCarrier;\n\n constructor({\n action,\n message,\n reason,\n }: {\n action?: TokenVerificationErrorAction;\n message: string;\n reason: TokenVerificationErrorReason;\n }) {\n super(message);\n\n Object.setPrototypeOf(this, TokenVerificationError.prototype);\n\n this.reason = reason;\n this.message = message;\n this.action = action;\n }\n\n public getFullMessage() {\n return `${[this.message, this.action].filter(m => m).join(' ')} (reason=${this.reason}, token-carrier=${\n this.tokenCarrier\n })`;\n }\n}\n\nexport class SignJWTError extends Error {}\n"],"mappings":";AAEO,IAAM,6BAA6B;AAAA,EACxC,kBAAkB;AACpB;AAIO,IAAM,+BAA+B;AAAA,EAC1C,cAAc;AAAA,EACd,cAAc;AAAA,EACd,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,yBAAyB;AAAA,EACzB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,gBAAgB;AAClB;AAKO,IAAM,+BAA+B;AAAA,EAC1C,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,iBAAiB;AACnB;AAKO,IAAM,yBAAN,MAAM,gCAA+B,MAAM;AAAA,EAKhD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAIG;AACD,UAAM,OAAO;AAEb,WAAO,eAAe,MAAM,wBAAuB,SAAS;AAE5D,SAAK,SAAS;AACd,SAAK,UAAU;AACf,SAAK,SAAS;AAAA,EAChB;AAAA,EAEO,iBAAiB;AACtB,WAAO,GAAG,CAAC,KAAK,SAAS,KAAK,MAAM,EAAE,OAAO,OAAK,CAAC,EAAE,KAAK,GAAG,CAAC,YAAY,KAAK,MAAM,mBACnF,KAAK,YACP;AAAA,EACF;AACF;AAEO,IAAM,eAAN,cAA2B,MAAM;AAAC;","names":[]}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/chunk-HGGLOBDA.mjs b/backend/node_modules/@clerk/backend/dist/chunk-HGGLOBDA.mjs
new file mode 100644
index 00000000..f9f20322
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/chunk-HGGLOBDA.mjs
@@ -0,0 +1,2834 @@
+import {
+ assertHeaderAlgorithm,
+ assertHeaderType,
+ decodeJwt,
+ hasValidSignature,
+ runtime_default,
+ verifyJwt
+} from "./chunk-PVHPEMF5.mjs";
+import {
+ TokenVerificationError,
+ TokenVerificationErrorAction,
+ TokenVerificationErrorCode,
+ TokenVerificationErrorReason
+} from "./chunk-5JS2VYLU.mjs";
+
+// src/constants.ts
+var API_URL = "https://api.clerk.com";
+var API_VERSION = "v1";
+var USER_AGENT = `${"@clerk/backend"}@${"1.14.1"}`;
+var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
+var JWKS_CACHE_TTL_MS = 1e3 * 60 * 60;
+var Attributes = {
+ AuthToken: "__clerkAuthToken",
+ AuthSignature: "__clerkAuthSignature",
+ AuthStatus: "__clerkAuthStatus",
+ AuthReason: "__clerkAuthReason",
+ AuthMessage: "__clerkAuthMessage",
+ ClerkUrl: "__clerkUrl"
+};
+var Cookies = {
+ Session: "__session",
+ Refresh: "__refresh",
+ ClientUat: "__client_uat",
+ Handshake: "__clerk_handshake",
+ DevBrowser: "__clerk_db_jwt",
+ RedirectCount: "__clerk_redirect_count"
+};
+var QueryParameters = {
+ ClerkSynced: "__clerk_synced",
+ ClerkRedirectUrl: "__clerk_redirect_url",
+ // use the reference to Cookies to indicate that it's the same value
+ DevBrowser: Cookies.DevBrowser,
+ Handshake: Cookies.Handshake,
+ HandshakeHelp: "__clerk_help",
+ LegacyDevBrowser: "__dev_session",
+ HandshakeReason: "__clerk_hs_reason"
+};
+var Headers2 = {
+ AuthToken: "x-clerk-auth-token",
+ AuthSignature: "x-clerk-auth-signature",
+ AuthStatus: "x-clerk-auth-status",
+ AuthReason: "x-clerk-auth-reason",
+ AuthMessage: "x-clerk-auth-message",
+ ClerkUrl: "x-clerk-clerk-url",
+ EnableDebug: "x-clerk-debug",
+ ClerkRequestData: "x-clerk-request-data",
+ ClerkRedirectTo: "x-clerk-redirect-to",
+ CloudFrontForwardedProto: "cloudfront-forwarded-proto",
+ Authorization: "authorization",
+ ForwardedPort: "x-forwarded-port",
+ ForwardedProto: "x-forwarded-proto",
+ ForwardedHost: "x-forwarded-host",
+ Accept: "accept",
+ Referrer: "referer",
+ UserAgent: "user-agent",
+ Origin: "origin",
+ Host: "host",
+ ContentType: "content-type",
+ SecFetchDest: "sec-fetch-dest",
+ Location: "location",
+ CacheControl: "cache-control"
+};
+var ContentTypes = {
+ Json: "application/json"
+};
+var constants = {
+ Attributes,
+ Cookies,
+ Headers: Headers2,
+ ContentTypes,
+ QueryParameters
+};
+
+// src/api/endpoints/AbstractApi.ts
+var AbstractAPI = class {
+ constructor(request) {
+ this.request = request;
+ }
+ requireId(id) {
+ if (!id) {
+ throw new Error("A valid resource ID is required.");
+ }
+ }
+};
+
+// src/util/path.ts
+var SEPARATOR = "/";
+var MULTIPLE_SEPARATOR_REGEX = new RegExp("(? p).join(SEPARATOR).replace(MULTIPLE_SEPARATOR_REGEX, SEPARATOR);
+}
+
+// src/api/endpoints/AllowlistIdentifierApi.ts
+var basePath = "/allowlist_identifiers";
+var AllowlistIdentifierAPI = class extends AbstractAPI {
+ async getAllowlistIdentifierList() {
+ return this.request({
+ method: "GET",
+ path: basePath,
+ queryParams: { paginated: true }
+ });
+ }
+ async createAllowlistIdentifier(params) {
+ return this.request({
+ method: "POST",
+ path: basePath,
+ bodyParams: params
+ });
+ }
+ async deleteAllowlistIdentifier(allowlistIdentifierId) {
+ this.requireId(allowlistIdentifierId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath, allowlistIdentifierId)
+ });
+ }
+};
+
+// src/api/endpoints/ClientApi.ts
+var basePath2 = "/clients";
+var ClientAPI = class extends AbstractAPI {
+ async getClientList(params = {}) {
+ return this.request({
+ method: "GET",
+ path: basePath2,
+ queryParams: { ...params, paginated: true }
+ });
+ }
+ async getClient(clientId) {
+ this.requireId(clientId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath2, clientId)
+ });
+ }
+ verifyClient(token) {
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath2, "verify"),
+ bodyParams: { token }
+ });
+ }
+};
+
+// src/api/endpoints/DomainApi.ts
+var basePath3 = "/domains";
+var DomainAPI = class extends AbstractAPI {
+ async deleteDomain(id) {
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath3, id)
+ });
+ }
+};
+
+// src/api/endpoints/EmailAddressApi.ts
+var basePath4 = "/email_addresses";
+var EmailAddressAPI = class extends AbstractAPI {
+ async getEmailAddress(emailAddressId) {
+ this.requireId(emailAddressId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath4, emailAddressId)
+ });
+ }
+ async createEmailAddress(params) {
+ return this.request({
+ method: "POST",
+ path: basePath4,
+ bodyParams: params
+ });
+ }
+ async updateEmailAddress(emailAddressId, params = {}) {
+ this.requireId(emailAddressId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath4, emailAddressId),
+ bodyParams: params
+ });
+ }
+ async deleteEmailAddress(emailAddressId) {
+ this.requireId(emailAddressId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath4, emailAddressId)
+ });
+ }
+};
+
+// src/api/endpoints/InvitationApi.ts
+var basePath5 = "/invitations";
+var InvitationAPI = class extends AbstractAPI {
+ async getInvitationList(params = {}) {
+ return this.request({
+ method: "GET",
+ path: basePath5,
+ queryParams: { ...params, paginated: true }
+ });
+ }
+ async createInvitation(params) {
+ return this.request({
+ method: "POST",
+ path: basePath5,
+ bodyParams: params
+ });
+ }
+ async revokeInvitation(invitationId) {
+ this.requireId(invitationId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath5, invitationId, "revoke")
+ });
+ }
+};
+
+// src/api/endpoints/OrganizationApi.ts
+var basePath6 = "/organizations";
+var OrganizationAPI = class extends AbstractAPI {
+ async getOrganizationList(params) {
+ return this.request({
+ method: "GET",
+ path: basePath6,
+ queryParams: params
+ });
+ }
+ async createOrganization(params) {
+ return this.request({
+ method: "POST",
+ path: basePath6,
+ bodyParams: params
+ });
+ }
+ async getOrganization(params) {
+ const { includeMembersCount } = params;
+ const organizationIdOrSlug = "organizationId" in params ? params.organizationId : params.slug;
+ this.requireId(organizationIdOrSlug);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath6, organizationIdOrSlug),
+ queryParams: {
+ includeMembersCount
+ }
+ });
+ }
+ async updateOrganization(organizationId, params) {
+ this.requireId(organizationId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath6, organizationId),
+ bodyParams: params
+ });
+ }
+ async updateOrganizationLogo(organizationId, params) {
+ this.requireId(organizationId);
+ const formData = new runtime_default.FormData();
+ formData.append("file", params?.file);
+ if (params?.uploaderUserId) {
+ formData.append("uploader_user_id", params?.uploaderUserId);
+ }
+ return this.request({
+ method: "PUT",
+ path: joinPaths(basePath6, organizationId, "logo"),
+ formData
+ });
+ }
+ async deleteOrganizationLogo(organizationId) {
+ this.requireId(organizationId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath6, organizationId, "logo")
+ });
+ }
+ async updateOrganizationMetadata(organizationId, params) {
+ this.requireId(organizationId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath6, organizationId, "metadata"),
+ bodyParams: params
+ });
+ }
+ async deleteOrganization(organizationId) {
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath6, organizationId)
+ });
+ }
+ async getOrganizationMembershipList(params) {
+ const { organizationId, limit, offset } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath6, organizationId, "memberships"),
+ queryParams: { limit, offset }
+ });
+ }
+ async createOrganizationMembership(params) {
+ const { organizationId, userId, role } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath6, organizationId, "memberships"),
+ bodyParams: {
+ userId,
+ role
+ }
+ });
+ }
+ async updateOrganizationMembership(params) {
+ const { organizationId, userId, role } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath6, organizationId, "memberships", userId),
+ bodyParams: {
+ role
+ }
+ });
+ }
+ async updateOrganizationMembershipMetadata(params) {
+ const { organizationId, userId, publicMetadata, privateMetadata } = params;
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath6, organizationId, "memberships", userId, "metadata"),
+ bodyParams: {
+ publicMetadata,
+ privateMetadata
+ }
+ });
+ }
+ async deleteOrganizationMembership(params) {
+ const { organizationId, userId } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath6, organizationId, "memberships", userId)
+ });
+ }
+ async getOrganizationInvitationList(params) {
+ const { organizationId, status, limit, offset } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath6, organizationId, "invitations"),
+ queryParams: { status, limit, offset }
+ });
+ }
+ async createOrganizationInvitation(params) {
+ const { organizationId, ...bodyParams } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath6, organizationId, "invitations"),
+ bodyParams: { ...bodyParams }
+ });
+ }
+ async getOrganizationInvitation(params) {
+ const { organizationId, invitationId } = params;
+ this.requireId(organizationId);
+ this.requireId(invitationId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath6, organizationId, "invitations", invitationId)
+ });
+ }
+ async revokeOrganizationInvitation(params) {
+ const { organizationId, invitationId, requestingUserId } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath6, organizationId, "invitations", invitationId, "revoke"),
+ bodyParams: {
+ requestingUserId
+ }
+ });
+ }
+ async getOrganizationDomainList(params) {
+ const { organizationId, limit, offset } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath6, organizationId, "domains"),
+ queryParams: { limit, offset }
+ });
+ }
+ async createOrganizationDomain(params) {
+ const { organizationId, name, enrollmentMode, verified = true } = params;
+ this.requireId(organizationId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath6, organizationId, "domains"),
+ bodyParams: {
+ name,
+ enrollmentMode,
+ verified
+ }
+ });
+ }
+ async updateOrganizationDomain(params) {
+ const { organizationId, domainId, ...bodyParams } = params;
+ this.requireId(organizationId);
+ this.requireId(domainId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath6, organizationId, "domains", domainId),
+ bodyParams
+ });
+ }
+ async deleteOrganizationDomain(params) {
+ const { organizationId, domainId } = params;
+ this.requireId(organizationId);
+ this.requireId(domainId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath6, organizationId, "domains", domainId)
+ });
+ }
+};
+
+// src/api/endpoints/PhoneNumberApi.ts
+var basePath7 = "/phone_numbers";
+var PhoneNumberAPI = class extends AbstractAPI {
+ async getPhoneNumber(phoneNumberId) {
+ this.requireId(phoneNumberId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath7, phoneNumberId)
+ });
+ }
+ async createPhoneNumber(params) {
+ return this.request({
+ method: "POST",
+ path: basePath7,
+ bodyParams: params
+ });
+ }
+ async updatePhoneNumber(phoneNumberId, params = {}) {
+ this.requireId(phoneNumberId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath7, phoneNumberId),
+ bodyParams: params
+ });
+ }
+ async deletePhoneNumber(phoneNumberId) {
+ this.requireId(phoneNumberId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath7, phoneNumberId)
+ });
+ }
+};
+
+// src/api/endpoints/RedirectUrlApi.ts
+var basePath8 = "/redirect_urls";
+var RedirectUrlAPI = class extends AbstractAPI {
+ async getRedirectUrlList() {
+ return this.request({
+ method: "GET",
+ path: basePath8,
+ queryParams: { paginated: true }
+ });
+ }
+ async getRedirectUrl(redirectUrlId) {
+ this.requireId(redirectUrlId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath8, redirectUrlId)
+ });
+ }
+ async createRedirectUrl(params) {
+ return this.request({
+ method: "POST",
+ path: basePath8,
+ bodyParams: params
+ });
+ }
+ async deleteRedirectUrl(redirectUrlId) {
+ this.requireId(redirectUrlId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath8, redirectUrlId)
+ });
+ }
+};
+
+// src/api/endpoints/SessionApi.ts
+var basePath9 = "/sessions";
+var SessionAPI = class extends AbstractAPI {
+ async getSessionList(params = {}) {
+ return this.request({
+ method: "GET",
+ path: basePath9,
+ queryParams: { ...params, paginated: true }
+ });
+ }
+ async getSession(sessionId) {
+ this.requireId(sessionId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath9, sessionId)
+ });
+ }
+ async revokeSession(sessionId) {
+ this.requireId(sessionId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath9, sessionId, "revoke")
+ });
+ }
+ async verifySession(sessionId, token) {
+ this.requireId(sessionId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath9, sessionId, "verify"),
+ bodyParams: { token }
+ });
+ }
+ async getToken(sessionId, template) {
+ this.requireId(sessionId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath9, sessionId, "tokens", template || "")
+ });
+ }
+ async refreshSession(sessionId, params) {
+ this.requireId(sessionId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath9, sessionId, "refresh"),
+ bodyParams: params
+ });
+ }
+};
+
+// src/api/endpoints/SignInTokenApi.ts
+var basePath10 = "/sign_in_tokens";
+var SignInTokenAPI = class extends AbstractAPI {
+ async createSignInToken(params) {
+ return this.request({
+ method: "POST",
+ path: basePath10,
+ bodyParams: params
+ });
+ }
+ async revokeSignInToken(signInTokenId) {
+ this.requireId(signInTokenId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath10, signInTokenId, "revoke")
+ });
+ }
+};
+
+// src/api/endpoints/UserApi.ts
+var basePath11 = "/users";
+var UserAPI = class extends AbstractAPI {
+ async getUserList(params = {}) {
+ const { limit, offset, orderBy, ...userCountParams } = params;
+ const [data, totalCount] = await Promise.all([
+ this.request({
+ method: "GET",
+ path: basePath11,
+ queryParams: params
+ }),
+ this.getCount(userCountParams)
+ ]);
+ return { data, totalCount };
+ }
+ async getUser(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath11, userId)
+ });
+ }
+ async createUser(params) {
+ return this.request({
+ method: "POST",
+ path: basePath11,
+ bodyParams: params
+ });
+ }
+ async updateUser(userId, params = {}) {
+ this.requireId(userId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath11, userId),
+ bodyParams: params
+ });
+ }
+ async updateUserProfileImage(userId, params) {
+ this.requireId(userId);
+ const formData = new runtime_default.FormData();
+ formData.append("file", params?.file);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath11, userId, "profile_image"),
+ formData
+ });
+ }
+ async updateUserMetadata(userId, params) {
+ this.requireId(userId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath11, userId, "metadata"),
+ bodyParams: params
+ });
+ }
+ async deleteUser(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath11, userId)
+ });
+ }
+ async getCount(params = {}) {
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath11, "count"),
+ queryParams: params
+ });
+ }
+ async getUserOauthAccessToken(userId, provider) {
+ this.requireId(userId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath11, userId, "oauth_access_tokens", provider),
+ queryParams: { paginated: true }
+ });
+ }
+ async disableUserMFA(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath11, userId, "mfa")
+ });
+ }
+ async getOrganizationMembershipList(params) {
+ const { userId, limit, offset } = params;
+ this.requireId(userId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath11, userId, "organization_memberships"),
+ queryParams: { limit, offset }
+ });
+ }
+ async verifyPassword(params) {
+ const { userId, password } = params;
+ this.requireId(userId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath11, userId, "verify_password"),
+ bodyParams: { password }
+ });
+ }
+ async verifyTOTP(params) {
+ const { userId, code } = params;
+ this.requireId(userId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath11, userId, "verify_totp"),
+ bodyParams: { code }
+ });
+ }
+ async banUser(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath11, userId, "ban")
+ });
+ }
+ async unbanUser(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath11, userId, "unban")
+ });
+ }
+ async lockUser(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath11, userId, "lock")
+ });
+ }
+ async unlockUser(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "POST",
+ path: joinPaths(basePath11, userId, "unlock")
+ });
+ }
+ async deleteUserProfileImage(userId) {
+ this.requireId(userId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath11, userId, "profile_image")
+ });
+ }
+};
+
+// src/api/endpoints/SamlConnectionApi.ts
+var basePath12 = "/saml_connections";
+var SamlConnectionAPI = class extends AbstractAPI {
+ async getSamlConnectionList(params = {}) {
+ return this.request({
+ method: "GET",
+ path: basePath12,
+ queryParams: params
+ });
+ }
+ async createSamlConnection(params) {
+ return this.request({
+ method: "POST",
+ path: basePath12,
+ bodyParams: params
+ });
+ }
+ async getSamlConnection(samlConnectionId) {
+ this.requireId(samlConnectionId);
+ return this.request({
+ method: "GET",
+ path: joinPaths(basePath12, samlConnectionId)
+ });
+ }
+ async updateSamlConnection(samlConnectionId, params = {}) {
+ this.requireId(samlConnectionId);
+ return this.request({
+ method: "PATCH",
+ path: joinPaths(basePath12, samlConnectionId),
+ bodyParams: params
+ });
+ }
+ async deleteSamlConnection(samlConnectionId) {
+ this.requireId(samlConnectionId);
+ return this.request({
+ method: "DELETE",
+ path: joinPaths(basePath12, samlConnectionId)
+ });
+ }
+};
+
+// src/api/endpoints/TestingTokenApi.ts
+var basePath13 = "/testing_tokens";
+var TestingTokenAPI = class extends AbstractAPI {
+ async createTestingToken() {
+ return this.request({
+ method: "POST",
+ path: basePath13
+ });
+ }
+};
+
+// src/api/request.ts
+import { ClerkAPIResponseError, parseError } from "@clerk/shared/error";
+import snakecaseKeys from "snakecase-keys";
+
+// src/util/shared.ts
+import { addClerkPrefix, getScriptUrl, getClerkJsMajorVersionOrTag } from "@clerk/shared/url";
+import { callWithRetry } from "@clerk/shared/callWithRetry";
+import {
+ isDevelopmentFromSecretKey,
+ isProductionFromSecretKey,
+ parsePublishableKey,
+ getCookieSuffix,
+ getSuffixedCookieName
+} from "@clerk/shared/keys";
+import { deprecated, deprecatedProperty } from "@clerk/shared/deprecated";
+import { buildErrorThrower } from "@clerk/shared/error";
+import { createDevOrStagingUrlCache } from "@clerk/shared/keys";
+var errorThrower = buildErrorThrower({ packageName: "@clerk/backend" });
+var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
+
+// src/util/optionsAssertions.ts
+function assertValidSecretKey(val) {
+ if (!val || typeof val !== "string") {
+ throw Error("Missing Clerk Secret Key. Go to https://dashboard.clerk.com and get your key for your instance.");
+ }
+}
+function assertValidPublishableKey(val) {
+ parsePublishableKey(val, { fatal: true });
+}
+
+// src/api/resources/AllowlistIdentifier.ts
+var AllowlistIdentifier = class _AllowlistIdentifier {
+ constructor(id, identifier, createdAt, updatedAt, invitationId) {
+ this.id = id;
+ this.identifier = identifier;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.invitationId = invitationId;
+ }
+ static fromJSON(data) {
+ return new _AllowlistIdentifier(data.id, data.identifier, data.created_at, data.updated_at, data.invitation_id);
+ }
+};
+
+// src/api/resources/Session.ts
+var Session = class _Session {
+ constructor(id, clientId, userId, status, lastActiveAt, expireAt, abandonAt, createdAt, updatedAt) {
+ this.id = id;
+ this.clientId = clientId;
+ this.userId = userId;
+ this.status = status;
+ this.lastActiveAt = lastActiveAt;
+ this.expireAt = expireAt;
+ this.abandonAt = abandonAt;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ }
+ static fromJSON(data) {
+ return new _Session(
+ data.id,
+ data.client_id,
+ data.user_id,
+ data.status,
+ data.last_active_at,
+ data.expire_at,
+ data.abandon_at,
+ data.created_at,
+ data.updated_at
+ );
+ }
+};
+
+// src/api/resources/Client.ts
+var Client = class _Client {
+ constructor(id, sessionIds, sessions, signInId, signUpId, lastActiveSessionId, createdAt, updatedAt) {
+ this.id = id;
+ this.sessionIds = sessionIds;
+ this.sessions = sessions;
+ this.signInId = signInId;
+ this.signUpId = signUpId;
+ this.lastActiveSessionId = lastActiveSessionId;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ }
+ static fromJSON(data) {
+ return new _Client(
+ data.id,
+ data.session_ids,
+ data.sessions.map((x) => Session.fromJSON(x)),
+ data.sign_in_id,
+ data.sign_up_id,
+ data.last_active_session_id,
+ data.created_at,
+ data.updated_at
+ );
+ }
+};
+
+// src/api/resources/DeletedObject.ts
+var DeletedObject = class _DeletedObject {
+ constructor(object, id, slug, deleted) {
+ this.object = object;
+ this.id = id;
+ this.slug = slug;
+ this.deleted = deleted;
+ }
+ static fromJSON(data) {
+ return new _DeletedObject(data.object, data.id || null, data.slug || null, data.deleted);
+ }
+};
+
+// src/api/resources/Email.ts
+var Email = class _Email {
+ constructor(id, fromEmailName, emailAddressId, toEmailAddress, subject, body, bodyPlain, status, slug, data, deliveredByClerk) {
+ this.id = id;
+ this.fromEmailName = fromEmailName;
+ this.emailAddressId = emailAddressId;
+ this.toEmailAddress = toEmailAddress;
+ this.subject = subject;
+ this.body = body;
+ this.bodyPlain = bodyPlain;
+ this.status = status;
+ this.slug = slug;
+ this.data = data;
+ this.deliveredByClerk = deliveredByClerk;
+ }
+ static fromJSON(data) {
+ return new _Email(
+ data.id,
+ data.from_email_name,
+ data.email_address_id,
+ data.to_email_address,
+ data.subject,
+ data.body,
+ data.body_plain,
+ data.status,
+ data.slug,
+ data.data,
+ data.delivered_by_clerk
+ );
+ }
+};
+
+// src/api/resources/IdentificationLink.ts
+var IdentificationLink = class _IdentificationLink {
+ constructor(id, type) {
+ this.id = id;
+ this.type = type;
+ }
+ static fromJSON(data) {
+ return new _IdentificationLink(data.id, data.type);
+ }
+};
+
+// src/api/resources/Verification.ts
+var Verification = class _Verification {
+ constructor(status, strategy, externalVerificationRedirectURL = null, attempts = null, expireAt = null, nonce = null, message = null) {
+ this.status = status;
+ this.strategy = strategy;
+ this.externalVerificationRedirectURL = externalVerificationRedirectURL;
+ this.attempts = attempts;
+ this.expireAt = expireAt;
+ this.nonce = nonce;
+ this.message = message;
+ }
+ static fromJSON(data) {
+ return new _Verification(
+ data.status,
+ data.strategy,
+ data.external_verification_redirect_url ? new URL(data.external_verification_redirect_url) : null,
+ data.attempts,
+ data.expire_at,
+ data.nonce
+ );
+ }
+};
+
+// src/api/resources/EmailAddress.ts
+var EmailAddress = class _EmailAddress {
+ constructor(id, emailAddress, verification, linkedTo) {
+ this.id = id;
+ this.emailAddress = emailAddress;
+ this.verification = verification;
+ this.linkedTo = linkedTo;
+ }
+ static fromJSON(data) {
+ return new _EmailAddress(
+ data.id,
+ data.email_address,
+ data.verification && Verification.fromJSON(data.verification),
+ data.linked_to.map((link) => IdentificationLink.fromJSON(link))
+ );
+ }
+};
+
+// src/api/resources/ExternalAccount.ts
+var ExternalAccount = class _ExternalAccount {
+ constructor(id, provider, identificationId, externalId, approvedScopes, emailAddress, firstName, lastName, imageUrl, username, publicMetadata = {}, label, verification) {
+ this.id = id;
+ this.provider = provider;
+ this.identificationId = identificationId;
+ this.externalId = externalId;
+ this.approvedScopes = approvedScopes;
+ this.emailAddress = emailAddress;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.imageUrl = imageUrl;
+ this.username = username;
+ this.publicMetadata = publicMetadata;
+ this.label = label;
+ this.verification = verification;
+ }
+ static fromJSON(data) {
+ return new _ExternalAccount(
+ data.id,
+ data.provider,
+ data.identification_id,
+ data.provider_user_id,
+ data.approved_scopes,
+ data.email_address,
+ data.first_name,
+ data.last_name,
+ data.image_url || "",
+ data.username,
+ data.public_metadata,
+ data.label,
+ data.verification && Verification.fromJSON(data.verification)
+ );
+ }
+};
+
+// src/api/resources/Invitation.ts
+var Invitation = class _Invitation {
+ constructor(id, emailAddress, publicMetadata, createdAt, updatedAt, status, url, revoked) {
+ this.id = id;
+ this.emailAddress = emailAddress;
+ this.publicMetadata = publicMetadata;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.status = status;
+ this.url = url;
+ this.revoked = revoked;
+ }
+ static fromJSON(data) {
+ return new _Invitation(
+ data.id,
+ data.email_address,
+ data.public_metadata,
+ data.created_at,
+ data.updated_at,
+ data.status,
+ data.url,
+ data.revoked
+ );
+ }
+};
+
+// src/api/resources/JSON.ts
+var ObjectType = {
+ AllowlistIdentifier: "allowlist_identifier",
+ Client: "client",
+ Email: "email",
+ EmailAddress: "email_address",
+ ExternalAccount: "external_account",
+ FacebookAccount: "facebook_account",
+ GoogleAccount: "google_account",
+ Invitation: "invitation",
+ OauthAccessToken: "oauth_access_token",
+ Organization: "organization",
+ OrganizationInvitation: "organization_invitation",
+ OrganizationMembership: "organization_membership",
+ PhoneNumber: "phone_number",
+ RedirectUrl: "redirect_url",
+ SamlAccount: "saml_account",
+ Session: "session",
+ SignInAttempt: "sign_in_attempt",
+ SignInToken: "sign_in_token",
+ SignUpAttempt: "sign_up_attempt",
+ SmsMessage: "sms_message",
+ User: "user",
+ Web3Wallet: "web3_wallet",
+ Token: "token",
+ TotalCount: "total_count",
+ TestingToken: "testing_token",
+ Role: "role",
+ Permission: "permission"
+};
+
+// src/api/resources/OauthAccessToken.ts
+var OauthAccessToken = class _OauthAccessToken {
+ constructor(externalAccountId, provider, token, publicMetadata = {}, label, scopes, tokenSecret) {
+ this.externalAccountId = externalAccountId;
+ this.provider = provider;
+ this.token = token;
+ this.publicMetadata = publicMetadata;
+ this.label = label;
+ this.scopes = scopes;
+ this.tokenSecret = tokenSecret;
+ }
+ static fromJSON(data) {
+ return new _OauthAccessToken(
+ data.external_account_id,
+ data.provider,
+ data.token,
+ data.public_metadata,
+ data.label || "",
+ data.scopes,
+ data.token_secret
+ );
+ }
+};
+
+// src/api/resources/Organization.ts
+var Organization = class _Organization {
+ constructor(id, name, slug, imageUrl, hasImage, createdBy, createdAt, updatedAt, publicMetadata = {}, privateMetadata = {}, maxAllowedMemberships, adminDeleteEnabled, membersCount) {
+ this.id = id;
+ this.name = name;
+ this.slug = slug;
+ this.imageUrl = imageUrl;
+ this.hasImage = hasImage;
+ this.createdBy = createdBy;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.publicMetadata = publicMetadata;
+ this.privateMetadata = privateMetadata;
+ this.maxAllowedMemberships = maxAllowedMemberships;
+ this.adminDeleteEnabled = adminDeleteEnabled;
+ this.membersCount = membersCount;
+ }
+ static fromJSON(data) {
+ return new _Organization(
+ data.id,
+ data.name,
+ data.slug,
+ data.image_url || "",
+ data.has_image,
+ data.created_by,
+ data.created_at,
+ data.updated_at,
+ data.public_metadata,
+ data.private_metadata,
+ data.max_allowed_memberships,
+ data.admin_delete_enabled,
+ data.members_count
+ );
+ }
+};
+
+// src/api/resources/OrganizationInvitation.ts
+var OrganizationInvitation = class _OrganizationInvitation {
+ constructor(id, emailAddress, role, organizationId, createdAt, updatedAt, status, publicMetadata = {}, privateMetadata = {}) {
+ this.id = id;
+ this.emailAddress = emailAddress;
+ this.role = role;
+ this.organizationId = organizationId;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.status = status;
+ this.publicMetadata = publicMetadata;
+ this.privateMetadata = privateMetadata;
+ }
+ static fromJSON(data) {
+ return new _OrganizationInvitation(
+ data.id,
+ data.email_address,
+ data.role,
+ data.organization_id,
+ data.created_at,
+ data.updated_at,
+ data.status,
+ data.public_metadata,
+ data.private_metadata
+ );
+ }
+};
+
+// src/api/resources/OrganizationMembership.ts
+var OrganizationMembership = class _OrganizationMembership {
+ constructor(id, role, permissions, publicMetadata = {}, privateMetadata = {}, createdAt, updatedAt, organization, publicUserData) {
+ this.id = id;
+ this.role = role;
+ this.permissions = permissions;
+ this.publicMetadata = publicMetadata;
+ this.privateMetadata = privateMetadata;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.organization = organization;
+ this.publicUserData = publicUserData;
+ }
+ static fromJSON(data) {
+ return new _OrganizationMembership(
+ data.id,
+ data.role,
+ data.permissions,
+ data.public_metadata,
+ data.private_metadata,
+ data.created_at,
+ data.updated_at,
+ Organization.fromJSON(data.organization),
+ OrganizationMembershipPublicUserData.fromJSON(data.public_user_data)
+ );
+ }
+};
+var OrganizationMembershipPublicUserData = class _OrganizationMembershipPublicUserData {
+ constructor(identifier, firstName, lastName, imageUrl, hasImage, userId) {
+ this.identifier = identifier;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.imageUrl = imageUrl;
+ this.hasImage = hasImage;
+ this.userId = userId;
+ }
+ static fromJSON(data) {
+ return new _OrganizationMembershipPublicUserData(
+ data.identifier,
+ data.first_name,
+ data.last_name,
+ data.image_url,
+ data.has_image,
+ data.user_id
+ );
+ }
+};
+
+// src/api/resources/PhoneNumber.ts
+var PhoneNumber = class _PhoneNumber {
+ constructor(id, phoneNumber, reservedForSecondFactor, defaultSecondFactor, verification, linkedTo) {
+ this.id = id;
+ this.phoneNumber = phoneNumber;
+ this.reservedForSecondFactor = reservedForSecondFactor;
+ this.defaultSecondFactor = defaultSecondFactor;
+ this.verification = verification;
+ this.linkedTo = linkedTo;
+ }
+ static fromJSON(data) {
+ return new _PhoneNumber(
+ data.id,
+ data.phone_number,
+ data.reserved_for_second_factor,
+ data.default_second_factor,
+ data.verification && Verification.fromJSON(data.verification),
+ data.linked_to.map((link) => IdentificationLink.fromJSON(link))
+ );
+ }
+};
+
+// src/api/resources/RedirectUrl.ts
+var RedirectUrl = class _RedirectUrl {
+ constructor(id, url, createdAt, updatedAt) {
+ this.id = id;
+ this.url = url;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ }
+ static fromJSON(data) {
+ return new _RedirectUrl(data.id, data.url, data.created_at, data.updated_at);
+ }
+};
+
+// src/api/resources/SignInTokens.ts
+var SignInToken = class _SignInToken {
+ constructor(id, userId, token, status, url, createdAt, updatedAt) {
+ this.id = id;
+ this.userId = userId;
+ this.token = token;
+ this.status = status;
+ this.url = url;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ }
+ static fromJSON(data) {
+ return new _SignInToken(data.id, data.user_id, data.token, data.status, data.url, data.created_at, data.updated_at);
+ }
+};
+
+// src/api/resources/SMSMessage.ts
+var SMSMessage = class _SMSMessage {
+ constructor(id, fromPhoneNumber, toPhoneNumber, message, status, phoneNumberId, data) {
+ this.id = id;
+ this.fromPhoneNumber = fromPhoneNumber;
+ this.toPhoneNumber = toPhoneNumber;
+ this.message = message;
+ this.status = status;
+ this.phoneNumberId = phoneNumberId;
+ this.data = data;
+ }
+ static fromJSON(data) {
+ return new _SMSMessage(
+ data.id,
+ data.from_phone_number,
+ data.to_phone_number,
+ data.message,
+ data.status,
+ data.phone_number_id,
+ data.data
+ );
+ }
+};
+
+// src/api/resources/Token.ts
+var Token = class _Token {
+ constructor(jwt) {
+ this.jwt = jwt;
+ }
+ static fromJSON(data) {
+ return new _Token(data.jwt);
+ }
+};
+
+// src/api/resources/SamlConnection.ts
+var SamlAccountConnection = class _SamlAccountConnection {
+ constructor(id, name, domain, active, provider, syncUserAttributes, allowSubdomains, allowIdpInitiated, createdAt, updatedAt) {
+ this.id = id;
+ this.name = name;
+ this.domain = domain;
+ this.active = active;
+ this.provider = provider;
+ this.syncUserAttributes = syncUserAttributes;
+ this.allowSubdomains = allowSubdomains;
+ this.allowIdpInitiated = allowIdpInitiated;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ }
+ static fromJSON(data) {
+ return new _SamlAccountConnection(
+ data.id,
+ data.name,
+ data.domain,
+ data.active,
+ data.provider,
+ data.sync_user_attributes,
+ data.allow_subdomains,
+ data.allow_idp_initiated,
+ data.created_at,
+ data.updated_at
+ );
+ }
+};
+
+// src/api/resources/SamlAccount.ts
+var SamlAccount = class _SamlAccount {
+ constructor(id, provider, providerUserId, active, emailAddress, firstName, lastName, verification, samlConnection) {
+ this.id = id;
+ this.provider = provider;
+ this.providerUserId = providerUserId;
+ this.active = active;
+ this.emailAddress = emailAddress;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.verification = verification;
+ this.samlConnection = samlConnection;
+ }
+ static fromJSON(data) {
+ return new _SamlAccount(
+ data.id,
+ data.provider,
+ data.provider_user_id,
+ data.active,
+ data.email_address,
+ data.first_name,
+ data.last_name,
+ data.verification && Verification.fromJSON(data.verification),
+ data.saml_connection && SamlAccountConnection.fromJSON(data.saml_connection)
+ );
+ }
+};
+
+// src/api/resources/Web3Wallet.ts
+var Web3Wallet = class _Web3Wallet {
+ constructor(id, web3Wallet, verification) {
+ this.id = id;
+ this.web3Wallet = web3Wallet;
+ this.verification = verification;
+ }
+ static fromJSON(data) {
+ return new _Web3Wallet(data.id, data.web3_wallet, data.verification && Verification.fromJSON(data.verification));
+ }
+};
+
+// src/api/resources/User.ts
+var User = class _User {
+ constructor(id, passwordEnabled, totpEnabled, backupCodeEnabled, twoFactorEnabled, banned, locked, createdAt, updatedAt, imageUrl, hasImage, primaryEmailAddressId, primaryPhoneNumberId, primaryWeb3WalletId, lastSignInAt, externalId, username, firstName, lastName, publicMetadata = {}, privateMetadata = {}, unsafeMetadata = {}, emailAddresses = [], phoneNumbers = [], web3Wallets = [], externalAccounts = [], samlAccounts = [], lastActiveAt, createOrganizationEnabled, createOrganizationsLimit = null, deleteSelfEnabled) {
+ this.id = id;
+ this.passwordEnabled = passwordEnabled;
+ this.totpEnabled = totpEnabled;
+ this.backupCodeEnabled = backupCodeEnabled;
+ this.twoFactorEnabled = twoFactorEnabled;
+ this.banned = banned;
+ this.locked = locked;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.imageUrl = imageUrl;
+ this.hasImage = hasImage;
+ this.primaryEmailAddressId = primaryEmailAddressId;
+ this.primaryPhoneNumberId = primaryPhoneNumberId;
+ this.primaryWeb3WalletId = primaryWeb3WalletId;
+ this.lastSignInAt = lastSignInAt;
+ this.externalId = externalId;
+ this.username = username;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.publicMetadata = publicMetadata;
+ this.privateMetadata = privateMetadata;
+ this.unsafeMetadata = unsafeMetadata;
+ this.emailAddresses = emailAddresses;
+ this.phoneNumbers = phoneNumbers;
+ this.web3Wallets = web3Wallets;
+ this.externalAccounts = externalAccounts;
+ this.samlAccounts = samlAccounts;
+ this.lastActiveAt = lastActiveAt;
+ this.createOrganizationEnabled = createOrganizationEnabled;
+ this.createOrganizationsLimit = createOrganizationsLimit;
+ this.deleteSelfEnabled = deleteSelfEnabled;
+ }
+ static fromJSON(data) {
+ return new _User(
+ data.id,
+ data.password_enabled,
+ data.totp_enabled,
+ data.backup_code_enabled,
+ data.two_factor_enabled,
+ data.banned,
+ data.locked,
+ data.created_at,
+ data.updated_at,
+ data.image_url,
+ data.has_image,
+ data.primary_email_address_id,
+ data.primary_phone_number_id,
+ data.primary_web3_wallet_id,
+ data.last_sign_in_at,
+ data.external_id,
+ data.username,
+ data.first_name,
+ data.last_name,
+ data.public_metadata,
+ data.private_metadata,
+ data.unsafe_metadata,
+ (data.email_addresses || []).map((x) => EmailAddress.fromJSON(x)),
+ (data.phone_numbers || []).map((x) => PhoneNumber.fromJSON(x)),
+ (data.web3_wallets || []).map((x) => Web3Wallet.fromJSON(x)),
+ (data.external_accounts || []).map((x) => ExternalAccount.fromJSON(x)),
+ (data.saml_accounts || []).map((x) => SamlAccount.fromJSON(x)),
+ data.last_active_at,
+ data.create_organization_enabled,
+ data.create_organizations_limit,
+ data.delete_self_enabled
+ );
+ }
+ get primaryEmailAddress() {
+ return this.emailAddresses.find(({ id }) => id === this.primaryEmailAddressId) ?? null;
+ }
+ get primaryPhoneNumber() {
+ return this.phoneNumbers.find(({ id }) => id === this.primaryPhoneNumberId) ?? null;
+ }
+ get primaryWeb3Wallet() {
+ return this.web3Wallets.find(({ id }) => id === this.primaryWeb3WalletId) ?? null;
+ }
+ get fullName() {
+ return [this.firstName, this.lastName].join(" ").trim() || null;
+ }
+};
+
+// src/api/resources/Deserializer.ts
+function deserialize(payload) {
+ let data, totalCount;
+ if (Array.isArray(payload)) {
+ const data2 = payload.map((item) => jsonToObject(item));
+ return { data: data2 };
+ } else if (isPaginated(payload)) {
+ data = payload.data.map((item) => jsonToObject(item));
+ totalCount = payload.total_count;
+ return { data, totalCount };
+ } else {
+ return { data: jsonToObject(payload) };
+ }
+}
+function isPaginated(payload) {
+ if (!payload || typeof payload !== "object" || !("data" in payload)) {
+ return false;
+ }
+ return Array.isArray(payload.data) && payload.data !== void 0;
+}
+function getCount(item) {
+ return item.total_count;
+}
+function jsonToObject(item) {
+ if (typeof item !== "string" && "object" in item && "deleted" in item) {
+ return DeletedObject.fromJSON(item);
+ }
+ switch (item.object) {
+ case ObjectType.AllowlistIdentifier:
+ return AllowlistIdentifier.fromJSON(item);
+ case ObjectType.Client:
+ return Client.fromJSON(item);
+ case ObjectType.EmailAddress:
+ return EmailAddress.fromJSON(item);
+ case ObjectType.Email:
+ return Email.fromJSON(item);
+ case ObjectType.Invitation:
+ return Invitation.fromJSON(item);
+ case ObjectType.OauthAccessToken:
+ return OauthAccessToken.fromJSON(item);
+ case ObjectType.Organization:
+ return Organization.fromJSON(item);
+ case ObjectType.OrganizationInvitation:
+ return OrganizationInvitation.fromJSON(item);
+ case ObjectType.OrganizationMembership:
+ return OrganizationMembership.fromJSON(item);
+ case ObjectType.PhoneNumber:
+ return PhoneNumber.fromJSON(item);
+ case ObjectType.RedirectUrl:
+ return RedirectUrl.fromJSON(item);
+ case ObjectType.SignInToken:
+ return SignInToken.fromJSON(item);
+ case ObjectType.Session:
+ return Session.fromJSON(item);
+ case ObjectType.SmsMessage:
+ return SMSMessage.fromJSON(item);
+ case ObjectType.Token:
+ return Token.fromJSON(item);
+ case ObjectType.TotalCount:
+ return getCount(item);
+ case ObjectType.User:
+ return User.fromJSON(item);
+ default:
+ return item;
+ }
+}
+
+// src/api/request.ts
+function buildRequest(options) {
+ const requestFn = async (requestOptions) => {
+ const { secretKey, apiUrl = API_URL, apiVersion = API_VERSION, userAgent = USER_AGENT } = options;
+ const { path, method, queryParams, headerParams, bodyParams, formData } = requestOptions;
+ assertValidSecretKey(secretKey);
+ const url = joinPaths(apiUrl, apiVersion, path);
+ const finalUrl = new URL(url);
+ if (queryParams) {
+ const snakecasedQueryParams = snakecaseKeys({ ...queryParams });
+ for (const [key, val] of Object.entries(snakecasedQueryParams)) {
+ if (val) {
+ [val].flat().forEach((v) => finalUrl.searchParams.append(key, v));
+ }
+ }
+ }
+ const headers = {
+ Authorization: `Bearer ${secretKey}`,
+ "User-Agent": userAgent,
+ ...headerParams
+ };
+ let res;
+ try {
+ if (formData) {
+ res = await runtime_default.fetch(finalUrl.href, {
+ method,
+ headers,
+ body: formData
+ });
+ } else {
+ headers["Content-Type"] = "application/json";
+ const hasBody = method !== "GET" && bodyParams && Object.keys(bodyParams).length > 0;
+ const body = hasBody ? { body: JSON.stringify(snakecaseKeys(bodyParams, { deep: false })) } : null;
+ res = await runtime_default.fetch(finalUrl.href, {
+ method,
+ headers,
+ ...body
+ });
+ }
+ const isJSONResponse = res?.headers && res.headers?.get(constants.Headers.ContentType) === constants.ContentTypes.Json;
+ const responseBody = await (isJSONResponse ? res.json() : res.text());
+ if (!res.ok) {
+ return {
+ data: null,
+ errors: parseErrors(responseBody),
+ status: res?.status,
+ statusText: res?.statusText,
+ clerkTraceId: getTraceId(responseBody, res?.headers)
+ };
+ }
+ return {
+ ...deserialize(responseBody),
+ errors: null
+ };
+ } catch (err) {
+ if (err instanceof Error) {
+ return {
+ data: null,
+ errors: [
+ {
+ code: "unexpected_error",
+ message: err.message || "Unexpected error"
+ }
+ ],
+ clerkTraceId: getTraceId(err, res?.headers)
+ };
+ }
+ return {
+ data: null,
+ errors: parseErrors(err),
+ status: res?.status,
+ statusText: res?.statusText,
+ clerkTraceId: getTraceId(err, res?.headers)
+ };
+ }
+ };
+ return withLegacyRequestReturn(requestFn);
+}
+function getTraceId(data, headers) {
+ if (data && typeof data === "object" && "clerk_trace_id" in data && typeof data.clerk_trace_id === "string") {
+ return data.clerk_trace_id;
+ }
+ const cfRay = headers?.get("cf-ray");
+ return cfRay || "";
+}
+function parseErrors(data) {
+ if (!!data && typeof data === "object" && "errors" in data) {
+ const errors = data.errors;
+ return errors.length > 0 ? errors.map(parseError) : [];
+ }
+ return [];
+}
+function withLegacyRequestReturn(cb) {
+ return async (...args) => {
+ const { data, errors, totalCount, status, statusText, clerkTraceId } = await cb(...args);
+ if (errors) {
+ const error = new ClerkAPIResponseError(statusText || "", {
+ data: [],
+ status,
+ clerkTraceId
+ });
+ error.errors = errors;
+ throw error;
+ }
+ if (typeof totalCount !== "undefined") {
+ return { data, totalCount };
+ }
+ return data;
+ };
+}
+
+// src/api/factory.ts
+function createBackendApiClient(options) {
+ const request = buildRequest(options);
+ return {
+ allowlistIdentifiers: new AllowlistIdentifierAPI(request),
+ clients: new ClientAPI(request),
+ emailAddresses: new EmailAddressAPI(request),
+ invitations: new InvitationAPI(request),
+ organizations: new OrganizationAPI(request),
+ phoneNumbers: new PhoneNumberAPI(request),
+ redirectUrls: new RedirectUrlAPI(request),
+ sessions: new SessionAPI(request),
+ signInTokens: new SignInTokenAPI(request),
+ users: new UserAPI(request),
+ domains: new DomainAPI(request),
+ samlConnections: new SamlConnectionAPI(request),
+ testingTokens: new TestingTokenAPI(request)
+ };
+}
+
+// src/tokens/authObjects.ts
+import { createCheckAuthorization } from "@clerk/shared/authorization";
+var createDebug = (data) => {
+ return () => {
+ const res = { ...data };
+ res.secretKey = (res.secretKey || "").substring(0, 7);
+ res.jwtKey = (res.jwtKey || "").substring(0, 7);
+ return { ...res };
+ };
+};
+function signedInAuthObject(authenticateContext, sessionToken, sessionClaims) {
+ const {
+ act: actor,
+ sid: sessionId,
+ org_id: orgId,
+ org_role: orgRole,
+ org_slug: orgSlug,
+ org_permissions: orgPermissions,
+ sub: userId,
+ fva
+ } = sessionClaims;
+ const apiClient = createBackendApiClient(authenticateContext);
+ const getToken = createGetToken({
+ sessionId,
+ sessionToken,
+ fetcher: async (...args) => (await apiClient.sessions.getToken(...args)).jwt
+ });
+ const __experimental_factorVerificationAge = fva ?? null;
+ return {
+ actor,
+ sessionClaims,
+ sessionId,
+ userId,
+ orgId,
+ orgRole,
+ orgSlug,
+ orgPermissions,
+ __experimental_factorVerificationAge,
+ getToken,
+ has: createCheckAuthorization({ orgId, orgRole, orgPermissions, userId, __experimental_factorVerificationAge }),
+ debug: createDebug({ ...authenticateContext, sessionToken })
+ };
+}
+function signedOutAuthObject(debugData) {
+ return {
+ sessionClaims: null,
+ sessionId: null,
+ userId: null,
+ actor: null,
+ orgId: null,
+ orgRole: null,
+ orgSlug: null,
+ orgPermissions: null,
+ __experimental_factorVerificationAge: null,
+ getToken: () => Promise.resolve(null),
+ has: () => false,
+ debug: createDebug(debugData)
+ };
+}
+var makeAuthObjectSerializable = (obj) => {
+ const { debug, getToken, has, ...rest } = obj;
+ return rest;
+};
+var createGetToken = (params) => {
+ const { fetcher, sessionToken, sessionId } = params || {};
+ return async (options = {}) => {
+ if (!sessionId) {
+ return null;
+ }
+ if (options.template) {
+ return fetcher(sessionId, options.template);
+ }
+ return sessionToken;
+ };
+};
+
+// src/tokens/authStatus.ts
+var AuthStatus = {
+ SignedIn: "signed-in",
+ SignedOut: "signed-out",
+ Handshake: "handshake"
+};
+var AuthErrorReason = {
+ ClientUATWithoutSessionToken: "client-uat-but-no-session-token",
+ DevBrowserMissing: "dev-browser-missing",
+ DevBrowserSync: "dev-browser-sync",
+ PrimaryRespondsToSyncing: "primary-responds-to-syncing",
+ SatelliteCookieNeedsSyncing: "satellite-needs-syncing",
+ SessionTokenAndUATMissing: "session-token-and-uat-missing",
+ SessionTokenMissing: "session-token-missing",
+ SessionTokenExpired: "session-token-expired",
+ SessionTokenIATBeforeClientUAT: "session-token-iat-before-client-uat",
+ SessionTokenNBF: "session-token-nbf",
+ SessionTokenIatInTheFuture: "session-token-iat-in-the-future",
+ SessionTokenWithoutClientUAT: "session-token-but-no-client-uat",
+ ActiveOrganizationMismatch: "active-organization-mismatch",
+ UnexpectedError: "unexpected-error"
+};
+function signedIn(authenticateContext, sessionClaims, headers = new Headers(), token) {
+ const authObject = signedInAuthObject(authenticateContext, token, sessionClaims);
+ return {
+ status: AuthStatus.SignedIn,
+ reason: null,
+ message: null,
+ proxyUrl: authenticateContext.proxyUrl || "",
+ publishableKey: authenticateContext.publishableKey || "",
+ isSatellite: authenticateContext.isSatellite || false,
+ domain: authenticateContext.domain || "",
+ signInUrl: authenticateContext.signInUrl || "",
+ signUpUrl: authenticateContext.signUpUrl || "",
+ afterSignInUrl: authenticateContext.afterSignInUrl || "",
+ afterSignUpUrl: authenticateContext.afterSignUpUrl || "",
+ isSignedIn: true,
+ toAuth: () => authObject,
+ headers,
+ token
+ };
+}
+function signedOut(authenticateContext, reason, message = "", headers = new Headers()) {
+ return withDebugHeaders({
+ status: AuthStatus.SignedOut,
+ reason,
+ message,
+ proxyUrl: authenticateContext.proxyUrl || "",
+ publishableKey: authenticateContext.publishableKey || "",
+ isSatellite: authenticateContext.isSatellite || false,
+ domain: authenticateContext.domain || "",
+ signInUrl: authenticateContext.signInUrl || "",
+ signUpUrl: authenticateContext.signUpUrl || "",
+ afterSignInUrl: authenticateContext.afterSignInUrl || "",
+ afterSignUpUrl: authenticateContext.afterSignUpUrl || "",
+ isSignedIn: false,
+ headers,
+ toAuth: () => signedOutAuthObject({ ...authenticateContext, status: AuthStatus.SignedOut, reason, message }),
+ token: null
+ });
+}
+function handshake(authenticateContext, reason, message = "", headers) {
+ return withDebugHeaders({
+ status: AuthStatus.Handshake,
+ reason,
+ message,
+ publishableKey: authenticateContext.publishableKey || "",
+ isSatellite: authenticateContext.isSatellite || false,
+ domain: authenticateContext.domain || "",
+ proxyUrl: authenticateContext.proxyUrl || "",
+ signInUrl: authenticateContext.signInUrl || "",
+ signUpUrl: authenticateContext.signUpUrl || "",
+ afterSignInUrl: authenticateContext.afterSignInUrl || "",
+ afterSignUpUrl: authenticateContext.afterSignUpUrl || "",
+ isSignedIn: false,
+ headers,
+ toAuth: () => null,
+ token: null
+ });
+}
+var withDebugHeaders = (requestState) => {
+ const headers = new Headers(requestState.headers || {});
+ if (requestState.message) {
+ try {
+ headers.set(constants.Headers.AuthMessage, requestState.message);
+ } catch (e) {
+ }
+ }
+ if (requestState.reason) {
+ try {
+ headers.set(constants.Headers.AuthReason, requestState.reason);
+ } catch (e) {
+ }
+ }
+ if (requestState.status) {
+ try {
+ headers.set(constants.Headers.AuthStatus, requestState.status);
+ } catch (e) {
+ }
+ }
+ requestState.headers = headers;
+ return requestState;
+};
+
+// src/tokens/clerkRequest.ts
+import { parse as parseCookies } from "cookie";
+
+// src/tokens/clerkUrl.ts
+var ClerkUrl = class extends URL {
+ isCrossOrigin(other) {
+ return this.origin !== new URL(other.toString()).origin;
+ }
+};
+var createClerkUrl = (...args) => {
+ return new ClerkUrl(...args);
+};
+
+// src/tokens/clerkRequest.ts
+var ClerkRequest = class extends Request {
+ constructor(input, init) {
+ const url = typeof input !== "string" && "url" in input ? input.url : String(input);
+ super(url, init || typeof input === "string" ? void 0 : input);
+ this.clerkUrl = this.deriveUrlFromHeaders(this);
+ this.cookies = this.parseCookies(this);
+ }
+ toJSON() {
+ return {
+ url: this.clerkUrl.href,
+ method: this.method,
+ headers: JSON.stringify(Object.fromEntries(this.headers)),
+ clerkUrl: this.clerkUrl.toString(),
+ cookies: JSON.stringify(Object.fromEntries(this.cookies))
+ };
+ }
+ /**
+ * Used to fix request.url using the x-forwarded-* headers
+ * TODO add detailed description of the issues this solves
+ */
+ deriveUrlFromHeaders(req) {
+ const initialUrl = new URL(req.url);
+ const forwardedProto = req.headers.get(constants.Headers.ForwardedProto);
+ const forwardedHost = req.headers.get(constants.Headers.ForwardedHost);
+ const host = req.headers.get(constants.Headers.Host);
+ const protocol = initialUrl.protocol;
+ const resolvedHost = this.getFirstValueFromHeader(forwardedHost) ?? host;
+ const resolvedProtocol = this.getFirstValueFromHeader(forwardedProto) ?? protocol?.replace(/[:/]/, "");
+ const origin = resolvedHost && resolvedProtocol ? `${resolvedProtocol}://${resolvedHost}` : initialUrl.origin;
+ if (origin === initialUrl.origin) {
+ return createClerkUrl(initialUrl);
+ }
+ return createClerkUrl(initialUrl.pathname + initialUrl.search, origin);
+ }
+ getFirstValueFromHeader(value) {
+ return value?.split(",")[0];
+ }
+ parseCookies(req) {
+ const cookiesRecord = parseCookies(this.decodeCookieValue(req.headers.get("cookie") || ""));
+ return new Map(Object.entries(cookiesRecord));
+ }
+ decodeCookieValue(str) {
+ return str ? str.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent) : str;
+ }
+};
+var createClerkRequest = (...args) => {
+ return args[0] instanceof ClerkRequest ? args[0] : new ClerkRequest(...args);
+};
+
+// src/tokens/keys.ts
+var cache = {};
+var lastUpdatedAt = 0;
+function getFromCache(kid) {
+ return cache[kid];
+}
+function getCacheValues() {
+ return Object.values(cache);
+}
+function setInCache(jwk, shouldExpire = true) {
+ cache[jwk.kid] = jwk;
+ lastUpdatedAt = shouldExpire ? Date.now() : -1;
+}
+var LocalJwkKid = "local";
+var PEM_HEADER = "-----BEGIN PUBLIC KEY-----";
+var PEM_TRAILER = "-----END PUBLIC KEY-----";
+var RSA_PREFIX = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA";
+var RSA_SUFFIX = "IDAQAB";
+function loadClerkJWKFromLocal(localKey) {
+ if (!getFromCache(LocalJwkKid)) {
+ if (!localKey) {
+ throw new TokenVerificationError({
+ action: TokenVerificationErrorAction.SetClerkJWTKey,
+ message: "Missing local JWK.",
+ reason: TokenVerificationErrorReason.LocalJWKMissing
+ });
+ }
+ const modulus = localKey.replace(/(\r\n|\n|\r)/gm, "").replace(PEM_HEADER, "").replace(PEM_TRAILER, "").replace(RSA_PREFIX, "").replace(RSA_SUFFIX, "").replace(/\+/g, "-").replace(/\//g, "_");
+ setInCache(
+ {
+ kid: "local",
+ kty: "RSA",
+ alg: "RS256",
+ n: modulus,
+ e: "AQAB"
+ },
+ false
+ // local key never expires in cache
+ );
+ }
+ return getFromCache(LocalJwkKid);
+}
+async function loadClerkJWKFromRemote({
+ secretKey,
+ apiUrl = API_URL,
+ apiVersion = API_VERSION,
+ kid,
+ skipJwksCache
+}) {
+ if (skipJwksCache || cacheHasExpired() || !getFromCache(kid)) {
+ if (!secretKey) {
+ throw new TokenVerificationError({
+ action: TokenVerificationErrorAction.ContactSupport,
+ message: "Failed to load JWKS from Clerk Backend or Frontend API.",
+ reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad
+ });
+ }
+ const fetcher = () => fetchJWKSFromBAPI(apiUrl, secretKey, apiVersion);
+ const { keys } = await callWithRetry(fetcher);
+ if (!keys || !keys.length) {
+ throw new TokenVerificationError({
+ action: TokenVerificationErrorAction.ContactSupport,
+ message: "The JWKS endpoint did not contain any signing keys. Contact support@clerk.com.",
+ reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad
+ });
+ }
+ keys.forEach((key) => setInCache(key));
+ }
+ const jwk = getFromCache(kid);
+ if (!jwk) {
+ const cacheValues = getCacheValues();
+ const jwkKeys = cacheValues.map((jwk2) => jwk2.kid).sort().join(", ");
+ throw new TokenVerificationError({
+ action: `Go to your Dashboard and validate your secret and public keys are correct. ${TokenVerificationErrorAction.ContactSupport} if the issue persists.`,
+ message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT. The following kid is available: ${jwkKeys}`,
+ reason: TokenVerificationErrorReason.JWKKidMismatch
+ });
+ }
+ return jwk;
+}
+async function fetchJWKSFromBAPI(apiUrl, key, apiVersion) {
+ if (!key) {
+ throw new TokenVerificationError({
+ action: TokenVerificationErrorAction.SetClerkSecretKey,
+ message: "Missing Clerk Secret Key or API Key. Go to https://dashboard.clerk.com and get your key for your instance.",
+ reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad
+ });
+ }
+ const url = new URL(apiUrl);
+ url.pathname = joinPaths(url.pathname, apiVersion, "/jwks");
+ const response = await runtime_default.fetch(url.href, {
+ headers: {
+ Authorization: `Bearer ${key}`,
+ "Content-Type": "application/json"
+ }
+ });
+ if (!response.ok) {
+ const json = await response.json();
+ const invalidSecretKeyError = getErrorObjectByCode(json?.errors, TokenVerificationErrorCode.InvalidSecretKey);
+ if (invalidSecretKeyError) {
+ const reason = TokenVerificationErrorReason.InvalidSecretKey;
+ throw new TokenVerificationError({
+ action: TokenVerificationErrorAction.ContactSupport,
+ message: invalidSecretKeyError.message,
+ reason
+ });
+ }
+ throw new TokenVerificationError({
+ action: TokenVerificationErrorAction.ContactSupport,
+ message: `Error loading Clerk JWKS from ${url.href} with code=${response.status}`,
+ reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad
+ });
+ }
+ return response.json();
+}
+function cacheHasExpired() {
+ if (lastUpdatedAt === -1) {
+ return false;
+ }
+ const isExpired = Date.now() - lastUpdatedAt >= MAX_CACHE_LAST_UPDATED_AT_SECONDS * 1e3;
+ if (isExpired) {
+ cache = {};
+ }
+ return isExpired;
+}
+var getErrorObjectByCode = (errors, code) => {
+ if (!errors) {
+ return null;
+ }
+ return errors.find((err) => err.code === code);
+};
+
+// src/tokens/verify.ts
+async function verifyToken(token, options) {
+ const { data: decodedResult, errors } = decodeJwt(token);
+ if (errors) {
+ return { errors };
+ }
+ const { header } = decodedResult;
+ const { kid } = header;
+ try {
+ let key;
+ if (options.jwtKey) {
+ key = loadClerkJWKFromLocal(options.jwtKey);
+ } else if (options.secretKey) {
+ key = await loadClerkJWKFromRemote({ ...options, kid });
+ } else {
+ return {
+ errors: [
+ new TokenVerificationError({
+ action: TokenVerificationErrorAction.SetClerkJWTKey,
+ message: "Failed to resolve JWK during verification.",
+ reason: TokenVerificationErrorReason.JWKFailedToResolve
+ })
+ ]
+ };
+ }
+ return await verifyJwt(token, { ...options, key });
+ } catch (error) {
+ return { errors: [error] };
+ }
+}
+
+// src/tokens/request.ts
+import { match } from "@clerk/shared/pathToRegexp";
+
+// src/tokens/authenticateContext.ts
+var AuthenticateContext = class {
+ constructor(cookieSuffix, clerkRequest, options) {
+ this.cookieSuffix = cookieSuffix;
+ this.clerkRequest = clerkRequest;
+ this.initPublishableKeyValues(options);
+ this.initHeaderValues();
+ this.initCookieValues();
+ this.initHandshakeValues();
+ Object.assign(this, options);
+ this.clerkUrl = this.clerkRequest.clerkUrl;
+ }
+ get sessionToken() {
+ return this.sessionTokenInCookie || this.sessionTokenInHeader;
+ }
+ initPublishableKeyValues(options) {
+ assertValidPublishableKey(options.publishableKey);
+ this.publishableKey = options.publishableKey;
+ const pk = parsePublishableKey(this.publishableKey, {
+ fatal: true,
+ proxyUrl: options.proxyUrl,
+ domain: options.domain
+ });
+ this.instanceType = pk.instanceType;
+ this.frontendApi = pk.frontendApi;
+ }
+ initHeaderValues() {
+ this.sessionTokenInHeader = this.stripAuthorizationHeader(this.getHeader(constants.Headers.Authorization));
+ this.origin = this.getHeader(constants.Headers.Origin);
+ this.host = this.getHeader(constants.Headers.Host);
+ this.forwardedHost = this.getHeader(constants.Headers.ForwardedHost);
+ this.forwardedProto = this.getHeader(constants.Headers.CloudFrontForwardedProto) || this.getHeader(constants.Headers.ForwardedProto);
+ this.referrer = this.getHeader(constants.Headers.Referrer);
+ this.userAgent = this.getHeader(constants.Headers.UserAgent);
+ this.secFetchDest = this.getHeader(constants.Headers.SecFetchDest);
+ this.accept = this.getHeader(constants.Headers.Accept);
+ }
+ initCookieValues() {
+ this.suffixedCookies = this.shouldUseSuffixed();
+ this.sessionTokenInCookie = this.getSuffixedOrUnSuffixedCookie(constants.Cookies.Session);
+ this.refreshTokenInCookie = this.getSuffixedCookie(constants.Cookies.Refresh);
+ this.clientUat = Number.parseInt(this.getSuffixedOrUnSuffixedCookie(constants.Cookies.ClientUat) || "") || 0;
+ }
+ initHandshakeValues() {
+ this.devBrowserToken = this.getQueryParam(constants.QueryParameters.DevBrowser) || this.getSuffixedOrUnSuffixedCookie(constants.Cookies.DevBrowser);
+ this.handshakeToken = this.getQueryParam(constants.QueryParameters.Handshake) || this.getCookie(constants.Cookies.Handshake);
+ this.handshakeRedirectLoopCounter = Number(this.getCookie(constants.Cookies.RedirectCount)) || 0;
+ }
+ stripAuthorizationHeader(authValue) {
+ return authValue?.replace("Bearer ", "");
+ }
+ getQueryParam(name) {
+ return this.clerkRequest.clerkUrl.searchParams.get(name);
+ }
+ getHeader(name) {
+ return this.clerkRequest.headers.get(name) || void 0;
+ }
+ getCookie(name) {
+ return this.clerkRequest.cookies.get(name) || void 0;
+ }
+ getSuffixedCookie(name) {
+ return this.getCookie(getSuffixedCookieName(name, this.cookieSuffix)) || void 0;
+ }
+ getSuffixedOrUnSuffixedCookie(cookieName) {
+ if (this.suffixedCookies) {
+ return this.getSuffixedCookie(cookieName);
+ }
+ return this.getCookie(cookieName);
+ }
+ shouldUseSuffixed() {
+ const suffixedClientUat = this.getSuffixedCookie(constants.Cookies.ClientUat);
+ const clientUat = this.getCookie(constants.Cookies.ClientUat);
+ const suffixedSession = this.getSuffixedCookie(constants.Cookies.Session) || "";
+ const session = this.getCookie(constants.Cookies.Session) || "";
+ if (session && !this.tokenHasIssuer(session)) {
+ return false;
+ }
+ if (session && !this.tokenBelongsToInstance(session)) {
+ return true;
+ }
+ if (!suffixedClientUat && !suffixedSession) {
+ return false;
+ }
+ const { data: sessionData } = decodeJwt(session);
+ const sessionIat = sessionData?.payload.iat || 0;
+ const { data: suffixedSessionData } = decodeJwt(suffixedSession);
+ const suffixedSessionIat = suffixedSessionData?.payload.iat || 0;
+ if (suffixedClientUat !== "0" && clientUat !== "0" && sessionIat > suffixedSessionIat) {
+ return false;
+ }
+ if (suffixedClientUat === "0" && clientUat !== "0") {
+ return false;
+ }
+ if (this.instanceType !== "production") {
+ const isSuffixedSessionExpired = this.sessionExpired(suffixedSessionData);
+ if (suffixedClientUat !== "0" && clientUat === "0" && isSuffixedSessionExpired) {
+ return false;
+ }
+ }
+ if (!suffixedClientUat && suffixedSession) {
+ return false;
+ }
+ return true;
+ }
+ tokenHasIssuer(token) {
+ const { data, errors } = decodeJwt(token);
+ if (errors) {
+ return false;
+ }
+ return !!data.payload.iss;
+ }
+ tokenBelongsToInstance(token) {
+ if (!token) {
+ return false;
+ }
+ const { data, errors } = decodeJwt(token);
+ if (errors) {
+ return false;
+ }
+ const tokenIssuer = data.payload.iss.replace(/https?:\/\//gi, "");
+ return this.frontendApi === tokenIssuer;
+ }
+ sessionExpired(jwt) {
+ return !!jwt && jwt?.payload.exp <= Date.now() / 1e3 >> 0;
+ }
+};
+var createAuthenticateContext = async (clerkRequest, options) => {
+ const cookieSuffix = options.publishableKey ? await getCookieSuffix(options.publishableKey, runtime_default.crypto.subtle) : "";
+ return new AuthenticateContext(cookieSuffix, clerkRequest, options);
+};
+
+// src/tokens/cookie.ts
+var getCookieName = (cookieDirective) => {
+ return cookieDirective.split(";")[0]?.split("=")[0];
+};
+var getCookieValue = (cookieDirective) => {
+ return cookieDirective.split(";")[0]?.split("=")[1];
+};
+
+// src/tokens/handshake.ts
+async function verifyHandshakeJwt(token, { key }) {
+ const { data: decoded, errors } = decodeJwt(token);
+ if (errors) {
+ throw errors[0];
+ }
+ const { header, payload } = decoded;
+ const { typ, alg } = header;
+ assertHeaderType(typ);
+ assertHeaderAlgorithm(alg);
+ const { data: signatureValid, errors: signatureErrors } = await hasValidSignature(decoded, key);
+ if (signatureErrors) {
+ throw new TokenVerificationError({
+ reason: TokenVerificationErrorReason.TokenVerificationFailed,
+ message: `Error verifying handshake token. ${signatureErrors[0]}`
+ });
+ }
+ if (!signatureValid) {
+ throw new TokenVerificationError({
+ reason: TokenVerificationErrorReason.TokenInvalidSignature,
+ message: "Handshake signature is invalid."
+ });
+ }
+ return payload;
+}
+async function verifyHandshakeToken(token, options) {
+ const { secretKey, apiUrl, apiVersion, jwksCacheTtlInMs, jwtKey, skipJwksCache } = options;
+ const { data, errors } = decodeJwt(token);
+ if (errors) {
+ throw errors[0];
+ }
+ const { kid } = data.header;
+ let key;
+ if (jwtKey) {
+ key = loadClerkJWKFromLocal(jwtKey);
+ } else if (secretKey) {
+ key = await loadClerkJWKFromRemote({ secretKey, apiUrl, apiVersion, kid, jwksCacheTtlInMs, skipJwksCache });
+ } else {
+ throw new TokenVerificationError({
+ action: TokenVerificationErrorAction.SetClerkJWTKey,
+ message: "Failed to resolve JWK during handshake verification.",
+ reason: TokenVerificationErrorReason.JWKFailedToResolve
+ });
+ }
+ return await verifyHandshakeJwt(token, {
+ key
+ });
+}
+
+// src/tokens/request.ts
+var RefreshTokenErrorReason = {
+ NonEligibleNoCookie: "non-eligible-no-refresh-cookie",
+ NonEligibleNonGet: "non-eligible-non-get",
+ InvalidSessionToken: "invalid-session-token",
+ MissingApiClient: "missing-api-client",
+ MissingSessionToken: "missing-session-token",
+ MissingRefreshToken: "missing-refresh-token",
+ ExpiredSessionTokenDecodeFailed: "expired-session-token-decode-failed",
+ ExpiredSessionTokenMissingSidClaim: "expired-session-token-missing-sid-claim",
+ FetchError: "fetch-error",
+ UnexpectedSDKError: "unexpected-sdk-error"
+};
+function assertSignInUrlExists(signInUrl, key) {
+ if (!signInUrl && isDevelopmentFromSecretKey(key)) {
+ throw new Error(`Missing signInUrl. Pass a signInUrl for dev instances if an app is satellite`);
+ }
+}
+function assertProxyUrlOrDomain(proxyUrlOrDomain) {
+ if (!proxyUrlOrDomain) {
+ throw new Error(`Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl`);
+ }
+}
+function assertSignInUrlFormatAndOrigin(_signInUrl, origin) {
+ let signInUrl;
+ try {
+ signInUrl = new URL(_signInUrl);
+ } catch {
+ throw new Error(`The signInUrl needs to have a absolute url format.`);
+ }
+ if (signInUrl.origin === origin) {
+ throw new Error(`The signInUrl needs to be on a different origin than your satellite application.`);
+ }
+}
+function isRequestEligibleForHandshake(authenticateContext) {
+ const { accept, secFetchDest } = authenticateContext;
+ if (secFetchDest === "document" || secFetchDest === "iframe") {
+ return true;
+ }
+ if (!secFetchDest && accept?.startsWith("text/html")) {
+ return true;
+ }
+ return false;
+}
+function isRequestEligibleForRefresh(err, authenticateContext, request) {
+ return err.reason === TokenVerificationErrorReason.TokenExpired && !!authenticateContext.refreshTokenInCookie && request.method === "GET";
+}
+async function authenticateRequest(request, options) {
+ const authenticateContext = await createAuthenticateContext(createClerkRequest(request), options);
+ assertValidSecretKey(authenticateContext.secretKey);
+ if (authenticateContext.isSatellite) {
+ assertSignInUrlExists(authenticateContext.signInUrl, authenticateContext.secretKey);
+ if (authenticateContext.signInUrl && authenticateContext.origin) {
+ assertSignInUrlFormatAndOrigin(authenticateContext.signInUrl, authenticateContext.origin);
+ }
+ assertProxyUrlOrDomain(authenticateContext.proxyUrl || authenticateContext.domain);
+ }
+ const organizationSyncTargetMatchers = computeOrganizationSyncTargetMatchers(options.organizationSyncOptions);
+ function removeDevBrowserFromURL(url) {
+ const updatedURL = new URL(url);
+ updatedURL.searchParams.delete(constants.QueryParameters.DevBrowser);
+ updatedURL.searchParams.delete(constants.QueryParameters.LegacyDevBrowser);
+ return updatedURL;
+ }
+ function buildRedirectToHandshake({ handshakeReason }) {
+ const redirectUrl = removeDevBrowserFromURL(authenticateContext.clerkUrl);
+ const frontendApiNoProtocol = authenticateContext.frontendApi.replace(/http(s)?:\/\//, "");
+ const url = new URL(`https://${frontendApiNoProtocol}/v1/client/handshake`);
+ url.searchParams.append("redirect_url", redirectUrl?.href || "");
+ url.searchParams.append("suffixed_cookies", authenticateContext.suffixedCookies.toString());
+ url.searchParams.append(constants.QueryParameters.HandshakeReason, handshakeReason);
+ if (authenticateContext.instanceType === "development" && authenticateContext.devBrowserToken) {
+ url.searchParams.append(constants.QueryParameters.DevBrowser, authenticateContext.devBrowserToken);
+ }
+ const toActivate = getOrganizationSyncTarget(
+ authenticateContext.clerkUrl,
+ options.organizationSyncOptions,
+ organizationSyncTargetMatchers
+ );
+ if (toActivate) {
+ const params = getOrganizationSyncQueryParams(toActivate);
+ params.forEach((value, key) => {
+ url.searchParams.append(key, value);
+ });
+ }
+ return new Headers({ [constants.Headers.Location]: url.href });
+ }
+ async function resolveHandshake() {
+ const headers = new Headers({
+ "Access-Control-Allow-Origin": "null",
+ "Access-Control-Allow-Credentials": "true"
+ });
+ const handshakePayload = await verifyHandshakeToken(authenticateContext.handshakeToken, authenticateContext);
+ const cookiesToSet = handshakePayload.handshake;
+ let sessionToken = "";
+ cookiesToSet.forEach((x) => {
+ headers.append("Set-Cookie", x);
+ if (getCookieName(x).startsWith(constants.Cookies.Session)) {
+ sessionToken = getCookieValue(x);
+ }
+ });
+ if (authenticateContext.instanceType === "development") {
+ const newUrl = new URL(authenticateContext.clerkUrl);
+ newUrl.searchParams.delete(constants.QueryParameters.Handshake);
+ newUrl.searchParams.delete(constants.QueryParameters.HandshakeHelp);
+ headers.append(constants.Headers.Location, newUrl.toString());
+ headers.set(constants.Headers.CacheControl, "no-store");
+ }
+ if (sessionToken === "") {
+ return signedOut(authenticateContext, AuthErrorReason.SessionTokenMissing, "", headers);
+ }
+ const { data, errors: [error] = [] } = await verifyToken(sessionToken, authenticateContext);
+ if (data) {
+ return signedIn(authenticateContext, data, headers, sessionToken);
+ }
+ if (authenticateContext.instanceType === "development" && (error?.reason === TokenVerificationErrorReason.TokenExpired || error?.reason === TokenVerificationErrorReason.TokenNotActiveYet || error?.reason === TokenVerificationErrorReason.TokenIatInTheFuture)) {
+ error.tokenCarrier = "cookie";
+ console.error(
+ `Clerk: Clock skew detected. This usually means that your system clock is inaccurate. Clerk will attempt to account for the clock skew in development.
+
+To resolve this issue, make sure your system's clock is set to the correct time (e.g. turn off and on automatic time synchronization).
+
+---
+
+${error.getFullMessage()}`
+ );
+ const { data: retryResult, errors: [retryError] = [] } = await verifyToken(sessionToken, {
+ ...authenticateContext,
+ clockSkewInMs: 864e5
+ });
+ if (retryResult) {
+ return signedIn(authenticateContext, retryResult, headers, sessionToken);
+ }
+ throw retryError;
+ }
+ throw error;
+ }
+ async function refreshToken(authenticateContext2) {
+ if (!options.apiClient) {
+ return {
+ data: null,
+ error: {
+ message: "An apiClient is needed to perform token refresh.",
+ cause: { reason: RefreshTokenErrorReason.MissingApiClient }
+ }
+ };
+ }
+ const { sessionToken: expiredSessionToken, refreshTokenInCookie: refreshToken2 } = authenticateContext2;
+ if (!expiredSessionToken) {
+ return {
+ data: null,
+ error: {
+ message: "Session token must be provided.",
+ cause: { reason: RefreshTokenErrorReason.MissingSessionToken }
+ }
+ };
+ }
+ if (!refreshToken2) {
+ return {
+ data: null,
+ error: {
+ message: "Refresh token must be provided.",
+ cause: { reason: RefreshTokenErrorReason.MissingRefreshToken }
+ }
+ };
+ }
+ const { data: decodeResult, errors: decodedErrors } = decodeJwt(expiredSessionToken);
+ if (!decodeResult || decodedErrors) {
+ return {
+ data: null,
+ error: {
+ message: "Unable to decode the expired session token.",
+ cause: { reason: RefreshTokenErrorReason.ExpiredSessionTokenDecodeFailed, errors: decodedErrors }
+ }
+ };
+ }
+ if (!decodeResult?.payload?.sid) {
+ return {
+ data: null,
+ error: {
+ message: "Expired session token is missing the `sid` claim.",
+ cause: { reason: RefreshTokenErrorReason.ExpiredSessionTokenMissingSidClaim }
+ }
+ };
+ }
+ try {
+ const tokenResponse = await options.apiClient.sessions.refreshSession(decodeResult.payload.sid, {
+ expired_token: expiredSessionToken || "",
+ refresh_token: refreshToken2 || "",
+ request_origin: authenticateContext2.clerkUrl.origin,
+ // The refresh endpoint expects headers as Record, so we need to transform it.
+ request_headers: Object.fromEntries(Array.from(request.headers.entries()).map(([k, v]) => [k, [v]]))
+ });
+ return { data: tokenResponse.jwt, error: null };
+ } catch (err) {
+ if (err?.errors?.length) {
+ if (err.errors[0].code === "unexpected_error") {
+ return {
+ data: null,
+ error: {
+ message: `Fetch unexpected error`,
+ cause: { reason: RefreshTokenErrorReason.FetchError, errors: err.errors }
+ }
+ };
+ }
+ return {
+ data: null,
+ error: {
+ message: err.errors[0].code,
+ cause: { reason: err.errors[0].code, errors: err.errors }
+ }
+ };
+ } else {
+ return {
+ data: null,
+ error: err
+ };
+ }
+ }
+ }
+ async function attemptRefresh(authenticateContext2) {
+ const { data: sessionToken, error } = await refreshToken(authenticateContext2);
+ if (!sessionToken) {
+ return { data: null, error };
+ }
+ const { data: jwtPayload, errors } = await verifyToken(sessionToken, authenticateContext2);
+ if (errors) {
+ return {
+ data: null,
+ error: {
+ message: `Clerk: unable to verify refreshed session token.`,
+ cause: { reason: RefreshTokenErrorReason.InvalidSessionToken, errors }
+ }
+ };
+ }
+ return { data: { jwtPayload, sessionToken }, error: null };
+ }
+ function handleMaybeHandshakeStatus(authenticateContext2, reason, message, headers) {
+ if (isRequestEligibleForHandshake(authenticateContext2)) {
+ const handshakeHeaders = headers ?? buildRedirectToHandshake({ handshakeReason: reason });
+ if (handshakeHeaders.get(constants.Headers.Location)) {
+ handshakeHeaders.set(constants.Headers.CacheControl, "no-store");
+ }
+ const isRedirectLoop = setHandshakeInfiniteRedirectionLoopHeaders(handshakeHeaders);
+ if (isRedirectLoop) {
+ const msg = `Clerk: Refreshing the session token resulted in an infinite redirect loop. This usually means that your Clerk instance keys do not match - make sure to copy the correct publishable and secret keys from the Clerk dashboard.`;
+ console.log(msg);
+ return signedOut(authenticateContext2, reason, message);
+ }
+ return handshake(authenticateContext2, reason, message, handshakeHeaders);
+ }
+ return signedOut(authenticateContext2, reason, message);
+ }
+ function handleMaybeOrganizationSyncHandshake(authenticateContext2, auth) {
+ const organizationSyncTarget = getOrganizationSyncTarget(
+ authenticateContext2.clerkUrl,
+ options.organizationSyncOptions,
+ organizationSyncTargetMatchers
+ );
+ if (!organizationSyncTarget) {
+ return null;
+ }
+ let mustActivate = false;
+ if (organizationSyncTarget.type === "organization") {
+ if (organizationSyncTarget.organizationSlug && organizationSyncTarget.organizationSlug !== auth.orgSlug) {
+ mustActivate = true;
+ }
+ if (organizationSyncTarget.organizationId && organizationSyncTarget.organizationId !== auth.orgId) {
+ mustActivate = true;
+ }
+ }
+ if (organizationSyncTarget.type === "personalAccount" && auth.orgId) {
+ mustActivate = true;
+ }
+ if (!mustActivate) {
+ return null;
+ }
+ if (authenticateContext2.handshakeRedirectLoopCounter > 0) {
+ console.warn(
+ "Clerk: Organization activation handshake loop detected. This is likely due to an invalid organization ID or slug. Skipping organization activation."
+ );
+ return null;
+ }
+ const handshakeState = handleMaybeHandshakeStatus(
+ authenticateContext2,
+ AuthErrorReason.ActiveOrganizationMismatch,
+ ""
+ );
+ if (handshakeState.status !== "handshake") {
+ return null;
+ }
+ return handshakeState;
+ }
+ async function authenticateRequestWithTokenInHeader() {
+ const { sessionTokenInHeader } = authenticateContext;
+ try {
+ const { data, errors } = await verifyToken(sessionTokenInHeader, authenticateContext);
+ if (errors) {
+ throw errors[0];
+ }
+ return signedIn(authenticateContext, data, void 0, sessionTokenInHeader);
+ } catch (err) {
+ return handleError(err, "header");
+ }
+ }
+ function setHandshakeInfiniteRedirectionLoopHeaders(headers) {
+ if (authenticateContext.handshakeRedirectLoopCounter === 3) {
+ return true;
+ }
+ const newCounterValue = authenticateContext.handshakeRedirectLoopCounter + 1;
+ const cookieName = constants.Cookies.RedirectCount;
+ headers.append("Set-Cookie", `${cookieName}=${newCounterValue}; SameSite=Lax; HttpOnly; Max-Age=3`);
+ return false;
+ }
+ function handleHandshakeTokenVerificationErrorInDevelopment(error) {
+ if (error.reason === TokenVerificationErrorReason.TokenInvalidSignature) {
+ const msg = `Clerk: Handshake token verification failed due to an invalid signature. If you have switched Clerk keys locally, clear your cookies and try again.`;
+ throw new Error(msg);
+ }
+ throw new Error(`Clerk: Handshake token verification failed: ${error.getFullMessage()}.`);
+ }
+ async function authenticateRequestWithTokenInCookie() {
+ const hasActiveClient = authenticateContext.clientUat;
+ const hasSessionToken = !!authenticateContext.sessionTokenInCookie;
+ const hasDevBrowserToken = !!authenticateContext.devBrowserToken;
+ const isRequestEligibleForMultiDomainSync = authenticateContext.isSatellite && authenticateContext.secFetchDest === "document" && !authenticateContext.clerkUrl.searchParams.has(constants.QueryParameters.ClerkSynced);
+ if (authenticateContext.handshakeToken) {
+ try {
+ return await resolveHandshake();
+ } catch (error) {
+ if (error instanceof TokenVerificationError && authenticateContext.instanceType === "development") {
+ handleHandshakeTokenVerificationErrorInDevelopment(error);
+ } else {
+ console.error("Clerk: unable to resolve handshake:", error);
+ }
+ }
+ }
+ if (authenticateContext.instanceType === "development" && authenticateContext.clerkUrl.searchParams.has(constants.QueryParameters.DevBrowser)) {
+ return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.DevBrowserSync, "");
+ }
+ if (authenticateContext.instanceType === "production" && isRequestEligibleForMultiDomainSync) {
+ return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.SatelliteCookieNeedsSyncing, "");
+ }
+ if (authenticateContext.instanceType === "development" && isRequestEligibleForMultiDomainSync) {
+ const redirectURL = new URL(authenticateContext.signInUrl);
+ redirectURL.searchParams.append(
+ constants.QueryParameters.ClerkRedirectUrl,
+ authenticateContext.clerkUrl.toString()
+ );
+ const authErrReason = AuthErrorReason.SatelliteCookieNeedsSyncing;
+ redirectURL.searchParams.append(constants.QueryParameters.HandshakeReason, authErrReason);
+ const headers = new Headers({ [constants.Headers.Location]: redirectURL.toString() });
+ return handleMaybeHandshakeStatus(authenticateContext, authErrReason, "", headers);
+ }
+ const redirectUrl = new URL(authenticateContext.clerkUrl).searchParams.get(
+ constants.QueryParameters.ClerkRedirectUrl
+ );
+ if (authenticateContext.instanceType === "development" && !authenticateContext.isSatellite && redirectUrl) {
+ const redirectBackToSatelliteUrl = new URL(redirectUrl);
+ if (authenticateContext.devBrowserToken) {
+ redirectBackToSatelliteUrl.searchParams.append(
+ constants.QueryParameters.DevBrowser,
+ authenticateContext.devBrowserToken
+ );
+ }
+ redirectBackToSatelliteUrl.searchParams.append(constants.QueryParameters.ClerkSynced, "true");
+ const authErrReason = AuthErrorReason.PrimaryRespondsToSyncing;
+ redirectBackToSatelliteUrl.searchParams.append(constants.QueryParameters.HandshakeReason, authErrReason);
+ const headers = new Headers({ [constants.Headers.Location]: redirectBackToSatelliteUrl.toString() });
+ return handleMaybeHandshakeStatus(authenticateContext, authErrReason, "", headers);
+ }
+ if (authenticateContext.instanceType === "development" && !hasDevBrowserToken) {
+ return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.DevBrowserMissing, "");
+ }
+ if (!hasActiveClient && !hasSessionToken) {
+ return signedOut(authenticateContext, AuthErrorReason.SessionTokenAndUATMissing, "");
+ }
+ if (!hasActiveClient && hasSessionToken) {
+ return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.SessionTokenWithoutClientUAT, "");
+ }
+ if (hasActiveClient && !hasSessionToken) {
+ return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.ClientUATWithoutSessionToken, "");
+ }
+ const { data: decodeResult, errors: decodedErrors } = decodeJwt(authenticateContext.sessionTokenInCookie);
+ if (decodedErrors) {
+ return handleError(decodedErrors[0], "cookie");
+ }
+ if (decodeResult.payload.iat < authenticateContext.clientUat) {
+ return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.SessionTokenIATBeforeClientUAT, "");
+ }
+ try {
+ const { data, errors } = await verifyToken(authenticateContext.sessionTokenInCookie, authenticateContext);
+ if (errors) {
+ throw errors[0];
+ }
+ const signedInRequestState = signedIn(
+ authenticateContext,
+ data,
+ void 0,
+ authenticateContext.sessionTokenInCookie
+ );
+ const handshakeRequestState = handleMaybeOrganizationSyncHandshake(
+ authenticateContext,
+ signedInRequestState.toAuth()
+ );
+ if (handshakeRequestState) {
+ return handshakeRequestState;
+ }
+ return signedInRequestState;
+ } catch (err) {
+ return handleError(err, "cookie");
+ }
+ return signedOut(authenticateContext, AuthErrorReason.UnexpectedError);
+ }
+ async function handleError(err, tokenCarrier) {
+ if (!(err instanceof TokenVerificationError)) {
+ return signedOut(authenticateContext, AuthErrorReason.UnexpectedError);
+ }
+ let refreshError;
+ if (isRequestEligibleForRefresh(err, authenticateContext, request)) {
+ const { data, error } = await attemptRefresh(authenticateContext);
+ if (data) {
+ return signedIn(authenticateContext, data.jwtPayload, void 0, data.sessionToken);
+ }
+ if (error?.cause?.reason) {
+ refreshError = error.cause.reason;
+ } else {
+ refreshError = RefreshTokenErrorReason.UnexpectedSDKError;
+ }
+ } else {
+ if (request.method !== "GET") {
+ refreshError = RefreshTokenErrorReason.NonEligibleNonGet;
+ } else if (!authenticateContext.refreshTokenInCookie) {
+ refreshError = RefreshTokenErrorReason.NonEligibleNoCookie;
+ } else {
+ refreshError = null;
+ }
+ }
+ err.tokenCarrier = tokenCarrier;
+ const reasonToHandshake = [
+ TokenVerificationErrorReason.TokenExpired,
+ TokenVerificationErrorReason.TokenNotActiveYet,
+ TokenVerificationErrorReason.TokenIatInTheFuture
+ ].includes(err.reason);
+ if (reasonToHandshake) {
+ return handleMaybeHandshakeStatus(
+ authenticateContext,
+ convertTokenVerificationErrorReasonToAuthErrorReason({ tokenError: err.reason, refreshError }),
+ err.getFullMessage()
+ );
+ }
+ return signedOut(authenticateContext, err.reason, err.getFullMessage());
+ }
+ if (authenticateContext.sessionTokenInHeader) {
+ return authenticateRequestWithTokenInHeader();
+ }
+ return authenticateRequestWithTokenInCookie();
+}
+var debugRequestState = (params) => {
+ const { isSignedIn, proxyUrl, reason, message, publishableKey, isSatellite, domain } = params;
+ return { isSignedIn, proxyUrl, reason, message, publishableKey, isSatellite, domain };
+};
+function computeOrganizationSyncTargetMatchers(options) {
+ let personalAccountMatcher = null;
+ if (options?.personalAccountPatterns) {
+ try {
+ personalAccountMatcher = match(options.personalAccountPatterns);
+ } catch (e) {
+ throw new Error(`Invalid personal account pattern "${options.personalAccountPatterns}": "${e}"`);
+ }
+ }
+ let organizationMatcher = null;
+ if (options?.organizationPatterns) {
+ try {
+ organizationMatcher = match(options.organizationPatterns);
+ } catch (e) {
+ throw new Error(`Clerk: Invalid organization pattern "${options.organizationPatterns}": "${e}"`);
+ }
+ }
+ return {
+ OrganizationMatcher: organizationMatcher,
+ PersonalAccountMatcher: personalAccountMatcher
+ };
+}
+function getOrganizationSyncTarget(url, options, matchers) {
+ if (!options) {
+ return null;
+ }
+ if (matchers.OrganizationMatcher) {
+ let orgResult;
+ try {
+ orgResult = matchers.OrganizationMatcher(url.pathname);
+ } catch (e) {
+ console.error(`Clerk: Failed to apply organization pattern "${options.organizationPatterns}" to a path`, e);
+ return null;
+ }
+ if (orgResult && "params" in orgResult) {
+ const params = orgResult.params;
+ if ("id" in params && typeof params.id === "string") {
+ return { type: "organization", organizationId: params.id };
+ }
+ if ("slug" in params && typeof params.slug === "string") {
+ return { type: "organization", organizationSlug: params.slug };
+ }
+ console.warn(
+ "Clerk: Detected an organization pattern match, but no organization ID or slug was found in the URL. Does the pattern include `:id` or `:slug`?"
+ );
+ }
+ }
+ if (matchers.PersonalAccountMatcher) {
+ let personalResult;
+ try {
+ personalResult = matchers.PersonalAccountMatcher(url.pathname);
+ } catch (e) {
+ console.error(`Failed to apply personal account pattern "${options.personalAccountPatterns}" to a path`, e);
+ return null;
+ }
+ if (personalResult) {
+ return { type: "personalAccount" };
+ }
+ }
+ return null;
+}
+function getOrganizationSyncQueryParams(toActivate) {
+ const ret = /* @__PURE__ */ new Map();
+ if (toActivate.type === "personalAccount") {
+ ret.set("organization_id", "");
+ }
+ if (toActivate.type === "organization") {
+ if (toActivate.organizationId) {
+ ret.set("organization_id", toActivate.organizationId);
+ }
+ if (toActivate.organizationSlug) {
+ ret.set("organization_id", toActivate.organizationSlug);
+ }
+ }
+ return ret;
+}
+var convertTokenVerificationErrorReasonToAuthErrorReason = ({
+ tokenError,
+ refreshError
+}) => {
+ switch (tokenError) {
+ case TokenVerificationErrorReason.TokenExpired:
+ return `${AuthErrorReason.SessionTokenExpired}-refresh-${refreshError}`;
+ case TokenVerificationErrorReason.TokenNotActiveYet:
+ return AuthErrorReason.SessionTokenNBF;
+ case TokenVerificationErrorReason.TokenIatInTheFuture:
+ return AuthErrorReason.SessionTokenIatInTheFuture;
+ default:
+ return AuthErrorReason.UnexpectedError;
+ }
+};
+
+// src/util/mergePreDefinedOptions.ts
+function mergePreDefinedOptions(preDefinedOptions, options) {
+ return Object.keys(preDefinedOptions).reduce(
+ (obj, key) => {
+ return { ...obj, [key]: options[key] || obj[key] };
+ },
+ { ...preDefinedOptions }
+ );
+}
+
+// src/tokens/factory.ts
+var defaultOptions = {
+ secretKey: "",
+ jwtKey: "",
+ apiUrl: void 0,
+ apiVersion: void 0,
+ proxyUrl: "",
+ publishableKey: "",
+ isSatellite: false,
+ domain: "",
+ audience: ""
+};
+function createAuthenticateRequest(params) {
+ const buildTimeOptions = mergePreDefinedOptions(defaultOptions, params.options);
+ const apiClient = params.apiClient;
+ const authenticateRequest2 = (request, options = {}) => {
+ const { apiUrl, apiVersion } = buildTimeOptions;
+ const runTimeOptions = mergePreDefinedOptions(buildTimeOptions, options);
+ return authenticateRequest(request, {
+ ...options,
+ ...runTimeOptions,
+ // We should add all the omitted props from options here (eg apiUrl / apiVersion)
+ // to avoid runtime options override them.
+ apiUrl,
+ apiVersion,
+ apiClient
+ });
+ };
+ return {
+ authenticateRequest: authenticateRequest2,
+ debugRequestState
+ };
+}
+
+export {
+ constants,
+ errorThrower,
+ parsePublishableKey,
+ createBackendApiClient,
+ signedInAuthObject,
+ signedOutAuthObject,
+ makeAuthObjectSerializable,
+ AuthStatus,
+ createClerkRequest,
+ verifyToken,
+ debugRequestState,
+ createAuthenticateRequest
+};
+//# sourceMappingURL=chunk-HGGLOBDA.mjs.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/chunk-HGGLOBDA.mjs.map b/backend/node_modules/@clerk/backend/dist/chunk-HGGLOBDA.mjs.map
new file mode 100644
index 00000000..c04cec75
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/chunk-HGGLOBDA.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/constants.ts","../src/api/endpoints/AbstractApi.ts","../src/util/path.ts","../src/api/endpoints/AllowlistIdentifierApi.ts","../src/api/endpoints/ClientApi.ts","../src/api/endpoints/DomainApi.ts","../src/api/endpoints/EmailAddressApi.ts","../src/api/endpoints/InvitationApi.ts","../src/api/endpoints/OrganizationApi.ts","../src/api/endpoints/PhoneNumberApi.ts","../src/api/endpoints/RedirectUrlApi.ts","../src/api/endpoints/SessionApi.ts","../src/api/endpoints/SignInTokenApi.ts","../src/api/endpoints/UserApi.ts","../src/api/endpoints/SamlConnectionApi.ts","../src/api/endpoints/TestingTokenApi.ts","../src/api/request.ts","../src/util/shared.ts","../src/util/optionsAssertions.ts","../src/api/resources/AllowlistIdentifier.ts","../src/api/resources/Session.ts","../src/api/resources/Client.ts","../src/api/resources/DeletedObject.ts","../src/api/resources/Email.ts","../src/api/resources/IdentificationLink.ts","../src/api/resources/Verification.ts","../src/api/resources/EmailAddress.ts","../src/api/resources/ExternalAccount.ts","../src/api/resources/Invitation.ts","../src/api/resources/JSON.ts","../src/api/resources/OauthAccessToken.ts","../src/api/resources/Organization.ts","../src/api/resources/OrganizationInvitation.ts","../src/api/resources/OrganizationMembership.ts","../src/api/resources/PhoneNumber.ts","../src/api/resources/RedirectUrl.ts","../src/api/resources/SignInTokens.ts","../src/api/resources/SMSMessage.ts","../src/api/resources/Token.ts","../src/api/resources/SamlConnection.ts","../src/api/resources/SamlAccount.ts","../src/api/resources/Web3Wallet.ts","../src/api/resources/User.ts","../src/api/resources/Deserializer.ts","../src/api/factory.ts","../src/tokens/authObjects.ts","../src/tokens/authStatus.ts","../src/tokens/clerkRequest.ts","../src/tokens/clerkUrl.ts","../src/tokens/keys.ts","../src/tokens/verify.ts","../src/tokens/request.ts","../src/tokens/authenticateContext.ts","../src/tokens/cookie.ts","../src/tokens/handshake.ts","../src/util/mergePreDefinedOptions.ts","../src/tokens/factory.ts"],"sourcesContent":["export const API_URL = 'https://api.clerk.com';\nexport const API_VERSION = 'v1';\n\nexport const USER_AGENT = `${PACKAGE_NAME}@${PACKAGE_VERSION}`;\nexport const MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;\nexport const JWKS_CACHE_TTL_MS = 1000 * 60 * 60;\n\nconst Attributes = {\n AuthToken: '__clerkAuthToken',\n AuthSignature: '__clerkAuthSignature',\n AuthStatus: '__clerkAuthStatus',\n AuthReason: '__clerkAuthReason',\n AuthMessage: '__clerkAuthMessage',\n ClerkUrl: '__clerkUrl',\n} as const;\n\nconst Cookies = {\n Session: '__session',\n Refresh: '__refresh',\n ClientUat: '__client_uat',\n Handshake: '__clerk_handshake',\n DevBrowser: '__clerk_db_jwt',\n RedirectCount: '__clerk_redirect_count',\n} as const;\n\nconst QueryParameters = {\n ClerkSynced: '__clerk_synced',\n ClerkRedirectUrl: '__clerk_redirect_url',\n // use the reference to Cookies to indicate that it's the same value\n DevBrowser: Cookies.DevBrowser,\n Handshake: Cookies.Handshake,\n HandshakeHelp: '__clerk_help',\n LegacyDevBrowser: '__dev_session',\n HandshakeReason: '__clerk_hs_reason',\n} as const;\n\nconst Headers = {\n AuthToken: 'x-clerk-auth-token',\n AuthSignature: 'x-clerk-auth-signature',\n AuthStatus: 'x-clerk-auth-status',\n AuthReason: 'x-clerk-auth-reason',\n AuthMessage: 'x-clerk-auth-message',\n ClerkUrl: 'x-clerk-clerk-url',\n EnableDebug: 'x-clerk-debug',\n ClerkRequestData: 'x-clerk-request-data',\n ClerkRedirectTo: 'x-clerk-redirect-to',\n CloudFrontForwardedProto: 'cloudfront-forwarded-proto',\n Authorization: 'authorization',\n ForwardedPort: 'x-forwarded-port',\n ForwardedProto: 'x-forwarded-proto',\n ForwardedHost: 'x-forwarded-host',\n Accept: 'accept',\n Referrer: 'referer',\n UserAgent: 'user-agent',\n Origin: 'origin',\n Host: 'host',\n ContentType: 'content-type',\n SecFetchDest: 'sec-fetch-dest',\n Location: 'location',\n CacheControl: 'cache-control',\n} as const;\n\nconst ContentTypes = {\n Json: 'application/json',\n} as const;\n\n/**\n * @internal\n */\nexport const constants = {\n Attributes,\n Cookies,\n Headers,\n ContentTypes,\n QueryParameters,\n} as const;\n\nexport type Constants = typeof constants;\n","import type { RequestFunction } from '../request';\n\nexport abstract class AbstractAPI {\n constructor(protected request: RequestFunction) {}\n\n protected requireId(id: string) {\n if (!id) {\n throw new Error('A valid resource ID is required.');\n }\n }\n}\n","const SEPARATOR = '/';\nconst MULTIPLE_SEPARATOR_REGEX = new RegExp('(? p)\n .join(SEPARATOR)\n .replace(MULTIPLE_SEPARATOR_REGEX, SEPARATOR);\n}\n","import { joinPaths } from '../../util/path';\nimport type { AllowlistIdentifier } from '../resources/AllowlistIdentifier';\nimport type { PaginatedResourceResponse } from '../resources/Deserializer';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/allowlist_identifiers';\n\ntype AllowlistIdentifierCreateParams = {\n identifier: string;\n notify: boolean;\n};\n\nexport class AllowlistIdentifierAPI extends AbstractAPI {\n public async getAllowlistIdentifierList() {\n return this.request>({\n method: 'GET',\n path: basePath,\n queryParams: { paginated: true },\n });\n }\n\n public async createAllowlistIdentifier(params: AllowlistIdentifierCreateParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async deleteAllowlistIdentifier(allowlistIdentifierId: string) {\n this.requireId(allowlistIdentifierId);\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, allowlistIdentifierId),\n });\n }\n}\n","import type { ClerkPaginationRequest } from '@clerk/types';\n\nimport { joinPaths } from '../../util/path';\nimport type { Client } from '../resources/Client';\nimport type { PaginatedResourceResponse } from '../resources/Deserializer';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/clients';\n\nexport class ClientAPI extends AbstractAPI {\n public async getClientList(params: ClerkPaginationRequest = {}) {\n return this.request>({\n method: 'GET',\n path: basePath,\n queryParams: { ...params, paginated: true },\n });\n }\n\n public async getClient(clientId: string) {\n this.requireId(clientId);\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, clientId),\n });\n }\n\n public verifyClient(token: string) {\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, 'verify'),\n bodyParams: { token },\n });\n }\n}\n","import { joinPaths } from '../../util/path';\nimport type { DeletedObject } from '../resources/DeletedObject';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/domains';\n\nexport class DomainAPI extends AbstractAPI {\n public async deleteDomain(id: string) {\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, id),\n });\n }\n}\n","import { joinPaths } from '../../util/path';\nimport type { DeletedObject, EmailAddress } from '../resources';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/email_addresses';\n\ntype CreateEmailAddressParams = {\n userId: string;\n emailAddress: string;\n verified?: boolean;\n primary?: boolean;\n};\n\ntype UpdateEmailAddressParams = {\n verified?: boolean;\n primary?: boolean;\n};\n\nexport class EmailAddressAPI extends AbstractAPI {\n public async getEmailAddress(emailAddressId: string) {\n this.requireId(emailAddressId);\n\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, emailAddressId),\n });\n }\n\n public async createEmailAddress(params: CreateEmailAddressParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async updateEmailAddress(emailAddressId: string, params: UpdateEmailAddressParams = {}) {\n this.requireId(emailAddressId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, emailAddressId),\n bodyParams: params,\n });\n }\n\n public async deleteEmailAddress(emailAddressId: string) {\n this.requireId(emailAddressId);\n\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, emailAddressId),\n });\n }\n}\n","import type { ClerkPaginationRequest } from '@clerk/types';\n\nimport { joinPaths } from '../../util/path';\nimport type { PaginatedResourceResponse } from '../resources/Deserializer';\nimport type { Invitation } from '../resources/Invitation';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/invitations';\n\ntype CreateParams = {\n emailAddress: string;\n redirectUrl?: string;\n publicMetadata?: UserPublicMetadata;\n notify?: boolean;\n ignoreExisting?: boolean;\n};\n\ntype GetInvitationListParams = ClerkPaginationRequest<{\n /**\n * Filters invitations based on their status(accepted, pending, revoked).\n *\n * @example\n * get all revoked invitations\n *\n * import { createClerkClient } from '@clerk/backend';\n * const clerkClient = createClerkClient(...)\n * await clerkClient.invitations.getInvitationList({ status: 'revoked })\n *\n */\n status?: 'accepted' | 'pending' | 'revoked';\n}>;\n\nexport class InvitationAPI extends AbstractAPI {\n public async getInvitationList(params: GetInvitationListParams = {}) {\n return this.request>({\n method: 'GET',\n path: basePath,\n queryParams: { ...params, paginated: true },\n });\n }\n\n public async createInvitation(params: CreateParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async revokeInvitation(invitationId: string) {\n this.requireId(invitationId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, invitationId, 'revoke'),\n });\n }\n}\n","import type { ClerkPaginationRequest, OrganizationEnrollmentMode } from '@clerk/types';\n\nimport runtime from '../../runtime';\nimport { joinPaths } from '../../util/path';\nimport type {\n Organization,\n OrganizationDomain,\n OrganizationInvitation,\n OrganizationInvitationStatus,\n OrganizationMembership,\n} from '../resources';\nimport type { PaginatedResourceResponse } from '../resources/Deserializer';\nimport type { OrganizationMembershipRole } from '../resources/Enums';\nimport { AbstractAPI } from './AbstractApi';\nimport type { WithSign } from './util-types';\n\nconst basePath = '/organizations';\n\ntype MetadataParams = {\n publicMetadata?: TPublic;\n privateMetadata?: TPrivate;\n};\n\ntype GetOrganizationListParams = ClerkPaginationRequest<{\n includeMembersCount?: boolean;\n query?: string;\n orderBy?: WithSign<'name' | 'created_at' | 'members_count'>;\n}>;\n\ntype CreateParams = {\n name: string;\n slug?: string;\n /* The User id for the user creating the organization. The user will become an administrator for the organization. */\n createdBy: string;\n maxAllowedMemberships?: number;\n} & MetadataParams;\n\ntype GetOrganizationParams = ({ organizationId: string } | { slug: string }) & {\n includeMembersCount?: boolean;\n};\n\ntype UpdateParams = {\n name?: string;\n slug?: string;\n maxAllowedMemberships?: number;\n} & MetadataParams;\n\ntype UpdateLogoParams = {\n file: Blob | File;\n uploaderUserId?: string;\n};\n\ntype UpdateMetadataParams = MetadataParams;\n\ntype GetOrganizationMembershipListParams = ClerkPaginationRequest<{\n organizationId: string;\n orderBy?: WithSign<'phone_number' | 'email_address' | 'created_at' | 'first_name' | 'last_name' | 'username'>;\n}>;\n\ntype CreateOrganizationMembershipParams = {\n organizationId: string;\n userId: string;\n role: OrganizationMembershipRole;\n};\n\ntype UpdateOrganizationMembershipParams = CreateOrganizationMembershipParams;\n\ntype UpdateOrganizationMembershipMetadataParams = {\n organizationId: string;\n userId: string;\n} & MetadataParams;\n\ntype DeleteOrganizationMembershipParams = {\n organizationId: string;\n userId: string;\n};\n\ntype CreateOrganizationInvitationParams = {\n organizationId: string;\n inviterUserId: string;\n emailAddress: string;\n role: OrganizationMembershipRole;\n redirectUrl?: string;\n publicMetadata?: OrganizationInvitationPublicMetadata;\n};\n\ntype GetOrganizationInvitationListParams = ClerkPaginationRequest<{\n organizationId: string;\n status?: OrganizationInvitationStatus[];\n}>;\n\ntype GetOrganizationInvitationParams = {\n organizationId: string;\n invitationId: string;\n};\n\ntype RevokeOrganizationInvitationParams = {\n organizationId: string;\n invitationId: string;\n requestingUserId: string;\n};\n\ntype GetOrganizationDomainListParams = {\n organizationId: string;\n limit?: number;\n offset?: number;\n};\n\ntype CreateOrganizationDomainParams = {\n organizationId: string;\n name: string;\n enrollmentMode: OrganizationEnrollmentMode;\n verified?: boolean;\n};\n\ntype UpdateOrganizationDomainParams = {\n organizationId: string;\n domainId: string;\n} & Partial;\n\ntype DeleteOrganizationDomainParams = {\n organizationId: string;\n domainId: string;\n};\n\nexport class OrganizationAPI extends AbstractAPI {\n public async getOrganizationList(params?: GetOrganizationListParams) {\n return this.request>({\n method: 'GET',\n path: basePath,\n queryParams: params,\n });\n }\n\n public async createOrganization(params: CreateParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async getOrganization(params: GetOrganizationParams) {\n const { includeMembersCount } = params;\n const organizationIdOrSlug = 'organizationId' in params ? params.organizationId : params.slug;\n this.requireId(organizationIdOrSlug);\n\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, organizationIdOrSlug),\n queryParams: {\n includeMembersCount,\n },\n });\n }\n\n public async updateOrganization(organizationId: string, params: UpdateParams) {\n this.requireId(organizationId);\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, organizationId),\n bodyParams: params,\n });\n }\n\n public async updateOrganizationLogo(organizationId: string, params: UpdateLogoParams) {\n this.requireId(organizationId);\n\n const formData = new runtime.FormData();\n formData.append('file', params?.file);\n if (params?.uploaderUserId) {\n formData.append('uploader_user_id', params?.uploaderUserId);\n }\n\n return this.request({\n method: 'PUT',\n path: joinPaths(basePath, organizationId, 'logo'),\n formData,\n });\n }\n\n public async deleteOrganizationLogo(organizationId: string) {\n this.requireId(organizationId);\n\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, organizationId, 'logo'),\n });\n }\n\n public async updateOrganizationMetadata(organizationId: string, params: UpdateMetadataParams) {\n this.requireId(organizationId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, organizationId, 'metadata'),\n bodyParams: params,\n });\n }\n\n public async deleteOrganization(organizationId: string) {\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, organizationId),\n });\n }\n\n public async getOrganizationMembershipList(params: GetOrganizationMembershipListParams) {\n const { organizationId, limit, offset } = params;\n this.requireId(organizationId);\n\n return this.request>({\n method: 'GET',\n path: joinPaths(basePath, organizationId, 'memberships'),\n queryParams: { limit, offset },\n });\n }\n\n public async createOrganizationMembership(params: CreateOrganizationMembershipParams) {\n const { organizationId, userId, role } = params;\n this.requireId(organizationId);\n\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, organizationId, 'memberships'),\n bodyParams: {\n userId,\n role,\n },\n });\n }\n\n public async updateOrganizationMembership(params: UpdateOrganizationMembershipParams) {\n const { organizationId, userId, role } = params;\n this.requireId(organizationId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, organizationId, 'memberships', userId),\n bodyParams: {\n role,\n },\n });\n }\n\n public async updateOrganizationMembershipMetadata(params: UpdateOrganizationMembershipMetadataParams) {\n const { organizationId, userId, publicMetadata, privateMetadata } = params;\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, organizationId, 'memberships', userId, 'metadata'),\n bodyParams: {\n publicMetadata,\n privateMetadata,\n },\n });\n }\n\n public async deleteOrganizationMembership(params: DeleteOrganizationMembershipParams) {\n const { organizationId, userId } = params;\n this.requireId(organizationId);\n\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, organizationId, 'memberships', userId),\n });\n }\n\n public async getOrganizationInvitationList(params: GetOrganizationInvitationListParams) {\n const { organizationId, status, limit, offset } = params;\n this.requireId(organizationId);\n\n return this.request>({\n method: 'GET',\n path: joinPaths(basePath, organizationId, 'invitations'),\n queryParams: { status, limit, offset },\n });\n }\n\n public async createOrganizationInvitation(params: CreateOrganizationInvitationParams) {\n const { organizationId, ...bodyParams } = params;\n this.requireId(organizationId);\n\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, organizationId, 'invitations'),\n bodyParams: { ...bodyParams },\n });\n }\n\n public async getOrganizationInvitation(params: GetOrganizationInvitationParams) {\n const { organizationId, invitationId } = params;\n this.requireId(organizationId);\n this.requireId(invitationId);\n\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, organizationId, 'invitations', invitationId),\n });\n }\n\n public async revokeOrganizationInvitation(params: RevokeOrganizationInvitationParams) {\n const { organizationId, invitationId, requestingUserId } = params;\n this.requireId(organizationId);\n\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, organizationId, 'invitations', invitationId, 'revoke'),\n bodyParams: {\n requestingUserId,\n },\n });\n }\n\n public async getOrganizationDomainList(params: GetOrganizationDomainListParams) {\n const { organizationId, limit, offset } = params;\n this.requireId(organizationId);\n\n return this.request>({\n method: 'GET',\n path: joinPaths(basePath, organizationId, 'domains'),\n queryParams: { limit, offset },\n });\n }\n\n public async createOrganizationDomain(params: CreateOrganizationDomainParams) {\n const { organizationId, name, enrollmentMode, verified = true } = params;\n this.requireId(organizationId);\n\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, organizationId, 'domains'),\n bodyParams: {\n name,\n enrollmentMode,\n verified,\n },\n });\n }\n\n public async updateOrganizationDomain(params: UpdateOrganizationDomainParams) {\n const { organizationId, domainId, ...bodyParams } = params;\n this.requireId(organizationId);\n this.requireId(domainId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, organizationId, 'domains', domainId),\n bodyParams,\n });\n }\n\n public async deleteOrganizationDomain(params: DeleteOrganizationDomainParams) {\n const { organizationId, domainId } = params;\n this.requireId(organizationId);\n this.requireId(domainId);\n\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, organizationId, 'domains', domainId),\n });\n }\n}\n","import { joinPaths } from '../../util/path';\nimport type { DeletedObject, PhoneNumber } from '../resources';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/phone_numbers';\n\ntype CreatePhoneNumberParams = {\n userId: string;\n phoneNumber: string;\n verified?: boolean;\n primary?: boolean;\n};\n\ntype UpdatePhoneNumberParams = {\n verified?: boolean;\n primary?: boolean;\n};\n\nexport class PhoneNumberAPI extends AbstractAPI {\n public async getPhoneNumber(phoneNumberId: string) {\n this.requireId(phoneNumberId);\n\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, phoneNumberId),\n });\n }\n\n public async createPhoneNumber(params: CreatePhoneNumberParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async updatePhoneNumber(phoneNumberId: string, params: UpdatePhoneNumberParams = {}) {\n this.requireId(phoneNumberId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, phoneNumberId),\n bodyParams: params,\n });\n }\n\n public async deletePhoneNumber(phoneNumberId: string) {\n this.requireId(phoneNumberId);\n\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, phoneNumberId),\n });\n }\n}\n","import { joinPaths } from '../../util/path';\nimport type { PaginatedResourceResponse } from '../resources/Deserializer';\nimport type { RedirectUrl } from '../resources/RedirectUrl';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/redirect_urls';\n\ntype CreateRedirectUrlParams = {\n url: string;\n};\n\nexport class RedirectUrlAPI extends AbstractAPI {\n public async getRedirectUrlList() {\n return this.request>({\n method: 'GET',\n path: basePath,\n queryParams: { paginated: true },\n });\n }\n\n public async getRedirectUrl(redirectUrlId: string) {\n this.requireId(redirectUrlId);\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, redirectUrlId),\n });\n }\n\n public async createRedirectUrl(params: CreateRedirectUrlParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async deleteRedirectUrl(redirectUrlId: string) {\n this.requireId(redirectUrlId);\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, redirectUrlId),\n });\n }\n}\n","import type { ClerkPaginationRequest, SessionStatus } from '@clerk/types';\n\nimport { joinPaths } from '../../util/path';\nimport type { PaginatedResourceResponse } from '../resources/Deserializer';\nimport type { Session } from '../resources/Session';\nimport type { Token } from '../resources/Token';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/sessions';\n\ntype SessionListParams = ClerkPaginationRequest<{\n clientId?: string;\n userId?: string;\n status?: SessionStatus;\n}>;\n\ntype RefreshTokenParams = {\n expired_token: string;\n refresh_token: string;\n request_origin: string;\n request_originating_ip?: string;\n request_headers?: Record;\n};\n\nexport class SessionAPI extends AbstractAPI {\n public async getSessionList(params: SessionListParams = {}) {\n return this.request>({\n method: 'GET',\n path: basePath,\n queryParams: { ...params, paginated: true },\n });\n }\n\n public async getSession(sessionId: string) {\n this.requireId(sessionId);\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, sessionId),\n });\n }\n\n public async revokeSession(sessionId: string) {\n this.requireId(sessionId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, sessionId, 'revoke'),\n });\n }\n\n public async verifySession(sessionId: string, token: string) {\n this.requireId(sessionId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, sessionId, 'verify'),\n bodyParams: { token },\n });\n }\n\n public async getToken(sessionId: string, template: string) {\n this.requireId(sessionId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, sessionId, 'tokens', template || ''),\n });\n }\n\n public async refreshSession(sessionId: string, params: RefreshTokenParams) {\n this.requireId(sessionId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, sessionId, 'refresh'),\n bodyParams: params,\n });\n }\n}\n","import { joinPaths } from '../../util/path';\nimport type { SignInToken } from '../resources/SignInTokens';\nimport { AbstractAPI } from './AbstractApi';\n\ntype CreateSignInTokensParams = {\n userId: string;\n expiresInSeconds: number;\n};\n\nconst basePath = '/sign_in_tokens';\n\nexport class SignInTokenAPI extends AbstractAPI {\n public async createSignInToken(params: CreateSignInTokensParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async revokeSignInToken(signInTokenId: string) {\n this.requireId(signInTokenId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, signInTokenId, 'revoke'),\n });\n }\n}\n","import type { ClerkPaginationRequest, OAuthProvider } from '@clerk/types';\n\nimport runtime from '../../runtime';\nimport { joinPaths } from '../../util/path';\nimport type { OauthAccessToken, OrganizationMembership, User } from '../resources';\nimport type { PaginatedResourceResponse } from '../resources/Deserializer';\nimport { AbstractAPI } from './AbstractApi';\nimport type { WithSign } from './util-types';\n\nconst basePath = '/users';\n\ntype UserCountParams = {\n emailAddress?: string[];\n phoneNumber?: string[];\n username?: string[];\n web3Wallet?: string[];\n query?: string;\n userId?: string[];\n externalId?: string[];\n};\n\ntype UserListParams = ClerkPaginationRequest<\n UserCountParams & {\n orderBy?: WithSign<\n | 'created_at'\n | 'updated_at'\n | 'email_address'\n | 'web3wallet'\n | 'first_name'\n | 'last_name'\n | 'phone_number'\n | 'username'\n | 'last_active_at'\n | 'last_sign_in_at'\n >;\n last_active_at_since?: number;\n organizationId?: string[];\n }\n>;\n\ntype UserMetadataParams = {\n publicMetadata?: UserPublicMetadata;\n privateMetadata?: UserPrivateMetadata;\n unsafeMetadata?: UserUnsafeMetadata;\n};\n\ntype PasswordHasher =\n | 'argon2i'\n | 'argon2id'\n | 'awscognito'\n | 'bcrypt'\n | 'bcrypt_sha256_django'\n | 'md5'\n | 'pbkdf2_sha256'\n | 'pbkdf2_sha256_django'\n | 'pbkdf2_sha1'\n | 'phpass'\n | 'scrypt_firebase'\n | 'scrypt_werkzeug'\n | 'sha256';\n\ntype UserPasswordHashingParams = {\n passwordDigest: string;\n passwordHasher: PasswordHasher;\n};\n\ntype CreateUserParams = {\n externalId?: string;\n emailAddress?: string[];\n phoneNumber?: string[];\n username?: string;\n password?: string;\n firstName?: string;\n lastName?: string;\n skipPasswordChecks?: boolean;\n skipPasswordRequirement?: boolean;\n totpSecret?: string;\n backupCodes?: string[];\n createdAt?: Date;\n} & UserMetadataParams &\n (UserPasswordHashingParams | object);\n\ntype UpdateUserParams = {\n firstName?: string;\n lastName?: string;\n username?: string;\n password?: string;\n skipPasswordChecks?: boolean;\n signOutOfOtherSessions?: boolean;\n primaryEmailAddressID?: string;\n primaryPhoneNumberID?: string;\n primaryWeb3WalletID?: string;\n profileImageID?: string;\n totpSecret?: string;\n backupCodes?: string[];\n externalId?: string;\n createdAt?: Date;\n deleteSelfEnabled?: boolean;\n createOrganizationEnabled?: boolean;\n createOrganizationsLimit?: number;\n} & UserMetadataParams &\n (UserPasswordHashingParams | object);\n\ntype GetOrganizationMembershipListParams = ClerkPaginationRequest<{\n userId: string;\n}>;\n\ntype VerifyPasswordParams = {\n userId: string;\n password: string;\n};\n\ntype VerifyTOTPParams = {\n userId: string;\n code: string;\n};\n\nexport class UserAPI extends AbstractAPI {\n public async getUserList(params: UserListParams = {}) {\n const { limit, offset, orderBy, ...userCountParams } = params;\n // TODO(dimkl): Temporary change to populate totalCount using a 2nd BAPI call to /users/count endpoint\n // until we update the /users endpoint to be paginated in a next BAPI version.\n // In some edge cases the data.length != totalCount due to a creation of a user between the 2 api responses\n const [data, totalCount] = await Promise.all([\n this.request({\n method: 'GET',\n path: basePath,\n queryParams: params,\n }),\n this.getCount(userCountParams),\n ]);\n return { data, totalCount } as PaginatedResourceResponse;\n }\n\n public async getUser(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, userId),\n });\n }\n\n public async createUser(params: CreateUserParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async updateUser(userId: string, params: UpdateUserParams = {}) {\n this.requireId(userId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, userId),\n bodyParams: params,\n });\n }\n\n public async updateUserProfileImage(userId: string, params: { file: Blob | File }) {\n this.requireId(userId);\n\n const formData = new runtime.FormData();\n formData.append('file', params?.file);\n\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, userId, 'profile_image'),\n formData,\n });\n }\n\n public async updateUserMetadata(userId: string, params: UserMetadataParams) {\n this.requireId(userId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, userId, 'metadata'),\n bodyParams: params,\n });\n }\n\n public async deleteUser(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, userId),\n });\n }\n\n public async getCount(params: UserCountParams = {}) {\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, 'count'),\n queryParams: params,\n });\n }\n\n public async getUserOauthAccessToken(userId: string, provider: `oauth_${OAuthProvider}`) {\n this.requireId(userId);\n return this.request>({\n method: 'GET',\n path: joinPaths(basePath, userId, 'oauth_access_tokens', provider),\n queryParams: { paginated: true },\n });\n }\n\n public async disableUserMFA(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, userId, 'mfa'),\n });\n }\n\n public async getOrganizationMembershipList(params: GetOrganizationMembershipListParams) {\n const { userId, limit, offset } = params;\n this.requireId(userId);\n\n return this.request>({\n method: 'GET',\n path: joinPaths(basePath, userId, 'organization_memberships'),\n queryParams: { limit, offset },\n });\n }\n\n public async verifyPassword(params: VerifyPasswordParams) {\n const { userId, password } = params;\n this.requireId(userId);\n\n return this.request<{ verified: true }>({\n method: 'POST',\n path: joinPaths(basePath, userId, 'verify_password'),\n bodyParams: { password },\n });\n }\n\n public async verifyTOTP(params: VerifyTOTPParams) {\n const { userId, code } = params;\n this.requireId(userId);\n\n return this.request<{ verified: true; code_type: 'totp' }>({\n method: 'POST',\n path: joinPaths(basePath, userId, 'verify_totp'),\n bodyParams: { code },\n });\n }\n\n public async banUser(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, userId, 'ban'),\n });\n }\n\n public async unbanUser(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, userId, 'unban'),\n });\n }\n\n public async lockUser(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, userId, 'lock'),\n });\n }\n\n public async unlockUser(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'POST',\n path: joinPaths(basePath, userId, 'unlock'),\n });\n }\n\n public async deleteUserProfileImage(userId: string) {\n this.requireId(userId);\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, userId, 'profile_image'),\n });\n }\n}\n","import type { SamlIdpSlug } from '@clerk/types';\n\nimport { joinPaths } from '../../util/path';\nimport type { SamlConnection } from '../resources';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/saml_connections';\n\ntype SamlConnectionListParams = {\n limit?: number;\n offset?: number;\n};\ntype CreateSamlConnectionParams = {\n name: string;\n provider: SamlIdpSlug;\n domain: string;\n idpEntityId?: string;\n idpSsoUrl?: string;\n idpCertificate?: string;\n idpMetadataUrl?: string;\n idpMetadata?: string;\n attributeMapping?: {\n emailAddress?: string;\n firstName?: string;\n lastName?: string;\n userId?: string;\n };\n};\n\ntype UpdateSamlConnectionParams = {\n name?: string;\n provider?: SamlIdpSlug;\n domain?: string;\n idpEntityId?: string;\n idpSsoUrl?: string;\n idpCertificate?: string;\n idpMetadataUrl?: string;\n idpMetadata?: string;\n attributeMapping?: {\n emailAddress?: string;\n firstName?: string;\n lastName?: string;\n userId?: string;\n };\n active?: boolean;\n syncUserAttributes?: boolean;\n allowSubdomains?: boolean;\n allowIdpInitiated?: boolean;\n};\n\nexport class SamlConnectionAPI extends AbstractAPI {\n public async getSamlConnectionList(params: SamlConnectionListParams = {}) {\n return this.request({\n method: 'GET',\n path: basePath,\n queryParams: params,\n });\n }\n\n public async createSamlConnection(params: CreateSamlConnectionParams) {\n return this.request({\n method: 'POST',\n path: basePath,\n bodyParams: params,\n });\n }\n\n public async getSamlConnection(samlConnectionId: string) {\n this.requireId(samlConnectionId);\n return this.request({\n method: 'GET',\n path: joinPaths(basePath, samlConnectionId),\n });\n }\n\n public async updateSamlConnection(samlConnectionId: string, params: UpdateSamlConnectionParams = {}) {\n this.requireId(samlConnectionId);\n\n return this.request({\n method: 'PATCH',\n path: joinPaths(basePath, samlConnectionId),\n bodyParams: params,\n });\n }\n public async deleteSamlConnection(samlConnectionId: string) {\n this.requireId(samlConnectionId);\n return this.request({\n method: 'DELETE',\n path: joinPaths(basePath, samlConnectionId),\n });\n }\n}\n","import type { TestingToken } from '../resources/TestingToken';\nimport { AbstractAPI } from './AbstractApi';\n\nconst basePath = '/testing_tokens';\n\nexport class TestingTokenAPI extends AbstractAPI {\n public async createTestingToken() {\n return this.request({\n method: 'POST',\n path: basePath,\n });\n }\n}\n","import { ClerkAPIResponseError, parseError } from '@clerk/shared/error';\nimport type { ClerkAPIError, ClerkAPIErrorJSON } from '@clerk/types';\nimport snakecaseKeys from 'snakecase-keys';\n\nimport { API_URL, API_VERSION, constants, USER_AGENT } from '../constants';\n// DO NOT CHANGE: Runtime needs to be imported as a default export so that we can stub its dependencies with Sinon.js\n// For more information refer to https://sinonjs.org/how-to/stub-dependency/\nimport runtime from '../runtime';\nimport { assertValidSecretKey } from '../util/optionsAssertions';\nimport { joinPaths } from '../util/path';\nimport { deserialize } from './resources/Deserializer';\n\nexport type ClerkBackendApiRequestOptions = {\n method: 'GET' | 'POST' | 'PATCH' | 'DELETE' | 'PUT';\n queryParams?: Record;\n headerParams?: Record;\n bodyParams?: object;\n formData?: FormData;\n} & (\n | {\n url: string;\n path?: string;\n }\n | {\n url?: string;\n path: string;\n }\n);\n\nexport type ClerkBackendApiResponse =\n | {\n data: T;\n errors: null;\n totalCount?: number;\n }\n | {\n data: null;\n errors: ClerkAPIError[];\n totalCount?: never;\n clerkTraceId?: string;\n status?: number;\n statusText?: string;\n };\n\nexport type RequestFunction = ReturnType;\n\ntype BuildRequestOptions = {\n /* Secret Key */\n secretKey?: string;\n /* Backend API URL */\n apiUrl?: string;\n /* Backend API version */\n apiVersion?: string;\n /* Library/SDK name */\n userAgent?: string;\n};\nexport function buildRequest(options: BuildRequestOptions) {\n const requestFn = async (requestOptions: ClerkBackendApiRequestOptions): Promise> => {\n const { secretKey, apiUrl = API_URL, apiVersion = API_VERSION, userAgent = USER_AGENT } = options;\n const { path, method, queryParams, headerParams, bodyParams, formData } = requestOptions;\n\n assertValidSecretKey(secretKey);\n\n const url = joinPaths(apiUrl, apiVersion, path);\n\n // Build final URL with search parameters\n const finalUrl = new URL(url);\n\n if (queryParams) {\n // Snakecase query parameters\n const snakecasedQueryParams = snakecaseKeys({ ...queryParams });\n\n // Support array values for queryParams such as { foo: [42, 43] }\n for (const [key, val] of Object.entries(snakecasedQueryParams)) {\n if (val) {\n [val].flat().forEach(v => finalUrl.searchParams.append(key, v as string));\n }\n }\n }\n\n // Build headers\n const headers: Record = {\n Authorization: `Bearer ${secretKey}`,\n 'User-Agent': userAgent,\n ...headerParams,\n };\n\n let res: Response | undefined;\n try {\n if (formData) {\n res = await runtime.fetch(finalUrl.href, {\n method,\n headers,\n body: formData,\n });\n } else {\n // Enforce application/json for all non form-data requests\n headers['Content-Type'] = 'application/json';\n // Build body\n const hasBody = method !== 'GET' && bodyParams && Object.keys(bodyParams).length > 0;\n const body = hasBody ? { body: JSON.stringify(snakecaseKeys(bodyParams, { deep: false })) } : null;\n\n res = await runtime.fetch(finalUrl.href, {\n method,\n headers,\n ...body,\n });\n }\n\n // TODO: Parse JSON or Text response based on a response header\n const isJSONResponse =\n res?.headers && res.headers?.get(constants.Headers.ContentType) === constants.ContentTypes.Json;\n const responseBody = await (isJSONResponse ? res.json() : res.text());\n\n if (!res.ok) {\n return {\n data: null,\n errors: parseErrors(responseBody),\n status: res?.status,\n statusText: res?.statusText,\n clerkTraceId: getTraceId(responseBody, res?.headers),\n };\n }\n\n return {\n ...deserialize(responseBody),\n errors: null,\n };\n } catch (err) {\n if (err instanceof Error) {\n return {\n data: null,\n errors: [\n {\n code: 'unexpected_error',\n message: err.message || 'Unexpected error',\n },\n ],\n clerkTraceId: getTraceId(err, res?.headers),\n };\n }\n\n return {\n data: null,\n errors: parseErrors(err),\n status: res?.status,\n statusText: res?.statusText,\n clerkTraceId: getTraceId(err, res?.headers),\n };\n }\n };\n\n return withLegacyRequestReturn(requestFn);\n}\n\n// Returns either clerk_trace_id if present in response json, otherwise defaults to CF-Ray header\n// If the request failed before receiving a response, returns undefined\nfunction getTraceId(data: unknown, headers?: Headers): string {\n if (data && typeof data === 'object' && 'clerk_trace_id' in data && typeof data.clerk_trace_id === 'string') {\n return data.clerk_trace_id;\n }\n\n const cfRay = headers?.get('cf-ray');\n return cfRay || '';\n}\n\nfunction parseErrors(data: unknown): ClerkAPIError[] {\n if (!!data && typeof data === 'object' && 'errors' in data) {\n const errors = data.errors as ClerkAPIErrorJSON[];\n return errors.length > 0 ? errors.map(parseError) : [];\n }\n return [];\n}\n\ntype LegacyRequestFunction = (requestOptions: ClerkBackendApiRequestOptions) => Promise;\n\n// TODO(dimkl): Will be probably be dropped in next major version\nfunction withLegacyRequestReturn(cb: any): LegacyRequestFunction {\n return async (...args) => {\n // @ts-ignore\n const { data, errors, totalCount, status, statusText, clerkTraceId } = await cb(...args);\n if (errors) {\n // instead of passing `data: errors`, we have set the `error.errors` because\n // the errors returned from callback is already parsed and passing them as `data`\n // will not be able to assign them to the instance\n const error = new ClerkAPIResponseError(statusText || '', {\n data: [],\n status,\n clerkTraceId,\n });\n error.errors = errors;\n throw error;\n }\n\n if (typeof totalCount !== 'undefined') {\n return { data, totalCount };\n }\n\n return data;\n };\n}\n","export { addClerkPrefix, getScriptUrl, getClerkJsMajorVersionOrTag } from '@clerk/shared/url';\nexport { callWithRetry } from '@clerk/shared/callWithRetry';\nexport {\n isDevelopmentFromSecretKey,\n isProductionFromSecretKey,\n parsePublishableKey,\n getCookieSuffix,\n getSuffixedCookieName,\n} from '@clerk/shared/keys';\nexport { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';\n\nimport { buildErrorThrower } from '@clerk/shared/error';\n// TODO: replace packageName with `${PACKAGE_NAME}@${PACKAGE_VERSION}` from tsup.config.ts\nexport const errorThrower = buildErrorThrower({ packageName: '@clerk/backend' });\n\nimport { createDevOrStagingUrlCache } from '@clerk/shared/keys';\nexport const { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n","import { parsePublishableKey } from './shared';\n\nexport function assertValidSecretKey(val: unknown): asserts val is string {\n if (!val || typeof val !== 'string') {\n throw Error('Missing Clerk Secret Key. Go to https://dashboard.clerk.com and get your key for your instance.');\n }\n\n //TODO: Check if the key is invalid and throw error\n}\n\nexport function assertValidPublishableKey(val: unknown): asserts val is string {\n parsePublishableKey(val as string | undefined, { fatal: true });\n}\n","import type { AllowlistIdentifierJSON } from './JSON';\n\nexport class AllowlistIdentifier {\n constructor(\n readonly id: string,\n readonly identifier: string,\n readonly createdAt: number,\n readonly updatedAt: number,\n readonly invitationId?: string,\n ) {}\n\n static fromJSON(data: AllowlistIdentifierJSON): AllowlistIdentifier {\n return new AllowlistIdentifier(data.id, data.identifier, data.created_at, data.updated_at, data.invitation_id);\n }\n}\n","import type { SessionJSON } from './JSON';\n\nexport class Session {\n constructor(\n readonly id: string,\n readonly clientId: string,\n readonly userId: string,\n readonly status: string,\n readonly lastActiveAt: number,\n readonly expireAt: number,\n readonly abandonAt: number,\n readonly createdAt: number,\n readonly updatedAt: number,\n ) {}\n\n static fromJSON(data: SessionJSON): Session {\n return new Session(\n data.id,\n data.client_id,\n data.user_id,\n data.status,\n data.last_active_at,\n data.expire_at,\n data.abandon_at,\n data.created_at,\n data.updated_at,\n );\n }\n}\n","import type { ClientJSON } from './JSON';\nimport { Session } from './Session';\n\nexport class Client {\n constructor(\n readonly id: string,\n readonly sessionIds: string[],\n readonly sessions: Session[],\n readonly signInId: string | null,\n readonly signUpId: string | null,\n readonly lastActiveSessionId: string | null,\n readonly createdAt: number,\n readonly updatedAt: number,\n ) {}\n\n static fromJSON(data: ClientJSON): Client {\n return new Client(\n data.id,\n data.session_ids,\n data.sessions.map(x => Session.fromJSON(x)),\n data.sign_in_id,\n data.sign_up_id,\n data.last_active_session_id,\n data.created_at,\n data.updated_at,\n );\n }\n}\n","import type { DeletedObjectJSON } from './JSON';\n\nexport class DeletedObject {\n constructor(\n readonly object: string,\n readonly id: string | null,\n readonly slug: string | null,\n readonly deleted: boolean,\n ) {}\n\n static fromJSON(data: DeletedObjectJSON) {\n return new DeletedObject(data.object, data.id || null, data.slug || null, data.deleted);\n }\n}\n","import type { EmailJSON } from './JSON';\n\nexport class Email {\n constructor(\n readonly id: string,\n readonly fromEmailName: string,\n readonly emailAddressId: string | null,\n readonly toEmailAddress?: string,\n readonly subject?: string,\n readonly body?: string,\n readonly bodyPlain?: string | null,\n readonly status?: string,\n readonly slug?: string | null,\n readonly data?: Record | null,\n readonly deliveredByClerk?: boolean,\n ) {}\n\n static fromJSON(data: EmailJSON): Email {\n return new Email(\n data.id,\n data.from_email_name,\n data.email_address_id,\n data.to_email_address,\n data.subject,\n data.body,\n data.body_plain,\n data.status,\n data.slug,\n data.data,\n data.delivered_by_clerk,\n );\n }\n}\n","import type { IdentificationLinkJSON } from './JSON';\n\nexport class IdentificationLink {\n constructor(\n readonly id: string,\n readonly type: string,\n ) {}\n\n static fromJSON(data: IdentificationLinkJSON): IdentificationLink {\n return new IdentificationLink(data.id, data.type);\n }\n}\n","import type { OrganizationDomainVerificationJSON } from '@clerk/types';\n\nimport type { VerificationJSON } from './JSON';\n\nexport class Verification {\n constructor(\n readonly status: string,\n readonly strategy: string,\n readonly externalVerificationRedirectURL: URL | null = null,\n readonly attempts: number | null = null,\n readonly expireAt: number | null = null,\n readonly nonce: string | null = null,\n readonly message: string | null = null,\n ) {}\n\n static fromJSON(data: VerificationJSON): Verification {\n return new Verification(\n data.status,\n data.strategy,\n data.external_verification_redirect_url ? new URL(data.external_verification_redirect_url) : null,\n data.attempts,\n data.expire_at,\n data.nonce,\n );\n }\n}\n\nexport class OrganizationDomainVerification {\n constructor(\n readonly status: string,\n readonly strategy: string,\n readonly attempts: number | null = null,\n readonly expireAt: number | null = null,\n ) {}\n\n static fromJSON(data: OrganizationDomainVerificationJSON): OrganizationDomainVerification {\n return new OrganizationDomainVerification(data.status, data.strategy, data.attempts, data.expires_at);\n }\n}\n","import { IdentificationLink } from './IdentificationLink';\nimport type { EmailAddressJSON } from './JSON';\nimport { Verification } from './Verification';\n\nexport class EmailAddress {\n constructor(\n readonly id: string,\n readonly emailAddress: string,\n readonly verification: Verification | null,\n readonly linkedTo: IdentificationLink[],\n ) {}\n\n static fromJSON(data: EmailAddressJSON): EmailAddress {\n return new EmailAddress(\n data.id,\n data.email_address,\n data.verification && Verification.fromJSON(data.verification),\n data.linked_to.map(link => IdentificationLink.fromJSON(link)),\n );\n }\n}\n","import type { ExternalAccountJSON } from './JSON';\nimport { Verification } from './Verification';\n\nexport class ExternalAccount {\n constructor(\n readonly id: string,\n readonly provider: string,\n readonly identificationId: string,\n readonly externalId: string,\n readonly approvedScopes: string,\n readonly emailAddress: string,\n readonly firstName: string,\n readonly lastName: string,\n readonly imageUrl: string,\n readonly username: string | null,\n readonly publicMetadata: Record | null = {},\n readonly label: string | null,\n readonly verification: Verification | null,\n ) {}\n\n static fromJSON(data: ExternalAccountJSON): ExternalAccount {\n return new ExternalAccount(\n data.id,\n data.provider,\n data.identification_id,\n data.provider_user_id,\n data.approved_scopes,\n data.email_address,\n data.first_name,\n data.last_name,\n data.image_url || '',\n data.username,\n data.public_metadata,\n data.label,\n data.verification && Verification.fromJSON(data.verification),\n );\n }\n}\n","import type { InvitationStatus } from './Enums';\nimport type { InvitationJSON } from './JSON';\n\nexport class Invitation {\n constructor(\n readonly id: string,\n readonly emailAddress: string,\n readonly publicMetadata: Record | null,\n readonly createdAt: number,\n readonly updatedAt: number,\n readonly status: InvitationStatus,\n readonly url?: string,\n readonly revoked?: boolean,\n ) {}\n\n static fromJSON(data: InvitationJSON): Invitation {\n return new Invitation(\n data.id,\n data.email_address,\n data.public_metadata,\n data.created_at,\n data.updated_at,\n data.status,\n data.url,\n data.revoked,\n );\n }\n}\n","import type {\n InvitationStatus,\n OrganizationInvitationStatus,\n OrganizationMembershipRole,\n SignInStatus,\n SignUpStatus,\n} from './Enums';\n\nexport const ObjectType = {\n AllowlistIdentifier: 'allowlist_identifier',\n Client: 'client',\n Email: 'email',\n EmailAddress: 'email_address',\n ExternalAccount: 'external_account',\n FacebookAccount: 'facebook_account',\n GoogleAccount: 'google_account',\n Invitation: 'invitation',\n OauthAccessToken: 'oauth_access_token',\n Organization: 'organization',\n OrganizationInvitation: 'organization_invitation',\n OrganizationMembership: 'organization_membership',\n PhoneNumber: 'phone_number',\n RedirectUrl: 'redirect_url',\n SamlAccount: 'saml_account',\n Session: 'session',\n SignInAttempt: 'sign_in_attempt',\n SignInToken: 'sign_in_token',\n SignUpAttempt: 'sign_up_attempt',\n SmsMessage: 'sms_message',\n User: 'user',\n Web3Wallet: 'web3_wallet',\n Token: 'token',\n TotalCount: 'total_count',\n TestingToken: 'testing_token',\n Role: 'role',\n Permission: 'permission',\n} as const;\n\nexport type ObjectType = (typeof ObjectType)[keyof typeof ObjectType];\n\nexport interface ClerkResourceJSON {\n object: ObjectType;\n id: string;\n}\n\nexport interface TokenJSON {\n object: typeof ObjectType.Token;\n jwt: string;\n}\n\nexport interface AllowlistIdentifierJSON extends ClerkResourceJSON {\n object: typeof ObjectType.AllowlistIdentifier;\n identifier: string;\n created_at: number;\n updated_at: number;\n invitation_id?: string;\n}\n\nexport interface ClientJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Client;\n session_ids: string[];\n sessions: SessionJSON[];\n sign_in_id: string | null;\n sign_up_id: string | null;\n last_active_session_id: string | null;\n created_at: number;\n updated_at: number;\n}\n\nexport interface EmailJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Email;\n slug?: string | null;\n from_email_name: string;\n to_email_address?: string;\n email_address_id: string | null;\n user_id?: string | null;\n subject?: string;\n body?: string;\n body_plain?: string | null;\n status?: string;\n data?: Record | null;\n delivered_by_clerk: boolean;\n}\n\nexport interface EmailAddressJSON extends ClerkResourceJSON {\n object: typeof ObjectType.EmailAddress;\n email_address: string;\n verification: VerificationJSON | null;\n linked_to: IdentificationLinkJSON[];\n}\n\nexport interface ExternalAccountJSON extends ClerkResourceJSON {\n object: typeof ObjectType.ExternalAccount;\n provider: string;\n identification_id: string;\n provider_user_id: string;\n approved_scopes: string;\n email_address: string;\n first_name: string;\n last_name: string;\n image_url?: string;\n username: string | null;\n public_metadata?: Record | null;\n label: string | null;\n verification: VerificationJSON | null;\n}\n\nexport interface SamlAccountJSON extends ClerkResourceJSON {\n object: typeof ObjectType.SamlAccount;\n provider: string;\n provider_user_id: string | null;\n active: boolean;\n email_address: string;\n first_name: string;\n last_name: string;\n verification: VerificationJSON | null;\n saml_connection: SamlAccountConnectionJSON | null;\n}\n\nexport interface IdentificationLinkJSON extends ClerkResourceJSON {\n type: string;\n}\n\nexport interface InvitationJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Invitation;\n email_address: string;\n public_metadata: Record | null;\n revoked?: boolean;\n status: InvitationStatus;\n url?: string;\n created_at: number;\n updated_at: number;\n}\n\nexport interface OauthAccessTokenJSON {\n external_account_id: string;\n object: typeof ObjectType.OauthAccessToken;\n token: string;\n provider: string;\n public_metadata: Record;\n label: string | null;\n // Only set in OAuth 2.0 tokens\n scopes?: string[];\n // Only set in OAuth 1.0 tokens\n token_secret?: string;\n}\n\nexport interface OrganizationJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Organization;\n name: string;\n slug: string;\n image_url?: string;\n has_image: boolean;\n members_count?: number;\n pending_invitations_count?: number;\n max_allowed_memberships: number;\n admin_delete_enabled: boolean;\n public_metadata: OrganizationPublicMetadata | null;\n private_metadata?: OrganizationPrivateMetadata;\n created_by: string;\n created_at: number;\n updated_at: number;\n}\n\nexport interface OrganizationInvitationJSON extends ClerkResourceJSON {\n email_address: string;\n role: OrganizationMembershipRole;\n organization_id: string;\n public_organization_data?: PublicOrganizationDataJSON | null;\n status?: OrganizationInvitationStatus;\n public_metadata: OrganizationInvitationPublicMetadata;\n private_metadata: OrganizationInvitationPrivateMetadata;\n created_at: number;\n updated_at: number;\n}\n\nexport interface PublicOrganizationDataJSON extends ClerkResourceJSON {\n name: string;\n slug: string;\n image_url?: string;\n has_image: boolean;\n}\n\nexport interface OrganizationMembershipJSON extends ClerkResourceJSON {\n object: typeof ObjectType.OrganizationMembership;\n public_metadata: OrganizationMembershipPublicMetadata;\n private_metadata?: OrganizationMembershipPrivateMetadata;\n role: OrganizationMembershipRole;\n permissions: string[];\n created_at: number;\n updated_at: number;\n organization: OrganizationJSON;\n public_user_data: OrganizationMembershipPublicUserDataJSON;\n}\n\nexport interface OrganizationMembershipPublicUserDataJSON {\n identifier: string;\n first_name: string | null;\n last_name: string | null;\n image_url: string;\n has_image: boolean;\n user_id: string;\n}\n\nexport interface PhoneNumberJSON extends ClerkResourceJSON {\n object: typeof ObjectType.PhoneNumber;\n phone_number: string;\n reserved_for_second_factor: boolean;\n default_second_factor: boolean;\n reserved: boolean;\n verification: VerificationJSON | null;\n linked_to: IdentificationLinkJSON[];\n backup_codes: string[];\n}\n\nexport interface RedirectUrlJSON extends ClerkResourceJSON {\n object: typeof ObjectType.RedirectUrl;\n url: string;\n created_at: number;\n updated_at: number;\n}\n\nexport interface SessionJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Session;\n client_id: string;\n user_id: string;\n status: string;\n last_active_organization_id?: string;\n actor?: Record;\n last_active_at: number;\n expire_at: number;\n abandon_at: number;\n created_at: number;\n updated_at: number;\n}\n\nexport interface SignInJSON extends ClerkResourceJSON {\n object: typeof ObjectType.SignInToken;\n status: SignInStatus;\n identifier: string;\n created_session_id: string | null;\n}\n\nexport interface SignInTokenJSON extends ClerkResourceJSON {\n object: typeof ObjectType.SignInToken;\n user_id: string;\n token: string;\n status: 'pending' | 'accepted' | 'revoked';\n url: string;\n created_at: number;\n updated_at: number;\n}\n\nexport interface SignUpJSON extends ClerkResourceJSON {\n object: typeof ObjectType.SignUpAttempt;\n status: SignUpStatus;\n username: string | null;\n email_address: string | null;\n phone_number: string | null;\n web3_wallet: string | null;\n web3_wallet_verification: VerificationJSON | null;\n external_account: any;\n has_password: boolean;\n name_full: string | null;\n created_session_id: string | null;\n created_user_id: string | null;\n abandon_at: number | null;\n}\n\nexport interface SMSMessageJSON extends ClerkResourceJSON {\n object: typeof ObjectType.SmsMessage;\n from_phone_number: string;\n to_phone_number: string;\n phone_number_id: string | null;\n user_id?: string;\n message: string;\n status: string;\n slug?: string | null;\n data?: Record | null;\n delivered_by_clerk: boolean;\n}\n\nexport interface UserJSON extends ClerkResourceJSON {\n object: typeof ObjectType.User;\n username: string | null;\n first_name: string | null;\n last_name: string | null;\n image_url: string;\n has_image: boolean;\n primary_email_address_id: string | null;\n primary_phone_number_id: string | null;\n primary_web3_wallet_id: string | null;\n password_enabled: boolean;\n two_factor_enabled: boolean;\n totp_enabled: boolean;\n backup_code_enabled: boolean;\n email_addresses: EmailAddressJSON[];\n phone_numbers: PhoneNumberJSON[];\n web3_wallets: Web3WalletJSON[];\n organization_memberships: OrganizationMembershipJSON[] | null;\n external_accounts: ExternalAccountJSON[];\n saml_accounts: SamlAccountJSON[];\n password_last_updated_at: number | null;\n public_metadata: UserPublicMetadata;\n private_metadata: UserPrivateMetadata;\n unsafe_metadata: UserUnsafeMetadata;\n external_id: string | null;\n last_sign_in_at: number | null;\n banned: boolean;\n locked: boolean;\n lockout_expires_in_seconds: number | null;\n verification_attempts_remaining: number | null;\n created_at: number;\n updated_at: number;\n last_active_at: number | null;\n create_organization_enabled: boolean;\n create_organizations_limit: number | null;\n delete_self_enabled: boolean;\n}\n\nexport interface VerificationJSON extends ClerkResourceJSON {\n status: string;\n strategy: string;\n attempts: number | null;\n expire_at: number | null;\n verified_at_client?: string;\n external_verification_redirect_url?: string | null;\n nonce?: string | null;\n message?: string | null;\n}\n\nexport interface Web3WalletJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Web3Wallet;\n web3_wallet: string;\n verification: VerificationJSON | null;\n}\n\nexport interface DeletedObjectJSON {\n object: string;\n id?: string;\n slug?: string;\n deleted: boolean;\n}\n\nexport interface PaginatedResponseJSON {\n data: object[];\n total_count?: number;\n}\n\nexport interface SamlConnectionJSON extends ClerkResourceJSON {\n name: string;\n domain: string;\n idp_entity_id: string;\n idp_sso_url: string;\n idp_certificate: string;\n idp_metadata_url: string;\n idp_metadata: string;\n acs_url: string;\n sp_entity_id: string;\n sp_metadata_url: string;\n active: boolean;\n provider: string;\n user_count: number;\n sync_user_attributes: boolean;\n allow_subdomains: boolean;\n allow_idp_initiated: boolean;\n created_at: number;\n updated_at: number;\n attribute_mapping: AttributeMappingJSON;\n}\n\nexport interface AttributeMappingJSON {\n user_id: string;\n email_address: string;\n first_name: string;\n last_name: string;\n}\n\nexport interface TestingTokenJSON {\n object: typeof ObjectType.TestingToken;\n token: string;\n expires_at: number;\n}\n\nexport interface RoleJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Role;\n key: string;\n name: string;\n description: string;\n permissions: PermissionJSON[];\n is_creator_eligible: boolean;\n created_at: number;\n updated_at: number;\n}\n\nexport interface PermissionJSON extends ClerkResourceJSON {\n object: typeof ObjectType.Permission;\n key: string;\n name: string;\n description: string;\n created_at: number;\n updated_at: number;\n}\n\nexport interface SamlAccountConnectionJSON extends ClerkResourceJSON {\n id: string;\n name: string;\n domain: string;\n active: boolean;\n provider: string;\n sync_user_attributes: boolean;\n allow_subdomains: boolean;\n allow_idp_initiated: boolean;\n disable_additional_identifications: boolean;\n created_at: number;\n updated_at: number;\n}\n","import type { OauthAccessTokenJSON } from './JSON';\n\nexport class OauthAccessToken {\n constructor(\n readonly externalAccountId: string,\n readonly provider: string,\n readonly token: string,\n readonly publicMetadata: Record = {},\n readonly label: string,\n readonly scopes?: string[],\n readonly tokenSecret?: string,\n ) {}\n\n static fromJSON(data: OauthAccessTokenJSON) {\n return new OauthAccessToken(\n data.external_account_id,\n data.provider,\n data.token,\n data.public_metadata,\n data.label || '',\n data.scopes,\n data.token_secret,\n );\n }\n}\n","import type { OrganizationJSON } from './JSON';\n\nexport class Organization {\n constructor(\n readonly id: string,\n readonly name: string,\n readonly slug: string | null,\n readonly imageUrl: string,\n readonly hasImage: boolean,\n readonly createdBy: string,\n readonly createdAt: number,\n readonly updatedAt: number,\n readonly publicMetadata: OrganizationPublicMetadata | null = {},\n readonly privateMetadata: OrganizationPrivateMetadata = {},\n readonly maxAllowedMemberships: number,\n readonly adminDeleteEnabled: boolean,\n readonly membersCount?: number,\n ) {}\n\n static fromJSON(data: OrganizationJSON): Organization {\n return new Organization(\n data.id,\n data.name,\n data.slug,\n data.image_url || '',\n data.has_image,\n data.created_by,\n data.created_at,\n data.updated_at,\n data.public_metadata,\n data.private_metadata,\n data.max_allowed_memberships,\n data.admin_delete_enabled,\n data.members_count,\n );\n }\n}\n","import type { OrganizationInvitationStatus, OrganizationMembershipRole } from './Enums';\nimport type { OrganizationInvitationJSON } from './JSON';\n\nexport class OrganizationInvitation {\n constructor(\n readonly id: string,\n readonly emailAddress: string,\n readonly role: OrganizationMembershipRole,\n readonly organizationId: string,\n readonly createdAt: number,\n readonly updatedAt: number,\n readonly status?: OrganizationInvitationStatus,\n readonly publicMetadata: OrganizationInvitationPublicMetadata = {},\n readonly privateMetadata: OrganizationInvitationPrivateMetadata = {},\n ) {}\n\n static fromJSON(data: OrganizationInvitationJSON) {\n return new OrganizationInvitation(\n data.id,\n data.email_address,\n data.role,\n data.organization_id,\n data.created_at,\n data.updated_at,\n data.status,\n data.public_metadata,\n data.private_metadata,\n );\n }\n}\n","import { Organization } from '../resources';\nimport type { OrganizationMembershipRole } from './Enums';\nimport type { OrganizationMembershipJSON, OrganizationMembershipPublicUserDataJSON } from './JSON';\n\nexport class OrganizationMembership {\n constructor(\n readonly id: string,\n readonly role: OrganizationMembershipRole,\n readonly permissions: string[],\n readonly publicMetadata: OrganizationMembershipPublicMetadata = {},\n readonly privateMetadata: OrganizationMembershipPrivateMetadata = {},\n readonly createdAt: number,\n readonly updatedAt: number,\n readonly organization: Organization,\n readonly publicUserData?: OrganizationMembershipPublicUserData | null,\n ) {}\n\n static fromJSON(data: OrganizationMembershipJSON) {\n return new OrganizationMembership(\n data.id,\n data.role,\n data.permissions,\n data.public_metadata,\n data.private_metadata,\n data.created_at,\n data.updated_at,\n Organization.fromJSON(data.organization),\n OrganizationMembershipPublicUserData.fromJSON(data.public_user_data),\n );\n }\n}\n\nexport class OrganizationMembershipPublicUserData {\n constructor(\n readonly identifier: string,\n readonly firstName: string | null,\n readonly lastName: string | null,\n readonly imageUrl: string,\n readonly hasImage: boolean,\n readonly userId: string,\n ) {}\n\n static fromJSON(data: OrganizationMembershipPublicUserDataJSON) {\n return new OrganizationMembershipPublicUserData(\n data.identifier,\n data.first_name,\n data.last_name,\n data.image_url,\n data.has_image,\n data.user_id,\n );\n }\n}\n","import { IdentificationLink } from './IdentificationLink';\nimport type { PhoneNumberJSON } from './JSON';\nimport { Verification } from './Verification';\n\nexport class PhoneNumber {\n constructor(\n readonly id: string,\n readonly phoneNumber: string,\n readonly reservedForSecondFactor: boolean,\n readonly defaultSecondFactor: boolean,\n readonly verification: Verification | null,\n readonly linkedTo: IdentificationLink[],\n ) {}\n\n static fromJSON(data: PhoneNumberJSON): PhoneNumber {\n return new PhoneNumber(\n data.id,\n data.phone_number,\n data.reserved_for_second_factor,\n data.default_second_factor,\n data.verification && Verification.fromJSON(data.verification),\n data.linked_to.map(link => IdentificationLink.fromJSON(link)),\n );\n }\n}\n","import type { RedirectUrlJSON } from './JSON';\n\nexport class RedirectUrl {\n constructor(\n readonly id: string,\n readonly url: string,\n readonly createdAt: number,\n readonly updatedAt: number,\n ) {}\n\n static fromJSON(data: RedirectUrlJSON): RedirectUrl {\n return new RedirectUrl(data.id, data.url, data.created_at, data.updated_at);\n }\n}\n","import type { SignInTokenJSON } from './JSON';\n\nexport class SignInToken {\n constructor(\n readonly id: string,\n readonly userId: string,\n readonly token: string,\n readonly status: string,\n readonly url: string,\n readonly createdAt: number,\n readonly updatedAt: number,\n ) {}\n\n static fromJSON(data: SignInTokenJSON): SignInToken {\n return new SignInToken(data.id, data.user_id, data.token, data.status, data.url, data.created_at, data.updated_at);\n }\n}\n","import type { SMSMessageJSON } from './JSON';\n\nexport class SMSMessage {\n constructor(\n readonly id: string,\n readonly fromPhoneNumber: string,\n readonly toPhoneNumber: string,\n readonly message: string,\n readonly status: string,\n readonly phoneNumberId: string | null,\n readonly data?: Record | null,\n ) {}\n\n static fromJSON(data: SMSMessageJSON): SMSMessage {\n return new SMSMessage(\n data.id,\n data.from_phone_number,\n data.to_phone_number,\n data.message,\n data.status,\n data.phone_number_id,\n data.data,\n );\n }\n}\n","import type { TokenJSON } from './JSON';\n\nexport class Token {\n constructor(readonly jwt: string) {}\n\n static fromJSON(data: TokenJSON): Token {\n return new Token(data.jwt);\n }\n}\n","import type { AttributeMappingJSON, SamlAccountConnectionJSON, SamlConnectionJSON } from './JSON';\n\nexport class SamlConnection {\n constructor(\n readonly id: string,\n readonly name: string,\n readonly domain: string,\n readonly idpEntityId: string | null,\n readonly idpSsoUrl: string | null,\n readonly idpCertificate: string | null,\n readonly idpMetadataUrl: string | null,\n readonly idpMetadata: string | null,\n readonly acsUrl: string,\n readonly spEntityId: string,\n readonly spMetadataUrl: string,\n readonly active: boolean,\n readonly provider: string,\n readonly userCount: number,\n readonly syncUserAttributes: boolean,\n readonly allowSubdomains: boolean,\n readonly allowIdpInitiated: boolean,\n readonly createdAt: number,\n readonly updatedAt: number,\n readonly attributeMapping: AttributeMapping,\n ) {}\n static fromJSON(data: SamlConnectionJSON): SamlConnection {\n return new SamlConnection(\n data.id,\n data.name,\n data.domain,\n data.idp_entity_id,\n data.idp_sso_url,\n data.idp_certificate,\n data.idp_metadata_url,\n data.idp_metadata,\n data.acs_url,\n data.sp_entity_id,\n data.sp_metadata_url,\n data.active,\n data.provider,\n data.user_count,\n data.sync_user_attributes,\n data.allow_subdomains,\n data.allow_idp_initiated,\n data.created_at,\n data.updated_at,\n data.attribute_mapping && AttributeMapping.fromJSON(data.attribute_mapping),\n );\n }\n}\n\nexport class SamlAccountConnection {\n constructor(\n readonly id: string,\n readonly name: string,\n readonly domain: string,\n readonly active: boolean,\n readonly provider: string,\n readonly syncUserAttributes: boolean,\n readonly allowSubdomains: boolean,\n readonly allowIdpInitiated: boolean,\n readonly createdAt: number,\n readonly updatedAt: number,\n ) {}\n static fromJSON(data: SamlAccountConnectionJSON): SamlAccountConnection {\n return new SamlAccountConnection(\n data.id,\n data.name,\n data.domain,\n data.active,\n data.provider,\n data.sync_user_attributes,\n data.allow_subdomains,\n data.allow_idp_initiated,\n data.created_at,\n data.updated_at,\n );\n }\n}\n\nclass AttributeMapping {\n constructor(\n readonly userId: string,\n readonly emailAddress: string,\n readonly firstName: string,\n readonly lastName: string,\n ) {}\n\n static fromJSON(data: AttributeMappingJSON): AttributeMapping {\n return new AttributeMapping(data.user_id, data.email_address, data.first_name, data.last_name);\n }\n}\n","import type { SamlAccountJSON } from './JSON';\nimport { SamlAccountConnection } from './SamlConnection';\nimport { Verification } from './Verification';\n\nexport class SamlAccount {\n constructor(\n readonly id: string,\n readonly provider: string,\n readonly providerUserId: string | null,\n readonly active: boolean,\n readonly emailAddress: string,\n readonly firstName: string,\n readonly lastName: string,\n readonly verification: Verification | null,\n readonly samlConnection: SamlAccountConnection | null,\n ) {}\n\n static fromJSON(data: SamlAccountJSON): SamlAccount {\n return new SamlAccount(\n data.id,\n data.provider,\n data.provider_user_id,\n data.active,\n data.email_address,\n data.first_name,\n data.last_name,\n data.verification && Verification.fromJSON(data.verification),\n data.saml_connection && SamlAccountConnection.fromJSON(data.saml_connection),\n );\n }\n}\n","import type { Web3WalletJSON } from './JSON';\nimport { Verification } from './Verification';\n\nexport class Web3Wallet {\n constructor(\n readonly id: string,\n readonly web3Wallet: string,\n readonly verification: Verification | null,\n ) {}\n\n static fromJSON(data: Web3WalletJSON): Web3Wallet {\n return new Web3Wallet(data.id, data.web3_wallet, data.verification && Verification.fromJSON(data.verification));\n }\n}\n","import { EmailAddress } from './EmailAddress';\nimport { ExternalAccount } from './ExternalAccount';\nimport type { ExternalAccountJSON, SamlAccountJSON, UserJSON } from './JSON';\nimport { PhoneNumber } from './PhoneNumber';\nimport { SamlAccount } from './SamlAccount';\nimport { Web3Wallet } from './Web3Wallet';\n\nexport class User {\n constructor(\n readonly id: string,\n readonly passwordEnabled: boolean,\n readonly totpEnabled: boolean,\n readonly backupCodeEnabled: boolean,\n readonly twoFactorEnabled: boolean,\n readonly banned: boolean,\n readonly locked: boolean,\n readonly createdAt: number,\n readonly updatedAt: number,\n readonly imageUrl: string,\n readonly hasImage: boolean,\n readonly primaryEmailAddressId: string | null,\n readonly primaryPhoneNumberId: string | null,\n readonly primaryWeb3WalletId: string | null,\n readonly lastSignInAt: number | null,\n readonly externalId: string | null,\n readonly username: string | null,\n readonly firstName: string | null,\n readonly lastName: string | null,\n readonly publicMetadata: UserPublicMetadata = {},\n readonly privateMetadata: UserPrivateMetadata = {},\n readonly unsafeMetadata: UserUnsafeMetadata = {},\n readonly emailAddresses: EmailAddress[] = [],\n readonly phoneNumbers: PhoneNumber[] = [],\n readonly web3Wallets: Web3Wallet[] = [],\n readonly externalAccounts: ExternalAccount[] = [],\n readonly samlAccounts: SamlAccount[] = [],\n readonly lastActiveAt: number | null,\n readonly createOrganizationEnabled: boolean,\n readonly createOrganizationsLimit: number | null = null,\n readonly deleteSelfEnabled: boolean,\n ) {}\n\n static fromJSON(data: UserJSON): User {\n return new User(\n data.id,\n data.password_enabled,\n data.totp_enabled,\n data.backup_code_enabled,\n data.two_factor_enabled,\n data.banned,\n data.locked,\n data.created_at,\n data.updated_at,\n data.image_url,\n data.has_image,\n data.primary_email_address_id,\n data.primary_phone_number_id,\n data.primary_web3_wallet_id,\n data.last_sign_in_at,\n data.external_id,\n data.username,\n data.first_name,\n data.last_name,\n data.public_metadata,\n data.private_metadata,\n data.unsafe_metadata,\n (data.email_addresses || []).map(x => EmailAddress.fromJSON(x)),\n (data.phone_numbers || []).map(x => PhoneNumber.fromJSON(x)),\n (data.web3_wallets || []).map(x => Web3Wallet.fromJSON(x)),\n (data.external_accounts || []).map((x: ExternalAccountJSON) => ExternalAccount.fromJSON(x)),\n (data.saml_accounts || []).map((x: SamlAccountJSON) => SamlAccount.fromJSON(x)),\n data.last_active_at,\n data.create_organization_enabled,\n data.create_organizations_limit,\n data.delete_self_enabled,\n );\n }\n\n get primaryEmailAddress() {\n return this.emailAddresses.find(({ id }) => id === this.primaryEmailAddressId) ?? null;\n }\n\n get primaryPhoneNumber() {\n return this.phoneNumbers.find(({ id }) => id === this.primaryPhoneNumberId) ?? null;\n }\n\n get primaryWeb3Wallet() {\n return this.web3Wallets.find(({ id }) => id === this.primaryWeb3WalletId) ?? null;\n }\n\n get fullName() {\n return [this.firstName, this.lastName].join(' ').trim() || null;\n }\n}\n","import {\n AllowlistIdentifier,\n Client,\n DeletedObject,\n Email,\n EmailAddress,\n Invitation,\n OauthAccessToken,\n Organization,\n OrganizationInvitation,\n OrganizationMembership,\n PhoneNumber,\n RedirectUrl,\n Session,\n SignInToken,\n SMSMessage,\n Token,\n User,\n} from '.';\nimport type { PaginatedResponseJSON } from './JSON';\nimport { ObjectType } from './JSON';\n\ntype ResourceResponse = {\n data: T;\n};\n\nexport type PaginatedResourceResponse = ResourceResponse & {\n totalCount: number;\n};\n\nexport function deserialize(payload: unknown): PaginatedResourceResponse | ResourceResponse {\n let data, totalCount: number | undefined;\n\n if (Array.isArray(payload)) {\n const data = payload.map(item => jsonToObject(item)) as U;\n return { data };\n } else if (isPaginated(payload)) {\n data = payload.data.map(item => jsonToObject(item)) as U;\n totalCount = payload.total_count;\n\n return { data, totalCount };\n } else {\n return { data: jsonToObject(payload) };\n }\n}\n\nfunction isPaginated(payload: unknown): payload is PaginatedResponseJSON {\n if (!payload || typeof payload !== 'object' || !('data' in payload)) {\n return false;\n }\n\n return Array.isArray(payload.data) && payload.data !== undefined;\n}\n\nfunction getCount(item: PaginatedResponseJSON) {\n return item.total_count;\n}\n\n// TODO: Revise response deserialization\nfunction jsonToObject(item: any): any {\n // Special case: DeletedObject\n // TODO: Improve this check\n if (typeof item !== 'string' && 'object' in item && 'deleted' in item) {\n return DeletedObject.fromJSON(item);\n }\n\n switch (item.object) {\n case ObjectType.AllowlistIdentifier:\n return AllowlistIdentifier.fromJSON(item);\n case ObjectType.Client:\n return Client.fromJSON(item);\n case ObjectType.EmailAddress:\n return EmailAddress.fromJSON(item);\n case ObjectType.Email:\n return Email.fromJSON(item);\n case ObjectType.Invitation:\n return Invitation.fromJSON(item);\n case ObjectType.OauthAccessToken:\n return OauthAccessToken.fromJSON(item);\n case ObjectType.Organization:\n return Organization.fromJSON(item);\n case ObjectType.OrganizationInvitation:\n return OrganizationInvitation.fromJSON(item);\n case ObjectType.OrganizationMembership:\n return OrganizationMembership.fromJSON(item);\n case ObjectType.PhoneNumber:\n return PhoneNumber.fromJSON(item);\n case ObjectType.RedirectUrl:\n return RedirectUrl.fromJSON(item);\n case ObjectType.SignInToken:\n return SignInToken.fromJSON(item);\n case ObjectType.Session:\n return Session.fromJSON(item);\n case ObjectType.SmsMessage:\n return SMSMessage.fromJSON(item);\n case ObjectType.Token:\n return Token.fromJSON(item);\n case ObjectType.TotalCount:\n return getCount(item);\n case ObjectType.User:\n return User.fromJSON(item);\n default:\n return item;\n }\n}\n","import {\n AllowlistIdentifierAPI,\n ClientAPI,\n DomainAPI,\n EmailAddressAPI,\n InvitationAPI,\n OrganizationAPI,\n PhoneNumberAPI,\n RedirectUrlAPI,\n SamlConnectionAPI,\n SessionAPI,\n SignInTokenAPI,\n TestingTokenAPI,\n UserAPI,\n} from './endpoints';\nimport { buildRequest } from './request';\n\nexport type CreateBackendApiOptions = Parameters[0];\n\nexport type ApiClient = ReturnType;\n\nexport function createBackendApiClient(options: CreateBackendApiOptions) {\n const request = buildRequest(options);\n\n return {\n allowlistIdentifiers: new AllowlistIdentifierAPI(request),\n clients: new ClientAPI(request),\n emailAddresses: new EmailAddressAPI(request),\n invitations: new InvitationAPI(request),\n organizations: new OrganizationAPI(request),\n phoneNumbers: new PhoneNumberAPI(request),\n redirectUrls: new RedirectUrlAPI(request),\n sessions: new SessionAPI(request),\n signInTokens: new SignInTokenAPI(request),\n users: new UserAPI(request),\n domains: new DomainAPI(request),\n samlConnections: new SamlConnectionAPI(request),\n testingTokens: new TestingTokenAPI(request),\n };\n}\n","import { createCheckAuthorization } from '@clerk/shared/authorization';\nimport type {\n ActClaim,\n CheckAuthorizationWithCustomPermissions,\n JwtPayload,\n OrganizationCustomPermissionKey,\n OrganizationCustomRoleKey,\n ServerGetToken,\n ServerGetTokenOptions,\n} from '@clerk/types';\n\nimport type { CreateBackendApiOptions } from '../api';\nimport { createBackendApiClient } from '../api';\nimport type { AuthenticateContext } from './authenticateContext';\n\ntype AuthObjectDebugData = Record;\ntype AuthObjectDebug = () => AuthObjectDebugData;\n\n/**\n * @internal\n */\nexport type SignedInAuthObjectOptions = CreateBackendApiOptions & {\n token: string;\n};\n\n/**\n * @internal\n */\nexport type SignedInAuthObject = {\n sessionClaims: JwtPayload;\n sessionId: string;\n actor: ActClaim | undefined;\n userId: string;\n orgId: string | undefined;\n orgRole: OrganizationCustomRoleKey | undefined;\n orgSlug: string | undefined;\n orgPermissions: OrganizationCustomPermissionKey[] | undefined;\n /**\n * Factor Verification Age\n * Each item represents the minutes that have passed since the last time a first or second factor were verified.\n * [fistFactorAge, secondFactorAge]\n * @experimental This API is experimental and may change at any moment.\n */\n __experimental_factorVerificationAge: [number, number] | null;\n getToken: ServerGetToken;\n has: CheckAuthorizationWithCustomPermissions;\n debug: AuthObjectDebug;\n};\n\n/**\n * @internal\n */\nexport type SignedOutAuthObject = {\n sessionClaims: null;\n sessionId: null;\n actor: null;\n userId: null;\n orgId: null;\n orgRole: null;\n orgSlug: null;\n orgPermissions: null;\n /**\n * Factor Verification Age\n * Each item represents the minutes that have passed since the last time a first or second factor were verified.\n * [fistFactorAge, secondFactorAge]\n * @experimental This API is experimental and may change at any moment.\n */\n __experimental_factorVerificationAge: null;\n getToken: ServerGetToken;\n has: CheckAuthorizationWithCustomPermissions;\n debug: AuthObjectDebug;\n};\n\n/**\n * @internal\n */\nexport type AuthObject = SignedInAuthObject | SignedOutAuthObject;\n\nconst createDebug = (data: AuthObjectDebugData | undefined) => {\n return () => {\n const res = { ...data };\n res.secretKey = (res.secretKey || '').substring(0, 7);\n res.jwtKey = (res.jwtKey || '').substring(0, 7);\n return { ...res };\n };\n};\n\n/**\n * @internal\n */\nexport function signedInAuthObject(\n authenticateContext: AuthenticateContext,\n sessionToken: string,\n sessionClaims: JwtPayload,\n): SignedInAuthObject {\n const {\n act: actor,\n sid: sessionId,\n org_id: orgId,\n org_role: orgRole,\n org_slug: orgSlug,\n org_permissions: orgPermissions,\n sub: userId,\n fva,\n } = sessionClaims;\n const apiClient = createBackendApiClient(authenticateContext);\n const getToken = createGetToken({\n sessionId,\n sessionToken,\n fetcher: async (...args) => (await apiClient.sessions.getToken(...args)).jwt,\n });\n\n // fva can be undefined for instances that have not opt-in\n const __experimental_factorVerificationAge = fva ?? null;\n\n return {\n actor,\n sessionClaims,\n sessionId,\n userId,\n orgId,\n orgRole,\n orgSlug,\n orgPermissions,\n __experimental_factorVerificationAge,\n getToken,\n has: createCheckAuthorization({ orgId, orgRole, orgPermissions, userId, __experimental_factorVerificationAge }),\n debug: createDebug({ ...authenticateContext, sessionToken }),\n };\n}\n\n/**\n * @internal\n */\nexport function signedOutAuthObject(debugData?: AuthObjectDebugData): SignedOutAuthObject {\n return {\n sessionClaims: null,\n sessionId: null,\n userId: null,\n actor: null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n orgPermissions: null,\n __experimental_factorVerificationAge: null,\n getToken: () => Promise.resolve(null),\n has: () => false,\n debug: createDebug(debugData),\n };\n}\n\n/**\n * Auth objects moving through the server -> client boundary need to be serializable\n * as we need to ensure that they can be transferred via the network as pure strings.\n * Some frameworks like Remix or Next (/pages dir only) handle this serialization by simply\n * ignoring any non-serializable keys, however Nextjs /app directory is stricter and\n * throws an error if a non-serializable value is found.\n * @internal\n */\nexport const makeAuthObjectSerializable = >(obj: T): T => {\n // remove any non-serializable props from the returned object\n\n const { debug, getToken, has, ...rest } = obj as unknown as AuthObject;\n return rest as unknown as T;\n};\n\ntype TokenFetcher = (sessionId: string, template: string) => Promise;\n\ntype CreateGetToken = (params: { sessionId: string; sessionToken: string; fetcher: TokenFetcher }) => ServerGetToken;\n\nconst createGetToken: CreateGetToken = params => {\n const { fetcher, sessionToken, sessionId } = params || {};\n\n return async (options: ServerGetTokenOptions = {}) => {\n if (!sessionId) {\n return null;\n }\n\n if (options.template) {\n return fetcher(sessionId, options.template);\n }\n\n return sessionToken;\n };\n};\n","import type { JwtPayload } from '@clerk/types';\n\nimport { constants } from '../constants';\nimport type { TokenVerificationErrorReason } from '../errors';\nimport type { AuthenticateContext } from './authenticateContext';\nimport type { SignedInAuthObject, SignedOutAuthObject } from './authObjects';\nimport { signedInAuthObject, signedOutAuthObject } from './authObjects';\n\nexport const AuthStatus = {\n SignedIn: 'signed-in',\n SignedOut: 'signed-out',\n Handshake: 'handshake',\n} as const;\n\nexport type AuthStatus = (typeof AuthStatus)[keyof typeof AuthStatus];\n\nexport type SignedInState = {\n status: typeof AuthStatus.SignedIn;\n reason: null;\n message: null;\n proxyUrl?: string;\n publishableKey: string;\n isSatellite: boolean;\n domain: string;\n signInUrl: string;\n signUpUrl: string;\n afterSignInUrl: string;\n afterSignUpUrl: string;\n isSignedIn: true;\n toAuth: () => SignedInAuthObject;\n headers: Headers;\n token: string;\n};\n\nexport type SignedOutState = {\n status: typeof AuthStatus.SignedOut;\n message: string;\n reason: AuthReason;\n proxyUrl?: string;\n publishableKey: string;\n isSatellite: boolean;\n domain: string;\n signInUrl: string;\n signUpUrl: string;\n afterSignInUrl: string;\n afterSignUpUrl: string;\n isSignedIn: false;\n toAuth: () => SignedOutAuthObject;\n headers: Headers;\n token: null;\n};\n\nexport type HandshakeState = Omit & {\n status: typeof AuthStatus.Handshake;\n headers: Headers;\n toAuth: () => null;\n};\n\nexport const AuthErrorReason = {\n ClientUATWithoutSessionToken: 'client-uat-but-no-session-token',\n DevBrowserMissing: 'dev-browser-missing',\n DevBrowserSync: 'dev-browser-sync',\n PrimaryRespondsToSyncing: 'primary-responds-to-syncing',\n SatelliteCookieNeedsSyncing: 'satellite-needs-syncing',\n SessionTokenAndUATMissing: 'session-token-and-uat-missing',\n SessionTokenMissing: 'session-token-missing',\n SessionTokenExpired: 'session-token-expired',\n SessionTokenIATBeforeClientUAT: 'session-token-iat-before-client-uat',\n SessionTokenNBF: 'session-token-nbf',\n SessionTokenIatInTheFuture: 'session-token-iat-in-the-future',\n SessionTokenWithoutClientUAT: 'session-token-but-no-client-uat',\n ActiveOrganizationMismatch: 'active-organization-mismatch',\n UnexpectedError: 'unexpected-error',\n} as const;\n\nexport type AuthErrorReason = (typeof AuthErrorReason)[keyof typeof AuthErrorReason];\n\nexport type AuthReason = AuthErrorReason | TokenVerificationErrorReason;\n\nexport type RequestState = SignedInState | SignedOutState | HandshakeState;\n\nexport function signedIn(\n authenticateContext: AuthenticateContext,\n sessionClaims: JwtPayload,\n headers: Headers = new Headers(),\n token: string,\n): SignedInState {\n const authObject = signedInAuthObject(authenticateContext, token, sessionClaims);\n return {\n status: AuthStatus.SignedIn,\n reason: null,\n message: null,\n proxyUrl: authenticateContext.proxyUrl || '',\n publishableKey: authenticateContext.publishableKey || '',\n isSatellite: authenticateContext.isSatellite || false,\n domain: authenticateContext.domain || '',\n signInUrl: authenticateContext.signInUrl || '',\n signUpUrl: authenticateContext.signUpUrl || '',\n afterSignInUrl: authenticateContext.afterSignInUrl || '',\n afterSignUpUrl: authenticateContext.afterSignUpUrl || '',\n isSignedIn: true,\n toAuth: () => authObject,\n headers,\n token,\n };\n}\n\nexport function signedOut(\n authenticateContext: AuthenticateContext,\n reason: AuthReason,\n message = '',\n headers: Headers = new Headers(),\n): SignedOutState {\n return withDebugHeaders({\n status: AuthStatus.SignedOut,\n reason,\n message,\n proxyUrl: authenticateContext.proxyUrl || '',\n publishableKey: authenticateContext.publishableKey || '',\n isSatellite: authenticateContext.isSatellite || false,\n domain: authenticateContext.domain || '',\n signInUrl: authenticateContext.signInUrl || '',\n signUpUrl: authenticateContext.signUpUrl || '',\n afterSignInUrl: authenticateContext.afterSignInUrl || '',\n afterSignUpUrl: authenticateContext.afterSignUpUrl || '',\n isSignedIn: false,\n headers,\n toAuth: () => signedOutAuthObject({ ...authenticateContext, status: AuthStatus.SignedOut, reason, message }),\n token: null,\n });\n}\n\nexport function handshake(\n authenticateContext: AuthenticateContext,\n reason: AuthReason,\n message = '',\n headers: Headers,\n): HandshakeState {\n return withDebugHeaders({\n status: AuthStatus.Handshake,\n reason,\n message,\n publishableKey: authenticateContext.publishableKey || '',\n isSatellite: authenticateContext.isSatellite || false,\n domain: authenticateContext.domain || '',\n proxyUrl: authenticateContext.proxyUrl || '',\n signInUrl: authenticateContext.signInUrl || '',\n signUpUrl: authenticateContext.signUpUrl || '',\n afterSignInUrl: authenticateContext.afterSignInUrl || '',\n afterSignUpUrl: authenticateContext.afterSignUpUrl || '',\n isSignedIn: false,\n headers,\n toAuth: () => null,\n token: null,\n });\n}\n\nconst withDebugHeaders = (requestState: T): T => {\n const headers = new Headers(requestState.headers || {});\n\n if (requestState.message) {\n try {\n headers.set(constants.Headers.AuthMessage, requestState.message);\n } catch (e) {\n // headers.set can throw if unicode strings are passed to it. In this case, simply do nothing\n }\n }\n\n if (requestState.reason) {\n try {\n headers.set(constants.Headers.AuthReason, requestState.reason);\n } catch (e) {\n /* empty */\n }\n }\n\n if (requestState.status) {\n try {\n headers.set(constants.Headers.AuthStatus, requestState.status);\n } catch (e) {\n /* empty */\n }\n }\n\n requestState.headers = headers;\n\n return requestState;\n};\n","import { parse as parseCookies } from 'cookie';\n\nimport { constants } from '../constants';\nimport type { ClerkUrl } from './clerkUrl';\nimport { createClerkUrl } from './clerkUrl';\n\n/**\n * A class that extends the native Request class,\n * adds cookies helpers and a normalised clerkUrl that is constructed by using the values found\n * in req.headers so it is able to work reliably when the app is running behind a proxy server.\n */\nclass ClerkRequest extends Request {\n readonly clerkUrl: ClerkUrl;\n readonly cookies: Map;\n\n public constructor(input: ClerkRequest | Request | RequestInfo, init?: RequestInit) {\n // The usual way to duplicate a request object is to\n // pass the original request object to the Request constructor\n // both as the `input` and `init` parameters, eg: super(req, req)\n // However, this fails in certain environments like Vercel Edge Runtime\n // when a framework like Remix polyfills the global Request object.\n // This happens because `undici` performs the following instanceof check\n // which, instead of testing against the global Request object, tests against\n // the Request class defined in the same file (local Request class).\n // For more details, please refer to:\n // https://github.com/nodejs/undici/issues/2155\n // https://github.com/nodejs/undici/blob/7153a1c78d51840bbe16576ce353e481c3934701/lib/fetch/request.js#L854\n const url = typeof input !== 'string' && 'url' in input ? input.url : String(input);\n super(url, init || typeof input === 'string' ? undefined : input);\n this.clerkUrl = this.deriveUrlFromHeaders(this);\n this.cookies = this.parseCookies(this);\n }\n\n public toJSON() {\n return {\n url: this.clerkUrl.href,\n method: this.method,\n headers: JSON.stringify(Object.fromEntries(this.headers)),\n clerkUrl: this.clerkUrl.toString(),\n cookies: JSON.stringify(Object.fromEntries(this.cookies)),\n };\n }\n\n /**\n * Used to fix request.url using the x-forwarded-* headers\n * TODO add detailed description of the issues this solves\n */\n private deriveUrlFromHeaders(req: Request) {\n const initialUrl = new URL(req.url);\n const forwardedProto = req.headers.get(constants.Headers.ForwardedProto);\n const forwardedHost = req.headers.get(constants.Headers.ForwardedHost);\n const host = req.headers.get(constants.Headers.Host);\n const protocol = initialUrl.protocol;\n\n const resolvedHost = this.getFirstValueFromHeader(forwardedHost) ?? host;\n const resolvedProtocol = this.getFirstValueFromHeader(forwardedProto) ?? protocol?.replace(/[:/]/, '');\n const origin = resolvedHost && resolvedProtocol ? `${resolvedProtocol}://${resolvedHost}` : initialUrl.origin;\n\n if (origin === initialUrl.origin) {\n return createClerkUrl(initialUrl);\n }\n return createClerkUrl(initialUrl.pathname + initialUrl.search, origin);\n }\n\n private getFirstValueFromHeader(value?: string | null) {\n return value?.split(',')[0];\n }\n\n private parseCookies(req: Request) {\n const cookiesRecord = parseCookies(this.decodeCookieValue(req.headers.get('cookie') || ''));\n return new Map(Object.entries(cookiesRecord));\n }\n\n private decodeCookieValue(str: string) {\n return str ? str.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent) : str;\n }\n}\n\nexport const createClerkRequest = (...args: ConstructorParameters): ClerkRequest => {\n return args[0] instanceof ClerkRequest ? args[0] : new ClerkRequest(...args);\n};\n\nexport type { ClerkRequest };\n","class ClerkUrl extends URL {\n public isCrossOrigin(other: URL | string) {\n return this.origin !== new URL(other.toString()).origin;\n }\n}\n\nexport type WithClerkUrl = T & {\n /**\n * When a NextJs app is hosted on a platform different from Vercel\n * or inside a container (Netlify, Fly.io, AWS Amplify, docker etc),\n * req.url is always set to `localhost:3000` instead of the actual host of the app.\n *\n * The `authMiddleware` uses the value of the available req.headers in order to construct\n * and use the correct url internally. This url is then exposed as `experimental_clerkUrl`,\n * intended to be used within `beforeAuth` and `afterAuth` if needed.\n */\n clerkUrl: ClerkUrl;\n};\n\nexport const createClerkUrl = (...args: ConstructorParameters): ClerkUrl => {\n return new ClerkUrl(...args);\n};\n\nexport type { ClerkUrl };\n","import { API_URL, API_VERSION, MAX_CACHE_LAST_UPDATED_AT_SECONDS } from '../constants';\nimport {\n TokenVerificationError,\n TokenVerificationErrorAction,\n TokenVerificationErrorCode,\n TokenVerificationErrorReason,\n} from '../errors';\n// DO NOT CHANGE: Runtime needs to be imported as a default export so that we can stub its dependencies with Sinon.js\n// For more information refer to https://sinonjs.org/how-to/stub-dependency/\nimport runtime from '../runtime';\nimport { joinPaths } from '../util/path';\nimport { callWithRetry } from '../util/shared';\n\ntype JsonWebKeyWithKid = JsonWebKey & { kid: string };\n\ntype JsonWebKeyCache = Record;\n\nlet cache: JsonWebKeyCache = {};\nlet lastUpdatedAt = 0;\n\nfunction getFromCache(kid: string) {\n return cache[kid];\n}\n\nfunction getCacheValues() {\n return Object.values(cache);\n}\n\nfunction setInCache(jwk: JsonWebKeyWithKid, shouldExpire = true) {\n cache[jwk.kid] = jwk;\n lastUpdatedAt = shouldExpire ? Date.now() : -1;\n}\n\nconst LocalJwkKid = 'local';\nconst PEM_HEADER = '-----BEGIN PUBLIC KEY-----';\nconst PEM_TRAILER = '-----END PUBLIC KEY-----';\nconst RSA_PREFIX = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA';\nconst RSA_SUFFIX = 'IDAQAB';\n\n/**\n *\n * Loads a local PEM key usually from process.env and transform it to JsonWebKey format.\n * The result is also cached on the module level to avoid unnecessary computations in subsequent invocations.\n *\n * @param {string} localKey\n * @returns {JsonWebKey} key\n */\nexport function loadClerkJWKFromLocal(localKey?: string): JsonWebKey {\n if (!getFromCache(LocalJwkKid)) {\n if (!localKey) {\n throw new TokenVerificationError({\n action: TokenVerificationErrorAction.SetClerkJWTKey,\n message: 'Missing local JWK.',\n reason: TokenVerificationErrorReason.LocalJWKMissing,\n });\n }\n\n const modulus = localKey\n .replace(/(\\r\\n|\\n|\\r)/gm, '')\n .replace(PEM_HEADER, '')\n .replace(PEM_TRAILER, '')\n .replace(RSA_PREFIX, '')\n .replace(RSA_SUFFIX, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n\n // JWK https://datatracker.ietf.org/doc/html/rfc7517\n setInCache(\n {\n kid: 'local',\n kty: 'RSA',\n alg: 'RS256',\n n: modulus,\n e: 'AQAB',\n },\n false, // local key never expires in cache\n );\n }\n\n return getFromCache(LocalJwkKid);\n}\n\nexport type LoadClerkJWKFromRemoteOptions = {\n kid: string;\n /**\n * @deprecated This cache TTL is deprecated and will be removed in the next major version. Specifying a cache TTL is now a no-op.\n */\n jwksCacheTtlInMs?: number;\n skipJwksCache?: boolean;\n secretKey?: string;\n apiUrl?: string;\n apiVersion?: string;\n};\n\n/**\n *\n * Loads a key from JWKS retrieved from the well-known Frontend API endpoint of the issuer.\n * The result is also cached on the module level to avoid network requests in subsequent invocations.\n * The cache lasts 1 hour by default.\n *\n * @param {Object} options\n * @param {string} options.kid - The id of the key that the JWT was signed with\n * @param {string} options.alg - The algorithm of the JWT\n * @returns {JsonWebKey} key\n */\nexport async function loadClerkJWKFromRemote({\n secretKey,\n apiUrl = API_URL,\n apiVersion = API_VERSION,\n kid,\n skipJwksCache,\n}: LoadClerkJWKFromRemoteOptions): Promise {\n if (skipJwksCache || cacheHasExpired() || !getFromCache(kid)) {\n if (!secretKey) {\n throw new TokenVerificationError({\n action: TokenVerificationErrorAction.ContactSupport,\n message: 'Failed to load JWKS from Clerk Backend or Frontend API.',\n reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad,\n });\n }\n const fetcher = () => fetchJWKSFromBAPI(apiUrl, secretKey, apiVersion);\n const { keys } = await callWithRetry<{ keys: JsonWebKeyWithKid[] }>(fetcher);\n\n if (!keys || !keys.length) {\n throw new TokenVerificationError({\n action: TokenVerificationErrorAction.ContactSupport,\n message: 'The JWKS endpoint did not contain any signing keys. Contact support@clerk.com.',\n reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad,\n });\n }\n\n keys.forEach(key => setInCache(key));\n }\n\n const jwk = getFromCache(kid);\n\n if (!jwk) {\n const cacheValues = getCacheValues();\n const jwkKeys = cacheValues\n .map(jwk => jwk.kid)\n .sort()\n .join(', ');\n\n throw new TokenVerificationError({\n action: `Go to your Dashboard and validate your secret and public keys are correct. ${TokenVerificationErrorAction.ContactSupport} if the issue persists.`,\n message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT. The following kid is available: ${jwkKeys}`,\n reason: TokenVerificationErrorReason.JWKKidMismatch,\n });\n }\n\n return jwk;\n}\n\nasync function fetchJWKSFromBAPI(apiUrl: string, key: string, apiVersion: string) {\n if (!key) {\n throw new TokenVerificationError({\n action: TokenVerificationErrorAction.SetClerkSecretKey,\n message:\n 'Missing Clerk Secret Key or API Key. Go to https://dashboard.clerk.com and get your key for your instance.',\n reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad,\n });\n }\n\n const url = new URL(apiUrl);\n url.pathname = joinPaths(url.pathname, apiVersion, '/jwks');\n\n const response = await runtime.fetch(url.href, {\n headers: {\n Authorization: `Bearer ${key}`,\n 'Content-Type': 'application/json',\n },\n });\n\n if (!response.ok) {\n const json = await response.json();\n const invalidSecretKeyError = getErrorObjectByCode(json?.errors, TokenVerificationErrorCode.InvalidSecretKey);\n\n if (invalidSecretKeyError) {\n const reason = TokenVerificationErrorReason.InvalidSecretKey;\n\n throw new TokenVerificationError({\n action: TokenVerificationErrorAction.ContactSupport,\n message: invalidSecretKeyError.message,\n reason,\n });\n }\n\n throw new TokenVerificationError({\n action: TokenVerificationErrorAction.ContactSupport,\n message: `Error loading Clerk JWKS from ${url.href} with code=${response.status}`,\n reason: TokenVerificationErrorReason.RemoteJWKFailedToLoad,\n });\n }\n\n return response.json();\n}\n\nfunction cacheHasExpired() {\n // If lastUpdatedAt is -1, it means that we're using a local JWKS and it never expires\n if (lastUpdatedAt === -1) {\n return false;\n }\n\n // If the cache has expired, clear the value so we don't attempt to make decisions based on stale data\n const isExpired = Date.now() - lastUpdatedAt >= MAX_CACHE_LAST_UPDATED_AT_SECONDS * 1000;\n\n if (isExpired) {\n cache = {};\n }\n\n return isExpired;\n}\n\ntype ErrorFields = {\n message: string;\n long_message: string;\n code: string;\n};\n\nconst getErrorObjectByCode = (errors: ErrorFields[], code: string) => {\n if (!errors) {\n return null;\n }\n\n return errors.find((err: ErrorFields) => err.code === code);\n};\n","import type { JwtPayload } from '@clerk/types';\n\nimport { TokenVerificationError, TokenVerificationErrorAction, TokenVerificationErrorReason } from '../errors';\nimport type { VerifyJwtOptions } from '../jwt';\nimport type { JwtReturnType } from '../jwt/types';\nimport { decodeJwt, verifyJwt } from '../jwt/verifyJwt';\nimport type { LoadClerkJWKFromRemoteOptions } from './keys';\nimport { loadClerkJWKFromLocal, loadClerkJWKFromRemote } from './keys';\n\nexport type VerifyTokenOptions = Omit &\n Omit & { jwtKey?: string };\n\nexport async function verifyToken(\n token: string,\n options: VerifyTokenOptions,\n): Promise> {\n const { data: decodedResult, errors } = decodeJwt(token);\n if (errors) {\n return { errors };\n }\n\n const { header } = decodedResult;\n const { kid } = header;\n\n try {\n let key;\n\n if (options.jwtKey) {\n key = loadClerkJWKFromLocal(options.jwtKey);\n } else if (options.secretKey) {\n // Fetch JWKS from Backend API using the key\n key = await loadClerkJWKFromRemote({ ...options, kid });\n } else {\n return {\n errors: [\n new TokenVerificationError({\n action: TokenVerificationErrorAction.SetClerkJWTKey,\n message: 'Failed to resolve JWK during verification.',\n reason: TokenVerificationErrorReason.JWKFailedToResolve,\n }),\n ],\n };\n }\n\n return await verifyJwt(token, { ...options, key });\n } catch (error) {\n return { errors: [error as TokenVerificationError] };\n }\n}\n","import type { Match, MatchFunction } from '@clerk/shared/pathToRegexp';\nimport { match } from '@clerk/shared/pathToRegexp';\nimport type { JwtPayload } from '@clerk/types';\n\nimport { constants } from '../constants';\nimport type { TokenCarrier } from '../errors';\nimport { TokenVerificationError, TokenVerificationErrorReason } from '../errors';\nimport { decodeJwt } from '../jwt/verifyJwt';\nimport { assertValidSecretKey } from '../util/optionsAssertions';\nimport { isDevelopmentFromSecretKey } from '../util/shared';\nimport type { AuthenticateContext } from './authenticateContext';\nimport { createAuthenticateContext } from './authenticateContext';\nimport type { SignedInAuthObject } from './authObjects';\nimport type { HandshakeState, RequestState, SignedInState, SignedOutState } from './authStatus';\nimport { AuthErrorReason, handshake, signedIn, signedOut } from './authStatus';\nimport { createClerkRequest } from './clerkRequest';\nimport { getCookieName, getCookieValue } from './cookie';\nimport { verifyHandshakeToken } from './handshake';\nimport type { AuthenticateRequestOptions, OrganizationSyncOptions } from './types';\nimport { verifyToken } from './verify';\n\nexport const RefreshTokenErrorReason = {\n NonEligibleNoCookie: 'non-eligible-no-refresh-cookie',\n NonEligibleNonGet: 'non-eligible-non-get',\n InvalidSessionToken: 'invalid-session-token',\n MissingApiClient: 'missing-api-client',\n MissingSessionToken: 'missing-session-token',\n MissingRefreshToken: 'missing-refresh-token',\n ExpiredSessionTokenDecodeFailed: 'expired-session-token-decode-failed',\n ExpiredSessionTokenMissingSidClaim: 'expired-session-token-missing-sid-claim',\n FetchError: 'fetch-error',\n UnexpectedSDKError: 'unexpected-sdk-error',\n} as const;\n\nfunction assertSignInUrlExists(signInUrl: string | undefined, key: string): asserts signInUrl is string {\n if (!signInUrl && isDevelopmentFromSecretKey(key)) {\n throw new Error(`Missing signInUrl. Pass a signInUrl for dev instances if an app is satellite`);\n }\n}\n\nfunction assertProxyUrlOrDomain(proxyUrlOrDomain: string | undefined) {\n if (!proxyUrlOrDomain) {\n throw new Error(`Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl`);\n }\n}\n\nfunction assertSignInUrlFormatAndOrigin(_signInUrl: string, origin: string) {\n let signInUrl: URL;\n try {\n signInUrl = new URL(_signInUrl);\n } catch {\n throw new Error(`The signInUrl needs to have a absolute url format.`);\n }\n\n if (signInUrl.origin === origin) {\n throw new Error(`The signInUrl needs to be on a different origin than your satellite application.`);\n }\n}\n\n/**\n * Currently, a request is only eligible for a handshake if we can say it's *probably* a request for a document, not a fetch or some other exotic request.\n * This heuristic should give us a reliable enough signal for browsers that support `Sec-Fetch-Dest` and for those that don't.\n */\nfunction isRequestEligibleForHandshake(authenticateContext: { secFetchDest?: string; accept?: string }) {\n const { accept, secFetchDest } = authenticateContext;\n\n // NOTE: we could also check sec-fetch-mode === navigate here, but according to the spec, sec-fetch-dest: document should indicate that the request is the data of a user navigation.\n // Also, we check for 'iframe' because it's the value set when a doc request is made by an iframe.\n if (secFetchDest === 'document' || secFetchDest === 'iframe') {\n return true;\n }\n\n if (!secFetchDest && accept?.startsWith('text/html')) {\n return true;\n }\n\n return false;\n}\n\nfunction isRequestEligibleForRefresh(\n err: TokenVerificationError,\n authenticateContext: { refreshTokenInCookie?: string },\n request: Request,\n) {\n return (\n err.reason === TokenVerificationErrorReason.TokenExpired &&\n !!authenticateContext.refreshTokenInCookie &&\n request.method === 'GET'\n );\n}\n\nexport async function authenticateRequest(\n request: Request,\n options: AuthenticateRequestOptions,\n): Promise {\n const authenticateContext = await createAuthenticateContext(createClerkRequest(request), options);\n assertValidSecretKey(authenticateContext.secretKey);\n\n if (authenticateContext.isSatellite) {\n assertSignInUrlExists(authenticateContext.signInUrl, authenticateContext.secretKey);\n if (authenticateContext.signInUrl && authenticateContext.origin) {\n assertSignInUrlFormatAndOrigin(authenticateContext.signInUrl, authenticateContext.origin);\n }\n assertProxyUrlOrDomain(authenticateContext.proxyUrl || authenticateContext.domain);\n }\n\n // NOTE(izaak): compute regex matchers early for efficiency - they can be used multiple times.\n const organizationSyncTargetMatchers = computeOrganizationSyncTargetMatchers(options.organizationSyncOptions);\n\n function removeDevBrowserFromURL(url: URL) {\n const updatedURL = new URL(url);\n\n updatedURL.searchParams.delete(constants.QueryParameters.DevBrowser);\n // Remove legacy dev browser query param key to support local app with v5 using AP with v4\n updatedURL.searchParams.delete(constants.QueryParameters.LegacyDevBrowser);\n\n return updatedURL;\n }\n\n function buildRedirectToHandshake({ handshakeReason }: { handshakeReason: string }) {\n const redirectUrl = removeDevBrowserFromURL(authenticateContext.clerkUrl);\n const frontendApiNoProtocol = authenticateContext.frontendApi.replace(/http(s)?:\\/\\//, '');\n\n const url = new URL(`https://${frontendApiNoProtocol}/v1/client/handshake`);\n url.searchParams.append('redirect_url', redirectUrl?.href || '');\n url.searchParams.append('suffixed_cookies', authenticateContext.suffixedCookies.toString());\n url.searchParams.append(constants.QueryParameters.HandshakeReason, handshakeReason);\n\n if (authenticateContext.instanceType === 'development' && authenticateContext.devBrowserToken) {\n url.searchParams.append(constants.QueryParameters.DevBrowser, authenticateContext.devBrowserToken);\n }\n\n const toActivate = getOrganizationSyncTarget(\n authenticateContext.clerkUrl,\n options.organizationSyncOptions,\n organizationSyncTargetMatchers,\n );\n if (toActivate) {\n const params = getOrganizationSyncQueryParams(toActivate);\n\n params.forEach((value, key) => {\n url.searchParams.append(key, value);\n });\n }\n\n return new Headers({ [constants.Headers.Location]: url.href });\n }\n\n async function resolveHandshake() {\n const headers = new Headers({\n 'Access-Control-Allow-Origin': 'null',\n 'Access-Control-Allow-Credentials': 'true',\n });\n\n const handshakePayload = await verifyHandshakeToken(authenticateContext.handshakeToken!, authenticateContext);\n const cookiesToSet = handshakePayload.handshake;\n\n let sessionToken = '';\n cookiesToSet.forEach((x: string) => {\n headers.append('Set-Cookie', x);\n if (getCookieName(x).startsWith(constants.Cookies.Session)) {\n sessionToken = getCookieValue(x);\n }\n });\n\n if (authenticateContext.instanceType === 'development') {\n const newUrl = new URL(authenticateContext.clerkUrl);\n newUrl.searchParams.delete(constants.QueryParameters.Handshake);\n newUrl.searchParams.delete(constants.QueryParameters.HandshakeHelp);\n headers.append(constants.Headers.Location, newUrl.toString());\n headers.set(constants.Headers.CacheControl, 'no-store');\n }\n\n if (sessionToken === '') {\n return signedOut(authenticateContext, AuthErrorReason.SessionTokenMissing, '', headers);\n }\n\n const { data, errors: [error] = [] } = await verifyToken(sessionToken, authenticateContext);\n if (data) {\n return signedIn(authenticateContext, data, headers, sessionToken);\n }\n\n if (\n authenticateContext.instanceType === 'development' &&\n (error?.reason === TokenVerificationErrorReason.TokenExpired ||\n error?.reason === TokenVerificationErrorReason.TokenNotActiveYet ||\n error?.reason === TokenVerificationErrorReason.TokenIatInTheFuture)\n ) {\n error.tokenCarrier = 'cookie';\n // This probably means we're dealing with clock skew\n console.error(\n `Clerk: Clock skew detected. This usually means that your system clock is inaccurate. Clerk will attempt to account for the clock skew in development.\n\nTo resolve this issue, make sure your system's clock is set to the correct time (e.g. turn off and on automatic time synchronization).\n\n---\n\n${error.getFullMessage()}`,\n );\n\n // Retry with a generous clock skew allowance (1 day)\n const { data: retryResult, errors: [retryError] = [] } = await verifyToken(sessionToken, {\n ...authenticateContext,\n clockSkewInMs: 86_400_000,\n });\n if (retryResult) {\n return signedIn(authenticateContext, retryResult, headers, sessionToken);\n }\n\n throw retryError;\n }\n\n throw error;\n }\n\n async function refreshToken(\n authenticateContext: AuthenticateContext,\n ): Promise<{ data: string; error: null } | { data: null; error: any }> {\n // To perform a token refresh, apiClient must be defined.\n if (!options.apiClient) {\n return {\n data: null,\n error: {\n message: 'An apiClient is needed to perform token refresh.',\n cause: { reason: RefreshTokenErrorReason.MissingApiClient },\n },\n };\n }\n const { sessionToken: expiredSessionToken, refreshTokenInCookie: refreshToken } = authenticateContext;\n if (!expiredSessionToken) {\n return {\n data: null,\n error: {\n message: 'Session token must be provided.',\n cause: { reason: RefreshTokenErrorReason.MissingSessionToken },\n },\n };\n }\n if (!refreshToken) {\n return {\n data: null,\n error: {\n message: 'Refresh token must be provided.',\n cause: { reason: RefreshTokenErrorReason.MissingRefreshToken },\n },\n };\n }\n // The token refresh endpoint requires a sessionId, so we decode that from the expired token.\n const { data: decodeResult, errors: decodedErrors } = decodeJwt(expiredSessionToken);\n if (!decodeResult || decodedErrors) {\n return {\n data: null,\n error: {\n message: 'Unable to decode the expired session token.',\n cause: { reason: RefreshTokenErrorReason.ExpiredSessionTokenDecodeFailed, errors: decodedErrors },\n },\n };\n }\n\n if (!decodeResult?.payload?.sid) {\n return {\n data: null,\n error: {\n message: 'Expired session token is missing the `sid` claim.',\n cause: { reason: RefreshTokenErrorReason.ExpiredSessionTokenMissingSidClaim },\n },\n };\n }\n\n try {\n // Perform the actual token refresh.\n const tokenResponse = await options.apiClient.sessions.refreshSession(decodeResult.payload.sid, {\n expired_token: expiredSessionToken || '',\n refresh_token: refreshToken || '',\n request_origin: authenticateContext.clerkUrl.origin,\n // The refresh endpoint expects headers as Record, so we need to transform it.\n request_headers: Object.fromEntries(Array.from(request.headers.entries()).map(([k, v]) => [k, [v]])),\n });\n return { data: tokenResponse.jwt, error: null };\n } catch (err: any) {\n if (err?.errors?.length) {\n if (err.errors[0].code === 'unexpected_error') {\n return {\n data: null,\n error: {\n message: `Fetch unexpected error`,\n cause: { reason: RefreshTokenErrorReason.FetchError, errors: err.errors },\n },\n };\n }\n return {\n data: null,\n error: {\n message: err.errors[0].code,\n cause: { reason: err.errors[0].code, errors: err.errors },\n },\n };\n } else {\n return {\n data: null,\n error: err,\n };\n }\n }\n }\n\n async function attemptRefresh(\n authenticateContext: AuthenticateContext,\n ): Promise<{ data: { jwtPayload: JwtPayload; sessionToken: string }; error: null } | { data: null; error: any }> {\n const { data: sessionToken, error } = await refreshToken(authenticateContext);\n if (!sessionToken) {\n return { data: null, error };\n }\n\n // Since we're going to return a signedIn response, we need to decode the data from the new sessionToken.\n const { data: jwtPayload, errors } = await verifyToken(sessionToken, authenticateContext);\n if (errors) {\n return {\n data: null,\n error: {\n message: `Clerk: unable to verify refreshed session token.`,\n cause: { reason: RefreshTokenErrorReason.InvalidSessionToken, errors },\n },\n };\n }\n return { data: { jwtPayload, sessionToken }, error: null };\n }\n\n function handleMaybeHandshakeStatus(\n authenticateContext: AuthenticateContext,\n reason: string,\n message: string,\n headers?: Headers,\n ): SignedInState | SignedOutState | HandshakeState {\n if (isRequestEligibleForHandshake(authenticateContext)) {\n // Right now the only usage of passing in different headers is for multi-domain sync, which redirects somewhere else.\n // In the future if we want to decorate the handshake redirect with additional headers per call we need to tweak this logic.\n const handshakeHeaders = headers ?? buildRedirectToHandshake({ handshakeReason: reason });\n\n // Chrome aggressively caches inactive tabs. If we don't set the header here,\n // all 307 redirects will be cached and the handshake will end up in an infinite loop.\n if (handshakeHeaders.get(constants.Headers.Location)) {\n handshakeHeaders.set(constants.Headers.CacheControl, 'no-store');\n }\n\n // Introduce the mechanism to protect for infinite handshake redirect loops\n // using a cookie and returning true if it's infinite redirect loop or false if we can\n // proceed with triggering handshake.\n const isRedirectLoop = setHandshakeInfiniteRedirectionLoopHeaders(handshakeHeaders);\n if (isRedirectLoop) {\n const msg = `Clerk: Refreshing the session token resulted in an infinite redirect loop. This usually means that your Clerk instance keys do not match - make sure to copy the correct publishable and secret keys from the Clerk dashboard.`;\n console.log(msg);\n return signedOut(authenticateContext, reason, message);\n }\n\n return handshake(authenticateContext, reason, message, handshakeHeaders);\n }\n\n return signedOut(authenticateContext, reason, message);\n }\n\n /**\n * Determines if a handshake must occur to resolve a mismatch between the organization as specified\n * by the URL (according to the options) and the actual active organization on the session.\n *\n * @returns {HandshakeState | SignedOutState | null} - The function can return the following:\n * - {HandshakeState}: If a handshake is needed to resolve the mismatched organization.\n * - {SignedOutState}: If a handshake is required but cannot be performed.\n * - {null}: If no action is required.\n */\n function handleMaybeOrganizationSyncHandshake(\n authenticateContext: AuthenticateContext,\n auth: SignedInAuthObject,\n ): HandshakeState | SignedOutState | null {\n const organizationSyncTarget = getOrganizationSyncTarget(\n authenticateContext.clerkUrl,\n options.organizationSyncOptions,\n organizationSyncTargetMatchers,\n );\n if (!organizationSyncTarget) {\n return null;\n }\n let mustActivate = false;\n if (organizationSyncTarget.type === 'organization') {\n // Activate an org by slug?\n if (organizationSyncTarget.organizationSlug && organizationSyncTarget.organizationSlug !== auth.orgSlug) {\n mustActivate = true;\n }\n // Activate an org by ID?\n if (organizationSyncTarget.organizationId && organizationSyncTarget.organizationId !== auth.orgId) {\n mustActivate = true;\n }\n }\n // Activate the personal account?\n if (organizationSyncTarget.type === 'personalAccount' && auth.orgId) {\n mustActivate = true;\n }\n if (!mustActivate) {\n return null;\n }\n if (authenticateContext.handshakeRedirectLoopCounter > 0) {\n // We have an organization that needs to be activated, but this isn't our first time redirecting.\n // This is because we attempted to activate the organization previously, but the organization\n // must not have been valid (either not found, or not valid for this user), and gave us back\n // a null organization. We won't re-try the handshake, and leave it to the server component to handle.\n console.warn(\n 'Clerk: Organization activation handshake loop detected. This is likely due to an invalid organization ID or slug. Skipping organization activation.',\n );\n return null;\n }\n const handshakeState = handleMaybeHandshakeStatus(\n authenticateContext,\n AuthErrorReason.ActiveOrganizationMismatch,\n '',\n );\n if (handshakeState.status !== 'handshake') {\n // Currently, this is only possible if we're in a redirect loop, but the above check should guard against that.\n return null;\n }\n return handshakeState;\n }\n\n async function authenticateRequestWithTokenInHeader() {\n const { sessionTokenInHeader } = authenticateContext;\n\n try {\n const { data, errors } = await verifyToken(sessionTokenInHeader!, authenticateContext);\n if (errors) {\n throw errors[0];\n }\n // use `await` to force this try/catch handle the signedIn invocation\n return signedIn(authenticateContext, data, undefined, sessionTokenInHeader!);\n } catch (err) {\n return handleError(err, 'header');\n }\n }\n\n // We want to prevent infinite handshake redirection loops.\n // We incrementally set a `__clerk_redirection_loop` cookie, and when it loops 3 times, we throw an error.\n // We also utilize the `referer` header to skip the prefetch requests.\n function setHandshakeInfiniteRedirectionLoopHeaders(headers: Headers): boolean {\n if (authenticateContext.handshakeRedirectLoopCounter === 3) {\n return true;\n }\n\n const newCounterValue = authenticateContext.handshakeRedirectLoopCounter + 1;\n const cookieName = constants.Cookies.RedirectCount;\n headers.append('Set-Cookie', `${cookieName}=${newCounterValue}; SameSite=Lax; HttpOnly; Max-Age=3`);\n return false;\n }\n\n function handleHandshakeTokenVerificationErrorInDevelopment(error: TokenVerificationError) {\n // In development, the handshake token is being transferred in the URL as a query parameter, so there is no\n // possibility of collision with a handshake token of another app running on the same local domain\n // (etc one app on localhost:3000 and one on localhost:3001).\n // Therefore, if the handshake token is invalid, it is likely that the user has switched Clerk keys locally.\n // We make sure to throw a descriptive error message and then stop the handshake flow in every case,\n // to avoid the possibility of an infinite loop.\n if (error.reason === TokenVerificationErrorReason.TokenInvalidSignature) {\n const msg = `Clerk: Handshake token verification failed due to an invalid signature. If you have switched Clerk keys locally, clear your cookies and try again.`;\n throw new Error(msg);\n }\n throw new Error(`Clerk: Handshake token verification failed: ${error.getFullMessage()}.`);\n }\n\n async function authenticateRequestWithTokenInCookie() {\n const hasActiveClient = authenticateContext.clientUat;\n const hasSessionToken = !!authenticateContext.sessionTokenInCookie;\n const hasDevBrowserToken = !!authenticateContext.devBrowserToken;\n\n const isRequestEligibleForMultiDomainSync =\n authenticateContext.isSatellite &&\n authenticateContext.secFetchDest === 'document' &&\n !authenticateContext.clerkUrl.searchParams.has(constants.QueryParameters.ClerkSynced);\n\n /**\n * If we have a handshakeToken, resolve the handshake and attempt to return a definitive signed in or signed out state.\n */\n if (authenticateContext.handshakeToken) {\n try {\n return await resolveHandshake();\n } catch (error) {\n // In production, the handshake token is being transferred as a cookie, so there is a possibility of collision\n // with a handshake token of another app running on the same etld+1 domain.\n // For example, if one app is running on sub1.clerk.com and another on sub2.clerk.com, the handshake token\n // cookie for both apps will be set on etld+1 (clerk.com) so there's a possibility that one app will accidentally\n // use the handshake token of a different app during the handshake flow.\n // In this scenario, verification will fail with TokenInvalidSignature. In contrast to the development case,\n // we need to allow the flow to continue so the app eventually retries another handshake with the correct token.\n // We need to make sure, however, that we don't allow the flow to continue indefinitely, so we throw an error after X\n // retries to avoid an infinite loop. An infinite loop can happen if the customer switched Clerk keys for their prod app.\n\n // Check the handleHandshakeTokenVerificationErrorInDevelopment function for the development case.\n if (error instanceof TokenVerificationError && authenticateContext.instanceType === 'development') {\n handleHandshakeTokenVerificationErrorInDevelopment(error);\n } else {\n console.error('Clerk: unable to resolve handshake:', error);\n }\n }\n }\n /**\n * Otherwise, check for \"known unknown\" auth states that we can resolve with a handshake.\n */\n if (\n authenticateContext.instanceType === 'development' &&\n authenticateContext.clerkUrl.searchParams.has(constants.QueryParameters.DevBrowser)\n ) {\n return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.DevBrowserSync, '');\n }\n\n /**\n * Begin multi-domain sync flows\n */\n if (authenticateContext.instanceType === 'production' && isRequestEligibleForMultiDomainSync) {\n return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.SatelliteCookieNeedsSyncing, '');\n }\n\n // Multi-domain development sync flow\n if (authenticateContext.instanceType === 'development' && isRequestEligibleForMultiDomainSync) {\n // initiate MD sync\n\n // signInUrl exists, checked at the top of `authenticateRequest`\n const redirectURL = new URL(authenticateContext.signInUrl!);\n redirectURL.searchParams.append(\n constants.QueryParameters.ClerkRedirectUrl,\n authenticateContext.clerkUrl.toString(),\n );\n const authErrReason = AuthErrorReason.SatelliteCookieNeedsSyncing;\n redirectURL.searchParams.append(constants.QueryParameters.HandshakeReason, authErrReason);\n\n const headers = new Headers({ [constants.Headers.Location]: redirectURL.toString() });\n return handleMaybeHandshakeStatus(authenticateContext, authErrReason, '', headers);\n }\n\n // Multi-domain development sync flow\n const redirectUrl = new URL(authenticateContext.clerkUrl).searchParams.get(\n constants.QueryParameters.ClerkRedirectUrl,\n );\n if (authenticateContext.instanceType === 'development' && !authenticateContext.isSatellite && redirectUrl) {\n // Dev MD sync from primary, redirect back to satellite w/ dev browser query param\n const redirectBackToSatelliteUrl = new URL(redirectUrl);\n\n if (authenticateContext.devBrowserToken) {\n redirectBackToSatelliteUrl.searchParams.append(\n constants.QueryParameters.DevBrowser,\n authenticateContext.devBrowserToken,\n );\n }\n redirectBackToSatelliteUrl.searchParams.append(constants.QueryParameters.ClerkSynced, 'true');\n const authErrReason = AuthErrorReason.PrimaryRespondsToSyncing;\n redirectBackToSatelliteUrl.searchParams.append(constants.QueryParameters.HandshakeReason, authErrReason);\n\n const headers = new Headers({ [constants.Headers.Location]: redirectBackToSatelliteUrl.toString() });\n return handleMaybeHandshakeStatus(authenticateContext, authErrReason, '', headers);\n }\n /**\n * End multi-domain sync flows\n */\n\n if (authenticateContext.instanceType === 'development' && !hasDevBrowserToken) {\n return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.DevBrowserMissing, '');\n }\n\n if (!hasActiveClient && !hasSessionToken) {\n return signedOut(authenticateContext, AuthErrorReason.SessionTokenAndUATMissing, '');\n }\n\n // This can eagerly run handshake since client_uat is SameSite=Strict in dev\n if (!hasActiveClient && hasSessionToken) {\n return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.SessionTokenWithoutClientUAT, '');\n }\n\n if (hasActiveClient && !hasSessionToken) {\n return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.ClientUATWithoutSessionToken, '');\n }\n\n const { data: decodeResult, errors: decodedErrors } = decodeJwt(authenticateContext.sessionTokenInCookie!);\n\n if (decodedErrors) {\n return handleError(decodedErrors[0], 'cookie');\n }\n\n if (decodeResult.payload.iat < authenticateContext.clientUat) {\n return handleMaybeHandshakeStatus(authenticateContext, AuthErrorReason.SessionTokenIATBeforeClientUAT, '');\n }\n\n try {\n const { data, errors } = await verifyToken(authenticateContext.sessionTokenInCookie!, authenticateContext);\n if (errors) {\n throw errors[0];\n }\n const signedInRequestState = signedIn(\n authenticateContext,\n data,\n undefined,\n authenticateContext.sessionTokenInCookie!,\n );\n\n // Org sync if necessary\n const handshakeRequestState = handleMaybeOrganizationSyncHandshake(\n authenticateContext,\n signedInRequestState.toAuth(),\n );\n if (handshakeRequestState) {\n return handshakeRequestState;\n }\n\n return signedInRequestState;\n } catch (err) {\n return handleError(err, 'cookie');\n }\n\n return signedOut(authenticateContext, AuthErrorReason.UnexpectedError);\n }\n\n async function handleError(\n err: unknown,\n tokenCarrier: TokenCarrier,\n ): Promise {\n if (!(err instanceof TokenVerificationError)) {\n return signedOut(authenticateContext, AuthErrorReason.UnexpectedError);\n }\n\n let refreshError: string | null;\n\n if (isRequestEligibleForRefresh(err, authenticateContext, request)) {\n const { data, error } = await attemptRefresh(authenticateContext);\n if (data) {\n return signedIn(authenticateContext, data.jwtPayload, undefined, data.sessionToken);\n }\n\n // If there's any error, simply fallback to the handshake flow including the reason as a query parameter.\n if (error?.cause?.reason) {\n refreshError = error.cause.reason;\n } else {\n refreshError = RefreshTokenErrorReason.UnexpectedSDKError;\n }\n } else {\n if (request.method !== 'GET') {\n refreshError = RefreshTokenErrorReason.NonEligibleNonGet;\n } else if (!authenticateContext.refreshTokenInCookie) {\n refreshError = RefreshTokenErrorReason.NonEligibleNoCookie;\n } else {\n //refresh error is not applicable if token verification error is not 'session-token-expired'\n refreshError = null;\n }\n }\n\n err.tokenCarrier = tokenCarrier;\n\n const reasonToHandshake = [\n TokenVerificationErrorReason.TokenExpired,\n TokenVerificationErrorReason.TokenNotActiveYet,\n TokenVerificationErrorReason.TokenIatInTheFuture,\n ].includes(err.reason);\n\n if (reasonToHandshake) {\n return handleMaybeHandshakeStatus(\n authenticateContext,\n convertTokenVerificationErrorReasonToAuthErrorReason({ tokenError: err.reason, refreshError }),\n err.getFullMessage(),\n );\n }\n\n return signedOut(authenticateContext, err.reason, err.getFullMessage());\n }\n\n if (authenticateContext.sessionTokenInHeader) {\n return authenticateRequestWithTokenInHeader();\n }\n\n return authenticateRequestWithTokenInCookie();\n}\n\n/**\n * @internal\n */\nexport const debugRequestState = (params: RequestState) => {\n const { isSignedIn, proxyUrl, reason, message, publishableKey, isSatellite, domain } = params;\n return { isSignedIn, proxyUrl, reason, message, publishableKey, isSatellite, domain };\n};\n\ntype OrganizationSyncTargetMatchers = {\n OrganizationMatcher: MatchFunction>> | null;\n PersonalAccountMatcher: MatchFunction>> | null;\n};\n\n/**\n * Computes regex-based matchers from the given organization sync options.\n */\nexport function computeOrganizationSyncTargetMatchers(\n options: OrganizationSyncOptions | undefined,\n): OrganizationSyncTargetMatchers {\n let personalAccountMatcher: MatchFunction>> | null = null;\n if (options?.personalAccountPatterns) {\n try {\n personalAccountMatcher = match(options.personalAccountPatterns);\n } catch (e) {\n // Likely to be encountered during development, so throwing the error is more prudent than logging\n throw new Error(`Invalid personal account pattern \"${options.personalAccountPatterns}\": \"${e}\"`);\n }\n }\n\n let organizationMatcher: MatchFunction>> | null = null;\n if (options?.organizationPatterns) {\n try {\n organizationMatcher = match(options.organizationPatterns);\n } catch (e) {\n // Likely to be encountered during development, so throwing the error is more prudent than logging\n throw new Error(`Clerk: Invalid organization pattern \"${options.organizationPatterns}\": \"${e}\"`);\n }\n }\n\n return {\n OrganizationMatcher: organizationMatcher,\n PersonalAccountMatcher: personalAccountMatcher,\n };\n}\n\n/**\n * Determines if the given URL and settings indicate a desire to activate a specific\n * organization or personal account.\n *\n * @param url - The URL of the original request.\n * @param options - The organization sync options.\n * @param matchers - The matchers for the organization and personal account patterns, as generated by `computeOrganizationSyncTargetMatchers`.\n */\nexport function getOrganizationSyncTarget(\n url: URL,\n options: OrganizationSyncOptions | undefined,\n matchers: OrganizationSyncTargetMatchers,\n): OrganizationSyncTarget | null {\n if (!options) {\n return null;\n }\n\n // Check for organization activation\n if (matchers.OrganizationMatcher) {\n let orgResult: Match>>;\n try {\n orgResult = matchers.OrganizationMatcher(url.pathname);\n } catch (e) {\n // Intentionally not logging the path to avoid potentially leaking anything sensitive\n console.error(`Clerk: Failed to apply organization pattern \"${options.organizationPatterns}\" to a path`, e);\n return null;\n }\n\n if (orgResult && 'params' in orgResult) {\n const params = orgResult.params;\n\n if ('id' in params && typeof params.id === 'string') {\n return { type: 'organization', organizationId: params.id };\n }\n if ('slug' in params && typeof params.slug === 'string') {\n return { type: 'organization', organizationSlug: params.slug };\n }\n console.warn(\n 'Clerk: Detected an organization pattern match, but no organization ID or slug was found in the URL. Does the pattern include `:id` or `:slug`?',\n );\n }\n }\n\n // Check for personal account activation\n if (matchers.PersonalAccountMatcher) {\n let personalResult: Match>>;\n try {\n personalResult = matchers.PersonalAccountMatcher(url.pathname);\n } catch (e) {\n // Intentionally not logging the path to avoid potentially leaking anything sensitive\n console.error(`Failed to apply personal account pattern \"${options.personalAccountPatterns}\" to a path`, e);\n return null;\n }\n\n if (personalResult) {\n return { type: 'personalAccount' };\n }\n }\n return null;\n}\n\n/**\n * Represents an organization or a personal account - e.g. an\n * entity that can be activated by the handshake API.\n */\nexport type OrganizationSyncTarget =\n | { type: 'personalAccount' }\n | { type: 'organization'; organizationId?: string; organizationSlug?: string };\n\n/**\n * Generates the query parameters to activate an organization or personal account\n * via the FAPI handshake api.\n */\nfunction getOrganizationSyncQueryParams(toActivate: OrganizationSyncTarget): Map {\n const ret = new Map();\n if (toActivate.type === 'personalAccount') {\n ret.set('organization_id', '');\n }\n if (toActivate.type === 'organization') {\n if (toActivate.organizationId) {\n ret.set('organization_id', toActivate.organizationId);\n }\n if (toActivate.organizationSlug) {\n ret.set('organization_id', toActivate.organizationSlug);\n }\n }\n return ret;\n}\n\nconst convertTokenVerificationErrorReasonToAuthErrorReason = ({\n tokenError,\n refreshError,\n}: {\n tokenError: TokenVerificationErrorReason;\n refreshError: string | null;\n}): string => {\n switch (tokenError) {\n case TokenVerificationErrorReason.TokenExpired:\n return `${AuthErrorReason.SessionTokenExpired}-refresh-${refreshError}`;\n case TokenVerificationErrorReason.TokenNotActiveYet:\n return AuthErrorReason.SessionTokenNBF;\n case TokenVerificationErrorReason.TokenIatInTheFuture:\n return AuthErrorReason.SessionTokenIatInTheFuture;\n default:\n return AuthErrorReason.UnexpectedError;\n }\n};\n","import type { Jwt } from '@clerk/types';\n\nimport { constants } from '../constants';\nimport { decodeJwt } from '../jwt/verifyJwt';\nimport runtime from '../runtime';\nimport { assertValidPublishableKey } from '../util/optionsAssertions';\nimport { getCookieSuffix, getSuffixedCookieName, parsePublishableKey } from '../util/shared';\nimport type { ClerkRequest } from './clerkRequest';\nimport type { AuthenticateRequestOptions } from './types';\n\ninterface AuthenticateContextInterface extends AuthenticateRequestOptions {\n // header-based values\n sessionTokenInHeader: string | undefined;\n origin: string | undefined;\n host: string | undefined;\n forwardedHost: string | undefined;\n forwardedProto: string | undefined;\n referrer: string | undefined;\n userAgent: string | undefined;\n secFetchDest: string | undefined;\n accept: string | undefined;\n // cookie-based values\n sessionTokenInCookie: string | undefined;\n refreshTokenInCookie: string | undefined;\n clientUat: number;\n suffixedCookies: boolean;\n // handshake-related values\n devBrowserToken: string | undefined;\n handshakeToken: string | undefined;\n handshakeRedirectLoopCounter: number;\n // url derived from headers\n clerkUrl: URL;\n // cookie or header session token\n sessionToken: string | undefined;\n // enforce existence of the following props\n publishableKey: string;\n instanceType: string;\n frontendApi: string;\n}\n\ninterface AuthenticateContext extends AuthenticateContextInterface {}\n\n/**\n * All data required to authenticate a request.\n * This is the data we use to decide whether a request\n * is in a signed in or signed out state or if we need\n * to perform a handshake.\n */\nclass AuthenticateContext {\n public get sessionToken(): string | undefined {\n return this.sessionTokenInCookie || this.sessionTokenInHeader;\n }\n\n public constructor(\n private cookieSuffix: string,\n private clerkRequest: ClerkRequest,\n options: AuthenticateRequestOptions,\n ) {\n // Even though the options are assigned to this later in this function\n // we set the publishableKey here because it is being used in cookies/headers/handshake-values\n // as part of getMultipleAppsCookie\n this.initPublishableKeyValues(options);\n this.initHeaderValues();\n // initCookieValues should be used before initHandshakeValues because it depends on suffixedCookies\n this.initCookieValues();\n this.initHandshakeValues();\n Object.assign(this, options);\n this.clerkUrl = this.clerkRequest.clerkUrl;\n }\n\n private initPublishableKeyValues(options: AuthenticateRequestOptions) {\n assertValidPublishableKey(options.publishableKey);\n this.publishableKey = options.publishableKey;\n\n const pk = parsePublishableKey(this.publishableKey, {\n fatal: true,\n proxyUrl: options.proxyUrl,\n domain: options.domain,\n });\n this.instanceType = pk.instanceType;\n this.frontendApi = pk.frontendApi;\n }\n\n private initHeaderValues() {\n this.sessionTokenInHeader = this.stripAuthorizationHeader(this.getHeader(constants.Headers.Authorization));\n this.origin = this.getHeader(constants.Headers.Origin);\n this.host = this.getHeader(constants.Headers.Host);\n this.forwardedHost = this.getHeader(constants.Headers.ForwardedHost);\n this.forwardedProto =\n this.getHeader(constants.Headers.CloudFrontForwardedProto) || this.getHeader(constants.Headers.ForwardedProto);\n this.referrer = this.getHeader(constants.Headers.Referrer);\n this.userAgent = this.getHeader(constants.Headers.UserAgent);\n this.secFetchDest = this.getHeader(constants.Headers.SecFetchDest);\n this.accept = this.getHeader(constants.Headers.Accept);\n }\n\n private initCookieValues() {\n // suffixedCookies needs to be set first because it's used in getMultipleAppsCookie\n this.suffixedCookies = this.shouldUseSuffixed();\n this.sessionTokenInCookie = this.getSuffixedOrUnSuffixedCookie(constants.Cookies.Session);\n this.refreshTokenInCookie = this.getSuffixedCookie(constants.Cookies.Refresh);\n this.clientUat = Number.parseInt(this.getSuffixedOrUnSuffixedCookie(constants.Cookies.ClientUat) || '') || 0;\n }\n\n private initHandshakeValues() {\n this.devBrowserToken =\n this.getQueryParam(constants.QueryParameters.DevBrowser) ||\n this.getSuffixedOrUnSuffixedCookie(constants.Cookies.DevBrowser);\n // Using getCookie since we don't suffix the handshake token cookie\n this.handshakeToken =\n this.getQueryParam(constants.QueryParameters.Handshake) || this.getCookie(constants.Cookies.Handshake);\n this.handshakeRedirectLoopCounter = Number(this.getCookie(constants.Cookies.RedirectCount)) || 0;\n }\n\n private stripAuthorizationHeader(authValue: string | undefined | null): string | undefined {\n return authValue?.replace('Bearer ', '');\n }\n\n private getQueryParam(name: string) {\n return this.clerkRequest.clerkUrl.searchParams.get(name);\n }\n\n private getHeader(name: string) {\n return this.clerkRequest.headers.get(name) || undefined;\n }\n\n private getCookie(name: string) {\n return this.clerkRequest.cookies.get(name) || undefined;\n }\n\n private getSuffixedCookie(name: string) {\n return this.getCookie(getSuffixedCookieName(name, this.cookieSuffix)) || undefined;\n }\n\n private getSuffixedOrUnSuffixedCookie(cookieName: string) {\n if (this.suffixedCookies) {\n return this.getSuffixedCookie(cookieName);\n }\n return this.getCookie(cookieName);\n }\n\n private shouldUseSuffixed(): boolean {\n const suffixedClientUat = this.getSuffixedCookie(constants.Cookies.ClientUat);\n const clientUat = this.getCookie(constants.Cookies.ClientUat);\n const suffixedSession = this.getSuffixedCookie(constants.Cookies.Session) || '';\n const session = this.getCookie(constants.Cookies.Session) || '';\n\n // In the case of malformed session cookies (eg missing the iss claim), we should\n // use the un-suffixed cookies to return signed-out state instead of triggering\n // handshake\n if (session && !this.tokenHasIssuer(session)) {\n return false;\n }\n\n // If there's a token in un-suffixed, and it doesn't belong to this\n // instance, then we must trust suffixed\n if (session && !this.tokenBelongsToInstance(session)) {\n return true;\n }\n\n // If there is no suffixed cookies use un-suffixed\n if (!suffixedClientUat && !suffixedSession) {\n return false;\n }\n\n const { data: sessionData } = decodeJwt(session);\n const sessionIat = sessionData?.payload.iat || 0;\n const { data: suffixedSessionData } = decodeJwt(suffixedSession);\n const suffixedSessionIat = suffixedSessionData?.payload.iat || 0;\n\n // Both indicate signed in, but un-suffixed is newer\n // Trust un-suffixed because it's newer\n if (suffixedClientUat !== '0' && clientUat !== '0' && sessionIat > suffixedSessionIat) {\n return false;\n }\n\n // Suffixed indicates signed out, but un-suffixed indicates signed in\n // Trust un-suffixed because it gets set with both new and old clerk.js,\n // so we can assume it's newer\n if (suffixedClientUat === '0' && clientUat !== '0') {\n return false;\n }\n\n // Suffixed indicates signed in, un-suffixed indicates signed out\n // This is the tricky one\n\n // In production, suffixed_uat should be set reliably, since it's\n // set by FAPI and not clerk.js. So in the scenario where a developer\n // downgrades, the state will look like this:\n // - un-suffixed session cookie: empty\n // - un-suffixed uat: 0\n // - suffixed session cookie: (possibly filled, possibly empty)\n // - suffixed uat: 0\n\n // Our SDK honors client_uat over the session cookie, so we don't\n // need a special case for production. We can rely on suffixed,\n // and the fact that the suffixed uat is set properly means and\n // suffixed session cookie will be ignored.\n\n // The important thing to make sure we have a test that confirms\n // the user ends up as signed out in this scenario, and the suffixed\n // session cookie is ignored\n\n // In development, suffixed_uat is not set reliably, since it's done\n // by clerk.js. If the developer downgrades to a pinned version of\n // clerk.js, the suffixed uat will no longer be updated\n\n // The best we can do is look to see if the suffixed token is expired.\n // This means that, if a developer downgrades, and then immediately\n // signs out, all in the span of 1 minute, then they will inadvertently\n // remain signed in for the rest of that minute. This is a known\n // limitation of the strategy but seems highly unlikely.\n if (this.instanceType !== 'production') {\n const isSuffixedSessionExpired = this.sessionExpired(suffixedSessionData);\n if (suffixedClientUat !== '0' && clientUat === '0' && isSuffixedSessionExpired) {\n return false;\n }\n }\n\n // If a suffixed session cookie exists but the corresponding client_uat cookie is missing, fallback to using\n // unsuffixed cookies.\n // This handles the scenario where an app has been deployed using an SDK version that supports suffixed\n // cookies, but FAPI for its Clerk instance has the feature disabled (eg: if we need to temporarily disable the feature).\n if (!suffixedClientUat && suffixedSession) {\n return false;\n }\n\n return true;\n }\n\n private tokenHasIssuer(token: string): boolean {\n const { data, errors } = decodeJwt(token);\n if (errors) {\n return false;\n }\n return !!data.payload.iss;\n }\n\n private tokenBelongsToInstance(token: string): boolean {\n if (!token) {\n return false;\n }\n\n const { data, errors } = decodeJwt(token);\n if (errors) {\n return false;\n }\n const tokenIssuer = data.payload.iss.replace(/https?:\\/\\//gi, '');\n return this.frontendApi === tokenIssuer;\n }\n\n private sessionExpired(jwt: Jwt | undefined): boolean {\n return !!jwt && jwt?.payload.exp <= (Date.now() / 1000) >> 0;\n }\n}\n\nexport type { AuthenticateContext };\n\nexport const createAuthenticateContext = async (\n clerkRequest: ClerkRequest,\n options: AuthenticateRequestOptions,\n): Promise => {\n const cookieSuffix = options.publishableKey\n ? await getCookieSuffix(options.publishableKey, runtime.crypto.subtle)\n : '';\n return new AuthenticateContext(cookieSuffix, clerkRequest, options);\n};\n","export const getCookieName = (cookieDirective: string): string => {\n return cookieDirective.split(';')[0]?.split('=')[0];\n};\n\nexport const getCookieValue = (cookieDirective: string): string => {\n return cookieDirective.split(';')[0]?.split('=')[1];\n};\n","import { TokenVerificationError, TokenVerificationErrorAction, TokenVerificationErrorReason } from '../errors';\nimport type { VerifyJwtOptions } from '../jwt';\nimport { assertHeaderAlgorithm, assertHeaderType } from '../jwt/assertions';\nimport { decodeJwt, hasValidSignature } from '../jwt/verifyJwt';\nimport { loadClerkJWKFromLocal, loadClerkJWKFromRemote } from './keys';\nimport type { VerifyTokenOptions } from './verify';\n\nasync function verifyHandshakeJwt(token: string, { key }: VerifyJwtOptions): Promise<{ handshake: string[] }> {\n const { data: decoded, errors } = decodeJwt(token);\n if (errors) {\n throw errors[0];\n }\n\n const { header, payload } = decoded;\n\n // Header verifications\n const { typ, alg } = header;\n\n assertHeaderType(typ);\n assertHeaderAlgorithm(alg);\n\n const { data: signatureValid, errors: signatureErrors } = await hasValidSignature(decoded, key);\n if (signatureErrors) {\n throw new TokenVerificationError({\n reason: TokenVerificationErrorReason.TokenVerificationFailed,\n message: `Error verifying handshake token. ${signatureErrors[0]}`,\n });\n }\n\n if (!signatureValid) {\n throw new TokenVerificationError({\n reason: TokenVerificationErrorReason.TokenInvalidSignature,\n message: 'Handshake signature is invalid.',\n });\n }\n\n return payload as unknown as { handshake: string[] };\n}\n\n/**\n * Similar to our verifyToken flow for Clerk-issued JWTs, but this verification flow is for our signed handshake payload.\n * The handshake payload requires fewer verification steps.\n */\nexport async function verifyHandshakeToken(\n token: string,\n options: VerifyTokenOptions,\n): Promise<{ handshake: string[] }> {\n const { secretKey, apiUrl, apiVersion, jwksCacheTtlInMs, jwtKey, skipJwksCache } = options;\n\n const { data, errors } = decodeJwt(token);\n if (errors) {\n throw errors[0];\n }\n\n const { kid } = data.header;\n\n let key;\n\n if (jwtKey) {\n key = loadClerkJWKFromLocal(jwtKey);\n } else if (secretKey) {\n // Fetch JWKS from Backend API using the key\n key = await loadClerkJWKFromRemote({ secretKey, apiUrl, apiVersion, kid, jwksCacheTtlInMs, skipJwksCache });\n } else {\n throw new TokenVerificationError({\n action: TokenVerificationErrorAction.SetClerkJWTKey,\n message: 'Failed to resolve JWK during handshake verification.',\n reason: TokenVerificationErrorReason.JWKFailedToResolve,\n });\n }\n\n return await verifyHandshakeJwt(token, {\n key,\n });\n}\n","export function mergePreDefinedOptions>(preDefinedOptions: T, options: Partial): T {\n return Object.keys(preDefinedOptions).reduce(\n (obj: T, key: string) => {\n return { ...obj, [key]: options[key] || obj[key] };\n },\n { ...preDefinedOptions },\n );\n}\n","import type { ApiClient } from '../api';\nimport { mergePreDefinedOptions } from '../util/mergePreDefinedOptions';\nimport { authenticateRequest as authenticateRequestOriginal, debugRequestState } from './request';\nimport type { AuthenticateRequestOptions } from './types';\n\ntype RunTimeOptions = Omit;\ntype BuildTimeOptions = Partial<\n Pick<\n AuthenticateRequestOptions,\n | 'apiUrl'\n | 'apiVersion'\n | 'audience'\n | 'domain'\n | 'isSatellite'\n | 'jwtKey'\n | 'proxyUrl'\n | 'publishableKey'\n | 'secretKey'\n >\n>;\n\nconst defaultOptions = {\n secretKey: '',\n jwtKey: '',\n apiUrl: undefined,\n apiVersion: undefined,\n proxyUrl: '',\n publishableKey: '',\n isSatellite: false,\n domain: '',\n audience: '',\n} satisfies BuildTimeOptions;\n\n/**\n * @internal\n */\nexport type CreateAuthenticateRequestOptions = {\n options: BuildTimeOptions;\n apiClient: ApiClient;\n};\n\n/**\n * @internal\n */\nexport function createAuthenticateRequest(params: CreateAuthenticateRequestOptions) {\n const buildTimeOptions = mergePreDefinedOptions(defaultOptions, params.options);\n const apiClient = params.apiClient;\n\n const authenticateRequest = (request: Request, options: RunTimeOptions = {}) => {\n const { apiUrl, apiVersion } = buildTimeOptions;\n const runTimeOptions = mergePreDefinedOptions(buildTimeOptions, options);\n return authenticateRequestOriginal(request, {\n ...options,\n ...runTimeOptions,\n // We should add all the omitted props from options here (eg apiUrl / apiVersion)\n // to avoid runtime options override them.\n apiUrl,\n apiVersion,\n apiClient,\n });\n };\n\n return {\n authenticateRequest,\n debugRequestState,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAO,IAAM,UAAU;AAChB,IAAM,cAAc;AAEpB,IAAM,aAAa,GAAG,gBAAY,IAAI,QAAe;AACrD,IAAM,oCAAoC,IAAI;AAC9C,IAAM,oBAAoB,MAAO,KAAK;AAE7C,IAAM,aAAa;AAAA,EACjB,WAAW;AAAA,EACX,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,UAAU;AACZ;AAEA,IAAM,UAAU;AAAA,EACd,SAAS;AAAA,EACT,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AACjB;AAEA,IAAM,kBAAkB;AAAA,EACtB,aAAa;AAAA,EACb,kBAAkB;AAAA;AAAA,EAElB,YAAY,QAAQ;AAAA,EACpB,WAAW,QAAQ;AAAA,EACnB,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,iBAAiB;AACnB;AAE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,EAAE;AAAA,IACpC,CAAC,KAAQ,QAAgB;AACvB,aAAO,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,QAAQ,GAAG,KAAK,IAAI,GAAG,EAAE;AAAA,IACnD;AAAA,IACA,EAAE,GAAG,kBAAkB;AAAA,EACzB;AACF;;;ACcA,IAAM,iBAAiB;AAAA,EACrB,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,UAAU;AACZ;AAaO,SAAS,0BAA0B,QAA0C;AAClF,QAAM,mBAAmB,uBAAuB,gBAAgB,OAAO,OAAO;AAC9E,QAAM,YAAY,OAAO;AAEzB,QAAME,uBAAsB,CAAC,SAAkB,UAA0B,CAAC,MAAM;AAC9E,UAAM,EAAE,QAAQ,WAAW,IAAI;AAC/B,UAAM,iBAAiB,uBAAuB,kBAAkB,OAAO;AACvE,WAAO,oBAA4B,SAAS;AAAA,MAC1C,GAAG;AAAA,MACH,GAAG;AAAA;AAAA;AAAA,MAGH;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,qBAAAA;AAAA,IACA;AAAA,EACF;AACF;","names":["Headers","basePath","basePath","basePath","basePath","basePath","basePath","basePath","basePath","basePath","basePath","basePath","basePath","data","jwk","authenticateContext","refreshToken","authenticateRequest"]}
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/chunk-P263NW7Z.mjs b/backend/node_modules/@clerk/backend/dist/chunk-P263NW7Z.mjs
new file mode 100644
index 00000000..e8f89afc
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/chunk-P263NW7Z.mjs
@@ -0,0 +1,25 @@
+// src/jwt/legacyReturn.ts
+function withLegacyReturn(cb) {
+ return async (...args) => {
+ const { data, errors } = await cb(...args);
+ if (errors) {
+ throw errors[0];
+ }
+ return data;
+ };
+}
+function withLegacySyncReturn(cb) {
+ return (...args) => {
+ const { data, errors } = cb(...args);
+ if (errors) {
+ throw errors[0];
+ }
+ return data;
+ };
+}
+
+export {
+ withLegacyReturn,
+ withLegacySyncReturn
+};
+//# sourceMappingURL=chunk-P263NW7Z.mjs.map
\ No newline at end of file
diff --git a/backend/node_modules/@clerk/backend/dist/chunk-P263NW7Z.mjs.map b/backend/node_modules/@clerk/backend/dist/chunk-P263NW7Z.mjs.map
new file mode 100644
index 00000000..437d6de0
--- /dev/null
+++ b/backend/node_modules/@clerk/backend/dist/chunk-P263NW7Z.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/jwt/legacyReturn.ts"],"sourcesContent":["import type { JwtReturnType } from './types';\n\n// TODO(dimkl): Will be probably be dropped in next major version\nexport function withLegacyReturn Promise>>(cb: T) {\n return async (...args: Parameters): Promise>['data']>> | never => {\n const { data, errors } = await cb(...args);\n if (errors) {\n throw errors[0];\n }\n return data;\n };\n}\n\n// TODO(dimkl): Will be probably be dropped in next major version\nexport function withLegacySyncReturn JwtReturnType>(cb: T) {\n return (...args: Parameters