mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 13:34:33 +00:00
feat(mcp): add OAuth 2.1 support (#505)
* feat(mcp): add OAuth 2.1 support with dynamic client registration * feat(api): alias bare oauth-authorization-server discovery endpoint * fix(auth): preserve user session on OAuth sign-in redirect to consent
This commit is contained in:
@@ -0,0 +1,205 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "jwks" (
|
||||
"id" TEXT NOT NULL,
|
||||
"public_key" TEXT NOT NULL,
|
||||
"private_key" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"expires_at" TIMESTAMP(3),
|
||||
"alg" TEXT,
|
||||
"crv" TEXT,
|
||||
|
||||
CONSTRAINT "jwks_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "oauth_clients" (
|
||||
"id" TEXT NOT NULL,
|
||||
"client_id" TEXT NOT NULL,
|
||||
"client_secret" TEXT,
|
||||
"client_discovery_id" TEXT,
|
||||
"disabled" BOOLEAN DEFAULT false,
|
||||
"skip_consent" BOOLEAN,
|
||||
"enable_end_session" BOOLEAN,
|
||||
"subject_type" TEXT,
|
||||
"scopes" TEXT[],
|
||||
"client_credentials_scopes" TEXT[] DEFAULT ARRAY[]::TEXT[],
|
||||
"user_id" TEXT,
|
||||
"created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3),
|
||||
"name" TEXT,
|
||||
"uri" TEXT,
|
||||
"icon" TEXT,
|
||||
"contacts" TEXT[],
|
||||
"tos" TEXT,
|
||||
"policy" TEXT,
|
||||
"software_id" TEXT,
|
||||
"software_version" TEXT,
|
||||
"software_statement" TEXT,
|
||||
"redirect_uris" TEXT[],
|
||||
"post_logout_redirect_uris" TEXT[],
|
||||
"backchannel_logout_uri" TEXT,
|
||||
"backchannel_logout_session_required" BOOLEAN,
|
||||
"token_endpoint_auth_method" TEXT,
|
||||
"application_type" TEXT,
|
||||
"jwks" TEXT,
|
||||
"jwks_uri" TEXT,
|
||||
"grant_types" TEXT[],
|
||||
"response_types" TEXT[],
|
||||
"require_pkce" BOOLEAN,
|
||||
"dpop_bound_access_tokens" BOOLEAN DEFAULT false,
|
||||
"reference_id" TEXT,
|
||||
"metadata" JSONB,
|
||||
|
||||
CONSTRAINT "oauth_clients_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "oauth_resources" (
|
||||
"id" TEXT NOT NULL,
|
||||
"identifier" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"access_token_ttl" INTEGER,
|
||||
"refresh_token_ttl" INTEGER,
|
||||
"signing_algorithm" TEXT,
|
||||
"signing_key_id" TEXT,
|
||||
"allowed_scopes" TEXT[],
|
||||
"custom_claims" JSONB,
|
||||
"dpop_bound_access_tokens_required" BOOLEAN DEFAULT false,
|
||||
"disabled" BOOLEAN DEFAULT false,
|
||||
"created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3),
|
||||
"policy_version" INTEGER DEFAULT 1,
|
||||
"metadata" JSONB,
|
||||
|
||||
CONSTRAINT "oauth_resources_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "oauth_client_resources" (
|
||||
"id" TEXT NOT NULL,
|
||||
"client_id" TEXT NOT NULL,
|
||||
"resource_id" TEXT NOT NULL,
|
||||
"metadata" JSONB,
|
||||
"created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "oauth_client_resources_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "oauth_refresh_tokens" (
|
||||
"id" TEXT NOT NULL,
|
||||
"token" TEXT NOT NULL,
|
||||
"client_id" TEXT NOT NULL,
|
||||
"session_id" TEXT,
|
||||
"user_id" TEXT NOT NULL,
|
||||
"reference_id" TEXT,
|
||||
"authorization_code_id" TEXT,
|
||||
"resources" TEXT[],
|
||||
"requested_user_info_claims" TEXT[],
|
||||
"expires_at" TIMESTAMP(3) NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"revoked" TIMESTAMP(3),
|
||||
"rotated_at" TIMESTAMP(3),
|
||||
"rotation_replay_response" TEXT,
|
||||
"rotation_replay_expires_at" TIMESTAMP(3),
|
||||
"auth_time" TIMESTAMP(3),
|
||||
"confirmation" JSONB,
|
||||
"scopes" TEXT[],
|
||||
|
||||
CONSTRAINT "oauth_refresh_tokens_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "oauth_access_tokens" (
|
||||
"id" TEXT NOT NULL,
|
||||
"token" TEXT NOT NULL,
|
||||
"client_id" TEXT NOT NULL,
|
||||
"session_id" TEXT,
|
||||
"user_id" TEXT,
|
||||
"reference_id" TEXT,
|
||||
"authorization_code_id" TEXT,
|
||||
"resources" TEXT[],
|
||||
"requested_user_info_claims" TEXT[],
|
||||
"refresh_id" TEXT,
|
||||
"expires_at" TIMESTAMP(3) NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"revoked" TIMESTAMP(3),
|
||||
"confirmation" JSONB,
|
||||
"scopes" TEXT[],
|
||||
|
||||
CONSTRAINT "oauth_access_tokens_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "oauth_consents" (
|
||||
"id" TEXT NOT NULL,
|
||||
"client_id" TEXT NOT NULL,
|
||||
"user_id" TEXT,
|
||||
"reference_id" TEXT,
|
||||
"resources" TEXT[],
|
||||
"requested_user_info_claims" TEXT[],
|
||||
"scopes" TEXT[],
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "oauth_consents_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "oauth_client_assertions" (
|
||||
"id" TEXT NOT NULL,
|
||||
"expires_at" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "oauth_client_assertions_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "oauth_clients_client_id_key" ON "oauth_clients"("client_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "oauth_resources_identifier_key" ON "oauth_resources"("identifier");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "oauth_client_resources_client_id_resource_id_key" ON "oauth_client_resources"("client_id", "resource_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "oauth_refresh_tokens_token_key" ON "oauth_refresh_tokens"("token");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "oauth_access_tokens_token_key" ON "oauth_access_tokens"("token");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_clients" ADD CONSTRAINT "oauth_clients_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_client_resources" ADD CONSTRAINT "oauth_client_resources_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_client_resources" ADD CONSTRAINT "oauth_client_resources_resource_id_fkey" FOREIGN KEY ("resource_id") REFERENCES "oauth_resources"("identifier") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_session_id_fkey" FOREIGN KEY ("session_id") REFERENCES "sessions"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_refresh_tokens" ADD CONSTRAINT "oauth_refresh_tokens_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_session_id_fkey" FOREIGN KEY ("session_id") REFERENCES "sessions"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_access_tokens" ADD CONSTRAINT "oauth_access_tokens_refresh_id_fkey" FOREIGN KEY ("refresh_id") REFERENCES "oauth_refresh_tokens"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_consents" ADD CONSTRAINT "oauth_consents_client_id_fkey" FOREIGN KEY ("client_id") REFERENCES "oauth_clients"("client_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "oauth_consents" ADD CONSTRAINT "oauth_consents_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,25 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "oauth_access_tokens" ALTER COLUMN "resources" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "requested_user_info_claims" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[];
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "oauth_clients" ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "contacts" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "redirect_uris" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "post_logout_redirect_uris" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "grant_types" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "response_types" SET DEFAULT ARRAY[]::TEXT[];
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "oauth_consents" ALTER COLUMN "resources" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "requested_user_info_claims" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[];
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "oauth_refresh_tokens" ALTER COLUMN "resources" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "requested_user_info_claims" SET DEFAULT ARRAY[]::TEXT[],
|
||||
ALTER COLUMN "scopes" SET DEFAULT ARRAY[]::TEXT[];
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "oauth_resources" ALTER COLUMN "allowed_scopes" SET DEFAULT ARRAY[]::TEXT[];
|
||||
@@ -249,6 +249,10 @@ model User {
|
||||
kanbanTaskComments KanbanTaskComment[]
|
||||
kanbanTaskEvents KanbanTaskEvent[]
|
||||
recentFiles RecentFileItem[]
|
||||
oauthClients OauthClient[]
|
||||
oauthRefreshTokens OauthRefreshToken[]
|
||||
oauthAccessTokens OauthAccessToken[]
|
||||
oauthConsents OauthConsent[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -264,6 +268,9 @@ model Session {
|
||||
userId String @map("user_id")
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
oauthRefreshTokens OauthRefreshToken[]
|
||||
oauthAccessTokens OauthAccessToken[]
|
||||
|
||||
@@map("sessions")
|
||||
}
|
||||
|
||||
@@ -1344,5 +1351,178 @@ model RecentFileItem {
|
||||
@@map("recent_file_items")
|
||||
}
|
||||
|
||||
model Jwks {
|
||||
id String @id @default(ulid())
|
||||
publicKey String @map("public_key")
|
||||
privateKey String @map("private_key")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
expiresAt DateTime? @map("expires_at")
|
||||
alg String?
|
||||
crv String?
|
||||
|
||||
@@map("jwks")
|
||||
}
|
||||
|
||||
model OauthClient {
|
||||
id String @id @default(ulid())
|
||||
clientId String @unique @map("client_id")
|
||||
clientSecret String? @map("client_secret")
|
||||
clientDiscoveryId String? @map("client_discovery_id")
|
||||
disabled Boolean? @default(false)
|
||||
skipConsent Boolean? @map("skip_consent")
|
||||
enableEndSession Boolean? @map("enable_end_session")
|
||||
subjectType String? @map("subject_type")
|
||||
scopes String[] @default([])
|
||||
clientCredentialsScopes String[] @default([]) @map("client_credentials_scopes")
|
||||
userId String? @map("user_id")
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
createdAt DateTime? @default(now()) @map("created_at")
|
||||
updatedAt DateTime? @updatedAt @map("updated_at")
|
||||
name String?
|
||||
uri String?
|
||||
icon String?
|
||||
contacts String[] @default([])
|
||||
tos String?
|
||||
policy String?
|
||||
softwareId String? @map("software_id")
|
||||
softwareVersion String? @map("software_version")
|
||||
softwareStatement String? @map("software_statement")
|
||||
redirectUris String[] @default([]) @map("redirect_uris")
|
||||
postLogoutRedirectUris String[] @default([]) @map("post_logout_redirect_uris")
|
||||
backchannelLogoutUri String? @map("backchannel_logout_uri")
|
||||
backchannelLogoutSessionRequired Boolean? @map("backchannel_logout_session_required")
|
||||
tokenEndpointAuthMethod String? @map("token_endpoint_auth_method")
|
||||
applicationType String? @map("application_type")
|
||||
jwks String?
|
||||
jwksUri String? @map("jwks_uri")
|
||||
grantTypes String[] @default([]) @map("grant_types")
|
||||
responseTypes String[] @default([]) @map("response_types")
|
||||
requirePKCE Boolean? @map("require_pkce")
|
||||
dpopBoundAccessTokens Boolean? @default(false) @map("dpop_bound_access_tokens")
|
||||
referenceId String? @map("reference_id")
|
||||
/// [OauthMetadata]
|
||||
metadata Json?
|
||||
|
||||
clientResources OauthClientResource[]
|
||||
refreshTokens OauthRefreshToken[]
|
||||
accessTokens OauthAccessToken[]
|
||||
consents OauthConsent[]
|
||||
|
||||
@@map("oauth_clients")
|
||||
}
|
||||
|
||||
model OauthResource {
|
||||
id String @id @default(ulid())
|
||||
identifier String @unique
|
||||
name String
|
||||
accessTokenTtl Int? @map("access_token_ttl")
|
||||
refreshTokenTtl Int? @map("refresh_token_ttl")
|
||||
signingAlgorithm String? @map("signing_algorithm")
|
||||
signingKeyId String? @map("signing_key_id")
|
||||
allowedScopes String[] @default([]) @map("allowed_scopes")
|
||||
/// [OauthCustomClaims]
|
||||
customClaims Json? @map("custom_claims")
|
||||
dpopBoundAccessTokensRequired Boolean? @default(false) @map("dpop_bound_access_tokens_required")
|
||||
disabled Boolean? @default(false)
|
||||
createdAt DateTime? @default(now()) @map("created_at")
|
||||
updatedAt DateTime? @updatedAt @map("updated_at")
|
||||
policyVersion Int? @default(1) @map("policy_version")
|
||||
/// [OauthMetadata]
|
||||
metadata Json?
|
||||
|
||||
clientResources OauthClientResource[]
|
||||
|
||||
@@map("oauth_resources")
|
||||
}
|
||||
|
||||
model OauthClientResource {
|
||||
id String @id @default(ulid())
|
||||
clientId String @map("client_id")
|
||||
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
||||
resourceId String @map("resource_id")
|
||||
resource OauthResource @relation(fields: [resourceId], references: [identifier], onDelete: Cascade)
|
||||
/// [OauthMetadata]
|
||||
metadata Json?
|
||||
createdAt DateTime? @default(now()) @map("created_at")
|
||||
|
||||
@@unique([clientId, resourceId])
|
||||
@@map("oauth_client_resources")
|
||||
}
|
||||
|
||||
model OauthRefreshToken {
|
||||
id String @id @default(ulid())
|
||||
token String @unique
|
||||
clientId String @map("client_id")
|
||||
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
||||
sessionId String? @map("session_id")
|
||||
session Session? @relation(fields: [sessionId], references: [id], onDelete: SetNull)
|
||||
userId String @map("user_id")
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
referenceId String? @map("reference_id")
|
||||
authorizationCodeId String? @map("authorization_code_id")
|
||||
resources String[] @default([])
|
||||
requestedUserInfoClaims String[] @default([]) @map("requested_user_info_claims")
|
||||
expiresAt DateTime @map("expires_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
revoked DateTime?
|
||||
rotatedAt DateTime? @map("rotated_at")
|
||||
rotationReplayResponse String? @map("rotation_replay_response")
|
||||
rotationReplayExpiresAt DateTime? @map("rotation_replay_expires_at")
|
||||
authTime DateTime? @map("auth_time")
|
||||
/// [OauthConfirmation]
|
||||
confirmation Json?
|
||||
scopes String[] @default([])
|
||||
|
||||
accessTokens OauthAccessToken[]
|
||||
|
||||
@@map("oauth_refresh_tokens")
|
||||
}
|
||||
|
||||
model OauthAccessToken {
|
||||
id String @id @default(ulid())
|
||||
token String @unique
|
||||
clientId String @map("client_id")
|
||||
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
||||
sessionId String? @map("session_id")
|
||||
session Session? @relation(fields: [sessionId], references: [id], onDelete: SetNull)
|
||||
userId String? @map("user_id")
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
referenceId String? @map("reference_id")
|
||||
authorizationCodeId String? @map("authorization_code_id")
|
||||
resources String[] @default([])
|
||||
requestedUserInfoClaims String[] @default([]) @map("requested_user_info_claims")
|
||||
refreshId String? @map("refresh_id")
|
||||
refreshToken OauthRefreshToken? @relation(fields: [refreshId], references: [id], onDelete: Cascade)
|
||||
expiresAt DateTime @map("expires_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
revoked DateTime?
|
||||
/// [OauthConfirmation]
|
||||
confirmation Json?
|
||||
scopes String[] @default([])
|
||||
|
||||
@@map("oauth_access_tokens")
|
||||
}
|
||||
|
||||
model OauthConsent {
|
||||
id String @id @default(ulid())
|
||||
clientId String @map("client_id")
|
||||
client OauthClient @relation(fields: [clientId], references: [clientId], onDelete: Cascade)
|
||||
userId String? @map("user_id")
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
referenceId String? @map("reference_id")
|
||||
resources String[] @default([])
|
||||
requestedUserInfoClaims String[] @default([]) @map("requested_user_info_claims")
|
||||
scopes String[] @default([])
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@map("oauth_consents")
|
||||
}
|
||||
|
||||
model OauthClientAssertion {
|
||||
id String @id @default(ulid())
|
||||
expiresAt DateTime @map("expires_at")
|
||||
|
||||
@@map("oauth_client_assertions")
|
||||
}
|
||||
|
||||
|
||||
+40
@@ -277,3 +277,43 @@ export type KanbanTaskEvent = Prisma.KanbanTaskEventModel
|
||||
*
|
||||
*/
|
||||
export type RecentFileItem = Prisma.RecentFileItemModel
|
||||
/**
|
||||
* Model Jwks
|
||||
*
|
||||
*/
|
||||
export type Jwks = Prisma.JwksModel
|
||||
/**
|
||||
* Model OauthClient
|
||||
*
|
||||
*/
|
||||
export type OauthClient = Prisma.OauthClientModel
|
||||
/**
|
||||
* Model OauthResource
|
||||
*
|
||||
*/
|
||||
export type OauthResource = Prisma.OauthResourceModel
|
||||
/**
|
||||
* Model OauthClientResource
|
||||
*
|
||||
*/
|
||||
export type OauthClientResource = Prisma.OauthClientResourceModel
|
||||
/**
|
||||
* Model OauthRefreshToken
|
||||
*
|
||||
*/
|
||||
export type OauthRefreshToken = Prisma.OauthRefreshTokenModel
|
||||
/**
|
||||
* Model OauthAccessToken
|
||||
*
|
||||
*/
|
||||
export type OauthAccessToken = Prisma.OauthAccessTokenModel
|
||||
/**
|
||||
* Model OauthConsent
|
||||
*
|
||||
*/
|
||||
export type OauthConsent = Prisma.OauthConsentModel
|
||||
/**
|
||||
* Model OauthClientAssertion
|
||||
*
|
||||
*/
|
||||
export type OauthClientAssertion = Prisma.OauthClientAssertionModel
|
||||
|
||||
+40
@@ -301,3 +301,43 @@ export type KanbanTaskEvent = Prisma.KanbanTaskEventModel
|
||||
*
|
||||
*/
|
||||
export type RecentFileItem = Prisma.RecentFileItemModel
|
||||
/**
|
||||
* Model Jwks
|
||||
*
|
||||
*/
|
||||
export type Jwks = Prisma.JwksModel
|
||||
/**
|
||||
* Model OauthClient
|
||||
*
|
||||
*/
|
||||
export type OauthClient = Prisma.OauthClientModel
|
||||
/**
|
||||
* Model OauthResource
|
||||
*
|
||||
*/
|
||||
export type OauthResource = Prisma.OauthResourceModel
|
||||
/**
|
||||
* Model OauthClientResource
|
||||
*
|
||||
*/
|
||||
export type OauthClientResource = Prisma.OauthClientResourceModel
|
||||
/**
|
||||
* Model OauthRefreshToken
|
||||
*
|
||||
*/
|
||||
export type OauthRefreshToken = Prisma.OauthRefreshTokenModel
|
||||
/**
|
||||
* Model OauthAccessToken
|
||||
*
|
||||
*/
|
||||
export type OauthAccessToken = Prisma.OauthAccessTokenModel
|
||||
/**
|
||||
* Model OauthConsent
|
||||
*
|
||||
*/
|
||||
export type OauthConsent = Prisma.OauthConsentModel
|
||||
/**
|
||||
* Model OauthClientAssertion
|
||||
*
|
||||
*/
|
||||
export type OauthClientAssertion = Prisma.OauthClientAssertionModel
|
||||
|
||||
+84
-4
File diff suppressed because one or more lines are too long
+765
-2
@@ -448,7 +448,15 @@ export const ModelName = {
|
||||
KanbanTaskAsset: 'KanbanTaskAsset',
|
||||
KanbanTaskComment: 'KanbanTaskComment',
|
||||
KanbanTaskEvent: 'KanbanTaskEvent',
|
||||
RecentFileItem: 'RecentFileItem'
|
||||
RecentFileItem: 'RecentFileItem',
|
||||
Jwks: 'Jwks',
|
||||
OauthClient: 'OauthClient',
|
||||
OauthResource: 'OauthResource',
|
||||
OauthClientResource: 'OauthClientResource',
|
||||
OauthRefreshToken: 'OauthRefreshToken',
|
||||
OauthAccessToken: 'OauthAccessToken',
|
||||
OauthConsent: 'OauthConsent',
|
||||
OauthClientAssertion: 'OauthClientAssertion'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -464,7 +472,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "user" | "session" | "account" | "verification" | "authToken" | "team" | "sandbox" | "skill" | "teamMember" | "project" | "projectMember" | "shareLink" | "watermarkConfig" | "watermarkTemplate" | "watermarkFile" | "asset" | "storageKey" | "assetMetadataValue" | "assetAgentMd" | "assetComment" | "assetCommentAttachment" | "assetCommentReaction" | "assetEmbedding" | "invite" | "metadataField" | "notification" | "systemSettings" | "task" | "workflowTask" | "agent" | "agentSkill" | "mcpServer" | "agentMcpServer" | "mcpServerCredential" | "agentSession" | "agentSessionEntry" | "userMetadata" | "model" | "provider" | "collection" | "apiToken" | "aiUsage" | "auditLog" | "quotaRule" | "quotaRecord" | "kanbanGoal" | "kanbanTask" | "kanbanTaskLink" | "kanbanTaskAsset" | "kanbanTaskComment" | "kanbanTaskEvent" | "recentFileItem"
|
||||
modelProps: "user" | "session" | "account" | "verification" | "authToken" | "team" | "sandbox" | "skill" | "teamMember" | "project" | "projectMember" | "shareLink" | "watermarkConfig" | "watermarkTemplate" | "watermarkFile" | "asset" | "storageKey" | "assetMetadataValue" | "assetAgentMd" | "assetComment" | "assetCommentAttachment" | "assetCommentReaction" | "assetEmbedding" | "invite" | "metadataField" | "notification" | "systemSettings" | "task" | "workflowTask" | "agent" | "agentSkill" | "mcpServer" | "agentMcpServer" | "mcpServerCredential" | "agentSession" | "agentSessionEntry" | "userMetadata" | "model" | "provider" | "collection" | "apiToken" | "aiUsage" | "auditLog" | "quotaRule" | "quotaRecord" | "kanbanGoal" | "kanbanTask" | "kanbanTaskLink" | "kanbanTaskAsset" | "kanbanTaskComment" | "kanbanTaskEvent" | "recentFileItem" | "jwks" | "oauthClient" | "oauthResource" | "oauthClientResource" | "oauthRefreshToken" | "oauthAccessToken" | "oauthConsent" | "oauthClientAssertion"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -4316,6 +4324,598 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
Jwks: {
|
||||
payload: Prisma.$JwksPayload<ExtArgs>
|
||||
fields: Prisma.JwksFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.JwksFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.JwksFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.JwksFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.JwksFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.JwksFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.JwksCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.JwksCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.JwksCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.JwksDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.JwksUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.JwksDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.JwksUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.JwksUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.JwksUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$JwksPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.JwksAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateJwks>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.JwksGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.JwksGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.JwksCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.JwksCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
OauthClient: {
|
||||
payload: Prisma.$OauthClientPayload<ExtArgs>
|
||||
fields: Prisma.OauthClientFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.OauthClientFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.OauthClientFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.OauthClientFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.OauthClientFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.OauthClientFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.OauthClientCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.OauthClientCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.OauthClientCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.OauthClientDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.OauthClientUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.OauthClientDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.OauthClientUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.OauthClientUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.OauthClientUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.OauthClientAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateOauthClient>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.OauthClientGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthClientGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.OauthClientCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthClientCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
OauthResource: {
|
||||
payload: Prisma.$OauthResourcePayload<ExtArgs>
|
||||
fields: Prisma.OauthResourceFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.OauthResourceFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.OauthResourceFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.OauthResourceFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.OauthResourceFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.OauthResourceFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.OauthResourceCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.OauthResourceCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.OauthResourceCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.OauthResourceDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.OauthResourceUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.OauthResourceDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.OauthResourceUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.OauthResourceUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.OauthResourceUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthResourcePayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.OauthResourceAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateOauthResource>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.OauthResourceGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthResourceGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.OauthResourceCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthResourceCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
OauthClientResource: {
|
||||
payload: Prisma.$OauthClientResourcePayload<ExtArgs>
|
||||
fields: Prisma.OauthClientResourceFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.OauthClientResourceFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.OauthClientResourceFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.OauthClientResourceFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.OauthClientResourceFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.OauthClientResourceFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.OauthClientResourceCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.OauthClientResourceCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.OauthClientResourceCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.OauthClientResourceDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.OauthClientResourceUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.OauthClientResourceDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.OauthClientResourceUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.OauthClientResourceUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.OauthClientResourceUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientResourcePayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.OauthClientResourceAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateOauthClientResource>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.OauthClientResourceGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthClientResourceGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.OauthClientResourceCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthClientResourceCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
OauthRefreshToken: {
|
||||
payload: Prisma.$OauthRefreshTokenPayload<ExtArgs>
|
||||
fields: Prisma.OauthRefreshTokenFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.OauthRefreshTokenFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.OauthRefreshTokenFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.OauthRefreshTokenFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.OauthRefreshTokenFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.OauthRefreshTokenFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.OauthRefreshTokenCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.OauthRefreshTokenCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.OauthRefreshTokenCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.OauthRefreshTokenDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.OauthRefreshTokenUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.OauthRefreshTokenDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.OauthRefreshTokenUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.OauthRefreshTokenUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.OauthRefreshTokenUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthRefreshTokenPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.OauthRefreshTokenAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateOauthRefreshToken>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.OauthRefreshTokenGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthRefreshTokenGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.OauthRefreshTokenCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthRefreshTokenCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
OauthAccessToken: {
|
||||
payload: Prisma.$OauthAccessTokenPayload<ExtArgs>
|
||||
fields: Prisma.OauthAccessTokenFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.OauthAccessTokenFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.OauthAccessTokenFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.OauthAccessTokenFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.OauthAccessTokenFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.OauthAccessTokenFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.OauthAccessTokenCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.OauthAccessTokenCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.OauthAccessTokenCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.OauthAccessTokenDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.OauthAccessTokenUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.OauthAccessTokenDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.OauthAccessTokenUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.OauthAccessTokenUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.OauthAccessTokenUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthAccessTokenPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.OauthAccessTokenAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateOauthAccessToken>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.OauthAccessTokenGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthAccessTokenGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.OauthAccessTokenCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthAccessTokenCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
OauthConsent: {
|
||||
payload: Prisma.$OauthConsentPayload<ExtArgs>
|
||||
fields: Prisma.OauthConsentFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.OauthConsentFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.OauthConsentFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.OauthConsentFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.OauthConsentFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.OauthConsentFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.OauthConsentCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.OauthConsentCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.OauthConsentCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.OauthConsentDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.OauthConsentUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.OauthConsentDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.OauthConsentUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.OauthConsentUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.OauthConsentUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthConsentPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.OauthConsentAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateOauthConsent>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.OauthConsentGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthConsentGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.OauthConsentCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthConsentCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
OauthClientAssertion: {
|
||||
payload: Prisma.$OauthClientAssertionPayload<ExtArgs>
|
||||
fields: Prisma.OauthClientAssertionFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.OauthClientAssertionFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.OauthClientAssertionFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.OauthClientAssertionFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.OauthClientAssertionFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.OauthClientAssertionFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.OauthClientAssertionCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.OauthClientAssertionCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.OauthClientAssertionCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.OauthClientAssertionDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.OauthClientAssertionUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.OauthClientAssertionDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.OauthClientAssertionUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.OauthClientAssertionUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.OauthClientAssertionUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$OauthClientAssertionPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.OauthClientAssertionAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateOauthClientAssertion>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.OauthClientAssertionGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthClientAssertionGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.OauthClientAssertionCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.OauthClientAssertionCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} & {
|
||||
other: {
|
||||
@@ -5111,6 +5711,161 @@ export const RecentFileItemScalarFieldEnum = {
|
||||
export type RecentFileItemScalarFieldEnum = (typeof RecentFileItemScalarFieldEnum)[keyof typeof RecentFileItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const JwksScalarFieldEnum = {
|
||||
id: 'id',
|
||||
publicKey: 'publicKey',
|
||||
privateKey: 'privateKey',
|
||||
createdAt: 'createdAt',
|
||||
expiresAt: 'expiresAt',
|
||||
alg: 'alg',
|
||||
crv: 'crv'
|
||||
} as const
|
||||
|
||||
export type JwksScalarFieldEnum = (typeof JwksScalarFieldEnum)[keyof typeof JwksScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthClientScalarFieldEnum = {
|
||||
id: 'id',
|
||||
clientId: 'clientId',
|
||||
clientSecret: 'clientSecret',
|
||||
clientDiscoveryId: 'clientDiscoveryId',
|
||||
disabled: 'disabled',
|
||||
skipConsent: 'skipConsent',
|
||||
enableEndSession: 'enableEndSession',
|
||||
subjectType: 'subjectType',
|
||||
scopes: 'scopes',
|
||||
clientCredentialsScopes: 'clientCredentialsScopes',
|
||||
userId: 'userId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
name: 'name',
|
||||
uri: 'uri',
|
||||
icon: 'icon',
|
||||
contacts: 'contacts',
|
||||
tos: 'tos',
|
||||
policy: 'policy',
|
||||
softwareId: 'softwareId',
|
||||
softwareVersion: 'softwareVersion',
|
||||
softwareStatement: 'softwareStatement',
|
||||
redirectUris: 'redirectUris',
|
||||
postLogoutRedirectUris: 'postLogoutRedirectUris',
|
||||
backchannelLogoutUri: 'backchannelLogoutUri',
|
||||
backchannelLogoutSessionRequired: 'backchannelLogoutSessionRequired',
|
||||
tokenEndpointAuthMethod: 'tokenEndpointAuthMethod',
|
||||
applicationType: 'applicationType',
|
||||
jwks: 'jwks',
|
||||
jwksUri: 'jwksUri',
|
||||
grantTypes: 'grantTypes',
|
||||
responseTypes: 'responseTypes',
|
||||
requirePKCE: 'requirePKCE',
|
||||
dpopBoundAccessTokens: 'dpopBoundAccessTokens',
|
||||
referenceId: 'referenceId',
|
||||
metadata: 'metadata'
|
||||
} as const
|
||||
|
||||
export type OauthClientScalarFieldEnum = (typeof OauthClientScalarFieldEnum)[keyof typeof OauthClientScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthResourceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
identifier: 'identifier',
|
||||
name: 'name',
|
||||
accessTokenTtl: 'accessTokenTtl',
|
||||
refreshTokenTtl: 'refreshTokenTtl',
|
||||
signingAlgorithm: 'signingAlgorithm',
|
||||
signingKeyId: 'signingKeyId',
|
||||
allowedScopes: 'allowedScopes',
|
||||
customClaims: 'customClaims',
|
||||
dpopBoundAccessTokensRequired: 'dpopBoundAccessTokensRequired',
|
||||
disabled: 'disabled',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
policyVersion: 'policyVersion',
|
||||
metadata: 'metadata'
|
||||
} as const
|
||||
|
||||
export type OauthResourceScalarFieldEnum = (typeof OauthResourceScalarFieldEnum)[keyof typeof OauthResourceScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthClientResourceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
clientId: 'clientId',
|
||||
resourceId: 'resourceId',
|
||||
metadata: 'metadata',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type OauthClientResourceScalarFieldEnum = (typeof OauthClientResourceScalarFieldEnum)[keyof typeof OauthClientResourceScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthRefreshTokenScalarFieldEnum = {
|
||||
id: 'id',
|
||||
token: 'token',
|
||||
clientId: 'clientId',
|
||||
sessionId: 'sessionId',
|
||||
userId: 'userId',
|
||||
referenceId: 'referenceId',
|
||||
authorizationCodeId: 'authorizationCodeId',
|
||||
resources: 'resources',
|
||||
requestedUserInfoClaims: 'requestedUserInfoClaims',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
revoked: 'revoked',
|
||||
rotatedAt: 'rotatedAt',
|
||||
rotationReplayResponse: 'rotationReplayResponse',
|
||||
rotationReplayExpiresAt: 'rotationReplayExpiresAt',
|
||||
authTime: 'authTime',
|
||||
confirmation: 'confirmation',
|
||||
scopes: 'scopes'
|
||||
} as const
|
||||
|
||||
export type OauthRefreshTokenScalarFieldEnum = (typeof OauthRefreshTokenScalarFieldEnum)[keyof typeof OauthRefreshTokenScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthAccessTokenScalarFieldEnum = {
|
||||
id: 'id',
|
||||
token: 'token',
|
||||
clientId: 'clientId',
|
||||
sessionId: 'sessionId',
|
||||
userId: 'userId',
|
||||
referenceId: 'referenceId',
|
||||
authorizationCodeId: 'authorizationCodeId',
|
||||
resources: 'resources',
|
||||
requestedUserInfoClaims: 'requestedUserInfoClaims',
|
||||
refreshId: 'refreshId',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
revoked: 'revoked',
|
||||
confirmation: 'confirmation',
|
||||
scopes: 'scopes'
|
||||
} as const
|
||||
|
||||
export type OauthAccessTokenScalarFieldEnum = (typeof OauthAccessTokenScalarFieldEnum)[keyof typeof OauthAccessTokenScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthConsentScalarFieldEnum = {
|
||||
id: 'id',
|
||||
clientId: 'clientId',
|
||||
userId: 'userId',
|
||||
referenceId: 'referenceId',
|
||||
resources: 'resources',
|
||||
requestedUserInfoClaims: 'requestedUserInfoClaims',
|
||||
scopes: 'scopes',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type OauthConsentScalarFieldEnum = (typeof OauthConsentScalarFieldEnum)[keyof typeof OauthConsentScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthClientAssertionScalarFieldEnum = {
|
||||
id: 'id',
|
||||
expiresAt: 'expiresAt'
|
||||
} as const
|
||||
|
||||
export type OauthClientAssertionScalarFieldEnum = (typeof OauthClientAssertionScalarFieldEnum)[keyof typeof OauthClientAssertionScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
@@ -5822,6 +6577,14 @@ export type GlobalOmitConfig = {
|
||||
kanbanTaskComment?: Prisma.KanbanTaskCommentOmit
|
||||
kanbanTaskEvent?: Prisma.KanbanTaskEventOmit
|
||||
recentFileItem?: Prisma.RecentFileItemOmit
|
||||
jwks?: Prisma.JwksOmit
|
||||
oauthClient?: Prisma.OauthClientOmit
|
||||
oauthResource?: Prisma.OauthResourceOmit
|
||||
oauthClientResource?: Prisma.OauthClientResourceOmit
|
||||
oauthRefreshToken?: Prisma.OauthRefreshTokenOmit
|
||||
oauthAccessToken?: Prisma.OauthAccessTokenOmit
|
||||
oauthConsent?: Prisma.OauthConsentOmit
|
||||
oauthClientAssertion?: Prisma.OauthClientAssertionOmit
|
||||
}
|
||||
|
||||
/* Types for Logging */
|
||||
|
||||
+164
-1
@@ -102,7 +102,15 @@ export const ModelName = {
|
||||
KanbanTaskAsset: 'KanbanTaskAsset',
|
||||
KanbanTaskComment: 'KanbanTaskComment',
|
||||
KanbanTaskEvent: 'KanbanTaskEvent',
|
||||
RecentFileItem: 'RecentFileItem'
|
||||
RecentFileItem: 'RecentFileItem',
|
||||
Jwks: 'Jwks',
|
||||
OauthClient: 'OauthClient',
|
||||
OauthResource: 'OauthResource',
|
||||
OauthClientResource: 'OauthClientResource',
|
||||
OauthRefreshToken: 'OauthRefreshToken',
|
||||
OauthAccessToken: 'OauthAccessToken',
|
||||
OauthConsent: 'OauthConsent',
|
||||
OauthClientAssertion: 'OauthClientAssertion'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
@@ -877,6 +885,161 @@ export const RecentFileItemScalarFieldEnum = {
|
||||
export type RecentFileItemScalarFieldEnum = (typeof RecentFileItemScalarFieldEnum)[keyof typeof RecentFileItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const JwksScalarFieldEnum = {
|
||||
id: 'id',
|
||||
publicKey: 'publicKey',
|
||||
privateKey: 'privateKey',
|
||||
createdAt: 'createdAt',
|
||||
expiresAt: 'expiresAt',
|
||||
alg: 'alg',
|
||||
crv: 'crv'
|
||||
} as const
|
||||
|
||||
export type JwksScalarFieldEnum = (typeof JwksScalarFieldEnum)[keyof typeof JwksScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthClientScalarFieldEnum = {
|
||||
id: 'id',
|
||||
clientId: 'clientId',
|
||||
clientSecret: 'clientSecret',
|
||||
clientDiscoveryId: 'clientDiscoveryId',
|
||||
disabled: 'disabled',
|
||||
skipConsent: 'skipConsent',
|
||||
enableEndSession: 'enableEndSession',
|
||||
subjectType: 'subjectType',
|
||||
scopes: 'scopes',
|
||||
clientCredentialsScopes: 'clientCredentialsScopes',
|
||||
userId: 'userId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
name: 'name',
|
||||
uri: 'uri',
|
||||
icon: 'icon',
|
||||
contacts: 'contacts',
|
||||
tos: 'tos',
|
||||
policy: 'policy',
|
||||
softwareId: 'softwareId',
|
||||
softwareVersion: 'softwareVersion',
|
||||
softwareStatement: 'softwareStatement',
|
||||
redirectUris: 'redirectUris',
|
||||
postLogoutRedirectUris: 'postLogoutRedirectUris',
|
||||
backchannelLogoutUri: 'backchannelLogoutUri',
|
||||
backchannelLogoutSessionRequired: 'backchannelLogoutSessionRequired',
|
||||
tokenEndpointAuthMethod: 'tokenEndpointAuthMethod',
|
||||
applicationType: 'applicationType',
|
||||
jwks: 'jwks',
|
||||
jwksUri: 'jwksUri',
|
||||
grantTypes: 'grantTypes',
|
||||
responseTypes: 'responseTypes',
|
||||
requirePKCE: 'requirePKCE',
|
||||
dpopBoundAccessTokens: 'dpopBoundAccessTokens',
|
||||
referenceId: 'referenceId',
|
||||
metadata: 'metadata'
|
||||
} as const
|
||||
|
||||
export type OauthClientScalarFieldEnum = (typeof OauthClientScalarFieldEnum)[keyof typeof OauthClientScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthResourceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
identifier: 'identifier',
|
||||
name: 'name',
|
||||
accessTokenTtl: 'accessTokenTtl',
|
||||
refreshTokenTtl: 'refreshTokenTtl',
|
||||
signingAlgorithm: 'signingAlgorithm',
|
||||
signingKeyId: 'signingKeyId',
|
||||
allowedScopes: 'allowedScopes',
|
||||
customClaims: 'customClaims',
|
||||
dpopBoundAccessTokensRequired: 'dpopBoundAccessTokensRequired',
|
||||
disabled: 'disabled',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
policyVersion: 'policyVersion',
|
||||
metadata: 'metadata'
|
||||
} as const
|
||||
|
||||
export type OauthResourceScalarFieldEnum = (typeof OauthResourceScalarFieldEnum)[keyof typeof OauthResourceScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthClientResourceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
clientId: 'clientId',
|
||||
resourceId: 'resourceId',
|
||||
metadata: 'metadata',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type OauthClientResourceScalarFieldEnum = (typeof OauthClientResourceScalarFieldEnum)[keyof typeof OauthClientResourceScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthRefreshTokenScalarFieldEnum = {
|
||||
id: 'id',
|
||||
token: 'token',
|
||||
clientId: 'clientId',
|
||||
sessionId: 'sessionId',
|
||||
userId: 'userId',
|
||||
referenceId: 'referenceId',
|
||||
authorizationCodeId: 'authorizationCodeId',
|
||||
resources: 'resources',
|
||||
requestedUserInfoClaims: 'requestedUserInfoClaims',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
revoked: 'revoked',
|
||||
rotatedAt: 'rotatedAt',
|
||||
rotationReplayResponse: 'rotationReplayResponse',
|
||||
rotationReplayExpiresAt: 'rotationReplayExpiresAt',
|
||||
authTime: 'authTime',
|
||||
confirmation: 'confirmation',
|
||||
scopes: 'scopes'
|
||||
} as const
|
||||
|
||||
export type OauthRefreshTokenScalarFieldEnum = (typeof OauthRefreshTokenScalarFieldEnum)[keyof typeof OauthRefreshTokenScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthAccessTokenScalarFieldEnum = {
|
||||
id: 'id',
|
||||
token: 'token',
|
||||
clientId: 'clientId',
|
||||
sessionId: 'sessionId',
|
||||
userId: 'userId',
|
||||
referenceId: 'referenceId',
|
||||
authorizationCodeId: 'authorizationCodeId',
|
||||
resources: 'resources',
|
||||
requestedUserInfoClaims: 'requestedUserInfoClaims',
|
||||
refreshId: 'refreshId',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
revoked: 'revoked',
|
||||
confirmation: 'confirmation',
|
||||
scopes: 'scopes'
|
||||
} as const
|
||||
|
||||
export type OauthAccessTokenScalarFieldEnum = (typeof OauthAccessTokenScalarFieldEnum)[keyof typeof OauthAccessTokenScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthConsentScalarFieldEnum = {
|
||||
id: 'id',
|
||||
clientId: 'clientId',
|
||||
userId: 'userId',
|
||||
referenceId: 'referenceId',
|
||||
resources: 'resources',
|
||||
requestedUserInfoClaims: 'requestedUserInfoClaims',
|
||||
scopes: 'scopes',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type OauthConsentScalarFieldEnum = (typeof OauthConsentScalarFieldEnum)[keyof typeof OauthConsentScalarFieldEnum]
|
||||
|
||||
|
||||
export const OauthClientAssertionScalarFieldEnum = {
|
||||
id: 'id',
|
||||
expiresAt: 'expiresAt'
|
||||
} as const
|
||||
|
||||
export type OauthClientAssertionScalarFieldEnum = (typeof OauthClientAssertionScalarFieldEnum)[keyof typeof OauthClientAssertionScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
|
||||
+8
@@ -60,4 +60,12 @@ export type * from './models/KanbanTaskAsset.ts'
|
||||
export type * from './models/KanbanTaskComment.ts'
|
||||
export type * from './models/KanbanTaskEvent.ts'
|
||||
export type * from './models/RecentFileItem.ts'
|
||||
export type * from './models/Jwks.ts'
|
||||
export type * from './models/OauthClient.ts'
|
||||
export type * from './models/OauthResource.ts'
|
||||
export type * from './models/OauthClientResource.ts'
|
||||
export type * from './models/OauthRefreshToken.ts'
|
||||
export type * from './models/OauthAccessToken.ts'
|
||||
export type * from './models/OauthConsent.ts'
|
||||
export type * from './models/OauthClientAssertion.ts'
|
||||
export type * from './commonInputTypes.ts'
|
||||
+1207
File diff suppressed because it is too large
Load Diff
+2300
File diff suppressed because it is too large
Load Diff
+3480
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1659
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1702
File diff suppressed because it is too large
Load Diff
+283
@@ -209,6 +209,8 @@ export type SessionWhereInput = {
|
||||
userAgent?: Prisma.StringNullableFilter<"Session"> | string | null
|
||||
userId?: Prisma.StringFilter<"Session"> | string
|
||||
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenListRelationFilter
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenListRelationFilter
|
||||
}
|
||||
|
||||
export type SessionOrderByWithRelationInput = {
|
||||
@@ -221,6 +223,8 @@ export type SessionOrderByWithRelationInput = {
|
||||
userAgent?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
userId?: Prisma.SortOrder
|
||||
user?: Prisma.UserOrderByWithRelationInput
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenOrderByRelationAggregateInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type SessionWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -236,6 +240,8 @@ export type SessionWhereUniqueInput = Prisma.AtLeast<{
|
||||
userAgent?: Prisma.StringNullableFilter<"Session"> | string | null
|
||||
userId?: Prisma.StringFilter<"Session"> | string
|
||||
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenListRelationFilter
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenListRelationFilter
|
||||
}, "id" | "token">
|
||||
|
||||
export type SessionOrderByWithAggregationInput = {
|
||||
@@ -275,6 +281,8 @@ export type SessionCreateInput = {
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
user: Prisma.UserCreateNestedOneWithoutSessionsInput
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenCreateNestedManyWithoutSessionInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedCreateInput = {
|
||||
@@ -286,6 +294,8 @@ export type SessionUncheckedCreateInput = {
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
userId: string
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUncheckedCreateNestedManyWithoutSessionInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUncheckedCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionUpdateInput = {
|
||||
@@ -297,6 +307,8 @@ export type SessionUpdateInput = {
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutSessionsNestedInput
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUpdateManyWithoutSessionNestedInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedUpdateInput = {
|
||||
@@ -308,6 +320,8 @@ export type SessionUncheckedUpdateInput = {
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUncheckedUpdateManyWithoutSessionNestedInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUncheckedUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionCreateManyInput = {
|
||||
@@ -385,6 +399,11 @@ export type SessionMinOrderByAggregateInput = {
|
||||
userId?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SessionNullableScalarRelationFilter = {
|
||||
is?: Prisma.SessionWhereInput | null
|
||||
isNot?: Prisma.SessionWhereInput | null
|
||||
}
|
||||
|
||||
export type SessionCreateNestedManyWithoutUserInput = {
|
||||
create?: Prisma.XOR<Prisma.SessionCreateWithoutUserInput, Prisma.SessionUncheckedCreateWithoutUserInput> | Prisma.SessionCreateWithoutUserInput[] | Prisma.SessionUncheckedCreateWithoutUserInput[]
|
||||
connectOrCreate?: Prisma.SessionCreateOrConnectWithoutUserInput | Prisma.SessionCreateOrConnectWithoutUserInput[]
|
||||
@@ -427,6 +446,38 @@ export type SessionUncheckedUpdateManyWithoutUserNestedInput = {
|
||||
deleteMany?: Prisma.SessionScalarWhereInput | Prisma.SessionScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type SessionCreateNestedOneWithoutOauthRefreshTokensInput = {
|
||||
create?: Prisma.XOR<Prisma.SessionCreateWithoutOauthRefreshTokensInput, Prisma.SessionUncheckedCreateWithoutOauthRefreshTokensInput>
|
||||
connectOrCreate?: Prisma.SessionCreateOrConnectWithoutOauthRefreshTokensInput
|
||||
connect?: Prisma.SessionWhereUniqueInput
|
||||
}
|
||||
|
||||
export type SessionUpdateOneWithoutOauthRefreshTokensNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SessionCreateWithoutOauthRefreshTokensInput, Prisma.SessionUncheckedCreateWithoutOauthRefreshTokensInput>
|
||||
connectOrCreate?: Prisma.SessionCreateOrConnectWithoutOauthRefreshTokensInput
|
||||
upsert?: Prisma.SessionUpsertWithoutOauthRefreshTokensInput
|
||||
disconnect?: Prisma.SessionWhereInput | boolean
|
||||
delete?: Prisma.SessionWhereInput | boolean
|
||||
connect?: Prisma.SessionWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SessionUpdateToOneWithWhereWithoutOauthRefreshTokensInput, Prisma.SessionUpdateWithoutOauthRefreshTokensInput>, Prisma.SessionUncheckedUpdateWithoutOauthRefreshTokensInput>
|
||||
}
|
||||
|
||||
export type SessionCreateNestedOneWithoutOauthAccessTokensInput = {
|
||||
create?: Prisma.XOR<Prisma.SessionCreateWithoutOauthAccessTokensInput, Prisma.SessionUncheckedCreateWithoutOauthAccessTokensInput>
|
||||
connectOrCreate?: Prisma.SessionCreateOrConnectWithoutOauthAccessTokensInput
|
||||
connect?: Prisma.SessionWhereUniqueInput
|
||||
}
|
||||
|
||||
export type SessionUpdateOneWithoutOauthAccessTokensNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SessionCreateWithoutOauthAccessTokensInput, Prisma.SessionUncheckedCreateWithoutOauthAccessTokensInput>
|
||||
connectOrCreate?: Prisma.SessionCreateOrConnectWithoutOauthAccessTokensInput
|
||||
upsert?: Prisma.SessionUpsertWithoutOauthAccessTokensInput
|
||||
disconnect?: Prisma.SessionWhereInput | boolean
|
||||
delete?: Prisma.SessionWhereInput | boolean
|
||||
connect?: Prisma.SessionWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SessionUpdateToOneWithWhereWithoutOauthAccessTokensInput, Prisma.SessionUpdateWithoutOauthAccessTokensInput>, Prisma.SessionUncheckedUpdateWithoutOauthAccessTokensInput>
|
||||
}
|
||||
|
||||
export type SessionCreateWithoutUserInput = {
|
||||
id?: string
|
||||
expiresAt: Date | string
|
||||
@@ -435,6 +486,8 @@ export type SessionCreateWithoutUserInput = {
|
||||
updatedAt?: Date | string
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenCreateNestedManyWithoutSessionInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedCreateWithoutUserInput = {
|
||||
@@ -445,6 +498,8 @@ export type SessionUncheckedCreateWithoutUserInput = {
|
||||
updatedAt?: Date | string
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUncheckedCreateNestedManyWithoutSessionInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUncheckedCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionCreateOrConnectWithoutUserInput = {
|
||||
@@ -487,6 +542,134 @@ export type SessionScalarWhereInput = {
|
||||
userId?: Prisma.StringFilter<"Session"> | string
|
||||
}
|
||||
|
||||
export type SessionCreateWithoutOauthRefreshTokensInput = {
|
||||
id?: string
|
||||
expiresAt: Date | string
|
||||
token: string
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
user: Prisma.UserCreateNestedOneWithoutSessionsInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedCreateWithoutOauthRefreshTokensInput = {
|
||||
id?: string
|
||||
expiresAt: Date | string
|
||||
token: string
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
userId: string
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUncheckedCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionCreateOrConnectWithoutOauthRefreshTokensInput = {
|
||||
where: Prisma.SessionWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.SessionCreateWithoutOauthRefreshTokensInput, Prisma.SessionUncheckedCreateWithoutOauthRefreshTokensInput>
|
||||
}
|
||||
|
||||
export type SessionUpsertWithoutOauthRefreshTokensInput = {
|
||||
update: Prisma.XOR<Prisma.SessionUpdateWithoutOauthRefreshTokensInput, Prisma.SessionUncheckedUpdateWithoutOauthRefreshTokensInput>
|
||||
create: Prisma.XOR<Prisma.SessionCreateWithoutOauthRefreshTokensInput, Prisma.SessionUncheckedCreateWithoutOauthRefreshTokensInput>
|
||||
where?: Prisma.SessionWhereInput
|
||||
}
|
||||
|
||||
export type SessionUpdateToOneWithWhereWithoutOauthRefreshTokensInput = {
|
||||
where?: Prisma.SessionWhereInput
|
||||
data: Prisma.XOR<Prisma.SessionUpdateWithoutOauthRefreshTokensInput, Prisma.SessionUncheckedUpdateWithoutOauthRefreshTokensInput>
|
||||
}
|
||||
|
||||
export type SessionUpdateWithoutOauthRefreshTokensInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutSessionsNestedInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedUpdateWithoutOauthRefreshTokensInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUncheckedUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionCreateWithoutOauthAccessTokensInput = {
|
||||
id?: string
|
||||
expiresAt: Date | string
|
||||
token: string
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
user: Prisma.UserCreateNestedOneWithoutSessionsInput
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedCreateWithoutOauthAccessTokensInput = {
|
||||
id?: string
|
||||
expiresAt: Date | string
|
||||
token: string
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
ipAddress?: string | null
|
||||
userAgent?: string | null
|
||||
userId: string
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUncheckedCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type SessionCreateOrConnectWithoutOauthAccessTokensInput = {
|
||||
where: Prisma.SessionWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.SessionCreateWithoutOauthAccessTokensInput, Prisma.SessionUncheckedCreateWithoutOauthAccessTokensInput>
|
||||
}
|
||||
|
||||
export type SessionUpsertWithoutOauthAccessTokensInput = {
|
||||
update: Prisma.XOR<Prisma.SessionUpdateWithoutOauthAccessTokensInput, Prisma.SessionUncheckedUpdateWithoutOauthAccessTokensInput>
|
||||
create: Prisma.XOR<Prisma.SessionCreateWithoutOauthAccessTokensInput, Prisma.SessionUncheckedCreateWithoutOauthAccessTokensInput>
|
||||
where?: Prisma.SessionWhereInput
|
||||
}
|
||||
|
||||
export type SessionUpdateToOneWithWhereWithoutOauthAccessTokensInput = {
|
||||
where?: Prisma.SessionWhereInput
|
||||
data: Prisma.XOR<Prisma.SessionUpdateWithoutOauthAccessTokensInput, Prisma.SessionUncheckedUpdateWithoutOauthAccessTokensInput>
|
||||
}
|
||||
|
||||
export type SessionUpdateWithoutOauthAccessTokensInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutSessionsNestedInput
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedUpdateWithoutOauthAccessTokensInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
token?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUncheckedUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionCreateManyUserInput = {
|
||||
id?: string
|
||||
expiresAt: Date | string
|
||||
@@ -505,6 +688,8 @@ export type SessionUpdateWithoutUserInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUpdateManyWithoutSessionNestedInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedUpdateWithoutUserInput = {
|
||||
@@ -515,6 +700,8 @@ export type SessionUncheckedUpdateWithoutUserInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
ipAddress?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
oauthRefreshTokens?: Prisma.OauthRefreshTokenUncheckedUpdateManyWithoutSessionNestedInput
|
||||
oauthAccessTokens?: Prisma.OauthAccessTokenUncheckedUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type SessionUncheckedUpdateManyWithoutUserInput = {
|
||||
@@ -528,6 +715,44 @@ export type SessionUncheckedUpdateManyWithoutUserInput = {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Count Type SessionCountOutputType
|
||||
*/
|
||||
|
||||
export type SessionCountOutputType = {
|
||||
oauthRefreshTokens: number
|
||||
oauthAccessTokens: number
|
||||
}
|
||||
|
||||
export type SessionCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
oauthRefreshTokens?: boolean | SessionCountOutputTypeCountOauthRefreshTokensArgs
|
||||
oauthAccessTokens?: boolean | SessionCountOutputTypeCountOauthAccessTokensArgs
|
||||
}
|
||||
|
||||
/**
|
||||
* SessionCountOutputType without action
|
||||
*/
|
||||
export type SessionCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the SessionCountOutputType
|
||||
*/
|
||||
select?: Prisma.SessionCountOutputTypeSelect<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* SessionCountOutputType without action
|
||||
*/
|
||||
export type SessionCountOutputTypeCountOauthRefreshTokensArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.OauthRefreshTokenWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* SessionCountOutputType without action
|
||||
*/
|
||||
export type SessionCountOutputTypeCountOauthAccessTokensArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.OauthAccessTokenWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type SessionSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -539,6 +764,9 @@ export type SessionSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
userAgent?: boolean
|
||||
userId?: boolean
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
oauthRefreshTokens?: boolean | Prisma.Session$oauthRefreshTokensArgs<ExtArgs>
|
||||
oauthAccessTokens?: boolean | Prisma.Session$oauthAccessTokensArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.SessionCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["session"]>
|
||||
|
||||
export type SessionSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
@@ -579,6 +807,9 @@ export type SessionSelectScalar = {
|
||||
export type SessionOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "expiresAt" | "token" | "createdAt" | "updatedAt" | "ipAddress" | "userAgent" | "userId", ExtArgs["result"]["session"]>
|
||||
export type SessionInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
oauthRefreshTokens?: boolean | Prisma.Session$oauthRefreshTokensArgs<ExtArgs>
|
||||
oauthAccessTokens?: boolean | Prisma.Session$oauthAccessTokensArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.SessionCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type SessionIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
@@ -591,6 +822,8 @@ export type $SessionPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
name: "Session"
|
||||
objects: {
|
||||
user: Prisma.$UserPayload<ExtArgs>
|
||||
oauthRefreshTokens: Prisma.$OauthRefreshTokenPayload<ExtArgs>[]
|
||||
oauthAccessTokens: Prisma.$OauthAccessTokenPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -996,6 +1229,8 @@ readonly fields: SessionFieldRefs;
|
||||
export interface Prisma__SessionClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
oauthRefreshTokens<T extends Prisma.Session$oauthRefreshTokensArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Session$oauthRefreshTokensArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OauthRefreshTokenPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
oauthAccessTokens<T extends Prisma.Session$oauthAccessTokensArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Session$oauthAccessTokensArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OauthAccessTokenPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1433,6 +1668,54 @@ export type SessionDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Session.oauthRefreshTokens
|
||||
*/
|
||||
export type Session$oauthRefreshTokensArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the OauthRefreshToken
|
||||
*/
|
||||
select?: Prisma.OauthRefreshTokenSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the OauthRefreshToken
|
||||
*/
|
||||
omit?: Prisma.OauthRefreshTokenOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.OauthRefreshTokenInclude<ExtArgs> | null
|
||||
where?: Prisma.OauthRefreshTokenWhereInput
|
||||
orderBy?: Prisma.OauthRefreshTokenOrderByWithRelationInput | Prisma.OauthRefreshTokenOrderByWithRelationInput[]
|
||||
cursor?: Prisma.OauthRefreshTokenWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.OauthRefreshTokenScalarFieldEnum | Prisma.OauthRefreshTokenScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Session.oauthAccessTokens
|
||||
*/
|
||||
export type Session$oauthAccessTokensArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the OauthAccessToken
|
||||
*/
|
||||
select?: Prisma.OauthAccessTokenSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the OauthAccessToken
|
||||
*/
|
||||
omit?: Prisma.OauthAccessTokenOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.OauthAccessTokenInclude<ExtArgs> | null
|
||||
where?: Prisma.OauthAccessTokenWhereInput
|
||||
orderBy?: Prisma.OauthAccessTokenOrderByWithRelationInput | Prisma.OauthAccessTokenOrderByWithRelationInput[]
|
||||
cursor?: Prisma.OauthAccessTokenWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.OauthAccessTokenScalarFieldEnum | Prisma.OauthAccessTokenScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Session without action
|
||||
*/
|
||||
|
||||
+1470
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,29 @@ const globalForPrisma = globalThis as unknown as {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let prismaTestingHelper: PrismaTestingHelper<any> | null = null
|
||||
|
||||
function sanitizeArrayFields<T>(data: T): T {
|
||||
if (data && typeof data === 'object') {
|
||||
const record = data as Record<string, unknown>
|
||||
const arrayFields = [
|
||||
'scopes',
|
||||
'allowedScopes',
|
||||
'resources',
|
||||
'requestedUserInfoClaims',
|
||||
'contacts',
|
||||
'redirectUris',
|
||||
'postLogoutRedirectUris',
|
||||
'grantTypes',
|
||||
'responseTypes',
|
||||
]
|
||||
for (const field of arrayFields) {
|
||||
if (record[field] === null) {
|
||||
record[field] = []
|
||||
}
|
||||
}
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
function createPrismaClient() {
|
||||
const connectionString = process.env.DATABASE_URL
|
||||
const pool = new Pool({ connectionString })
|
||||
@@ -49,6 +72,80 @@ function createPrismaClient() {
|
||||
|
||||
return client.$extends({
|
||||
query: {
|
||||
oauthResource: {
|
||||
async create({ args, query }) {
|
||||
sanitizeArrayFields(args.data)
|
||||
try {
|
||||
return await query(args)
|
||||
} catch (e: unknown) {
|
||||
if (
|
||||
e &&
|
||||
typeof e === 'object' &&
|
||||
'code' in e &&
|
||||
e.code === 'P2002' &&
|
||||
args.data.identifier
|
||||
) {
|
||||
const existing = await client.oauthResource.findUnique({
|
||||
where: { identifier: args.data.identifier },
|
||||
})
|
||||
if (existing) return existing
|
||||
}
|
||||
throw e
|
||||
}
|
||||
},
|
||||
async update({ args, query }) {
|
||||
sanitizeArrayFields(args.data)
|
||||
return query(args)
|
||||
},
|
||||
async upsert({ args, query }) {
|
||||
sanitizeArrayFields(args.create)
|
||||
sanitizeArrayFields(args.update)
|
||||
return query(args)
|
||||
},
|
||||
async findUnique({ args, query }) {
|
||||
const result = await query(args)
|
||||
if (result && Array.isArray(result.allowedScopes) && result.allowedScopes.length === 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
;(result as any).allowedScopes = null
|
||||
}
|
||||
return result
|
||||
},
|
||||
async findFirst({ args, query }) {
|
||||
const result = await query(args)
|
||||
if (result && Array.isArray(result.allowedScopes) && result.allowedScopes.length === 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
;(result as any).allowedScopes = null
|
||||
}
|
||||
return result
|
||||
},
|
||||
async findMany({ args, query }) {
|
||||
const results = await query(args)
|
||||
if (Array.isArray(results)) {
|
||||
for (const r of results) {
|
||||
if (r && Array.isArray(r.allowedScopes) && r.allowedScopes.length === 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
;(r as any).allowedScopes = null
|
||||
}
|
||||
}
|
||||
}
|
||||
return results
|
||||
},
|
||||
},
|
||||
oauthClient: {
|
||||
async create({ args, query }) {
|
||||
sanitizeArrayFields(args.data)
|
||||
return query(args)
|
||||
},
|
||||
async update({ args, query }) {
|
||||
sanitizeArrayFields(args.data)
|
||||
return query(args)
|
||||
},
|
||||
async upsert({ args, query }) {
|
||||
sanitizeArrayFields(args.create)
|
||||
sanitizeArrayFields(args.update)
|
||||
return query(args)
|
||||
},
|
||||
},
|
||||
workflowTask: {
|
||||
async create({ args, query }) {
|
||||
const result = await query(args)
|
||||
|
||||
@@ -571,5 +571,12 @@ declare global {
|
||||
proxyType?: 'image' | 'video' | 'audio' | 'pdf' | '3d' | null
|
||||
}
|
||||
export type KanbanCommentAttachmentList = KanbanCommentAttachment[]
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Better Auth OAuth
|
||||
// ----------------------------------------------------------------------
|
||||
export type OauthMetadata = Record<string, unknown>
|
||||
export type OauthCustomClaims = Record<string, unknown>
|
||||
export type OauthConfirmation = Record<string, unknown>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user