Files
shumai/packages/db/src/generated/prisma/models/Jwks.ts
T
Yiling-J baf30730af 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
2026-10-29 15:39:37 +08:00

1208 lines
39 KiB
TypeScript
Generated

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `Jwks` model and its related types.
*
* 🟢 You can import this file directly.
*/
import type * as PJTG from '../pjtg';
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums.ts"
import type * as Prisma from "../internal/prismaNamespace.ts"
/**
* Model Jwks
*
*/
export type JwksModel = runtime.Types.Result.DefaultSelection<Prisma.$JwksPayload>
export type AggregateJwks = {
_count: JwksCountAggregateOutputType | null
_min: JwksMinAggregateOutputType | null
_max: JwksMaxAggregateOutputType | null
}
export type JwksMinAggregateOutputType = {
id: string | null
publicKey: string | null
privateKey: string | null
createdAt: Date | null
expiresAt: Date | null
alg: string | null
crv: string | null
}
export type JwksMaxAggregateOutputType = {
id: string | null
publicKey: string | null
privateKey: string | null
createdAt: Date | null
expiresAt: Date | null
alg: string | null
crv: string | null
}
export type JwksCountAggregateOutputType = {
id: number
publicKey: number
privateKey: number
createdAt: number
expiresAt: number
alg: number
crv: number
_all: number
}
export type JwksMinAggregateInputType = {
id?: true
publicKey?: true
privateKey?: true
createdAt?: true
expiresAt?: true
alg?: true
crv?: true
}
export type JwksMaxAggregateInputType = {
id?: true
publicKey?: true
privateKey?: true
createdAt?: true
expiresAt?: true
alg?: true
crv?: true
}
export type JwksCountAggregateInputType = {
id?: true
publicKey?: true
privateKey?: true
createdAt?: true
expiresAt?: true
alg?: true
crv?: true
_all?: true
}
export type JwksAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Jwks to aggregate.
*/
where?: Prisma.JwksWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Jwks to fetch.
*/
orderBy?: Prisma.JwksOrderByWithRelationInput | Prisma.JwksOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.JwksWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Jwks from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Jwks.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Jwks
**/
_count?: true | JwksCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: JwksMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: JwksMaxAggregateInputType
}
export type GetJwksAggregateType<T extends JwksAggregateArgs> = {
[P in keyof T & keyof AggregateJwks]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateJwks[P]>
: Prisma.GetScalarType<T[P], AggregateJwks[P]>
}
export type JwksGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.JwksWhereInput
orderBy?: Prisma.JwksOrderByWithAggregationInput | Prisma.JwksOrderByWithAggregationInput[]
by: Prisma.JwksScalarFieldEnum[] | Prisma.JwksScalarFieldEnum
having?: Prisma.JwksScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: JwksCountAggregateInputType | true
_min?: JwksMinAggregateInputType
_max?: JwksMaxAggregateInputType
}
export type JwksGroupByOutputType = {
id: string
publicKey: string
privateKey: string
createdAt: Date
expiresAt: Date | null
alg: string | null
crv: string | null
_count: JwksCountAggregateOutputType | null
_min: JwksMinAggregateOutputType | null
_max: JwksMaxAggregateOutputType | null
}
export type GetJwksGroupByPayload<T extends JwksGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<JwksGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof JwksGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], JwksGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], JwksGroupByOutputType[P]>
}
>
>
export type JwksWhereInput = {
AND?: Prisma.JwksWhereInput | Prisma.JwksWhereInput[]
OR?: Prisma.JwksWhereInput[]
NOT?: Prisma.JwksWhereInput | Prisma.JwksWhereInput[]
id?: Prisma.StringFilter<"Jwks"> | string
publicKey?: Prisma.StringFilter<"Jwks"> | string
privateKey?: Prisma.StringFilter<"Jwks"> | string
createdAt?: Prisma.DateTimeFilter<"Jwks"> | Date | string
expiresAt?: Prisma.DateTimeNullableFilter<"Jwks"> | Date | string | null
alg?: Prisma.StringNullableFilter<"Jwks"> | string | null
crv?: Prisma.StringNullableFilter<"Jwks"> | string | null
}
export type JwksOrderByWithRelationInput = {
id?: Prisma.SortOrder
publicKey?: Prisma.SortOrder
privateKey?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrderInput | Prisma.SortOrder
alg?: Prisma.SortOrderInput | Prisma.SortOrder
crv?: Prisma.SortOrderInput | Prisma.SortOrder
}
export type JwksWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: Prisma.JwksWhereInput | Prisma.JwksWhereInput[]
OR?: Prisma.JwksWhereInput[]
NOT?: Prisma.JwksWhereInput | Prisma.JwksWhereInput[]
publicKey?: Prisma.StringFilter<"Jwks"> | string
privateKey?: Prisma.StringFilter<"Jwks"> | string
createdAt?: Prisma.DateTimeFilter<"Jwks"> | Date | string
expiresAt?: Prisma.DateTimeNullableFilter<"Jwks"> | Date | string | null
alg?: Prisma.StringNullableFilter<"Jwks"> | string | null
crv?: Prisma.StringNullableFilter<"Jwks"> | string | null
}, "id">
export type JwksOrderByWithAggregationInput = {
id?: Prisma.SortOrder
publicKey?: Prisma.SortOrder
privateKey?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrderInput | Prisma.SortOrder
alg?: Prisma.SortOrderInput | Prisma.SortOrder
crv?: Prisma.SortOrderInput | Prisma.SortOrder
_count?: Prisma.JwksCountOrderByAggregateInput
_max?: Prisma.JwksMaxOrderByAggregateInput
_min?: Prisma.JwksMinOrderByAggregateInput
}
export type JwksScalarWhereWithAggregatesInput = {
AND?: Prisma.JwksScalarWhereWithAggregatesInput | Prisma.JwksScalarWhereWithAggregatesInput[]
OR?: Prisma.JwksScalarWhereWithAggregatesInput[]
NOT?: Prisma.JwksScalarWhereWithAggregatesInput | Prisma.JwksScalarWhereWithAggregatesInput[]
id?: Prisma.StringWithAggregatesFilter<"Jwks"> | string
publicKey?: Prisma.StringWithAggregatesFilter<"Jwks"> | string
privateKey?: Prisma.StringWithAggregatesFilter<"Jwks"> | string
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Jwks"> | Date | string
expiresAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Jwks"> | Date | string | null
alg?: Prisma.StringNullableWithAggregatesFilter<"Jwks"> | string | null
crv?: Prisma.StringNullableWithAggregatesFilter<"Jwks"> | string | null
}
export type JwksCreateInput = {
id?: string
publicKey: string
privateKey: string
createdAt?: Date | string
expiresAt?: Date | string | null
alg?: string | null
crv?: string | null
}
export type JwksUncheckedCreateInput = {
id?: string
publicKey: string
privateKey: string
createdAt?: Date | string
expiresAt?: Date | string | null
alg?: string | null
crv?: string | null
}
export type JwksUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
publicKey?: Prisma.StringFieldUpdateOperationsInput | string
privateKey?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
alg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
crv?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type JwksUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
publicKey?: Prisma.StringFieldUpdateOperationsInput | string
privateKey?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
alg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
crv?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type JwksCreateManyInput = {
id?: string
publicKey: string
privateKey: string
createdAt?: Date | string
expiresAt?: Date | string | null
alg?: string | null
crv?: string | null
}
export type JwksUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
publicKey?: Prisma.StringFieldUpdateOperationsInput | string
privateKey?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
alg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
crv?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type JwksUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
publicKey?: Prisma.StringFieldUpdateOperationsInput | string
privateKey?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
alg?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
crv?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type JwksCountOrderByAggregateInput = {
id?: Prisma.SortOrder
publicKey?: Prisma.SortOrder
privateKey?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
alg?: Prisma.SortOrder
crv?: Prisma.SortOrder
}
export type JwksMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
publicKey?: Prisma.SortOrder
privateKey?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
alg?: Prisma.SortOrder
crv?: Prisma.SortOrder
}
export type JwksMinOrderByAggregateInput = {
id?: Prisma.SortOrder
publicKey?: Prisma.SortOrder
privateKey?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
alg?: Prisma.SortOrder
crv?: Prisma.SortOrder
}
export type JwksSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
publicKey?: boolean
privateKey?: boolean
createdAt?: boolean
expiresAt?: boolean
alg?: boolean
crv?: boolean
}, ExtArgs["result"]["jwks"]>
export type JwksSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
publicKey?: boolean
privateKey?: boolean
createdAt?: boolean
expiresAt?: boolean
alg?: boolean
crv?: boolean
}, ExtArgs["result"]["jwks"]>
export type JwksSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
publicKey?: boolean
privateKey?: boolean
createdAt?: boolean
expiresAt?: boolean
alg?: boolean
crv?: boolean
}, ExtArgs["result"]["jwks"]>
export type JwksSelectScalar = {
id?: boolean
publicKey?: boolean
privateKey?: boolean
createdAt?: boolean
expiresAt?: boolean
alg?: boolean
crv?: boolean
}
export type JwksOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "publicKey" | "privateKey" | "createdAt" | "expiresAt" | "alg" | "crv", ExtArgs["result"]["jwks"]>
export type $JwksPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "Jwks"
objects: {}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
publicKey: string
privateKey: string
createdAt: Date
expiresAt: Date | null
alg: string | null
crv: string | null
}, ExtArgs["result"]["jwks"]>
composites: {}
}
export type JwksGetPayload<S extends boolean | null | undefined | JwksDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$JwksPayload, S>
export type JwksCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<JwksFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: JwksCountAggregateInputType | true
}
export interface JwksDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Jwks'], meta: { name: 'Jwks' } }
/**
* Find zero or one Jwks that matches the filter.
* @param {JwksFindUniqueArgs} args - Arguments to find a Jwks
* @example
* // Get one Jwks
* const jwks = await prisma.jwks.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends JwksFindUniqueArgs>(args: Prisma.SelectSubset<T, JwksFindUniqueArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one Jwks that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {JwksFindUniqueOrThrowArgs} args - Arguments to find a Jwks
* @example
* // Get one Jwks
* const jwks = await prisma.jwks.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends JwksFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, JwksFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first Jwks that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {JwksFindFirstArgs} args - Arguments to find a Jwks
* @example
* // Get one Jwks
* const jwks = await prisma.jwks.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends JwksFindFirstArgs>(args?: Prisma.SelectSubset<T, JwksFindFirstArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first Jwks that matches the filter or
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {JwksFindFirstOrThrowArgs} args - Arguments to find a Jwks
* @example
* // Get one Jwks
* const jwks = await prisma.jwks.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends JwksFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, JwksFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more Jwks that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {JwksFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Jwks
* const jwks = await prisma.jwks.findMany()
*
* // Get first 10 Jwks
* const jwks = await prisma.jwks.findMany({ take: 10 })
*
* // Only select the `id`
* const jwksWithIdOnly = await prisma.jwks.findMany({ select: { id: true } })
*
*/
findMany<T extends JwksFindManyArgs>(args?: Prisma.SelectSubset<T, JwksFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a Jwks.
* @param {JwksCreateArgs} args - Arguments to create a Jwks.
* @example
* // Create one Jwks
* const Jwks = await prisma.jwks.create({
* data: {
* // ... data to create a Jwks
* }
* })
*
*/
create<T extends JwksCreateArgs>(args: Prisma.SelectSubset<T, JwksCreateArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many Jwks.
* @param {JwksCreateManyArgs} args - Arguments to create many Jwks.
* @example
* // Create many Jwks
* const jwks = await prisma.jwks.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends JwksCreateManyArgs>(args?: Prisma.SelectSubset<T, JwksCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many Jwks and returns the data saved in the database.
* @param {JwksCreateManyAndReturnArgs} args - Arguments to create many Jwks.
* @example
* // Create many Jwks
* const jwks = await prisma.jwks.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Jwks and only return the `id`
* const jwksWithIdOnly = await prisma.jwks.createManyAndReturn({
* select: { id: true },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
createManyAndReturn<T extends JwksCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, JwksCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a Jwks.
* @param {JwksDeleteArgs} args - Arguments to delete one Jwks.
* @example
* // Delete one Jwks
* const Jwks = await prisma.jwks.delete({
* where: {
* // ... filter to delete one Jwks
* }
* })
*
*/
delete<T extends JwksDeleteArgs>(args: Prisma.SelectSubset<T, JwksDeleteArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one Jwks.
* @param {JwksUpdateArgs} args - Arguments to update one Jwks.
* @example
* // Update one Jwks
* const jwks = await prisma.jwks.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends JwksUpdateArgs>(args: Prisma.SelectSubset<T, JwksUpdateArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more Jwks.
* @param {JwksDeleteManyArgs} args - Arguments to filter Jwks to delete.
* @example
* // Delete a few Jwks
* const { count } = await prisma.jwks.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends JwksDeleteManyArgs>(args?: Prisma.SelectSubset<T, JwksDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Jwks.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {JwksUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Jwks
* const jwks = await prisma.jwks.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends JwksUpdateManyArgs>(args: Prisma.SelectSubset<T, JwksUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Jwks and returns the data updated in the database.
* @param {JwksUpdateManyAndReturnArgs} args - Arguments to update many Jwks.
* @example
* // Update many Jwks
* const jwks = await prisma.jwks.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more Jwks and only return the `id`
* const jwksWithIdOnly = await prisma.jwks.updateManyAndReturn({
* select: { id: true },
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
updateManyAndReturn<T extends JwksUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, JwksUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one Jwks.
* @param {JwksUpsertArgs} args - Arguments to update or create a Jwks.
* @example
* // Update or create a Jwks
* const jwks = await prisma.jwks.upsert({
* create: {
* // ... data to create a Jwks
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Jwks we want to update
* }
* })
*/
upsert<T extends JwksUpsertArgs>(args: Prisma.SelectSubset<T, JwksUpsertArgs<ExtArgs>>): Prisma.Prisma__JwksClient<runtime.Types.Result.GetResult<Prisma.$JwksPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of Jwks.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {JwksCountArgs} args - Arguments to filter Jwks to count.
* @example
* // Count the number of Jwks
* const count = await prisma.jwks.count({
* where: {
* // ... the filter for the Jwks we want to count
* }
* })
**/
count<T extends JwksCountArgs>(
args?: Prisma.Subset<T, JwksCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], JwksCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Jwks.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {JwksAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
* @example
* // Ordered by age ascending
* // Where email contains prisma.io
* // Limited to the 10 users
* const aggregations = await prisma.user.aggregate({
* _avg: {
* age: true,
* },
* where: {
* email: {
* contains: "prisma.io",
* },
* },
* orderBy: {
* age: "asc",
* },
* take: 10,
* })
**/
aggregate<T extends JwksAggregateArgs>(args: Prisma.Subset<T, JwksAggregateArgs>): Prisma.PrismaPromise<GetJwksAggregateType<T>>
/**
* Group by Jwks.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {JwksGroupByArgs} args - Group by arguments.
* @example
* // Group by city, order by createdAt, get count
* const result = await prisma.user.groupBy({
* by: ['city', 'createdAt'],
* orderBy: {
* createdAt: true
* },
* _count: {
* _all: true
* },
* })
*
**/
groupBy<
T extends JwksGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: JwksGroupByArgs['orderBy'] }
: { orderBy?: JwksGroupByArgs['orderBy'] },
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
ByValid extends Prisma.Has<ByFields, OrderFields>,
HavingFields extends Prisma.GetHavingFields<T['having']>,
HavingValid extends Prisma.Has<ByFields, HavingFields>,
ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
InputErrors extends ByEmpty extends Prisma.True
? `Error: "by" must not be empty.`
: HavingValid extends Prisma.False
? {
[P in HavingFields]: P extends ByFields
? never
: P extends string
? `Error: Field "${P}" used in "having" needs to be provided in "by".`
: [
Error,
'Field ',
P,
` in "having" needs to be provided in "by"`,
]
}[HavingFields]
: 'take' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "take", you also need to provide "orderBy"'
: 'skip' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "skip", you also need to provide "orderBy"'
: ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
>(args: Prisma.SubsetIntersection<T, JwksGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetJwksGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Jwks model
*/
readonly fields: JwksFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Jwks.
* Why is this prefixed with `Prisma__`?
* Because we want to prevent naming conflicts as mentioned in
* https://github.com/prisma/prisma-client-js/issues/707
*/
export interface Prisma__JwksClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}
/**
* Fields of the Jwks model
*/
export interface JwksFieldRefs {
readonly id: Prisma.FieldRef<"Jwks", 'String'>
readonly publicKey: Prisma.FieldRef<"Jwks", 'String'>
readonly privateKey: Prisma.FieldRef<"Jwks", 'String'>
readonly createdAt: Prisma.FieldRef<"Jwks", 'DateTime'>
readonly expiresAt: Prisma.FieldRef<"Jwks", 'DateTime'>
readonly alg: Prisma.FieldRef<"Jwks", 'String'>
readonly crv: Prisma.FieldRef<"Jwks", 'String'>
}
// Custom InputTypes
/**
* Jwks findUnique
*/
export type JwksFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* Filter, which Jwks to fetch.
*/
where: Prisma.JwksWhereUniqueInput
}
/**
* Jwks findUniqueOrThrow
*/
export type JwksFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* Filter, which Jwks to fetch.
*/
where: Prisma.JwksWhereUniqueInput
}
/**
* Jwks findFirst
*/
export type JwksFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* Filter, which Jwks to fetch.
*/
where?: Prisma.JwksWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Jwks to fetch.
*/
orderBy?: Prisma.JwksOrderByWithRelationInput | Prisma.JwksOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Jwks.
*/
cursor?: Prisma.JwksWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Jwks from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Jwks.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Jwks.
*/
distinct?: Prisma.JwksScalarFieldEnum | Prisma.JwksScalarFieldEnum[]
}
/**
* Jwks findFirstOrThrow
*/
export type JwksFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* Filter, which Jwks to fetch.
*/
where?: Prisma.JwksWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Jwks to fetch.
*/
orderBy?: Prisma.JwksOrderByWithRelationInput | Prisma.JwksOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Jwks.
*/
cursor?: Prisma.JwksWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Jwks from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Jwks.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Jwks.
*/
distinct?: Prisma.JwksScalarFieldEnum | Prisma.JwksScalarFieldEnum[]
}
/**
* Jwks findMany
*/
export type JwksFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* Filter, which Jwks to fetch.
*/
where?: Prisma.JwksWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Jwks to fetch.
*/
orderBy?: Prisma.JwksOrderByWithRelationInput | Prisma.JwksOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Jwks.
*/
cursor?: Prisma.JwksWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Jwks from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` Jwks.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Jwks.
*/
distinct?: Prisma.JwksScalarFieldEnum | Prisma.JwksScalarFieldEnum[]
}
/**
* Jwks create
*/
export type JwksCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* The data needed to create a Jwks.
*/
data: Prisma.XOR<Prisma.JwksCreateInput, Prisma.JwksUncheckedCreateInput>
}
/**
* Jwks createMany
*/
export type JwksCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many Jwks.
*/
data: Prisma.JwksCreateManyInput | Prisma.JwksCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Jwks createManyAndReturn
*/
export type JwksCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* The data used to create many Jwks.
*/
data: Prisma.JwksCreateManyInput | Prisma.JwksCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Jwks update
*/
export type JwksUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* The data needed to update a Jwks.
*/
data: Prisma.XOR<Prisma.JwksUpdateInput, Prisma.JwksUncheckedUpdateInput>
/**
* Choose, which Jwks to update.
*/
where: Prisma.JwksWhereUniqueInput
}
/**
* Jwks updateMany
*/
export type JwksUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update Jwks.
*/
data: Prisma.XOR<Prisma.JwksUpdateManyMutationInput, Prisma.JwksUncheckedUpdateManyInput>
/**
* Filter which Jwks to update
*/
where?: Prisma.JwksWhereInput
/**
* Limit how many Jwks to update.
*/
limit?: number
}
/**
* Jwks updateManyAndReturn
*/
export type JwksUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* The data used to update Jwks.
*/
data: Prisma.XOR<Prisma.JwksUpdateManyMutationInput, Prisma.JwksUncheckedUpdateManyInput>
/**
* Filter which Jwks to update
*/
where?: Prisma.JwksWhereInput
/**
* Limit how many Jwks to update.
*/
limit?: number
}
/**
* Jwks upsert
*/
export type JwksUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* The filter to search for the Jwks to update in case it exists.
*/
where: Prisma.JwksWhereUniqueInput
/**
* In case the Jwks found by the `where` argument doesn't exist, create a new Jwks with this data.
*/
create: Prisma.XOR<Prisma.JwksCreateInput, Prisma.JwksUncheckedCreateInput>
/**
* In case the Jwks was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.JwksUpdateInput, Prisma.JwksUncheckedUpdateInput>
}
/**
* Jwks delete
*/
export type JwksDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
/**
* Filter which Jwks to delete.
*/
where: Prisma.JwksWhereUniqueInput
}
/**
* Jwks deleteMany
*/
export type JwksDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Jwks to delete
*/
where?: Prisma.JwksWhereInput
/**
* Limit how many Jwks to delete.
*/
limit?: number
}
/**
* Jwks without action
*/
export type JwksDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Jwks
*/
select?: Prisma.JwksSelect<ExtArgs> | null
/**
* Omit specific fields from the Jwks
*/
omit?: Prisma.JwksOmit<ExtArgs> | null
}