/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Permission` model and its related types. * * 🟢 You can import this file directly. */ 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 Permission * */ export type PermissionModel = runtime.Types.Result.DefaultSelection export type AggregatePermission = { _count: PermissionCountAggregateOutputType | null _avg: PermissionAvgAggregateOutputType | null _sum: PermissionSumAggregateOutputType | null _min: PermissionMinAggregateOutputType | null _max: PermissionMaxAggregateOutputType | null } export type PermissionAvgAggregateOutputType = { order: number | null } export type PermissionSumAggregateOutputType = { order: number | null } export type PermissionMinAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null name: string | null description: string | null type: string | null isDefault: boolean | null order: number | null } export type PermissionMaxAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null name: string | null description: string | null type: string | null isDefault: boolean | null order: number | null } export type PermissionCountAggregateOutputType = { id: number createdAt: number updatedAt: number name: number description: number type: number isDefault: number order: number _all: number } export type PermissionAvgAggregateInputType = { order?: true } export type PermissionSumAggregateInputType = { order?: true } export type PermissionMinAggregateInputType = { id?: true createdAt?: true updatedAt?: true name?: true description?: true type?: true isDefault?: true order?: true } export type PermissionMaxAggregateInputType = { id?: true createdAt?: true updatedAt?: true name?: true description?: true type?: true isDefault?: true order?: true } export type PermissionCountAggregateInputType = { id?: true createdAt?: true updatedAt?: true name?: true description?: true type?: true isDefault?: true order?: true _all?: true } export type PermissionAggregateArgs = { /** * Filter which Permission to aggregate. */ where?: Prisma.PermissionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Permissions to fetch. */ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.PermissionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Permissions 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` Permissions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Permissions **/ _count?: true | PermissionCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: PermissionAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: PermissionSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: PermissionMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: PermissionMaxAggregateInputType } export type GetPermissionAggregateType = { [P in keyof T & keyof AggregatePermission]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type PermissionGroupByArgs = { where?: Prisma.PermissionWhereInput orderBy?: Prisma.PermissionOrderByWithAggregationInput | Prisma.PermissionOrderByWithAggregationInput[] by: Prisma.PermissionScalarFieldEnum[] | Prisma.PermissionScalarFieldEnum having?: Prisma.PermissionScalarWhereWithAggregatesInput take?: number skip?: number _count?: PermissionCountAggregateInputType | true _avg?: PermissionAvgAggregateInputType _sum?: PermissionSumAggregateInputType _min?: PermissionMinAggregateInputType _max?: PermissionMaxAggregateInputType } export type PermissionGroupByOutputType = { id: string createdAt: Date updatedAt: Date name: string description: string type: string isDefault: boolean order: number _count: PermissionCountAggregateOutputType | null _avg: PermissionAvgAggregateOutputType | null _sum: PermissionSumAggregateOutputType | null _min: PermissionMinAggregateOutputType | null _max: PermissionMaxAggregateOutputType | null } export type GetPermissionGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof PermissionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type PermissionWhereInput = { AND?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[] OR?: Prisma.PermissionWhereInput[] NOT?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[] id?: Prisma.StringFilter<"Permission"> | string createdAt?: Prisma.DateTimeFilter<"Permission"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Permission"> | Date | string name?: Prisma.StringFilter<"Permission"> | string description?: Prisma.StringFilter<"Permission"> | string type?: Prisma.StringFilter<"Permission"> | string isDefault?: Prisma.BoolFilter<"Permission"> | boolean order?: Prisma.IntFilter<"Permission"> | number inRoles?: Prisma.RolePermissionListRelationFilter } export type PermissionOrderByWithRelationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder inRoles?: Prisma.RolePermissionOrderByRelationAggregateInput } export type PermissionWhereUniqueInput = Prisma.AtLeast<{ id?: string name?: string AND?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[] OR?: Prisma.PermissionWhereInput[] NOT?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[] createdAt?: Prisma.DateTimeFilter<"Permission"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Permission"> | Date | string description?: Prisma.StringFilter<"Permission"> | string type?: Prisma.StringFilter<"Permission"> | string isDefault?: Prisma.BoolFilter<"Permission"> | boolean order?: Prisma.IntFilter<"Permission"> | number inRoles?: Prisma.RolePermissionListRelationFilter }, "id" | "name"> export type PermissionOrderByWithAggregationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder _count?: Prisma.PermissionCountOrderByAggregateInput _avg?: Prisma.PermissionAvgOrderByAggregateInput _max?: Prisma.PermissionMaxOrderByAggregateInput _min?: Prisma.PermissionMinOrderByAggregateInput _sum?: Prisma.PermissionSumOrderByAggregateInput } export type PermissionScalarWhereWithAggregatesInput = { AND?: Prisma.PermissionScalarWhereWithAggregatesInput | Prisma.PermissionScalarWhereWithAggregatesInput[] OR?: Prisma.PermissionScalarWhereWithAggregatesInput[] NOT?: Prisma.PermissionScalarWhereWithAggregatesInput | Prisma.PermissionScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"Permission"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"Permission"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Permission"> | Date | string name?: Prisma.StringWithAggregatesFilter<"Permission"> | string description?: Prisma.StringWithAggregatesFilter<"Permission"> | string type?: Prisma.StringWithAggregatesFilter<"Permission"> | string isDefault?: Prisma.BoolWithAggregatesFilter<"Permission"> | boolean order?: Prisma.IntWithAggregatesFilter<"Permission"> | number } export type PermissionCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string isDefault: boolean order: number inRoles?: Prisma.RolePermissionCreateNestedManyWithoutPermissionInput } export type PermissionUncheckedCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string isDefault: boolean order: number inRoles?: Prisma.RolePermissionUncheckedCreateNestedManyWithoutPermissionInput } export type PermissionUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number inRoles?: Prisma.RolePermissionUpdateManyWithoutPermissionNestedInput } export type PermissionUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number inRoles?: Prisma.RolePermissionUncheckedUpdateManyWithoutPermissionNestedInput } export type PermissionCreateManyInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string isDefault: boolean order: number } export type PermissionUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number } export type PermissionUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number } export type PermissionCountOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder } export type PermissionAvgOrderByAggregateInput = { order?: Prisma.SortOrder } export type PermissionMaxOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder } export type PermissionMinOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder } export type PermissionSumOrderByAggregateInput = { order?: Prisma.SortOrder } export type PermissionScalarRelationFilter = { is?: Prisma.PermissionWhereInput isNot?: Prisma.PermissionWhereInput } export type PermissionCreateNestedOneWithoutInRolesInput = { create?: Prisma.XOR connectOrCreate?: Prisma.PermissionCreateOrConnectWithoutInRolesInput connect?: Prisma.PermissionWhereUniqueInput } export type PermissionUpdateOneRequiredWithoutInRolesNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.PermissionCreateOrConnectWithoutInRolesInput upsert?: Prisma.PermissionUpsertWithoutInRolesInput connect?: Prisma.PermissionWhereUniqueInput update?: Prisma.XOR, Prisma.PermissionUncheckedUpdateWithoutInRolesInput> } export type PermissionCreateWithoutInRolesInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string isDefault: boolean order: number } export type PermissionUncheckedCreateWithoutInRolesInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string isDefault: boolean order: number } export type PermissionCreateOrConnectWithoutInRolesInput = { where: Prisma.PermissionWhereUniqueInput create: Prisma.XOR } export type PermissionUpsertWithoutInRolesInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.PermissionWhereInput } export type PermissionUpdateToOneWithWhereWithoutInRolesInput = { where?: Prisma.PermissionWhereInput data: Prisma.XOR } export type PermissionUpdateWithoutInRolesInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number } export type PermissionUncheckedUpdateWithoutInRolesInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number } /** * Count Type PermissionCountOutputType */ export type PermissionCountOutputType = { inRoles: number } export type PermissionCountOutputTypeSelect = { inRoles?: boolean | PermissionCountOutputTypeCountInRolesArgs } /** * PermissionCountOutputType without action */ export type PermissionCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the PermissionCountOutputType */ select?: Prisma.PermissionCountOutputTypeSelect | null } /** * PermissionCountOutputType without action */ export type PermissionCountOutputTypeCountInRolesArgs = { where?: Prisma.RolePermissionWhereInput } export type PermissionSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean name?: boolean description?: boolean type?: boolean isDefault?: boolean order?: boolean inRoles?: boolean | Prisma.Permission$inRolesArgs _count?: boolean | Prisma.PermissionCountOutputTypeDefaultArgs }, ExtArgs["result"]["permission"]> export type PermissionSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean name?: boolean description?: boolean type?: boolean isDefault?: boolean order?: boolean }, ExtArgs["result"]["permission"]> export type PermissionSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean name?: boolean description?: boolean type?: boolean isDefault?: boolean order?: boolean }, ExtArgs["result"]["permission"]> export type PermissionSelectScalar = { id?: boolean createdAt?: boolean updatedAt?: boolean name?: boolean description?: boolean type?: boolean isDefault?: boolean order?: boolean } export type PermissionOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "updatedAt" | "name" | "description" | "type" | "isDefault" | "order", ExtArgs["result"]["permission"]> export type PermissionInclude = { inRoles?: boolean | Prisma.Permission$inRolesArgs _count?: boolean | Prisma.PermissionCountOutputTypeDefaultArgs } export type PermissionIncludeCreateManyAndReturn = {} export type PermissionIncludeUpdateManyAndReturn = {} export type $PermissionPayload = { name: "Permission" objects: { inRoles: Prisma.$RolePermissionPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string createdAt: Date updatedAt: Date name: string description: string type: string isDefault: boolean order: number }, ExtArgs["result"]["permission"]> composites: {} } export type PermissionGetPayload = runtime.Types.Result.GetResult export type PermissionCountArgs = Omit & { select?: PermissionCountAggregateInputType | true } export interface PermissionDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Permission'], meta: { name: 'Permission' } } /** * Find zero or one Permission that matches the filter. * @param {PermissionFindUniqueArgs} args - Arguments to find a Permission * @example * // Get one Permission * const permission = await prisma.permission.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Permission that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {PermissionFindUniqueOrThrowArgs} args - Arguments to find a Permission * @example * // Get one Permission * const permission = await prisma.permission.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Permission 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 {PermissionFindFirstArgs} args - Arguments to find a Permission * @example * // Get one Permission * const permission = await prisma.permission.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Permission 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 {PermissionFindFirstOrThrowArgs} args - Arguments to find a Permission * @example * // Get one Permission * const permission = await prisma.permission.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Permissions 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 {PermissionFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Permissions * const permissions = await prisma.permission.findMany() * * // Get first 10 Permissions * const permissions = await prisma.permission.findMany({ take: 10 }) * * // Only select the `id` * const permissionWithIdOnly = await prisma.permission.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Permission. * @param {PermissionCreateArgs} args - Arguments to create a Permission. * @example * // Create one Permission * const Permission = await prisma.permission.create({ * data: { * // ... data to create a Permission * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Permissions. * @param {PermissionCreateManyArgs} args - Arguments to create many Permissions. * @example * // Create many Permissions * const permission = await prisma.permission.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Permissions and returns the data saved in the database. * @param {PermissionCreateManyAndReturnArgs} args - Arguments to create many Permissions. * @example * // Create many Permissions * const permission = await prisma.permission.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Permissions and only return the `id` * const permissionWithIdOnly = await prisma.permission.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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> /** * Delete a Permission. * @param {PermissionDeleteArgs} args - Arguments to delete one Permission. * @example * // Delete one Permission * const Permission = await prisma.permission.delete({ * where: { * // ... filter to delete one Permission * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Permission. * @param {PermissionUpdateArgs} args - Arguments to update one Permission. * @example * // Update one Permission * const permission = await prisma.permission.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Permissions. * @param {PermissionDeleteManyArgs} args - Arguments to filter Permissions to delete. * @example * // Delete a few Permissions * const { count } = await prisma.permission.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Permissions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PermissionUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Permissions * const permission = await prisma.permission.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Permissions and returns the data updated in the database. * @param {PermissionUpdateManyAndReturnArgs} args - Arguments to update many Permissions. * @example * // Update many Permissions * const permission = await prisma.permission.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Permissions and only return the `id` * const permissionWithIdOnly = await prisma.permission.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(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Permission. * @param {PermissionUpsertArgs} args - Arguments to update or create a Permission. * @example * // Update or create a Permission * const permission = await prisma.permission.upsert({ * create: { * // ... data to create a Permission * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Permission we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PermissionClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Permissions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PermissionCountArgs} args - Arguments to filter Permissions to count. * @example * // Count the number of Permissions * const count = await prisma.permission.count({ * where: { * // ... the filter for the Permissions we want to count * } * }) **/ count( args?: Prisma.Subset, ): Prisma.PrismaPromise< T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType : number > /** * Allows you to perform aggregations operations on a Permission. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PermissionAggregateArgs} 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(args: Prisma.Subset): Prisma.PrismaPromise> /** * Group by Permission. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PermissionGroupByArgs} 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 PermissionGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: PermissionGroupByArgs['orderBy'] } : { orderBy?: PermissionGroupByArgs['orderBy'] }, OrderFields extends Prisma.ExcludeUnderscoreKeys>>, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, 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 ? 'orderBy' extends Prisma.Keys ? 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 ? 'orderBy' extends Prisma.Keys ? 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 & InputErrors): {} extends InputErrors ? GetPermissionGroupByPayload : Prisma.PrismaPromise /** * Fields of the Permission model */ readonly fields: PermissionFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Permission. * 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__PermissionClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" inRoles = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, 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. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * 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 } /** * Fields of the Permission model */ export interface PermissionFieldRefs { readonly id: Prisma.FieldRef<"Permission", 'String'> readonly createdAt: Prisma.FieldRef<"Permission", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Permission", 'DateTime'> readonly name: Prisma.FieldRef<"Permission", 'String'> readonly description: Prisma.FieldRef<"Permission", 'String'> readonly type: Prisma.FieldRef<"Permission", 'String'> readonly isDefault: Prisma.FieldRef<"Permission", 'Boolean'> readonly order: Prisma.FieldRef<"Permission", 'Int'> } // Custom InputTypes /** * Permission findUnique */ export type PermissionFindUniqueArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * Filter, which Permission to fetch. */ where: Prisma.PermissionWhereUniqueInput } /** * Permission findUniqueOrThrow */ export type PermissionFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * Filter, which Permission to fetch. */ where: Prisma.PermissionWhereUniqueInput } /** * Permission findFirst */ export type PermissionFindFirstArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * Filter, which Permission to fetch. */ where?: Prisma.PermissionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Permissions to fetch. */ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Permissions. */ cursor?: Prisma.PermissionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Permissions 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` Permissions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Permissions. */ distinct?: Prisma.PermissionScalarFieldEnum | Prisma.PermissionScalarFieldEnum[] } /** * Permission findFirstOrThrow */ export type PermissionFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * Filter, which Permission to fetch. */ where?: Prisma.PermissionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Permissions to fetch. */ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Permissions. */ cursor?: Prisma.PermissionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Permissions 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` Permissions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Permissions. */ distinct?: Prisma.PermissionScalarFieldEnum | Prisma.PermissionScalarFieldEnum[] } /** * Permission findMany */ export type PermissionFindManyArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * Filter, which Permissions to fetch. */ where?: Prisma.PermissionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Permissions to fetch. */ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Permissions. */ cursor?: Prisma.PermissionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Permissions 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` Permissions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Permissions. */ distinct?: Prisma.PermissionScalarFieldEnum | Prisma.PermissionScalarFieldEnum[] } /** * Permission create */ export type PermissionCreateArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * The data needed to create a Permission. */ data: Prisma.XOR } /** * Permission createMany */ export type PermissionCreateManyArgs = { /** * The data used to create many Permissions. */ data: Prisma.PermissionCreateManyInput | Prisma.PermissionCreateManyInput[] skipDuplicates?: boolean } /** * Permission createManyAndReturn */ export type PermissionCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelectCreateManyAndReturn | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * The data used to create many Permissions. */ data: Prisma.PermissionCreateManyInput | Prisma.PermissionCreateManyInput[] skipDuplicates?: boolean } /** * Permission update */ export type PermissionUpdateArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * The data needed to update a Permission. */ data: Prisma.XOR /** * Choose, which Permission to update. */ where: Prisma.PermissionWhereUniqueInput } /** * Permission updateMany */ export type PermissionUpdateManyArgs = { /** * The data used to update Permissions. */ data: Prisma.XOR /** * Filter which Permissions to update */ where?: Prisma.PermissionWhereInput /** * Limit how many Permissions to update. */ limit?: number } /** * Permission updateManyAndReturn */ export type PermissionUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelectUpdateManyAndReturn | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * The data used to update Permissions. */ data: Prisma.XOR /** * Filter which Permissions to update */ where?: Prisma.PermissionWhereInput /** * Limit how many Permissions to update. */ limit?: number } /** * Permission upsert */ export type PermissionUpsertArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * The filter to search for the Permission to update in case it exists. */ where: Prisma.PermissionWhereUniqueInput /** * In case the Permission found by the `where` argument doesn't exist, create a new Permission with this data. */ create: Prisma.XOR /** * In case the Permission was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Permission delete */ export type PermissionDeleteArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null /** * Filter which Permission to delete. */ where: Prisma.PermissionWhereUniqueInput } /** * Permission deleteMany */ export type PermissionDeleteManyArgs = { /** * Filter which Permissions to delete */ where?: Prisma.PermissionWhereInput /** * Limit how many Permissions to delete. */ limit?: number } /** * Permission.inRoles */ export type Permission$inRolesArgs = { /** * Select specific fields to fetch from the RolePermission */ select?: Prisma.RolePermissionSelect | null /** * Omit specific fields from the RolePermission */ omit?: Prisma.RolePermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RolePermissionInclude | null where?: Prisma.RolePermissionWhereInput orderBy?: Prisma.RolePermissionOrderByWithRelationInput | Prisma.RolePermissionOrderByWithRelationInput[] cursor?: Prisma.RolePermissionWhereUniqueInput take?: number skip?: number distinct?: Prisma.RolePermissionScalarFieldEnum | Prisma.RolePermissionScalarFieldEnum[] } /** * Permission without action */ export type PermissionDefaultArgs = { /** * Select specific fields to fetch from the Permission */ select?: Prisma.PermissionSelect | null /** * Omit specific fields from the Permission */ omit?: Prisma.PermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PermissionInclude | null }