/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Role` 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 Role * */ export type RoleModel = runtime.Types.Result.DefaultSelection export type AggregateRole = { _count: RoleCountAggregateOutputType | null _avg: RoleAvgAggregateOutputType | null _sum: RoleSumAggregateOutputType | null _min: RoleMinAggregateOutputType | null _max: RoleMaxAggregateOutputType | null } export type RoleAvgAggregateOutputType = { order: number | null } export type RoleSumAggregateOutputType = { order: number | null } export type RoleMinAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null tenantId: string | null name: string | null description: string | null type: string | null assignToNewUsers: boolean | null isDefault: boolean | null order: number | null } export type RoleMaxAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null tenantId: string | null name: string | null description: string | null type: string | null assignToNewUsers: boolean | null isDefault: boolean | null order: number | null } export type RoleCountAggregateOutputType = { id: number createdAt: number updatedAt: number tenantId: number name: number description: number type: number assignToNewUsers: number isDefault: number order: number _all: number } export type RoleAvgAggregateInputType = { order?: true } export type RoleSumAggregateInputType = { order?: true } export type RoleMinAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true name?: true description?: true type?: true assignToNewUsers?: true isDefault?: true order?: true } export type RoleMaxAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true name?: true description?: true type?: true assignToNewUsers?: true isDefault?: true order?: true } export type RoleCountAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true name?: true description?: true type?: true assignToNewUsers?: true isDefault?: true order?: true _all?: true } export type RoleAggregateArgs = { /** * Filter which Role to aggregate. */ where?: Prisma.RoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Roles to fetch. */ orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.RoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Roles 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` Roles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Roles **/ _count?: true | RoleCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: RoleAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: RoleSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: RoleMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: RoleMaxAggregateInputType } export type GetRoleAggregateType = { [P in keyof T & keyof AggregateRole]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type RoleGroupByArgs = { where?: Prisma.RoleWhereInput orderBy?: Prisma.RoleOrderByWithAggregationInput | Prisma.RoleOrderByWithAggregationInput[] by: Prisma.RoleScalarFieldEnum[] | Prisma.RoleScalarFieldEnum having?: Prisma.RoleScalarWhereWithAggregatesInput take?: number skip?: number _count?: RoleCountAggregateInputType | true _avg?: RoleAvgAggregateInputType _sum?: RoleSumAggregateInputType _min?: RoleMinAggregateInputType _max?: RoleMaxAggregateInputType } export type RoleGroupByOutputType = { id: string createdAt: Date updatedAt: Date tenantId: string | null name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number _count: RoleCountAggregateOutputType | null _avg: RoleAvgAggregateOutputType | null _sum: RoleSumAggregateOutputType | null _min: RoleMinAggregateOutputType | null _max: RoleMaxAggregateOutputType | null } export type GetRoleGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof RoleGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type RoleWhereInput = { AND?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] OR?: Prisma.RoleWhereInput[] NOT?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] id?: Prisma.StringFilter<"Role"> | string createdAt?: Prisma.DateTimeFilter<"Role"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Role"> | Date | string tenantId?: Prisma.StringNullableFilter<"Role"> | string | null name?: Prisma.StringFilter<"Role"> | string description?: Prisma.StringFilter<"Role"> | string type?: Prisma.StringFilter<"Role"> | string assignToNewUsers?: Prisma.BoolFilter<"Role"> | boolean isDefault?: Prisma.BoolFilter<"Role"> | boolean order?: Prisma.IntFilter<"Role"> | number tenant?: Prisma.XOR | null permissions?: Prisma.RolePermissionListRelationFilter rowPermissions?: Prisma.RowPermissionListRelationFilter users?: Prisma.UserRoleListRelationFilter } export type RoleOrderByWithRelationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder assignToNewUsers?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder tenant?: Prisma.TenantOrderByWithRelationInput permissions?: Prisma.RolePermissionOrderByRelationAggregateInput rowPermissions?: Prisma.RowPermissionOrderByRelationAggregateInput users?: Prisma.UserRoleOrderByRelationAggregateInput } export type RoleWhereUniqueInput = Prisma.AtLeast<{ id?: string tenantId_name?: Prisma.RoleTenantIdNameCompoundUniqueInput AND?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] OR?: Prisma.RoleWhereInput[] NOT?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] createdAt?: Prisma.DateTimeFilter<"Role"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Role"> | Date | string tenantId?: Prisma.StringNullableFilter<"Role"> | string | null name?: Prisma.StringFilter<"Role"> | string description?: Prisma.StringFilter<"Role"> | string type?: Prisma.StringFilter<"Role"> | string assignToNewUsers?: Prisma.BoolFilter<"Role"> | boolean isDefault?: Prisma.BoolFilter<"Role"> | boolean order?: Prisma.IntFilter<"Role"> | number tenant?: Prisma.XOR | null permissions?: Prisma.RolePermissionListRelationFilter rowPermissions?: Prisma.RowPermissionListRelationFilter users?: Prisma.UserRoleListRelationFilter }, "id" | "tenantId_name"> export type RoleOrderByWithAggregationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder assignToNewUsers?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder _count?: Prisma.RoleCountOrderByAggregateInput _avg?: Prisma.RoleAvgOrderByAggregateInput _max?: Prisma.RoleMaxOrderByAggregateInput _min?: Prisma.RoleMinOrderByAggregateInput _sum?: Prisma.RoleSumOrderByAggregateInput } export type RoleScalarWhereWithAggregatesInput = { AND?: Prisma.RoleScalarWhereWithAggregatesInput | Prisma.RoleScalarWhereWithAggregatesInput[] OR?: Prisma.RoleScalarWhereWithAggregatesInput[] NOT?: Prisma.RoleScalarWhereWithAggregatesInput | Prisma.RoleScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"Role"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"Role"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Role"> | Date | string tenantId?: Prisma.StringNullableWithAggregatesFilter<"Role"> | string | null name?: Prisma.StringWithAggregatesFilter<"Role"> | string description?: Prisma.StringWithAggregatesFilter<"Role"> | string type?: Prisma.StringWithAggregatesFilter<"Role"> | string assignToNewUsers?: Prisma.BoolWithAggregatesFilter<"Role"> | boolean isDefault?: Prisma.BoolWithAggregatesFilter<"Role"> | boolean order?: Prisma.IntWithAggregatesFilter<"Role"> | number } export type RoleCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number tenant?: Prisma.TenantCreateNestedOneWithoutRolesInput permissions?: Prisma.RolePermissionCreateNestedManyWithoutRoleInput rowPermissions?: Prisma.RowPermissionCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleCreateNestedManyWithoutRoleInput } export type RoleUncheckedCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number permissions?: Prisma.RolePermissionUncheckedCreateNestedManyWithoutRoleInput rowPermissions?: Prisma.RowPermissionUncheckedCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleUncheckedCreateNestedManyWithoutRoleInput } export type RoleUpdateInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number tenant?: Prisma.TenantUpdateOneWithoutRolesNestedInput permissions?: Prisma.RolePermissionUpdateManyWithoutRoleNestedInput rowPermissions?: Prisma.RowPermissionUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUpdateManyWithoutRoleNestedInput } export type RoleUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number permissions?: Prisma.RolePermissionUncheckedUpdateManyWithoutRoleNestedInput rowPermissions?: Prisma.RowPermissionUncheckedUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUncheckedUpdateManyWithoutRoleNestedInput } export type RoleCreateManyInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number } export type RoleUpdateManyMutationInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number } export type RoleUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number } export type RoleListRelationFilter = { every?: Prisma.RoleWhereInput some?: Prisma.RoleWhereInput none?: Prisma.RoleWhereInput } export type RoleOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } export type RoleNullableScalarRelationFilter = { is?: Prisma.RoleWhereInput | null isNot?: Prisma.RoleWhereInput | null } export type RoleTenantIdNameCompoundUniqueInput = { tenantId: string name: string } export type RoleCountOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder assignToNewUsers?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder } export type RoleAvgOrderByAggregateInput = { order?: Prisma.SortOrder } export type RoleMaxOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder assignToNewUsers?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder } export type RoleMinOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder type?: Prisma.SortOrder assignToNewUsers?: Prisma.SortOrder isDefault?: Prisma.SortOrder order?: Prisma.SortOrder } export type RoleSumOrderByAggregateInput = { order?: Prisma.SortOrder } export type RoleScalarRelationFilter = { is?: Prisma.RoleWhereInput isNot?: Prisma.RoleWhereInput } export type RoleCreateNestedManyWithoutTenantInput = { create?: Prisma.XOR | Prisma.RoleCreateWithoutTenantInput[] | Prisma.RoleUncheckedCreateWithoutTenantInput[] connectOrCreate?: Prisma.RoleCreateOrConnectWithoutTenantInput | Prisma.RoleCreateOrConnectWithoutTenantInput[] createMany?: Prisma.RoleCreateManyTenantInputEnvelope connect?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] } export type RoleUncheckedCreateNestedManyWithoutTenantInput = { create?: Prisma.XOR | Prisma.RoleCreateWithoutTenantInput[] | Prisma.RoleUncheckedCreateWithoutTenantInput[] connectOrCreate?: Prisma.RoleCreateOrConnectWithoutTenantInput | Prisma.RoleCreateOrConnectWithoutTenantInput[] createMany?: Prisma.RoleCreateManyTenantInputEnvelope connect?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] } export type RoleUpdateManyWithoutTenantNestedInput = { create?: Prisma.XOR | Prisma.RoleCreateWithoutTenantInput[] | Prisma.RoleUncheckedCreateWithoutTenantInput[] connectOrCreate?: Prisma.RoleCreateOrConnectWithoutTenantInput | Prisma.RoleCreateOrConnectWithoutTenantInput[] upsert?: Prisma.RoleUpsertWithWhereUniqueWithoutTenantInput | Prisma.RoleUpsertWithWhereUniqueWithoutTenantInput[] createMany?: Prisma.RoleCreateManyTenantInputEnvelope set?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] disconnect?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] delete?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] connect?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] update?: Prisma.RoleUpdateWithWhereUniqueWithoutTenantInput | Prisma.RoleUpdateWithWhereUniqueWithoutTenantInput[] updateMany?: Prisma.RoleUpdateManyWithWhereWithoutTenantInput | Prisma.RoleUpdateManyWithWhereWithoutTenantInput[] deleteMany?: Prisma.RoleScalarWhereInput | Prisma.RoleScalarWhereInput[] } export type RoleUncheckedUpdateManyWithoutTenantNestedInput = { create?: Prisma.XOR | Prisma.RoleCreateWithoutTenantInput[] | Prisma.RoleUncheckedCreateWithoutTenantInput[] connectOrCreate?: Prisma.RoleCreateOrConnectWithoutTenantInput | Prisma.RoleCreateOrConnectWithoutTenantInput[] upsert?: Prisma.RoleUpsertWithWhereUniqueWithoutTenantInput | Prisma.RoleUpsertWithWhereUniqueWithoutTenantInput[] createMany?: Prisma.RoleCreateManyTenantInputEnvelope set?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] disconnect?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] delete?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] connect?: Prisma.RoleWhereUniqueInput | Prisma.RoleWhereUniqueInput[] update?: Prisma.RoleUpdateWithWhereUniqueWithoutTenantInput | Prisma.RoleUpdateWithWhereUniqueWithoutTenantInput[] updateMany?: Prisma.RoleUpdateManyWithWhereWithoutTenantInput | Prisma.RoleUpdateManyWithWhereWithoutTenantInput[] deleteMany?: Prisma.RoleScalarWhereInput | Prisma.RoleScalarWhereInput[] } export type RoleCreateNestedOneWithoutRowPermissionsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.RoleCreateOrConnectWithoutRowPermissionsInput connect?: Prisma.RoleWhereUniqueInput } export type RoleUpdateOneWithoutRowPermissionsNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.RoleCreateOrConnectWithoutRowPermissionsInput upsert?: Prisma.RoleUpsertWithoutRowPermissionsInput disconnect?: Prisma.RoleWhereInput | boolean delete?: Prisma.RoleWhereInput | boolean connect?: Prisma.RoleWhereUniqueInput update?: Prisma.XOR, Prisma.RoleUncheckedUpdateWithoutRowPermissionsInput> } export type RoleCreateNestedOneWithoutPermissionsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.RoleCreateOrConnectWithoutPermissionsInput connect?: Prisma.RoleWhereUniqueInput } export type RoleUpdateOneRequiredWithoutPermissionsNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.RoleCreateOrConnectWithoutPermissionsInput upsert?: Prisma.RoleUpsertWithoutPermissionsInput connect?: Prisma.RoleWhereUniqueInput update?: Prisma.XOR, Prisma.RoleUncheckedUpdateWithoutPermissionsInput> } export type RoleCreateNestedOneWithoutUsersInput = { create?: Prisma.XOR connectOrCreate?: Prisma.RoleCreateOrConnectWithoutUsersInput connect?: Prisma.RoleWhereUniqueInput } export type RoleUpdateOneRequiredWithoutUsersNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.RoleCreateOrConnectWithoutUsersInput upsert?: Prisma.RoleUpsertWithoutUsersInput connect?: Prisma.RoleWhereUniqueInput update?: Prisma.XOR, Prisma.RoleUncheckedUpdateWithoutUsersInput> } export type RoleCreateWithoutTenantInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number permissions?: Prisma.RolePermissionCreateNestedManyWithoutRoleInput rowPermissions?: Prisma.RowPermissionCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleCreateNestedManyWithoutRoleInput } export type RoleUncheckedCreateWithoutTenantInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number permissions?: Prisma.RolePermissionUncheckedCreateNestedManyWithoutRoleInput rowPermissions?: Prisma.RowPermissionUncheckedCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleUncheckedCreateNestedManyWithoutRoleInput } export type RoleCreateOrConnectWithoutTenantInput = { where: Prisma.RoleWhereUniqueInput create: Prisma.XOR } export type RoleCreateManyTenantInputEnvelope = { data: Prisma.RoleCreateManyTenantInput | Prisma.RoleCreateManyTenantInput[] skipDuplicates?: boolean } export type RoleUpsertWithWhereUniqueWithoutTenantInput = { where: Prisma.RoleWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type RoleUpdateWithWhereUniqueWithoutTenantInput = { where: Prisma.RoleWhereUniqueInput data: Prisma.XOR } export type RoleUpdateManyWithWhereWithoutTenantInput = { where: Prisma.RoleScalarWhereInput data: Prisma.XOR } export type RoleScalarWhereInput = { AND?: Prisma.RoleScalarWhereInput | Prisma.RoleScalarWhereInput[] OR?: Prisma.RoleScalarWhereInput[] NOT?: Prisma.RoleScalarWhereInput | Prisma.RoleScalarWhereInput[] id?: Prisma.StringFilter<"Role"> | string createdAt?: Prisma.DateTimeFilter<"Role"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Role"> | Date | string tenantId?: Prisma.StringNullableFilter<"Role"> | string | null name?: Prisma.StringFilter<"Role"> | string description?: Prisma.StringFilter<"Role"> | string type?: Prisma.StringFilter<"Role"> | string assignToNewUsers?: Prisma.BoolFilter<"Role"> | boolean isDefault?: Prisma.BoolFilter<"Role"> | boolean order?: Prisma.IntFilter<"Role"> | number } export type RoleCreateWithoutRowPermissionsInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number tenant?: Prisma.TenantCreateNestedOneWithoutRolesInput permissions?: Prisma.RolePermissionCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleCreateNestedManyWithoutRoleInput } export type RoleUncheckedCreateWithoutRowPermissionsInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number permissions?: Prisma.RolePermissionUncheckedCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleUncheckedCreateNestedManyWithoutRoleInput } export type RoleCreateOrConnectWithoutRowPermissionsInput = { where: Prisma.RoleWhereUniqueInput create: Prisma.XOR } export type RoleUpsertWithoutRowPermissionsInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.RoleWhereInput } export type RoleUpdateToOneWithWhereWithoutRowPermissionsInput = { where?: Prisma.RoleWhereInput data: Prisma.XOR } export type RoleUpdateWithoutRowPermissionsInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number tenant?: Prisma.TenantUpdateOneWithoutRolesNestedInput permissions?: Prisma.RolePermissionUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUpdateManyWithoutRoleNestedInput } export type RoleUncheckedUpdateWithoutRowPermissionsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number permissions?: Prisma.RolePermissionUncheckedUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUncheckedUpdateManyWithoutRoleNestedInput } export type RoleCreateWithoutPermissionsInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number tenant?: Prisma.TenantCreateNestedOneWithoutRolesInput rowPermissions?: Prisma.RowPermissionCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleCreateNestedManyWithoutRoleInput } export type RoleUncheckedCreateWithoutPermissionsInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number rowPermissions?: Prisma.RowPermissionUncheckedCreateNestedManyWithoutRoleInput users?: Prisma.UserRoleUncheckedCreateNestedManyWithoutRoleInput } export type RoleCreateOrConnectWithoutPermissionsInput = { where: Prisma.RoleWhereUniqueInput create: Prisma.XOR } export type RoleUpsertWithoutPermissionsInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.RoleWhereInput } export type RoleUpdateToOneWithWhereWithoutPermissionsInput = { where?: Prisma.RoleWhereInput data: Prisma.XOR } export type RoleUpdateWithoutPermissionsInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number tenant?: Prisma.TenantUpdateOneWithoutRolesNestedInput rowPermissions?: Prisma.RowPermissionUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUpdateManyWithoutRoleNestedInput } export type RoleUncheckedUpdateWithoutPermissionsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number rowPermissions?: Prisma.RowPermissionUncheckedUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUncheckedUpdateManyWithoutRoleNestedInput } export type RoleCreateWithoutUsersInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number tenant?: Prisma.TenantCreateNestedOneWithoutRolesInput permissions?: Prisma.RolePermissionCreateNestedManyWithoutRoleInput rowPermissions?: Prisma.RowPermissionCreateNestedManyWithoutRoleInput } export type RoleUncheckedCreateWithoutUsersInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number permissions?: Prisma.RolePermissionUncheckedCreateNestedManyWithoutRoleInput rowPermissions?: Prisma.RowPermissionUncheckedCreateNestedManyWithoutRoleInput } export type RoleCreateOrConnectWithoutUsersInput = { where: Prisma.RoleWhereUniqueInput create: Prisma.XOR } export type RoleUpsertWithoutUsersInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.RoleWhereInput } export type RoleUpdateToOneWithWhereWithoutUsersInput = { where?: Prisma.RoleWhereInput data: Prisma.XOR } export type RoleUpdateWithoutUsersInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number tenant?: Prisma.TenantUpdateOneWithoutRolesNestedInput permissions?: Prisma.RolePermissionUpdateManyWithoutRoleNestedInput rowPermissions?: Prisma.RowPermissionUpdateManyWithoutRoleNestedInput } export type RoleUncheckedUpdateWithoutUsersInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number permissions?: Prisma.RolePermissionUncheckedUpdateManyWithoutRoleNestedInput rowPermissions?: Prisma.RowPermissionUncheckedUpdateManyWithoutRoleNestedInput } export type RoleCreateManyTenantInput = { id?: string createdAt?: Date | string updatedAt?: Date | string name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number } export type RoleUpdateWithoutTenantInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number permissions?: Prisma.RolePermissionUpdateManyWithoutRoleNestedInput rowPermissions?: Prisma.RowPermissionUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUpdateManyWithoutRoleNestedInput } export type RoleUncheckedUpdateWithoutTenantInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number permissions?: Prisma.RolePermissionUncheckedUpdateManyWithoutRoleNestedInput rowPermissions?: Prisma.RowPermissionUncheckedUpdateManyWithoutRoleNestedInput users?: Prisma.UserRoleUncheckedUpdateManyWithoutRoleNestedInput } export type RoleUncheckedUpdateManyWithoutTenantInput = { 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 assignToNewUsers?: Prisma.BoolFieldUpdateOperationsInput | boolean isDefault?: Prisma.BoolFieldUpdateOperationsInput | boolean order?: Prisma.IntFieldUpdateOperationsInput | number } /** * Count Type RoleCountOutputType */ export type RoleCountOutputType = { permissions: number rowPermissions: number users: number } export type RoleCountOutputTypeSelect = { permissions?: boolean | RoleCountOutputTypeCountPermissionsArgs rowPermissions?: boolean | RoleCountOutputTypeCountRowPermissionsArgs users?: boolean | RoleCountOutputTypeCountUsersArgs } /** * RoleCountOutputType without action */ export type RoleCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the RoleCountOutputType */ select?: Prisma.RoleCountOutputTypeSelect | null } /** * RoleCountOutputType without action */ export type RoleCountOutputTypeCountPermissionsArgs = { where?: Prisma.RolePermissionWhereInput } /** * RoleCountOutputType without action */ export type RoleCountOutputTypeCountRowPermissionsArgs = { where?: Prisma.RowPermissionWhereInput } /** * RoleCountOutputType without action */ export type RoleCountOutputTypeCountUsersArgs = { where?: Prisma.UserRoleWhereInput } export type RoleSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean type?: boolean assignToNewUsers?: boolean isDefault?: boolean order?: boolean tenant?: boolean | Prisma.Role$tenantArgs permissions?: boolean | Prisma.Role$permissionsArgs rowPermissions?: boolean | Prisma.Role$rowPermissionsArgs users?: boolean | Prisma.Role$usersArgs _count?: boolean | Prisma.RoleCountOutputTypeDefaultArgs }, ExtArgs["result"]["role"]> export type RoleSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean type?: boolean assignToNewUsers?: boolean isDefault?: boolean order?: boolean tenant?: boolean | Prisma.Role$tenantArgs }, ExtArgs["result"]["role"]> export type RoleSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean type?: boolean assignToNewUsers?: boolean isDefault?: boolean order?: boolean tenant?: boolean | Prisma.Role$tenantArgs }, ExtArgs["result"]["role"]> export type RoleSelectScalar = { id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean type?: boolean assignToNewUsers?: boolean isDefault?: boolean order?: boolean } export type RoleOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "updatedAt" | "tenantId" | "name" | "description" | "type" | "assignToNewUsers" | "isDefault" | "order", ExtArgs["result"]["role"]> export type RoleInclude = { tenant?: boolean | Prisma.Role$tenantArgs permissions?: boolean | Prisma.Role$permissionsArgs rowPermissions?: boolean | Prisma.Role$rowPermissionsArgs users?: boolean | Prisma.Role$usersArgs _count?: boolean | Prisma.RoleCountOutputTypeDefaultArgs } export type RoleIncludeCreateManyAndReturn = { tenant?: boolean | Prisma.Role$tenantArgs } export type RoleIncludeUpdateManyAndReturn = { tenant?: boolean | Prisma.Role$tenantArgs } export type $RolePayload = { name: "Role" objects: { tenant: Prisma.$TenantPayload | null permissions: Prisma.$RolePermissionPayload[] rowPermissions: Prisma.$RowPermissionPayload[] users: Prisma.$UserRolePayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string createdAt: Date updatedAt: Date tenantId: string | null name: string description: string type: string assignToNewUsers: boolean isDefault: boolean order: number }, ExtArgs["result"]["role"]> composites: {} } export type RoleGetPayload = runtime.Types.Result.GetResult export type RoleCountArgs = Omit & { select?: RoleCountAggregateInputType | true } export interface RoleDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Role'], meta: { name: 'Role' } } /** * Find zero or one Role that matches the filter. * @param {RoleFindUniqueArgs} args - Arguments to find a Role * @example * // Get one Role * const role = await prisma.role.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Role that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {RoleFindUniqueOrThrowArgs} args - Arguments to find a Role * @example * // Get one Role * const role = await prisma.role.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Role 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 {RoleFindFirstArgs} args - Arguments to find a Role * @example * // Get one Role * const role = await prisma.role.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Role 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 {RoleFindFirstOrThrowArgs} args - Arguments to find a Role * @example * // Get one Role * const role = await prisma.role.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Roles 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 {RoleFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Roles * const roles = await prisma.role.findMany() * * // Get first 10 Roles * const roles = await prisma.role.findMany({ take: 10 }) * * // Only select the `id` * const roleWithIdOnly = await prisma.role.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Role. * @param {RoleCreateArgs} args - Arguments to create a Role. * @example * // Create one Role * const Role = await prisma.role.create({ * data: { * // ... data to create a Role * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Roles. * @param {RoleCreateManyArgs} args - Arguments to create many Roles. * @example * // Create many Roles * const role = await prisma.role.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Roles and returns the data saved in the database. * @param {RoleCreateManyAndReturnArgs} args - Arguments to create many Roles. * @example * // Create many Roles * const role = await prisma.role.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Roles and only return the `id` * const roleWithIdOnly = await prisma.role.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 Role. * @param {RoleDeleteArgs} args - Arguments to delete one Role. * @example * // Delete one Role * const Role = await prisma.role.delete({ * where: { * // ... filter to delete one Role * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Role. * @param {RoleUpdateArgs} args - Arguments to update one Role. * @example * // Update one Role * const role = await prisma.role.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Roles. * @param {RoleDeleteManyArgs} args - Arguments to filter Roles to delete. * @example * // Delete a few Roles * const { count } = await prisma.role.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Roles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {RoleUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Roles * const role = await prisma.role.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Roles and returns the data updated in the database. * @param {RoleUpdateManyAndReturnArgs} args - Arguments to update many Roles. * @example * // Update many Roles * const role = await prisma.role.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Roles and only return the `id` * const roleWithIdOnly = await prisma.role.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 Role. * @param {RoleUpsertArgs} args - Arguments to update or create a Role. * @example * // Update or create a Role * const role = await prisma.role.upsert({ * create: { * // ... data to create a Role * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Role we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Roles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {RoleCountArgs} args - Arguments to filter Roles to count. * @example * // Count the number of Roles * const count = await prisma.role.count({ * where: { * // ... the filter for the Roles 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 Role. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {RoleAggregateArgs} 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 Role. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {RoleGroupByArgs} 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 RoleGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: RoleGroupByArgs['orderBy'] } : { orderBy?: RoleGroupByArgs['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 ? GetRoleGroupByPayload : Prisma.PrismaPromise /** * Fields of the Role model */ readonly fields: RoleFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Role. * 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__RoleClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" tenant = {}>(args?: Prisma.Subset>): Prisma.Prisma__TenantClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> permissions = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> rowPermissions = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> users = {}>(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 Role model */ export interface RoleFieldRefs { readonly id: Prisma.FieldRef<"Role", 'String'> readonly createdAt: Prisma.FieldRef<"Role", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Role", 'DateTime'> readonly tenantId: Prisma.FieldRef<"Role", 'String'> readonly name: Prisma.FieldRef<"Role", 'String'> readonly description: Prisma.FieldRef<"Role", 'String'> readonly type: Prisma.FieldRef<"Role", 'String'> readonly assignToNewUsers: Prisma.FieldRef<"Role", 'Boolean'> readonly isDefault: Prisma.FieldRef<"Role", 'Boolean'> readonly order: Prisma.FieldRef<"Role", 'Int'> } // Custom InputTypes /** * Role findUnique */ export type RoleFindUniqueArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * Filter, which Role to fetch. */ where: Prisma.RoleWhereUniqueInput } /** * Role findUniqueOrThrow */ export type RoleFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * Filter, which Role to fetch. */ where: Prisma.RoleWhereUniqueInput } /** * Role findFirst */ export type RoleFindFirstArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * Filter, which Role to fetch. */ where?: Prisma.RoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Roles to fetch. */ orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Roles. */ cursor?: Prisma.RoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Roles 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` Roles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Roles. */ distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[] } /** * Role findFirstOrThrow */ export type RoleFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * Filter, which Role to fetch. */ where?: Prisma.RoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Roles to fetch. */ orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Roles. */ cursor?: Prisma.RoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Roles 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` Roles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Roles. */ distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[] } /** * Role findMany */ export type RoleFindManyArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * Filter, which Roles to fetch. */ where?: Prisma.RoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Roles to fetch. */ orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Roles. */ cursor?: Prisma.RoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Roles 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` Roles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Roles. */ distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[] } /** * Role create */ export type RoleCreateArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * The data needed to create a Role. */ data: Prisma.XOR } /** * Role createMany */ export type RoleCreateManyArgs = { /** * The data used to create many Roles. */ data: Prisma.RoleCreateManyInput | Prisma.RoleCreateManyInput[] skipDuplicates?: boolean } /** * Role createManyAndReturn */ export type RoleCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelectCreateManyAndReturn | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * The data used to create many Roles. */ data: Prisma.RoleCreateManyInput | Prisma.RoleCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleIncludeCreateManyAndReturn | null } /** * Role update */ export type RoleUpdateArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * The data needed to update a Role. */ data: Prisma.XOR /** * Choose, which Role to update. */ where: Prisma.RoleWhereUniqueInput } /** * Role updateMany */ export type RoleUpdateManyArgs = { /** * The data used to update Roles. */ data: Prisma.XOR /** * Filter which Roles to update */ where?: Prisma.RoleWhereInput /** * Limit how many Roles to update. */ limit?: number } /** * Role updateManyAndReturn */ export type RoleUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelectUpdateManyAndReturn | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * The data used to update Roles. */ data: Prisma.XOR /** * Filter which Roles to update */ where?: Prisma.RoleWhereInput /** * Limit how many Roles to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleIncludeUpdateManyAndReturn | null } /** * Role upsert */ export type RoleUpsertArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * The filter to search for the Role to update in case it exists. */ where: Prisma.RoleWhereUniqueInput /** * In case the Role found by the `where` argument doesn't exist, create a new Role with this data. */ create: Prisma.XOR /** * In case the Role was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Role delete */ export type RoleDeleteArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null /** * Filter which Role to delete. */ where: Prisma.RoleWhereUniqueInput } /** * Role deleteMany */ export type RoleDeleteManyArgs = { /** * Filter which Roles to delete */ where?: Prisma.RoleWhereInput /** * Limit how many Roles to delete. */ limit?: number } /** * Role.tenant */ export type Role$tenantArgs = { /** * Select specific fields to fetch from the Tenant */ select?: Prisma.TenantSelect | null /** * Omit specific fields from the Tenant */ omit?: Prisma.TenantOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.TenantInclude | null where?: Prisma.TenantWhereInput } /** * Role.permissions */ export type Role$permissionsArgs = { /** * 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[] } /** * Role.rowPermissions */ export type Role$rowPermissionsArgs = { /** * Select specific fields to fetch from the RowPermission */ select?: Prisma.RowPermissionSelect | null /** * Omit specific fields from the RowPermission */ omit?: Prisma.RowPermissionOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RowPermissionInclude | null where?: Prisma.RowPermissionWhereInput orderBy?: Prisma.RowPermissionOrderByWithRelationInput | Prisma.RowPermissionOrderByWithRelationInput[] cursor?: Prisma.RowPermissionWhereUniqueInput take?: number skip?: number distinct?: Prisma.RowPermissionScalarFieldEnum | Prisma.RowPermissionScalarFieldEnum[] } /** * Role.users */ export type Role$usersArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null where?: Prisma.UserRoleWhereInput orderBy?: Prisma.UserRoleOrderByWithRelationInput | Prisma.UserRoleOrderByWithRelationInput[] cursor?: Prisma.UserRoleWhereUniqueInput take?: number skip?: number distinct?: Prisma.UserRoleScalarFieldEnum | Prisma.UserRoleScalarFieldEnum[] } /** * Role without action */ export type RoleDefaultArgs = { /** * Select specific fields to fetch from the Role */ select?: Prisma.RoleSelect | null /** * Omit specific fields from the Role */ omit?: Prisma.RoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RoleInclude | null }