/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Activity` 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 Activity * User-facing business activity timeline (M045 / M01 Block E). * * DISTINCT from the tamper-evident, hash-chained `AuditEvent` (M001): `Activity` * is the per-entity, human-readable stream shown to tenant users (calls, notes, * emails, status changes, …). Every writing module appends here via * `logActivity()` from `@hivegrid/activity` (AGENTS DoD #14). * * `activityType` and `subjectType` are stored as strings (extensible per module — * see the `ActivityType` / `ActivitySubjectType` unions in `@hivegrid/activity`), * not Prisma enums, to avoid a schema migration for every new module event. * * Tenant isolation: RLS policy is added with M27 (Auth/Tenancy); until then access * is App-Level-scoped via the tenant-scoped query helpers. */ export type ActivityModel = runtime.Types.Result.DefaultSelection export type AggregateActivity = { _count: ActivityCountAggregateOutputType | null _min: ActivityMinAggregateOutputType | null _max: ActivityMaxAggregateOutputType | null } export type ActivityMinAggregateOutputType = { id: string | null tenantId: string | null createdAt: Date | null actorUserId: string | null actorKind: $Enums.ActivityActorKind | null activityType: string | null subjectType: string | null subjectId: string | null summaryText: string | null } export type ActivityMaxAggregateOutputType = { id: string | null tenantId: string | null createdAt: Date | null actorUserId: string | null actorKind: $Enums.ActivityActorKind | null activityType: string | null subjectType: string | null subjectId: string | null summaryText: string | null } export type ActivityCountAggregateOutputType = { id: number tenantId: number createdAt: number actorUserId: number actorKind: number activityType: number subjectType: number subjectId: number relatedEntityRefs: number metadata: number summaryText: number _all: number } export type ActivityMinAggregateInputType = { id?: true tenantId?: true createdAt?: true actorUserId?: true actorKind?: true activityType?: true subjectType?: true subjectId?: true summaryText?: true } export type ActivityMaxAggregateInputType = { id?: true tenantId?: true createdAt?: true actorUserId?: true actorKind?: true activityType?: true subjectType?: true subjectId?: true summaryText?: true } export type ActivityCountAggregateInputType = { id?: true tenantId?: true createdAt?: true actorUserId?: true actorKind?: true activityType?: true subjectType?: true subjectId?: true relatedEntityRefs?: true metadata?: true summaryText?: true _all?: true } export type ActivityAggregateArgs = { /** * Filter which Activity to aggregate. */ where?: Prisma.ActivityWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Activities to fetch. */ orderBy?: Prisma.ActivityOrderByWithRelationInput | Prisma.ActivityOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.ActivityWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Activities 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` Activities. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Activities **/ _count?: true | ActivityCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: ActivityMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: ActivityMaxAggregateInputType } export type GetActivityAggregateType = { [P in keyof T & keyof AggregateActivity]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type ActivityGroupByArgs = { where?: Prisma.ActivityWhereInput orderBy?: Prisma.ActivityOrderByWithAggregationInput | Prisma.ActivityOrderByWithAggregationInput[] by: Prisma.ActivityScalarFieldEnum[] | Prisma.ActivityScalarFieldEnum having?: Prisma.ActivityScalarWhereWithAggregatesInput take?: number skip?: number _count?: ActivityCountAggregateInputType | true _min?: ActivityMinAggregateInputType _max?: ActivityMaxAggregateInputType } export type ActivityGroupByOutputType = { id: string tenantId: string createdAt: Date actorUserId: string | null actorKind: $Enums.ActivityActorKind activityType: string subjectType: string subjectId: string relatedEntityRefs: runtime.JsonValue | null metadata: runtime.JsonValue | null summaryText: string _count: ActivityCountAggregateOutputType | null _min: ActivityMinAggregateOutputType | null _max: ActivityMaxAggregateOutputType | null } export type GetActivityGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof ActivityGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type ActivityWhereInput = { AND?: Prisma.ActivityWhereInput | Prisma.ActivityWhereInput[] OR?: Prisma.ActivityWhereInput[] NOT?: Prisma.ActivityWhereInput | Prisma.ActivityWhereInput[] id?: Prisma.StringFilter<"Activity"> | string tenantId?: Prisma.StringFilter<"Activity"> | string createdAt?: Prisma.DateTimeFilter<"Activity"> | Date | string actorUserId?: Prisma.StringNullableFilter<"Activity"> | string | null actorKind?: Prisma.EnumActivityActorKindFilter<"Activity"> | $Enums.ActivityActorKind activityType?: Prisma.StringFilter<"Activity"> | string subjectType?: Prisma.StringFilter<"Activity"> | string subjectId?: Prisma.StringFilter<"Activity"> | string relatedEntityRefs?: Prisma.JsonNullableFilter<"Activity"> metadata?: Prisma.JsonNullableFilter<"Activity"> summaryText?: Prisma.StringFilter<"Activity"> | string } export type ActivityOrderByWithRelationInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdAt?: Prisma.SortOrder actorUserId?: Prisma.SortOrderInput | Prisma.SortOrder actorKind?: Prisma.SortOrder activityType?: Prisma.SortOrder subjectType?: Prisma.SortOrder subjectId?: Prisma.SortOrder relatedEntityRefs?: Prisma.SortOrderInput | Prisma.SortOrder metadata?: Prisma.SortOrderInput | Prisma.SortOrder summaryText?: Prisma.SortOrder } export type ActivityWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: Prisma.ActivityWhereInput | Prisma.ActivityWhereInput[] OR?: Prisma.ActivityWhereInput[] NOT?: Prisma.ActivityWhereInput | Prisma.ActivityWhereInput[] tenantId?: Prisma.StringFilter<"Activity"> | string createdAt?: Prisma.DateTimeFilter<"Activity"> | Date | string actorUserId?: Prisma.StringNullableFilter<"Activity"> | string | null actorKind?: Prisma.EnumActivityActorKindFilter<"Activity"> | $Enums.ActivityActorKind activityType?: Prisma.StringFilter<"Activity"> | string subjectType?: Prisma.StringFilter<"Activity"> | string subjectId?: Prisma.StringFilter<"Activity"> | string relatedEntityRefs?: Prisma.JsonNullableFilter<"Activity"> metadata?: Prisma.JsonNullableFilter<"Activity"> summaryText?: Prisma.StringFilter<"Activity"> | string }, "id"> export type ActivityOrderByWithAggregationInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdAt?: Prisma.SortOrder actorUserId?: Prisma.SortOrderInput | Prisma.SortOrder actorKind?: Prisma.SortOrder activityType?: Prisma.SortOrder subjectType?: Prisma.SortOrder subjectId?: Prisma.SortOrder relatedEntityRefs?: Prisma.SortOrderInput | Prisma.SortOrder metadata?: Prisma.SortOrderInput | Prisma.SortOrder summaryText?: Prisma.SortOrder _count?: Prisma.ActivityCountOrderByAggregateInput _max?: Prisma.ActivityMaxOrderByAggregateInput _min?: Prisma.ActivityMinOrderByAggregateInput } export type ActivityScalarWhereWithAggregatesInput = { AND?: Prisma.ActivityScalarWhereWithAggregatesInput | Prisma.ActivityScalarWhereWithAggregatesInput[] OR?: Prisma.ActivityScalarWhereWithAggregatesInput[] NOT?: Prisma.ActivityScalarWhereWithAggregatesInput | Prisma.ActivityScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"Activity"> | string tenantId?: Prisma.StringWithAggregatesFilter<"Activity"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"Activity"> | Date | string actorUserId?: Prisma.StringNullableWithAggregatesFilter<"Activity"> | string | null actorKind?: Prisma.EnumActivityActorKindWithAggregatesFilter<"Activity"> | $Enums.ActivityActorKind activityType?: Prisma.StringWithAggregatesFilter<"Activity"> | string subjectType?: Prisma.StringWithAggregatesFilter<"Activity"> | string subjectId?: Prisma.StringWithAggregatesFilter<"Activity"> | string relatedEntityRefs?: Prisma.JsonNullableWithAggregatesFilter<"Activity"> metadata?: Prisma.JsonNullableWithAggregatesFilter<"Activity"> summaryText?: Prisma.StringWithAggregatesFilter<"Activity"> | string } export type ActivityCreateInput = { id?: string tenantId: string createdAt?: Date | string actorUserId?: string | null actorKind: $Enums.ActivityActorKind activityType: string subjectType: string subjectId: string relatedEntityRefs?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue summaryText: string } export type ActivityUncheckedCreateInput = { id?: string tenantId: string createdAt?: Date | string actorUserId?: string | null actorKind: $Enums.ActivityActorKind activityType: string subjectType: string subjectId: string relatedEntityRefs?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue summaryText: string } export type ActivityUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string actorUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null actorKind?: Prisma.EnumActivityActorKindFieldUpdateOperationsInput | $Enums.ActivityActorKind activityType?: Prisma.StringFieldUpdateOperationsInput | string subjectType?: Prisma.StringFieldUpdateOperationsInput | string subjectId?: Prisma.StringFieldUpdateOperationsInput | string relatedEntityRefs?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue summaryText?: Prisma.StringFieldUpdateOperationsInput | string } export type ActivityUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string actorUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null actorKind?: Prisma.EnumActivityActorKindFieldUpdateOperationsInput | $Enums.ActivityActorKind activityType?: Prisma.StringFieldUpdateOperationsInput | string subjectType?: Prisma.StringFieldUpdateOperationsInput | string subjectId?: Prisma.StringFieldUpdateOperationsInput | string relatedEntityRefs?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue summaryText?: Prisma.StringFieldUpdateOperationsInput | string } export type ActivityCreateManyInput = { id?: string tenantId: string createdAt?: Date | string actorUserId?: string | null actorKind: $Enums.ActivityActorKind activityType: string subjectType: string subjectId: string relatedEntityRefs?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue summaryText: string } export type ActivityUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string actorUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null actorKind?: Prisma.EnumActivityActorKindFieldUpdateOperationsInput | $Enums.ActivityActorKind activityType?: Prisma.StringFieldUpdateOperationsInput | string subjectType?: Prisma.StringFieldUpdateOperationsInput | string subjectId?: Prisma.StringFieldUpdateOperationsInput | string relatedEntityRefs?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue summaryText?: Prisma.StringFieldUpdateOperationsInput | string } export type ActivityUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string actorUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null actorKind?: Prisma.EnumActivityActorKindFieldUpdateOperationsInput | $Enums.ActivityActorKind activityType?: Prisma.StringFieldUpdateOperationsInput | string subjectType?: Prisma.StringFieldUpdateOperationsInput | string subjectId?: Prisma.StringFieldUpdateOperationsInput | string relatedEntityRefs?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue summaryText?: Prisma.StringFieldUpdateOperationsInput | string } export type ActivityCountOrderByAggregateInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdAt?: Prisma.SortOrder actorUserId?: Prisma.SortOrder actorKind?: Prisma.SortOrder activityType?: Prisma.SortOrder subjectType?: Prisma.SortOrder subjectId?: Prisma.SortOrder relatedEntityRefs?: Prisma.SortOrder metadata?: Prisma.SortOrder summaryText?: Prisma.SortOrder } export type ActivityMaxOrderByAggregateInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdAt?: Prisma.SortOrder actorUserId?: Prisma.SortOrder actorKind?: Prisma.SortOrder activityType?: Prisma.SortOrder subjectType?: Prisma.SortOrder subjectId?: Prisma.SortOrder summaryText?: Prisma.SortOrder } export type ActivityMinOrderByAggregateInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdAt?: Prisma.SortOrder actorUserId?: Prisma.SortOrder actorKind?: Prisma.SortOrder activityType?: Prisma.SortOrder subjectType?: Prisma.SortOrder subjectId?: Prisma.SortOrder summaryText?: Prisma.SortOrder } export type EnumActivityActorKindFieldUpdateOperationsInput = { set?: $Enums.ActivityActorKind } export type ActivitySelect = runtime.Types.Extensions.GetSelect<{ id?: boolean tenantId?: boolean createdAt?: boolean actorUserId?: boolean actorKind?: boolean activityType?: boolean subjectType?: boolean subjectId?: boolean relatedEntityRefs?: boolean metadata?: boolean summaryText?: boolean }, ExtArgs["result"]["activity"]> export type ActivitySelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean tenantId?: boolean createdAt?: boolean actorUserId?: boolean actorKind?: boolean activityType?: boolean subjectType?: boolean subjectId?: boolean relatedEntityRefs?: boolean metadata?: boolean summaryText?: boolean }, ExtArgs["result"]["activity"]> export type ActivitySelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean tenantId?: boolean createdAt?: boolean actorUserId?: boolean actorKind?: boolean activityType?: boolean subjectType?: boolean subjectId?: boolean relatedEntityRefs?: boolean metadata?: boolean summaryText?: boolean }, ExtArgs["result"]["activity"]> export type ActivitySelectScalar = { id?: boolean tenantId?: boolean createdAt?: boolean actorUserId?: boolean actorKind?: boolean activityType?: boolean subjectType?: boolean subjectId?: boolean relatedEntityRefs?: boolean metadata?: boolean summaryText?: boolean } export type ActivityOmit = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "createdAt" | "actorUserId" | "actorKind" | "activityType" | "subjectType" | "subjectId" | "relatedEntityRefs" | "metadata" | "summaryText", ExtArgs["result"]["activity"]> export type $ActivityPayload = { name: "Activity" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string tenantId: string createdAt: Date actorUserId: string | null actorKind: $Enums.ActivityActorKind activityType: string subjectType: string subjectId: string relatedEntityRefs: runtime.JsonValue | null metadata: runtime.JsonValue | null summaryText: string }, ExtArgs["result"]["activity"]> composites: {} } export type ActivityGetPayload = runtime.Types.Result.GetResult export type ActivityCountArgs = Omit & { select?: ActivityCountAggregateInputType | true } export interface ActivityDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Activity'], meta: { name: 'Activity' } } /** * Find zero or one Activity that matches the filter. * @param {ActivityFindUniqueArgs} args - Arguments to find a Activity * @example * // Get one Activity * const activity = await prisma.activity.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Activity that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {ActivityFindUniqueOrThrowArgs} args - Arguments to find a Activity * @example * // Get one Activity * const activity = await prisma.activity.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Activity 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 {ActivityFindFirstArgs} args - Arguments to find a Activity * @example * // Get one Activity * const activity = await prisma.activity.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Activity 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 {ActivityFindFirstOrThrowArgs} args - Arguments to find a Activity * @example * // Get one Activity * const activity = await prisma.activity.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Activities 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 {ActivityFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Activities * const activities = await prisma.activity.findMany() * * // Get first 10 Activities * const activities = await prisma.activity.findMany({ take: 10 }) * * // Only select the `id` * const activityWithIdOnly = await prisma.activity.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Activity. * @param {ActivityCreateArgs} args - Arguments to create a Activity. * @example * // Create one Activity * const Activity = await prisma.activity.create({ * data: { * // ... data to create a Activity * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Activities. * @param {ActivityCreateManyArgs} args - Arguments to create many Activities. * @example * // Create many Activities * const activity = await prisma.activity.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Activities and returns the data saved in the database. * @param {ActivityCreateManyAndReturnArgs} args - Arguments to create many Activities. * @example * // Create many Activities * const activity = await prisma.activity.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Activities and only return the `id` * const activityWithIdOnly = await prisma.activity.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 Activity. * @param {ActivityDeleteArgs} args - Arguments to delete one Activity. * @example * // Delete one Activity * const Activity = await prisma.activity.delete({ * where: { * // ... filter to delete one Activity * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Activity. * @param {ActivityUpdateArgs} args - Arguments to update one Activity. * @example * // Update one Activity * const activity = await prisma.activity.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Activities. * @param {ActivityDeleteManyArgs} args - Arguments to filter Activities to delete. * @example * // Delete a few Activities * const { count } = await prisma.activity.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Activities. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ActivityUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Activities * const activity = await prisma.activity.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Activities and returns the data updated in the database. * @param {ActivityUpdateManyAndReturnArgs} args - Arguments to update many Activities. * @example * // Update many Activities * const activity = await prisma.activity.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Activities and only return the `id` * const activityWithIdOnly = await prisma.activity.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 Activity. * @param {ActivityUpsertArgs} args - Arguments to update or create a Activity. * @example * // Update or create a Activity * const activity = await prisma.activity.upsert({ * create: { * // ... data to create a Activity * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Activity we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ActivityClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Activities. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ActivityCountArgs} args - Arguments to filter Activities to count. * @example * // Count the number of Activities * const count = await prisma.activity.count({ * where: { * // ... the filter for the Activities 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 Activity. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ActivityAggregateArgs} 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 Activity. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ActivityGroupByArgs} 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 ActivityGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: ActivityGroupByArgs['orderBy'] } : { orderBy?: ActivityGroupByArgs['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 ? GetActivityGroupByPayload : Prisma.PrismaPromise /** * Fields of the Activity model */ readonly fields: ActivityFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Activity. * 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__ActivityClient 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 Activity model */ export interface ActivityFieldRefs { readonly id: Prisma.FieldRef<"Activity", 'String'> readonly tenantId: Prisma.FieldRef<"Activity", 'String'> readonly createdAt: Prisma.FieldRef<"Activity", 'DateTime'> readonly actorUserId: Prisma.FieldRef<"Activity", 'String'> readonly actorKind: Prisma.FieldRef<"Activity", 'ActivityActorKind'> readonly activityType: Prisma.FieldRef<"Activity", 'String'> readonly subjectType: Prisma.FieldRef<"Activity", 'String'> readonly subjectId: Prisma.FieldRef<"Activity", 'String'> readonly relatedEntityRefs: Prisma.FieldRef<"Activity", 'Json'> readonly metadata: Prisma.FieldRef<"Activity", 'Json'> readonly summaryText: Prisma.FieldRef<"Activity", 'String'> } // Custom InputTypes /** * Activity findUnique */ export type ActivityFindUniqueArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * Filter, which Activity to fetch. */ where: Prisma.ActivityWhereUniqueInput } /** * Activity findUniqueOrThrow */ export type ActivityFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * Filter, which Activity to fetch. */ where: Prisma.ActivityWhereUniqueInput } /** * Activity findFirst */ export type ActivityFindFirstArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * Filter, which Activity to fetch. */ where?: Prisma.ActivityWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Activities to fetch. */ orderBy?: Prisma.ActivityOrderByWithRelationInput | Prisma.ActivityOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Activities. */ cursor?: Prisma.ActivityWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Activities 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` Activities. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Activities. */ distinct?: Prisma.ActivityScalarFieldEnum | Prisma.ActivityScalarFieldEnum[] } /** * Activity findFirstOrThrow */ export type ActivityFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * Filter, which Activity to fetch. */ where?: Prisma.ActivityWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Activities to fetch. */ orderBy?: Prisma.ActivityOrderByWithRelationInput | Prisma.ActivityOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Activities. */ cursor?: Prisma.ActivityWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Activities 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` Activities. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Activities. */ distinct?: Prisma.ActivityScalarFieldEnum | Prisma.ActivityScalarFieldEnum[] } /** * Activity findMany */ export type ActivityFindManyArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * Filter, which Activities to fetch. */ where?: Prisma.ActivityWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Activities to fetch. */ orderBy?: Prisma.ActivityOrderByWithRelationInput | Prisma.ActivityOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Activities. */ cursor?: Prisma.ActivityWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Activities 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` Activities. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Activities. */ distinct?: Prisma.ActivityScalarFieldEnum | Prisma.ActivityScalarFieldEnum[] } /** * Activity create */ export type ActivityCreateArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * The data needed to create a Activity. */ data: Prisma.XOR } /** * Activity createMany */ export type ActivityCreateManyArgs = { /** * The data used to create many Activities. */ data: Prisma.ActivityCreateManyInput | Prisma.ActivityCreateManyInput[] skipDuplicates?: boolean } /** * Activity createManyAndReturn */ export type ActivityCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelectCreateManyAndReturn | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * The data used to create many Activities. */ data: Prisma.ActivityCreateManyInput | Prisma.ActivityCreateManyInput[] skipDuplicates?: boolean } /** * Activity update */ export type ActivityUpdateArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * The data needed to update a Activity. */ data: Prisma.XOR /** * Choose, which Activity to update. */ where: Prisma.ActivityWhereUniqueInput } /** * Activity updateMany */ export type ActivityUpdateManyArgs = { /** * The data used to update Activities. */ data: Prisma.XOR /** * Filter which Activities to update */ where?: Prisma.ActivityWhereInput /** * Limit how many Activities to update. */ limit?: number } /** * Activity updateManyAndReturn */ export type ActivityUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelectUpdateManyAndReturn | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * The data used to update Activities. */ data: Prisma.XOR /** * Filter which Activities to update */ where?: Prisma.ActivityWhereInput /** * Limit how many Activities to update. */ limit?: number } /** * Activity upsert */ export type ActivityUpsertArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * The filter to search for the Activity to update in case it exists. */ where: Prisma.ActivityWhereUniqueInput /** * In case the Activity found by the `where` argument doesn't exist, create a new Activity with this data. */ create: Prisma.XOR /** * In case the Activity was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Activity delete */ export type ActivityDeleteArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null /** * Filter which Activity to delete. */ where: Prisma.ActivityWhereUniqueInput } /** * Activity deleteMany */ export type ActivityDeleteManyArgs = { /** * Filter which Activities to delete */ where?: Prisma.ActivityWhereInput /** * Limit how many Activities to delete. */ limit?: number } /** * Activity without action */ export type ActivityDefaultArgs = { /** * Select specific fields to fetch from the Activity */ select?: Prisma.ActivitySelect | null /** * Omit specific fields from the Activity */ omit?: Prisma.ActivityOmit | null }