/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `TenantEncryptionKey` 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 TenantEncryptionKey * One wrapped Data-Encryption-Key per tenant. `wrappedDek` is the tenant DEK * encrypted with the app master key (never the plaintext DEK). `keyVersion` * allows rotating the wrapping scheme without touching field ciphertext. */ export type TenantEncryptionKeyModel = runtime.Types.Result.DefaultSelection export type AggregateTenantEncryptionKey = { _count: TenantEncryptionKeyCountAggregateOutputType | null _avg: TenantEncryptionKeyAvgAggregateOutputType | null _sum: TenantEncryptionKeySumAggregateOutputType | null _min: TenantEncryptionKeyMinAggregateOutputType | null _max: TenantEncryptionKeyMaxAggregateOutputType | null } export type TenantEncryptionKeyAvgAggregateOutputType = { keyVersion: number | null } export type TenantEncryptionKeySumAggregateOutputType = { keyVersion: number | null } export type TenantEncryptionKeyMinAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null tenantId: string | null wrappedDek: runtime.Bytes | null keyVersion: number | null } export type TenantEncryptionKeyMaxAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null tenantId: string | null wrappedDek: runtime.Bytes | null keyVersion: number | null } export type TenantEncryptionKeyCountAggregateOutputType = { id: number createdAt: number updatedAt: number tenantId: number wrappedDek: number keyVersion: number _all: number } export type TenantEncryptionKeyAvgAggregateInputType = { keyVersion?: true } export type TenantEncryptionKeySumAggregateInputType = { keyVersion?: true } export type TenantEncryptionKeyMinAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true wrappedDek?: true keyVersion?: true } export type TenantEncryptionKeyMaxAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true wrappedDek?: true keyVersion?: true } export type TenantEncryptionKeyCountAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true wrappedDek?: true keyVersion?: true _all?: true } export type TenantEncryptionKeyAggregateArgs = { /** * Filter which TenantEncryptionKey to aggregate. */ where?: Prisma.TenantEncryptionKeyWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of TenantEncryptionKeys to fetch. */ orderBy?: Prisma.TenantEncryptionKeyOrderByWithRelationInput | Prisma.TenantEncryptionKeyOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.TenantEncryptionKeyWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` TenantEncryptionKeys 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` TenantEncryptionKeys. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned TenantEncryptionKeys **/ _count?: true | TenantEncryptionKeyCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: TenantEncryptionKeyAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: TenantEncryptionKeySumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: TenantEncryptionKeyMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: TenantEncryptionKeyMaxAggregateInputType } export type GetTenantEncryptionKeyAggregateType = { [P in keyof T & keyof AggregateTenantEncryptionKey]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type TenantEncryptionKeyGroupByArgs = { where?: Prisma.TenantEncryptionKeyWhereInput orderBy?: Prisma.TenantEncryptionKeyOrderByWithAggregationInput | Prisma.TenantEncryptionKeyOrderByWithAggregationInput[] by: Prisma.TenantEncryptionKeyScalarFieldEnum[] | Prisma.TenantEncryptionKeyScalarFieldEnum having?: Prisma.TenantEncryptionKeyScalarWhereWithAggregatesInput take?: number skip?: number _count?: TenantEncryptionKeyCountAggregateInputType | true _avg?: TenantEncryptionKeyAvgAggregateInputType _sum?: TenantEncryptionKeySumAggregateInputType _min?: TenantEncryptionKeyMinAggregateInputType _max?: TenantEncryptionKeyMaxAggregateInputType } export type TenantEncryptionKeyGroupByOutputType = { id: string createdAt: Date updatedAt: Date tenantId: string wrappedDek: runtime.Bytes keyVersion: number _count: TenantEncryptionKeyCountAggregateOutputType | null _avg: TenantEncryptionKeyAvgAggregateOutputType | null _sum: TenantEncryptionKeySumAggregateOutputType | null _min: TenantEncryptionKeyMinAggregateOutputType | null _max: TenantEncryptionKeyMaxAggregateOutputType | null } export type GetTenantEncryptionKeyGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof TenantEncryptionKeyGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type TenantEncryptionKeyWhereInput = { AND?: Prisma.TenantEncryptionKeyWhereInput | Prisma.TenantEncryptionKeyWhereInput[] OR?: Prisma.TenantEncryptionKeyWhereInput[] NOT?: Prisma.TenantEncryptionKeyWhereInput | Prisma.TenantEncryptionKeyWhereInput[] id?: Prisma.StringFilter<"TenantEncryptionKey"> | string createdAt?: Prisma.DateTimeFilter<"TenantEncryptionKey"> | Date | string updatedAt?: Prisma.DateTimeFilter<"TenantEncryptionKey"> | Date | string tenantId?: Prisma.StringFilter<"TenantEncryptionKey"> | string wrappedDek?: Prisma.BytesFilter<"TenantEncryptionKey"> | runtime.Bytes keyVersion?: Prisma.IntFilter<"TenantEncryptionKey"> | number } export type TenantEncryptionKeyOrderByWithRelationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder wrappedDek?: Prisma.SortOrder keyVersion?: Prisma.SortOrder } export type TenantEncryptionKeyWhereUniqueInput = Prisma.AtLeast<{ id?: string tenantId?: string AND?: Prisma.TenantEncryptionKeyWhereInput | Prisma.TenantEncryptionKeyWhereInput[] OR?: Prisma.TenantEncryptionKeyWhereInput[] NOT?: Prisma.TenantEncryptionKeyWhereInput | Prisma.TenantEncryptionKeyWhereInput[] createdAt?: Prisma.DateTimeFilter<"TenantEncryptionKey"> | Date | string updatedAt?: Prisma.DateTimeFilter<"TenantEncryptionKey"> | Date | string wrappedDek?: Prisma.BytesFilter<"TenantEncryptionKey"> | runtime.Bytes keyVersion?: Prisma.IntFilter<"TenantEncryptionKey"> | number }, "id" | "tenantId"> export type TenantEncryptionKeyOrderByWithAggregationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder wrappedDek?: Prisma.SortOrder keyVersion?: Prisma.SortOrder _count?: Prisma.TenantEncryptionKeyCountOrderByAggregateInput _avg?: Prisma.TenantEncryptionKeyAvgOrderByAggregateInput _max?: Prisma.TenantEncryptionKeyMaxOrderByAggregateInput _min?: Prisma.TenantEncryptionKeyMinOrderByAggregateInput _sum?: Prisma.TenantEncryptionKeySumOrderByAggregateInput } export type TenantEncryptionKeyScalarWhereWithAggregatesInput = { AND?: Prisma.TenantEncryptionKeyScalarWhereWithAggregatesInput | Prisma.TenantEncryptionKeyScalarWhereWithAggregatesInput[] OR?: Prisma.TenantEncryptionKeyScalarWhereWithAggregatesInput[] NOT?: Prisma.TenantEncryptionKeyScalarWhereWithAggregatesInput | Prisma.TenantEncryptionKeyScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"TenantEncryptionKey"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"TenantEncryptionKey"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"TenantEncryptionKey"> | Date | string tenantId?: Prisma.StringWithAggregatesFilter<"TenantEncryptionKey"> | string wrappedDek?: Prisma.BytesWithAggregatesFilter<"TenantEncryptionKey"> | runtime.Bytes keyVersion?: Prisma.IntWithAggregatesFilter<"TenantEncryptionKey"> | number } export type TenantEncryptionKeyCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId: string wrappedDek: runtime.Bytes keyVersion?: number } export type TenantEncryptionKeyUncheckedCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId: string wrappedDek: runtime.Bytes keyVersion?: number } export type TenantEncryptionKeyUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string wrappedDek?: Prisma.BytesFieldUpdateOperationsInput | runtime.Bytes keyVersion?: Prisma.IntFieldUpdateOperationsInput | number } export type TenantEncryptionKeyUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string wrappedDek?: Prisma.BytesFieldUpdateOperationsInput | runtime.Bytes keyVersion?: Prisma.IntFieldUpdateOperationsInput | number } export type TenantEncryptionKeyCreateManyInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId: string wrappedDek: runtime.Bytes keyVersion?: number } export type TenantEncryptionKeyUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string wrappedDek?: Prisma.BytesFieldUpdateOperationsInput | runtime.Bytes keyVersion?: Prisma.IntFieldUpdateOperationsInput | number } export type TenantEncryptionKeyUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string wrappedDek?: Prisma.BytesFieldUpdateOperationsInput | runtime.Bytes keyVersion?: Prisma.IntFieldUpdateOperationsInput | number } export type TenantEncryptionKeyCountOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder wrappedDek?: Prisma.SortOrder keyVersion?: Prisma.SortOrder } export type TenantEncryptionKeyAvgOrderByAggregateInput = { keyVersion?: Prisma.SortOrder } export type TenantEncryptionKeyMaxOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder wrappedDek?: Prisma.SortOrder keyVersion?: Prisma.SortOrder } export type TenantEncryptionKeyMinOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder wrappedDek?: Prisma.SortOrder keyVersion?: Prisma.SortOrder } export type TenantEncryptionKeySumOrderByAggregateInput = { keyVersion?: Prisma.SortOrder } export type TenantEncryptionKeySelect = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean wrappedDek?: boolean keyVersion?: boolean }, ExtArgs["result"]["tenantEncryptionKey"]> export type TenantEncryptionKeySelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean wrappedDek?: boolean keyVersion?: boolean }, ExtArgs["result"]["tenantEncryptionKey"]> export type TenantEncryptionKeySelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean wrappedDek?: boolean keyVersion?: boolean }, ExtArgs["result"]["tenantEncryptionKey"]> export type TenantEncryptionKeySelectScalar = { id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean wrappedDek?: boolean keyVersion?: boolean } export type TenantEncryptionKeyOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "updatedAt" | "tenantId" | "wrappedDek" | "keyVersion", ExtArgs["result"]["tenantEncryptionKey"]> export type $TenantEncryptionKeyPayload = { name: "TenantEncryptionKey" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string createdAt: Date updatedAt: Date tenantId: string wrappedDek: runtime.Bytes keyVersion: number }, ExtArgs["result"]["tenantEncryptionKey"]> composites: {} } export type TenantEncryptionKeyGetPayload = runtime.Types.Result.GetResult export type TenantEncryptionKeyCountArgs = Omit & { select?: TenantEncryptionKeyCountAggregateInputType | true } export interface TenantEncryptionKeyDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['TenantEncryptionKey'], meta: { name: 'TenantEncryptionKey' } } /** * Find zero or one TenantEncryptionKey that matches the filter. * @param {TenantEncryptionKeyFindUniqueArgs} args - Arguments to find a TenantEncryptionKey * @example * // Get one TenantEncryptionKey * const tenantEncryptionKey = await prisma.tenantEncryptionKey.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one TenantEncryptionKey that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {TenantEncryptionKeyFindUniqueOrThrowArgs} args - Arguments to find a TenantEncryptionKey * @example * // Get one TenantEncryptionKey * const tenantEncryptionKey = await prisma.tenantEncryptionKey.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first TenantEncryptionKey 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 {TenantEncryptionKeyFindFirstArgs} args - Arguments to find a TenantEncryptionKey * @example * // Get one TenantEncryptionKey * const tenantEncryptionKey = await prisma.tenantEncryptionKey.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first TenantEncryptionKey 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 {TenantEncryptionKeyFindFirstOrThrowArgs} args - Arguments to find a TenantEncryptionKey * @example * // Get one TenantEncryptionKey * const tenantEncryptionKey = await prisma.tenantEncryptionKey.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more TenantEncryptionKeys 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 {TenantEncryptionKeyFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all TenantEncryptionKeys * const tenantEncryptionKeys = await prisma.tenantEncryptionKey.findMany() * * // Get first 10 TenantEncryptionKeys * const tenantEncryptionKeys = await prisma.tenantEncryptionKey.findMany({ take: 10 }) * * // Only select the `id` * const tenantEncryptionKeyWithIdOnly = await prisma.tenantEncryptionKey.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a TenantEncryptionKey. * @param {TenantEncryptionKeyCreateArgs} args - Arguments to create a TenantEncryptionKey. * @example * // Create one TenantEncryptionKey * const TenantEncryptionKey = await prisma.tenantEncryptionKey.create({ * data: { * // ... data to create a TenantEncryptionKey * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many TenantEncryptionKeys. * @param {TenantEncryptionKeyCreateManyArgs} args - Arguments to create many TenantEncryptionKeys. * @example * // Create many TenantEncryptionKeys * const tenantEncryptionKey = await prisma.tenantEncryptionKey.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many TenantEncryptionKeys and returns the data saved in the database. * @param {TenantEncryptionKeyCreateManyAndReturnArgs} args - Arguments to create many TenantEncryptionKeys. * @example * // Create many TenantEncryptionKeys * const tenantEncryptionKey = await prisma.tenantEncryptionKey.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many TenantEncryptionKeys and only return the `id` * const tenantEncryptionKeyWithIdOnly = await prisma.tenantEncryptionKey.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 TenantEncryptionKey. * @param {TenantEncryptionKeyDeleteArgs} args - Arguments to delete one TenantEncryptionKey. * @example * // Delete one TenantEncryptionKey * const TenantEncryptionKey = await prisma.tenantEncryptionKey.delete({ * where: { * // ... filter to delete one TenantEncryptionKey * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one TenantEncryptionKey. * @param {TenantEncryptionKeyUpdateArgs} args - Arguments to update one TenantEncryptionKey. * @example * // Update one TenantEncryptionKey * const tenantEncryptionKey = await prisma.tenantEncryptionKey.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more TenantEncryptionKeys. * @param {TenantEncryptionKeyDeleteManyArgs} args - Arguments to filter TenantEncryptionKeys to delete. * @example * // Delete a few TenantEncryptionKeys * const { count } = await prisma.tenantEncryptionKey.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more TenantEncryptionKeys. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TenantEncryptionKeyUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many TenantEncryptionKeys * const tenantEncryptionKey = await prisma.tenantEncryptionKey.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more TenantEncryptionKeys and returns the data updated in the database. * @param {TenantEncryptionKeyUpdateManyAndReturnArgs} args - Arguments to update many TenantEncryptionKeys. * @example * // Update many TenantEncryptionKeys * const tenantEncryptionKey = await prisma.tenantEncryptionKey.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more TenantEncryptionKeys and only return the `id` * const tenantEncryptionKeyWithIdOnly = await prisma.tenantEncryptionKey.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 TenantEncryptionKey. * @param {TenantEncryptionKeyUpsertArgs} args - Arguments to update or create a TenantEncryptionKey. * @example * // Update or create a TenantEncryptionKey * const tenantEncryptionKey = await prisma.tenantEncryptionKey.upsert({ * create: { * // ... data to create a TenantEncryptionKey * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the TenantEncryptionKey we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__TenantEncryptionKeyClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of TenantEncryptionKeys. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TenantEncryptionKeyCountArgs} args - Arguments to filter TenantEncryptionKeys to count. * @example * // Count the number of TenantEncryptionKeys * const count = await prisma.tenantEncryptionKey.count({ * where: { * // ... the filter for the TenantEncryptionKeys 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 TenantEncryptionKey. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TenantEncryptionKeyAggregateArgs} 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 TenantEncryptionKey. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TenantEncryptionKeyGroupByArgs} 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 TenantEncryptionKeyGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: TenantEncryptionKeyGroupByArgs['orderBy'] } : { orderBy?: TenantEncryptionKeyGroupByArgs['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 ? GetTenantEncryptionKeyGroupByPayload : Prisma.PrismaPromise /** * Fields of the TenantEncryptionKey model */ readonly fields: TenantEncryptionKeyFieldRefs; } /** * The delegate class that acts as a "Promise-like" for TenantEncryptionKey. * 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__TenantEncryptionKeyClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(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 TenantEncryptionKey model */ export interface TenantEncryptionKeyFieldRefs { readonly id: Prisma.FieldRef<"TenantEncryptionKey", 'String'> readonly createdAt: Prisma.FieldRef<"TenantEncryptionKey", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"TenantEncryptionKey", 'DateTime'> readonly tenantId: Prisma.FieldRef<"TenantEncryptionKey", 'String'> readonly wrappedDek: Prisma.FieldRef<"TenantEncryptionKey", 'Bytes'> readonly keyVersion: Prisma.FieldRef<"TenantEncryptionKey", 'Int'> } // Custom InputTypes /** * TenantEncryptionKey findUnique */ export type TenantEncryptionKeyFindUniqueArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * Filter, which TenantEncryptionKey to fetch. */ where: Prisma.TenantEncryptionKeyWhereUniqueInput } /** * TenantEncryptionKey findUniqueOrThrow */ export type TenantEncryptionKeyFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * Filter, which TenantEncryptionKey to fetch. */ where: Prisma.TenantEncryptionKeyWhereUniqueInput } /** * TenantEncryptionKey findFirst */ export type TenantEncryptionKeyFindFirstArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * Filter, which TenantEncryptionKey to fetch. */ where?: Prisma.TenantEncryptionKeyWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of TenantEncryptionKeys to fetch. */ orderBy?: Prisma.TenantEncryptionKeyOrderByWithRelationInput | Prisma.TenantEncryptionKeyOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for TenantEncryptionKeys. */ cursor?: Prisma.TenantEncryptionKeyWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` TenantEncryptionKeys 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` TenantEncryptionKeys. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of TenantEncryptionKeys. */ distinct?: Prisma.TenantEncryptionKeyScalarFieldEnum | Prisma.TenantEncryptionKeyScalarFieldEnum[] } /** * TenantEncryptionKey findFirstOrThrow */ export type TenantEncryptionKeyFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * Filter, which TenantEncryptionKey to fetch. */ where?: Prisma.TenantEncryptionKeyWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of TenantEncryptionKeys to fetch. */ orderBy?: Prisma.TenantEncryptionKeyOrderByWithRelationInput | Prisma.TenantEncryptionKeyOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for TenantEncryptionKeys. */ cursor?: Prisma.TenantEncryptionKeyWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` TenantEncryptionKeys 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` TenantEncryptionKeys. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of TenantEncryptionKeys. */ distinct?: Prisma.TenantEncryptionKeyScalarFieldEnum | Prisma.TenantEncryptionKeyScalarFieldEnum[] } /** * TenantEncryptionKey findMany */ export type TenantEncryptionKeyFindManyArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * Filter, which TenantEncryptionKeys to fetch. */ where?: Prisma.TenantEncryptionKeyWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of TenantEncryptionKeys to fetch. */ orderBy?: Prisma.TenantEncryptionKeyOrderByWithRelationInput | Prisma.TenantEncryptionKeyOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing TenantEncryptionKeys. */ cursor?: Prisma.TenantEncryptionKeyWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` TenantEncryptionKeys 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` TenantEncryptionKeys. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of TenantEncryptionKeys. */ distinct?: Prisma.TenantEncryptionKeyScalarFieldEnum | Prisma.TenantEncryptionKeyScalarFieldEnum[] } /** * TenantEncryptionKey create */ export type TenantEncryptionKeyCreateArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * The data needed to create a TenantEncryptionKey. */ data: Prisma.XOR } /** * TenantEncryptionKey createMany */ export type TenantEncryptionKeyCreateManyArgs = { /** * The data used to create many TenantEncryptionKeys. */ data: Prisma.TenantEncryptionKeyCreateManyInput | Prisma.TenantEncryptionKeyCreateManyInput[] skipDuplicates?: boolean } /** * TenantEncryptionKey createManyAndReturn */ export type TenantEncryptionKeyCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelectCreateManyAndReturn | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * The data used to create many TenantEncryptionKeys. */ data: Prisma.TenantEncryptionKeyCreateManyInput | Prisma.TenantEncryptionKeyCreateManyInput[] skipDuplicates?: boolean } /** * TenantEncryptionKey update */ export type TenantEncryptionKeyUpdateArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * The data needed to update a TenantEncryptionKey. */ data: Prisma.XOR /** * Choose, which TenantEncryptionKey to update. */ where: Prisma.TenantEncryptionKeyWhereUniqueInput } /** * TenantEncryptionKey updateMany */ export type TenantEncryptionKeyUpdateManyArgs = { /** * The data used to update TenantEncryptionKeys. */ data: Prisma.XOR /** * Filter which TenantEncryptionKeys to update */ where?: Prisma.TenantEncryptionKeyWhereInput /** * Limit how many TenantEncryptionKeys to update. */ limit?: number } /** * TenantEncryptionKey updateManyAndReturn */ export type TenantEncryptionKeyUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelectUpdateManyAndReturn | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * The data used to update TenantEncryptionKeys. */ data: Prisma.XOR /** * Filter which TenantEncryptionKeys to update */ where?: Prisma.TenantEncryptionKeyWhereInput /** * Limit how many TenantEncryptionKeys to update. */ limit?: number } /** * TenantEncryptionKey upsert */ export type TenantEncryptionKeyUpsertArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * The filter to search for the TenantEncryptionKey to update in case it exists. */ where: Prisma.TenantEncryptionKeyWhereUniqueInput /** * In case the TenantEncryptionKey found by the `where` argument doesn't exist, create a new TenantEncryptionKey with this data. */ create: Prisma.XOR /** * In case the TenantEncryptionKey was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * TenantEncryptionKey delete */ export type TenantEncryptionKeyDeleteArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null /** * Filter which TenantEncryptionKey to delete. */ where: Prisma.TenantEncryptionKeyWhereUniqueInput } /** * TenantEncryptionKey deleteMany */ export type TenantEncryptionKeyDeleteManyArgs = { /** * Filter which TenantEncryptionKeys to delete */ where?: Prisma.TenantEncryptionKeyWhereInput /** * Limit how many TenantEncryptionKeys to delete. */ limit?: number } /** * TenantEncryptionKey without action */ export type TenantEncryptionKeyDefaultArgs = { /** * Select specific fields to fetch from the TenantEncryptionKey */ select?: Prisma.TenantEncryptionKeySelect | null /** * Omit specific fields from the TenantEncryptionKey */ omit?: Prisma.TenantEncryptionKeyOmit | null }