diff --git a/src/generated/prisma/browser.ts b/src/generated/prisma/browser.ts new file mode 100644 index 0000000..075b151 --- /dev/null +++ b/src/generated/prisma/browser.ts @@ -0,0 +1,39 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma-related types and utilities in a browser. + * Use it to get access to models, enums, and input types. + * + * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only. + * See `client.ts` for the standard, server-side entry point. + * + * 🟢 You can import this file directly. + */ + +import * as Prisma from './internal/prismaNamespaceBrowser' +export { Prisma } +export * as $Enums from './enums' +export * from './enums'; +/** + * Model State + * + */ +export type State = Prisma.StateModel +/** + * Model Task + * + */ +export type Task = Prisma.TaskModel +/** + * Model StateHistory + * + */ +export type StateHistory = Prisma.StateHistoryModel +/** + * Model Note + * + */ +export type Note = Prisma.NoteModel diff --git a/src/generated/prisma/client.ts b/src/generated/prisma/client.ts new file mode 100644 index 0000000..ad6e1fa --- /dev/null +++ b/src/generated/prisma/client.ts @@ -0,0 +1,63 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types. + * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead. + * + * 🟢 You can import this file directly. + */ + +import * as process from 'node:process' +import * as path from 'node:path' +import { fileURLToPath } from 'node:url' +globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url)) + +import * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import * as $Class from "./internal/class" +import * as Prisma from "./internal/prismaNamespace" + +export * as $Enums from './enums' +export * from "./enums" +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) + * }) + * // Fetch zero or more States + * const states = await prisma.state.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ +export const PrismaClient = $Class.getPrismaClientClass() +export type PrismaClient = $Class.PrismaClient +export { Prisma } + +/** + * Model State + * + */ +export type State = Prisma.StateModel +/** + * Model Task + * + */ +export type Task = Prisma.TaskModel +/** + * Model StateHistory + * + */ +export type StateHistory = Prisma.StateHistoryModel +/** + * Model Note + * + */ +export type Note = Prisma.NoteModel diff --git a/src/generated/prisma/commonInputTypes.ts b/src/generated/prisma/commonInputTypes.ts new file mode 100644 index 0000000..de8f5de --- /dev/null +++ b/src/generated/prisma/commonInputTypes.ts @@ -0,0 +1,222 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports various common sort, input & filter types that are not directly linked to a particular model. + * + * 🟢 You can import this file directly. + */ + +import type * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import type * as Prisma from "./internal/prismaNamespace" + + +export type StringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type IntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + + diff --git a/src/generated/prisma/enums.ts b/src/generated/prisma/enums.ts new file mode 100644 index 0000000..043572d --- /dev/null +++ b/src/generated/prisma/enums.ts @@ -0,0 +1,15 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* +* This file exports all enum related types from the schema. +* +* 🟢 You can import this file directly. +*/ + + + +// This file is empty because there are no enums in the schema. +export {} diff --git a/src/generated/prisma/internal/class.ts b/src/generated/prisma/internal/class.ts new file mode 100644 index 0000000..0993607 --- /dev/null +++ b/src/generated/prisma/internal/class.ts @@ -0,0 +1,234 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * Please import the `PrismaClient` class from the `client.ts` file instead. + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "./prismaNamespace" + + +const config: runtime.GetPrismaClientConfig = { + "previewFeatures": [], + "clientVersion": "7.8.0", + "engineVersion": "3c6e192761c0362d496ed980de936e2f3cebcd3a", + "activeProvider": "postgresql", + "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel State {\n name String @id\n\n tasks StateHistory[]\n}\n\nmodel Task {\n id String @id @default(uuid())\n title String\n description String\n dueDate String\n completed Boolean @default(false)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n stateHistory StateHistory[]\n notes Note[]\n}\n\nmodel StateHistory {\n id String @id @default(uuid())\n state String\n date String\n taskId String\n order Int\n\n task Task @relation(fields: [taskId], references: [id], onDelete: Cascade)\n stateRef State @relation(fields: [state], references: [name])\n\n @@index([taskId])\n}\n\nmodel Note {\n id String @id @default(uuid())\n content String\n taskId String\n order Int\n\n task Task @relation(fields: [taskId], references: [id], onDelete: Cascade)\n\n @@index([taskId])\n}\n", + "runtimeDataModel": { + "models": {}, + "enums": {}, + "types": {} + }, + "parameterizationSchema": { + "strings": [], + "graph": "" + } +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"State\":{\"fields\":[{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tasks\",\"kind\":\"object\",\"type\":\"StateHistory\",\"relationName\":\"StateToStateHistory\"}],\"dbName\":null},\"Task\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"dueDate\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"completed\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"stateHistory\",\"kind\":\"object\",\"type\":\"StateHistory\",\"relationName\":\"StateHistoryToTask\"},{\"name\":\"notes\",\"kind\":\"object\",\"type\":\"Note\",\"relationName\":\"NoteToTask\"}],\"dbName\":null},\"StateHistory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"taskId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"order\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"task\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"StateHistoryToTask\"},{\"name\":\"stateRef\",\"kind\":\"object\",\"type\":\"State\",\"relationName\":\"StateToStateHistory\"}],\"dbName\":null},\"Note\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"taskId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"order\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"task\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"NoteToTask\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +config.parameterizationSchema = { + strings: JSON.parse("[\"where\",\"orderBy\",\"cursor\",\"stateHistory\",\"task\",\"notes\",\"_count\",\"stateRef\",\"tasks\",\"State.findUnique\",\"State.findUniqueOrThrow\",\"State.findFirst\",\"State.findFirstOrThrow\",\"State.findMany\",\"data\",\"State.createOne\",\"State.createMany\",\"State.createManyAndReturn\",\"State.updateOne\",\"State.updateMany\",\"State.updateManyAndReturn\",\"create\",\"update\",\"State.upsertOne\",\"State.deleteOne\",\"State.deleteMany\",\"having\",\"_min\",\"_max\",\"State.groupBy\",\"State.aggregate\",\"Task.findUnique\",\"Task.findUniqueOrThrow\",\"Task.findFirst\",\"Task.findFirstOrThrow\",\"Task.findMany\",\"Task.createOne\",\"Task.createMany\",\"Task.createManyAndReturn\",\"Task.updateOne\",\"Task.updateMany\",\"Task.updateManyAndReturn\",\"Task.upsertOne\",\"Task.deleteOne\",\"Task.deleteMany\",\"Task.groupBy\",\"Task.aggregate\",\"StateHistory.findUnique\",\"StateHistory.findUniqueOrThrow\",\"StateHistory.findFirst\",\"StateHistory.findFirstOrThrow\",\"StateHistory.findMany\",\"StateHistory.createOne\",\"StateHistory.createMany\",\"StateHistory.createManyAndReturn\",\"StateHistory.updateOne\",\"StateHistory.updateMany\",\"StateHistory.updateManyAndReturn\",\"StateHistory.upsertOne\",\"StateHistory.deleteOne\",\"StateHistory.deleteMany\",\"_avg\",\"_sum\",\"StateHistory.groupBy\",\"StateHistory.aggregate\",\"Note.findUnique\",\"Note.findUniqueOrThrow\",\"Note.findFirst\",\"Note.findFirstOrThrow\",\"Note.findMany\",\"Note.createOne\",\"Note.createMany\",\"Note.createManyAndReturn\",\"Note.updateOne\",\"Note.updateMany\",\"Note.updateManyAndReturn\",\"Note.upsertOne\",\"Note.deleteOne\",\"Note.deleteMany\",\"Note.groupBy\",\"Note.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"content\",\"taskId\",\"order\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"contains\",\"startsWith\",\"endsWith\",\"state\",\"date\",\"title\",\"description\",\"dueDate\",\"completed\",\"createdAt\",\"updatedAt\",\"every\",\"some\",\"none\",\"name\",\"is\",\"isNot\",\"connectOrCreate\",\"upsert\",\"createMany\",\"set\",\"disconnect\",\"delete\",\"connect\",\"updateMany\",\"deleteMany\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), + graph: "3gEnQAUIAAB_ACBRAACCAQAwUgAAEAAQUwAAggEAMG4BAAAAAQEAAAABACAKBAAAhQEAIAcAAIcBACBRAACGAQAwUgAAAwAQUwAAhgEAMFQBAHwAIVYBAHwAIVcCAIQBACFjAQB8ACFkAQB8ACECBAAAywEAIAcAAMwBACAKBAAAhQEAIAcAAIcBACBRAACGAQAwUgAAAwAQUwAAhgEAMFQBAAAAAVYBAHwAIVcCAIQBACFjAQB8ACFkAQB8ACEDAAAAAwAgAQAABAAwAgAABQAgAwAAAAMAIAEAAAQAMAIAAAUAIAgEAACFAQAgUQAAgwEAMFIAAAgAEFMAAIMBADBUAQB8ACFVAQB8ACFWAQB8ACFXAgCEAQAhAQQAAMsBACAIBAAAhQEAIFEAAIMBADBSAAAIABBTAACDAQAwVAEAAAABVQEAfAAhVgEAfAAhVwIAhAEAIQMAAAAIACABAAAJADACAAAKACABAAAAAwAgAQAAAAgAIAEAAAADACABAAAAAQAgBQgAAH8AIFEAAIIBADBSAAAQABBTAACCAQAwbgEAfAAhAQgAALsBACADAAAAEAAgAQAAEQAwAgAAAQAgAwAAABAAIAEAABEAMAIAAAEAIAMAAAAQACABAAARADACAAABACACCAAAygEAIG4BAAAAAQEOAAAVACABbgEAAAABAQ4AABcAMAEOAAAXADACCAAAwAEAIG4BAI0BACECAAAAAQAgDgAAGgAgAW4BAI0BACECAAAAEAAgDgAAHAAgAgAAABAAIA4AABwAIAMAAAABACAVAAAVACAWAAAaACABAAAAAQAgAQAAABAAIAMGAAC9AQAgGwAAvwEAIBwAAL4BACAEUQAAgQEAMFIAACMAEFMAAIEBADBuAQBsACEDAAAAEAAgAQAAIgAwGgAAIwAgAwAAABAAIAEAABEAMAIAAAEAIAwDAAB_ACAFAACAAQAgUQAAewAwUgAAKQAQUwAAewAwVAEAAAABZQEAfAAhZgEAfAAhZwEAfAAhaCAAfQAhaUAAfgAhakAAfgAhAQAAACYAIAEAAAAmACAMAwAAfwAgBQAAgAEAIFEAAHsAMFIAACkAEFMAAHsAMFQBAHwAIWUBAHwAIWYBAHwAIWcBAHwAIWggAH0AIWlAAH4AIWpAAH4AIQIDAAC7AQAgBQAAvAEAIAMAAAApACABAAAqADACAAAmACADAAAAKQAgAQAAKgAwAgAAJgAgAwAAACkAIAEAACoAMAIAACYAIAkDAAC5AQAgBQAAugEAIFQBAAAAAWUBAAAAAWYBAAAAAWcBAAAAAWggAAAAAWlAAAAAAWpAAAAAAQEOAAAuACAHVAEAAAABZQEAAAABZgEAAAABZwEAAAABaCAAAAABaUAAAAABakAAAAABAQ4AADAAMAEOAAAwADAJAwAAnwEAIAUAAKABACBUAQCNAQAhZQEAjQEAIWYBAI0BACFnAQCNAQAhaCAAnQEAIWlAAJ4BACFqQACeAQAhAgAAACYAIA4AADMAIAdUAQCNAQAhZQEAjQEAIWYBAI0BACFnAQCNAQAhaCAAnQEAIWlAAJ4BACFqQACeAQAhAgAAACkAIA4AADUAIAIAAAApACAOAAA1ACADAAAAJgAgFQAALgAgFgAAMwAgAQAAACYAIAEAAAApACADBgAAmgEAIBsAAJwBACAcAACbAQAgClEAAHQAMFIAADwAEFMAAHQAMFQBAGwAIWUBAGwAIWYBAGwAIWcBAGwAIWggAHUAIWlAAHYAIWpAAHYAIQMAAAApACABAAA7ADAaAAA8ACADAAAAKQAgAQAAKgAwAgAAJgAgAQAAAAUAIAEAAAAFACADAAAAAwAgAQAABAAwAgAABQAgAwAAAAMAIAEAAAQAMAIAAAUAIAMAAAADACABAAAEADACAAAFACAHBAAAmAEAIAcAAJkBACBUAQAAAAFWAQAAAAFXAgAAAAFjAQAAAAFkAQAAAAEBDgAARAAgBVQBAAAAAVYBAAAAAVcCAAAAAWMBAAAAAWQBAAAAAQEOAABGADABDgAARgAwBwQAAJYBACAHAACXAQAgVAEAjQEAIVYBAI0BACFXAgCOAQAhYwEAjQEAIWQBAI0BACECAAAABQAgDgAASQAgBVQBAI0BACFWAQCNAQAhVwIAjgEAIWMBAI0BACFkAQCNAQAhAgAAAAMAIA4AAEsAIAIAAAADACAOAABLACADAAAABQAgFQAARAAgFgAASQAgAQAAAAUAIAEAAAADACAFBgAAkQEAIBsAAJQBACAcAACTAQAgPQAAkgEAID4AAJUBACAIUQAAcwAwUgAAUgAQUwAAcwAwVAEAbAAhVgEAbAAhVwIAbQAhYwEAbAAhZAEAbAAhAwAAAAMAIAEAAFEAMBoAAFIAIAMAAAADACABAAAEADACAAAFACABAAAACgAgAQAAAAoAIAMAAAAIACABAAAJADACAAAKACADAAAACAAgAQAACQAwAgAACgAgAwAAAAgAIAEAAAkAMAIAAAoAIAUEAACQAQAgVAEAAAABVQEAAAABVgEAAAABVwIAAAABAQ4AAFoAIARUAQAAAAFVAQAAAAFWAQAAAAFXAgAAAAEBDgAAXAAwAQ4AAFwAMAUEAACPAQAgVAEAjQEAIVUBAI0BACFWAQCNAQAhVwIAjgEAIQIAAAAKACAOAABfACAEVAEAjQEAIVUBAI0BACFWAQCNAQAhVwIAjgEAIQIAAAAIACAOAABhACACAAAACAAgDgAAYQAgAwAAAAoAIBUAAFoAIBYAAF8AIAEAAAAKACABAAAACAAgBQYAAIgBACAbAACLAQAgHAAAigEAID0AAIkBACA-AACMAQAgB1EAAGsAMFIAAGgAEFMAAGsAMFQBAGwAIVUBAGwAIVYBAGwAIVcCAG0AIQMAAAAIACABAABnADAaAABoACADAAAACAAgAQAACQAwAgAACgAgB1EAAGsAMFIAAGgAEFMAAGsAMFQBAGwAIVUBAGwAIVYBAGwAIVcCAG0AIQ4GAABvACAbAAByACAcAAByACBYAQAAAAFZAQAAAARaAQAAAARbAQAAAAFcAQAAAAFdAQAAAAFeAQAAAAFfAQBxACFgAQAAAAFhAQAAAAFiAQAAAAENBgAAbwAgGwAAbwAgHAAAbwAgPQAAcAAgPgAAbwAgWAIAAAABWQIAAAAEWgIAAAAEWwIAAAABXAIAAAABXQIAAAABXgIAAAABXwIAbgAhDQYAAG8AIBsAAG8AIBwAAG8AID0AAHAAID4AAG8AIFgCAAAAAVkCAAAABFoCAAAABFsCAAAAAVwCAAAAAV0CAAAAAV4CAAAAAV8CAG4AIQhYAgAAAAFZAgAAAARaAgAAAARbAgAAAAFcAgAAAAFdAgAAAAFeAgAAAAFfAgBvACEIWAgAAAABWQgAAAAEWggAAAAEWwgAAAABXAgAAAABXQgAAAABXggAAAABXwgAcAAhDgYAAG8AIBsAAHIAIBwAAHIAIFgBAAAAAVkBAAAABFoBAAAABFsBAAAAAVwBAAAAAV0BAAAAAV4BAAAAAV8BAHEAIWABAAAAAWEBAAAAAWIBAAAAAQtYAQAAAAFZAQAAAARaAQAAAARbAQAAAAFcAQAAAAFdAQAAAAFeAQAAAAFfAQByACFgAQAAAAFhAQAAAAFiAQAAAAEIUQAAcwAwUgAAUgAQUwAAcwAwVAEAbAAhVgEAbAAhVwIAbQAhYwEAbAAhZAEAbAAhClEAAHQAMFIAADwAEFMAAHQAMFQBAGwAIWUBAGwAIWYBAGwAIWcBAGwAIWggAHUAIWlAAHYAIWpAAHYAIQUGAABvACAbAAB6ACAcAAB6ACBYIAAAAAFfIAB5ACELBgAAbwAgGwAAeAAgHAAAeAAgWEAAAAABWUAAAAAEWkAAAAAEW0AAAAABXEAAAAABXUAAAAABXkAAAAABX0AAdwAhCwYAAG8AIBsAAHgAIBwAAHgAIFhAAAAAAVlAAAAABFpAAAAABFtAAAAAAVxAAAAAAV1AAAAAAV5AAAAAAV9AAHcAIQhYQAAAAAFZQAAAAARaQAAAAARbQAAAAAFcQAAAAAFdQAAAAAFeQAAAAAFfQAB4ACEFBgAAbwAgGwAAegAgHAAAegAgWCAAAAABXyAAeQAhAlggAAAAAV8gAHoAIQwDAAB_ACAFAACAAQAgUQAAewAwUgAAKQAQUwAAewAwVAEAfAAhZQEAfAAhZgEAfAAhZwEAfAAhaCAAfQAhaUAAfgAhakAAfgAhC1gBAAAAAVkBAAAABFoBAAAABFsBAAAAAVwBAAAAAV0BAAAAAV4BAAAAAV8BAHIAIWABAAAAAWEBAAAAAWIBAAAAAQJYIAAAAAFfIAB6ACEIWEAAAAABWUAAAAAEWkAAAAAEW0AAAAABXEAAAAABXUAAAAABXkAAAAABX0AAeAAhA2sAAAMAIGwAAAMAIG0AAAMAIANrAAAIACBsAAAIACBtAAAIACAEUQAAgQEAMFIAACMAEFMAAIEBADBuAQBsACEFCAAAfwAgUQAAggEAMFIAABAAEFMAAIIBADBuAQB8ACEIBAAAhQEAIFEAAIMBADBSAAAIABBTAACDAQAwVAEAfAAhVQEAfAAhVgEAfAAhVwIAhAEAIQhYAgAAAAFZAgAAAARaAgAAAARbAgAAAAFcAgAAAAFdAgAAAAFeAgAAAAFfAgBvACEOAwAAfwAgBQAAgAEAIFEAAHsAMFIAACkAEFMAAHsAMFQBAHwAIWUBAHwAIWYBAHwAIWcBAHwAIWggAH0AIWlAAH4AIWpAAH4AIW8AACkAIHAAACkAIAoEAACFAQAgBwAAhwEAIFEAAIYBADBSAAADABBTAACGAQAwVAEAfAAhVgEAfAAhVwIAhAEAIWMBAHwAIWQBAHwAIQcIAAB_ACBRAACCAQAwUgAAEAAQUwAAggEAMG4BAHwAIW8AABAAIHAAABAAIAAAAAAAAXQBAAAAAQV0AgAAAAF6AgAAAAF7AgAAAAF8AgAAAAF9AgAAAAEFFQAA2gEAIBYAAN0BACBxAADbAQAgcgAA3AEAIHcAACYAIAMVAADaAQAgcQAA2wEAIHcAACYAIAAAAAAABRUAANIBACAWAADYAQAgcQAA0wEAIHIAANcBACB3AAAmACAFFQAA0AEAIBYAANUBACBxAADRAQAgcgAA1AEAIHcAAAEAIAMVAADSAQAgcQAA0wEAIHcAACYAIAMVAADQAQAgcQAA0QEAIHcAAAEAIAAAAAF0IAAAAAEBdEAAAAABCxUAAK0BADAWAACyAQAwcQAArgEAMHIAAK8BADBzAACwAQAgdAAAsQEAMHUAALEBADB2AACxAQAwdwAAsQEAMHgAALMBADB5AAC0AQAwCxUAAKEBADAWAACmAQAwcQAAogEAMHIAAKMBADBzAACkAQAgdAAApQEAMHUAAKUBADB2AAClAQAwdwAApQEAMHgAAKcBADB5AACoAQAwA1QBAAAAAVUBAAAAAVcCAAAAAQIAAAAKACAVAACsAQAgAwAAAAoAIBUAAKwBACAWAACrAQAgAQ4AAM8BADAIBAAAhQEAIFEAAIMBADBSAAAIABBTAACDAQAwVAEAAAABVQEAfAAhVgEAfAAhVwIAhAEAIQIAAAAKACAOAACrAQAgAgAAAKkBACAOAACqAQAgB1EAAKgBADBSAACpAQAQUwAAqAEAMFQBAHwAIVUBAHwAIVYBAHwAIVcCAIQBACEHUQAAqAEAMFIAAKkBABBTAACoAQAwVAEAfAAhVQEAfAAhVgEAfAAhVwIAhAEAIQNUAQCNAQAhVQEAjQEAIVcCAI4BACEDVAEAjQEAIVUBAI0BACFXAgCOAQAhA1QBAAAAAVUBAAAAAVcCAAAAAQUHAACZAQAgVAEAAAABVwIAAAABYwEAAAABZAEAAAABAgAAAAUAIBUAALgBACADAAAABQAgFQAAuAEAIBYAALcBACABDgAAzgEAMAoEAACFAQAgBwAAhwEAIFEAAIYBADBSAAADABBTAACGAQAwVAEAAAABVgEAfAAhVwIAhAEAIWMBAHwAIWQBAHwAIQIAAAAFACAOAAC3AQAgAgAAALUBACAOAAC2AQAgCFEAALQBADBSAAC1AQAQUwAAtAEAMFQBAHwAIVYBAHwAIVcCAIQBACFjAQB8ACFkAQB8ACEIUQAAtAEAMFIAALUBABBTAAC0AQAwVAEAfAAhVgEAfAAhVwIAhAEAIWMBAHwAIWQBAHwAIQRUAQCNAQAhVwIAjgEAIWMBAI0BACFkAQCNAQAhBQcAAJcBACBUAQCNAQAhVwIAjgEAIWMBAI0BACFkAQCNAQAhBQcAAJkBACBUAQAAAAFXAgAAAAFjAQAAAAFkAQAAAAEEFQAArQEAMHEAAK4BADBzAACwAQAgdwAAsQEAMAQVAAChAQAwcQAAogEAMHMAAKQBACB3AAClAQAwAAAAAAALFQAAwQEAMBYAAMUBADBxAADCAQAwcgAAwwEAMHMAAMQBACB0AACxAQAwdQAAsQEAMHYAALEBADB3AACxAQAweAAAxgEAMHkAALQBADAFBAAAmAEAIFQBAAAAAVYBAAAAAVcCAAAAAWQBAAAAAQIAAAAFACAVAADJAQAgAwAAAAUAIBUAAMkBACAWAADIAQAgAQ4AAM0BADACAAAABQAgDgAAyAEAIAIAAAC1AQAgDgAAxwEAIARUAQCNAQAhVgEAjQEAIVcCAI4BACFkAQCNAQAhBQQAAJYBACBUAQCNAQAhVgEAjQEAIVcCAI4BACFkAQCNAQAhBQQAAJgBACBUAQAAAAFWAQAAAAFXAgAAAAFkAQAAAAEEFQAAwQEAMHEAAMIBADBzAADEAQAgdwAAsQEAMAIDAAC7AQAgBQAAvAEAIAEIAAC7AQAgBFQBAAAAAVYBAAAAAVcCAAAAAWQBAAAAAQRUAQAAAAFXAgAAAAFjAQAAAAFkAQAAAAEDVAEAAAABVQEAAAABVwIAAAABAW4BAAAAAQIAAAABACAVAADQAQAgCAUAALoBACBUAQAAAAFlAQAAAAFmAQAAAAFnAQAAAAFoIAAAAAFpQAAAAAFqQAAAAAECAAAAJgAgFQAA0gEAIAMAAAAQACAVAADQAQAgFgAA1gEAIAMAAAAQACAOAADWAQAgbgEAjQEAIQFuAQCNAQAhAwAAACkAIBUAANIBACAWAADZAQAgCgAAACkAIAUAAKABACAOAADZAQAgVAEAjQEAIWUBAI0BACFmAQCNAQAhZwEAjQEAIWggAJ0BACFpQACeAQAhakAAngEAIQgFAACgAQAgVAEAjQEAIWUBAI0BACFmAQCNAQAhZwEAjQEAIWggAJ0BACFpQACeAQAhakAAngEAIQgDAAC5AQAgVAEAAAABZQEAAAABZgEAAAABZwEAAAABaCAAAAABaUAAAAABakAAAAABAgAAACYAIBUAANoBACADAAAAKQAgFQAA2gEAIBYAAN4BACAKAAAAKQAgAwAAnwEAIA4AAN4BACBUAQCNAQAhZQEAjQEAIWYBAI0BACFnAQCNAQAhaCAAnQEAIWlAAJ4BACFqQACeAQAhCAMAAJ8BACBUAQCNAQAhZQEAjQEAIWYBAI0BACFnAQCNAQAhaCAAnQEAIWlAAJ4BACFqQACeAQAhAgYABggGAgIEAAMHAAEDAwcCBQsEBgAFAQQAAwIDDAAFDQABCA4AAAAAAwYACxsADBwADQAAAAMGAAsbAAwcAA0AAAMGABIbABMcABQAAAADBgASGwATHAAUAgQAAwcAAQIEAAMHAAEFBgAZGwAcHAAdPQAaPgAbAAAAAAAFBgAZGwAcHAAdPQAaPgAbAQQAAwEEAAMFBgAiGwAlHAAmPQAjPgAkAAAAAAAFBgAiGwAlHAAmPQAjPgAkCQIBCg8BCxIBDBMBDRQBDxYBEBgHERkIEhsBEx0HFB4JFx8BGCABGSEHHSQKHiUOHycDICgDISsDIiwDIy0DJC8DJTEHJjIPJzQDKDYHKTcQKjgDKzkDLDoHLT0RLj4VLz8CMEACMUECMkICM0MCNEUCNUcHNkgWN0oCOEwHOU0XOk4CO08CPFAHP1MYQFQeQVUEQlYEQ1cERFgERVkERlsER10HSF4fSWAESmIHS2MgTGQETWUETmYHT2khUGon" +} + +async function decodeBase64AsWasm(wasmBase64: string): Promise { + const { Buffer } = await import('node:buffer') + const wasmArray = Buffer.from(wasmBase64, 'base64') + return new WebAssembly.Module(wasmArray) +} + +config.compilerWasm = { + getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.mjs"), + + getQueryCompilerWasmModule: async () => { + const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.mjs") + return await decodeBase64AsWasm(wasm) + }, + + importName: "./query_compiler_fast_bg.js" +} + + + +export type LogOptions = + 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never + +export interface PrismaClientConstructor { + /** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) + * }) + * // Fetch zero or more States + * const states = await prisma.state.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + + new < + Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + LogOpts extends LogOptions = LogOptions, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs + >(options: Prisma.Subset ): PrismaClient +} + +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) + * }) + * // Fetch zero or more States + * const states = await prisma.state.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + +export interface PrismaClient< + in LogOpts extends Prisma.LogLevel = never, + in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined, + in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): runtime.Types.Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): runtime.Types.Utils.JsPromise; + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions). + */ + $transaction

[]>(arg: [...P], options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise + + $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, runtime.Types.Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.state`: Exposes CRUD operations for the **State** model. + * Example usage: + * ```ts + * // Fetch zero or more States + * const states = await prisma.state.findMany() + * ``` + */ + get state(): Prisma.StateDelegate; + + /** + * `prisma.task`: Exposes CRUD operations for the **Task** model. + * Example usage: + * ```ts + * // Fetch zero or more Tasks + * const tasks = await prisma.task.findMany() + * ``` + */ + get task(): Prisma.TaskDelegate; + + /** + * `prisma.stateHistory`: Exposes CRUD operations for the **StateHistory** model. + * Example usage: + * ```ts + * // Fetch zero or more StateHistories + * const stateHistories = await prisma.stateHistory.findMany() + * ``` + */ + get stateHistory(): Prisma.StateHistoryDelegate; + + /** + * `prisma.note`: Exposes CRUD operations for the **Note** model. + * Example usage: + * ```ts + * // Fetch zero or more Notes + * const notes = await prisma.note.findMany() + * ``` + */ + get note(): Prisma.NoteDelegate; +} + +export function getPrismaClientClass(): PrismaClientConstructor { + return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor +} diff --git a/src/generated/prisma/internal/prismaNamespace.ts b/src/generated/prisma/internal/prismaNamespace.ts new file mode 100644 index 0000000..8d677fc --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -0,0 +1,1046 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "../models" +import { type PrismaClient } from "./class" + +export type * from '../models' + +export type DMMF = typeof runtime.DMMF + +export type PrismaPromise = runtime.Types.Public.PrismaPromise + +/** + * Prisma Errors + */ + +export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError +export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + +export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError +export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + +export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError +export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + +export const PrismaClientInitializationError = runtime.PrismaClientInitializationError +export type PrismaClientInitializationError = runtime.PrismaClientInitializationError + +export const PrismaClientValidationError = runtime.PrismaClientValidationError +export type PrismaClientValidationError = runtime.PrismaClientValidationError + +/** + * Re-export of sql-template-tag + */ +export const sql = runtime.sqltag +export const empty = runtime.empty +export const join = runtime.join +export const raw = runtime.raw +export const Sql = runtime.Sql +export type Sql = runtime.Sql + + + +/** + * Decimal.js + */ +export const Decimal = runtime.Decimal +export type Decimal = runtime.Decimal + +export type DecimalJsLike = runtime.DecimalJsLike + +/** +* Extensions +*/ +export type Extension = runtime.Types.Extensions.UserArgs +export const getExtensionContext = runtime.Extensions.getExtensionContext +export type Args = runtime.Types.Public.Args +export type Payload = runtime.Types.Public.Payload +export type Result = runtime.Types.Public.Result +export type Exact = runtime.Types.Public.Exact + +export type PrismaVersion = { + client: string + engine: string +} + +/** + * Prisma Client JS version: 7.8.0 + * Query Engine version: 3c6e192761c0362d496ed980de936e2f3cebcd3a + */ +export const prismaVersion: PrismaVersion = { + client: "7.8.0", + engine: "3c6e192761c0362d496ed980de936e2f3cebcd3a" +} + +/** + * Utility Types + */ + +export type Bytes = runtime.Bytes +export type JsonObject = runtime.JsonObject +export type JsonArray = runtime.JsonArray +export type JsonValue = runtime.JsonValue +export type InputJsonObject = runtime.InputJsonObject +export type InputJsonArray = runtime.InputJsonArray +export type InputJsonValue = runtime.InputJsonValue + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const DbNull = runtime.DbNull + +/** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const JsonNull = runtime.JsonNull + +/** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const AnyNull = runtime.AnyNull + + +type SelectAndInclude = { + select: any + include: any +} + +type SelectAndOmit = { + select: any + omit: any +} + +/** + * From T, pick a set of properties whose keys are in the union K + */ +type Prisma__Pick = { + [P in K]: T[P]; +}; + +export type Enumerable = T | Array; + +/** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ +export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; +}; + +/** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ +export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + +/** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ +export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + K + +type Without = { [P in Exclude]?: never }; + +/** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ +export type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + +/** + * Is T a Record? + */ +type IsObject = T extends Array +? False +: T extends Date +? False +: T extends Uint8Array +? False +: T extends BigInt +? False +: T extends object +? True +: False + + +/** + * If it's T[], return T + */ +export type UnEnumerate = T extends Array ? U : T + +/** + * From ts-toolbelt + */ + +type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + +type EitherStrict = Strict<__Either> + +type EitherLoose = ComputeRaw<__Either> + +type _Either< + O extends object, + K extends Key, + strict extends Boolean +> = { + 1: EitherStrict + 0: EitherLoose +}[strict] + +export type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 +> = O extends unknown ? _Either : never + +export type Union = any + +export type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] +} & {} + +/** Helper Types for "Merge" **/ +export type IntersectOf = ( + U extends unknown ? (k: U) => void : never +) extends (k: infer I) => void + ? I + : never + +export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; +} & {}; + +type _Merge = IntersectOf; +}>>; + +type Key = string | number | symbol; +type AtStrict = O[K & keyof O]; +type AtLoose = O extends unknown ? AtStrict : never; +export type At = { + 1: AtStrict; + 0: AtLoose; +}[strict]; + +export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; +} & {}; + +export type OptionalFlat = { + [K in keyof O]?: O[K]; +} & {}; + +type _Record = { + [P in K]: T; +}; + +// cause typescript not to expand types and preserve names +type NoExpand = T extends unknown ? T : never; + +// this type assumes the passed object is entirely optional +export type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O + : never>; + +type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + +export type Strict = ComputeRaw<_Strict>; +/** End Helper Types for "Merge" **/ + +export type Merge = ComputeRaw<_Merge>>; + +export type Boolean = True | False + +export type True = 1 + +export type False = 0 + +export type Not = { + 0: 1 + 1: 0 +}[B] + +export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + +export type Has = Not< + Extends, U1> +> + +export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } +}[B1][B2] + +export type Keys = U extends unknown ? keyof U : never + +export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never +} : never + +type FieldPaths< + T, + U = Omit +> = IsObject extends True ? U : T + +export type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K +}[keyof T] + +/** + * Convert tuple to union + */ +type _TupleToUnion = T extends (infer E)[] ? E : never +type TupleToUnion = _TupleToUnion +export type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + +/** + * Like `Pick`, but additionally can also accept an array of keys + */ +export type PickEnumerable | keyof T> = Prisma__Pick> + +/** + * Exclude all keys with underscores + */ +export type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + +export type FieldRef = runtime.FieldRef + +type FieldRefInputType = Model extends never ? never : FieldRef + + +export const ModelName = { + State: 'State', + Task: 'Task', + StateHistory: 'StateHistory', + Note: 'Note' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + +export interface TypeMapCb extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record> { + returns: TypeMap +} + +export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "state" | "task" | "stateHistory" | "note" + txIsolationLevel: TransactionIsolationLevel + } + model: { + State: { + payload: Prisma.$StatePayload + fields: Prisma.StateFieldRefs + operations: { + findUnique: { + args: Prisma.StateFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.StateFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.StateFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.StateFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.StateFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.StateCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.StateCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.StateCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.StateDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.StateUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.StateDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.StateUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.StateUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.StateUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.StateAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.StateGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.StateCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Task: { + payload: Prisma.$TaskPayload + fields: Prisma.TaskFieldRefs + operations: { + findUnique: { + args: Prisma.TaskFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.TaskFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.TaskFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.TaskFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.TaskFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.TaskCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.TaskCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.TaskCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.TaskDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.TaskUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.TaskDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.TaskUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.TaskUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.TaskUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.TaskAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.TaskGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.TaskCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + StateHistory: { + payload: Prisma.$StateHistoryPayload + fields: Prisma.StateHistoryFieldRefs + operations: { + findUnique: { + args: Prisma.StateHistoryFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.StateHistoryFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.StateHistoryFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.StateHistoryFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.StateHistoryFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.StateHistoryCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.StateHistoryCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.StateHistoryCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.StateHistoryDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.StateHistoryUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.StateHistoryDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.StateHistoryUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.StateHistoryUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.StateHistoryUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.StateHistoryAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.StateHistoryGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.StateHistoryCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Note: { + payload: Prisma.$NotePayload + fields: Prisma.NoteFieldRefs + operations: { + findUnique: { + args: Prisma.NoteFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.NoteFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.NoteFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.NoteFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.NoteFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.NoteCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.NoteCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.NoteCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.NoteDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.NoteUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.NoteDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.NoteUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.NoteUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.NoteUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.NoteAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.NoteGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.NoteCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + } +} & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } +} + +/** + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const StateScalarFieldEnum = { + name: 'name' +} as const + +export type StateScalarFieldEnum = (typeof StateScalarFieldEnum)[keyof typeof StateScalarFieldEnum] + + +export const TaskScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + dueDate: 'dueDate', + completed: 'completed', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type TaskScalarFieldEnum = (typeof TaskScalarFieldEnum)[keyof typeof TaskScalarFieldEnum] + + +export const StateHistoryScalarFieldEnum = { + id: 'id', + state: 'state', + date: 'date', + taskId: 'taskId', + order: 'order' +} as const + +export type StateHistoryScalarFieldEnum = (typeof StateHistoryScalarFieldEnum)[keyof typeof StateHistoryScalarFieldEnum] + + +export const NoteScalarFieldEnum = { + id: 'id', + content: 'content', + taskId: 'taskId', + order: 'order' +} as const + +export type NoteScalarFieldEnum = (typeof NoteScalarFieldEnum)[keyof typeof NoteScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + +/** + * Field references + */ + + +/** + * Reference to a field of type 'String' + */ +export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + +/** + * Reference to a field of type 'String[]' + */ +export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + +/** + * Reference to a field of type 'Boolean' + */ +export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + +/** + * Reference to a field of type 'DateTime' + */ +export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + +/** + * Reference to a field of type 'DateTime[]' + */ +export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + +/** + * Reference to a field of type 'Int' + */ +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + +/** + * Reference to a field of type 'Int[]' + */ +export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + +/** + * Reference to a field of type 'Float' + */ +export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + +/** + * Reference to a field of type 'Float[]' + */ +export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ +export type BatchPayload = { + count: number +} + +export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs> +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +export type PrismaClientOptions = ({ + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. + */ + adapter: runtime.SqlDriverAdapterFactory + accelerateUrl?: never +} | { + /** + * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. + */ + accelerateUrl: string + adapter?: never +}) & { + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://pris.ly/d/logging). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: TransactionIsolationLevel + } + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: GlobalOmitConfig + /** + * SQL commenter plugins that add metadata to SQL queries as comments. + * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/ + * + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter, + * comments: [ + * traceContext(), + * queryInsights(), + * ], + * }) + * ``` + */ + comments?: runtime.SqlCommenterPlugin[] + /** + * Optional maximum size for the query plan cache. If not provided, a default size will be used. + * A value of `0` can be used to disable the cache entirely. A higher cache size can improve + * performance for applications that execute a large number of unique queries, while a smaller + * cache size can reduce memory usage. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter, + * queryPlanCacheMaxSize: 100, + * }) + * ``` + */ + queryPlanCacheMaxSize?: number +} +export type GlobalOmitConfig = { + state?: Prisma.StateOmit + task?: Prisma.TaskOmit + stateHistory?: Prisma.StateHistoryOmit + note?: Prisma.NoteOmit +} + +/* Types for Logging */ +export type LogLevel = 'info' | 'query' | 'warn' | 'error' +export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' +} + +export type CheckIsLogLevel = T extends LogLevel ? T : never; + +export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T +>; + +export type GetEvents = T extends Array + ? GetLogType + : never; + +export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string +} + +export type LogEvent = { + timestamp: Date + message: string + target: string +} +/* End Types for Logging */ + + +export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + +/** + * `PrismaClient` proxy available in interactive transactions. + */ +export type TransactionClient = Omit + diff --git a/src/generated/prisma/internal/prismaNamespaceBrowser.ts b/src/generated/prisma/internal/prismaNamespaceBrowser.ts new file mode 100644 index 0000000..c98bbd8 --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -0,0 +1,131 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/index-browser" + +export type * from '../models' +export type * from './prismaNamespace' + +export const Decimal = runtime.Decimal + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const DbNull = runtime.DbNull + +/** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const JsonNull = runtime.JsonNull + +/** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const AnyNull = runtime.AnyNull + + +export const ModelName = { + State: 'State', + Task: 'Task', + StateHistory: 'StateHistory', + Note: 'Note' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + +/* + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const StateScalarFieldEnum = { + name: 'name' +} as const + +export type StateScalarFieldEnum = (typeof StateScalarFieldEnum)[keyof typeof StateScalarFieldEnum] + + +export const TaskScalarFieldEnum = { + id: 'id', + title: 'title', + description: 'description', + dueDate: 'dueDate', + completed: 'completed', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type TaskScalarFieldEnum = (typeof TaskScalarFieldEnum)[keyof typeof TaskScalarFieldEnum] + + +export const StateHistoryScalarFieldEnum = { + id: 'id', + state: 'state', + date: 'date', + taskId: 'taskId', + order: 'order' +} as const + +export type StateHistoryScalarFieldEnum = (typeof StateHistoryScalarFieldEnum)[keyof typeof StateHistoryScalarFieldEnum] + + +export const NoteScalarFieldEnum = { + id: 'id', + content: 'content', + taskId: 'taskId', + order: 'order' +} as const + +export type NoteScalarFieldEnum = (typeof NoteScalarFieldEnum)[keyof typeof NoteScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + diff --git a/src/generated/prisma/models.ts b/src/generated/prisma/models.ts new file mode 100644 index 0000000..c44db36 --- /dev/null +++ b/src/generated/prisma/models.ts @@ -0,0 +1,15 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This is a barrel export file for all models and their related types. + * + * 🟢 You can import this file directly. + */ +export type * from './models/State' +export type * from './models/Task' +export type * from './models/StateHistory' +export type * from './models/Note' +export type * from './commonInputTypes' \ No newline at end of file diff --git a/src/generated/prisma/models/Note.ts b/src/generated/prisma/models/Note.ts new file mode 100644 index 0000000..ce1f434 --- /dev/null +++ b/src/generated/prisma/models/Note.ts @@ -0,0 +1,1354 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Note` 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" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Note + * + */ +export type NoteModel = runtime.Types.Result.DefaultSelection + +export type AggregateNote = { + _count: NoteCountAggregateOutputType | null + _avg: NoteAvgAggregateOutputType | null + _sum: NoteSumAggregateOutputType | null + _min: NoteMinAggregateOutputType | null + _max: NoteMaxAggregateOutputType | null +} + +export type NoteAvgAggregateOutputType = { + order: number | null +} + +export type NoteSumAggregateOutputType = { + order: number | null +} + +export type NoteMinAggregateOutputType = { + id: string | null + content: string | null + taskId: string | null + order: number | null +} + +export type NoteMaxAggregateOutputType = { + id: string | null + content: string | null + taskId: string | null + order: number | null +} + +export type NoteCountAggregateOutputType = { + id: number + content: number + taskId: number + order: number + _all: number +} + + +export type NoteAvgAggregateInputType = { + order?: true +} + +export type NoteSumAggregateInputType = { + order?: true +} + +export type NoteMinAggregateInputType = { + id?: true + content?: true + taskId?: true + order?: true +} + +export type NoteMaxAggregateInputType = { + id?: true + content?: true + taskId?: true + order?: true +} + +export type NoteCountAggregateInputType = { + id?: true + content?: true + taskId?: true + order?: true + _all?: true +} + +export type NoteAggregateArgs = { + /** + * Filter which Note to aggregate. + */ + where?: Prisma.NoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Notes to fetch. + */ + orderBy?: Prisma.NoteOrderByWithRelationInput | Prisma.NoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.NoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Notes 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` Notes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Notes + **/ + _count?: true | NoteCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: NoteAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: NoteSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: NoteMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: NoteMaxAggregateInputType +} + +export type GetNoteAggregateType = { + [P in keyof T & keyof AggregateNote]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type NoteGroupByArgs = { + where?: Prisma.NoteWhereInput + orderBy?: Prisma.NoteOrderByWithAggregationInput | Prisma.NoteOrderByWithAggregationInput[] + by: Prisma.NoteScalarFieldEnum[] | Prisma.NoteScalarFieldEnum + having?: Prisma.NoteScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: NoteCountAggregateInputType | true + _avg?: NoteAvgAggregateInputType + _sum?: NoteSumAggregateInputType + _min?: NoteMinAggregateInputType + _max?: NoteMaxAggregateInputType +} + +export type NoteGroupByOutputType = { + id: string + content: string + taskId: string + order: number + _count: NoteCountAggregateOutputType | null + _avg: NoteAvgAggregateOutputType | null + _sum: NoteSumAggregateOutputType | null + _min: NoteMinAggregateOutputType | null + _max: NoteMaxAggregateOutputType | null +} + +export type GetNoteGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof NoteGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type NoteWhereInput = { + AND?: Prisma.NoteWhereInput | Prisma.NoteWhereInput[] + OR?: Prisma.NoteWhereInput[] + NOT?: Prisma.NoteWhereInput | Prisma.NoteWhereInput[] + id?: Prisma.StringFilter<"Note"> | string + content?: Prisma.StringFilter<"Note"> | string + taskId?: Prisma.StringFilter<"Note"> | string + order?: Prisma.IntFilter<"Note"> | number + task?: Prisma.XOR +} + +export type NoteOrderByWithRelationInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder + task?: Prisma.TaskOrderByWithRelationInput +} + +export type NoteWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.NoteWhereInput | Prisma.NoteWhereInput[] + OR?: Prisma.NoteWhereInput[] + NOT?: Prisma.NoteWhereInput | Prisma.NoteWhereInput[] + content?: Prisma.StringFilter<"Note"> | string + taskId?: Prisma.StringFilter<"Note"> | string + order?: Prisma.IntFilter<"Note"> | number + task?: Prisma.XOR +}, "id"> + +export type NoteOrderByWithAggregationInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder + _count?: Prisma.NoteCountOrderByAggregateInput + _avg?: Prisma.NoteAvgOrderByAggregateInput + _max?: Prisma.NoteMaxOrderByAggregateInput + _min?: Prisma.NoteMinOrderByAggregateInput + _sum?: Prisma.NoteSumOrderByAggregateInput +} + +export type NoteScalarWhereWithAggregatesInput = { + AND?: Prisma.NoteScalarWhereWithAggregatesInput | Prisma.NoteScalarWhereWithAggregatesInput[] + OR?: Prisma.NoteScalarWhereWithAggregatesInput[] + NOT?: Prisma.NoteScalarWhereWithAggregatesInput | Prisma.NoteScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"Note"> | string + content?: Prisma.StringWithAggregatesFilter<"Note"> | string + taskId?: Prisma.StringWithAggregatesFilter<"Note"> | string + order?: Prisma.IntWithAggregatesFilter<"Note"> | number +} + +export type NoteCreateInput = { + id?: string + content: string + order: number + task: Prisma.TaskCreateNestedOneWithoutNotesInput +} + +export type NoteUncheckedCreateInput = { + id?: string + content: string + taskId: string + order: number +} + +export type NoteUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number + task?: Prisma.TaskUpdateOneRequiredWithoutNotesNestedInput +} + +export type NoteUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + taskId?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type NoteCreateManyInput = { + id?: string + content: string + taskId: string + order: number +} + +export type NoteUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type NoteUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + taskId?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type NoteListRelationFilter = { + every?: Prisma.NoteWhereInput + some?: Prisma.NoteWhereInput + none?: Prisma.NoteWhereInput +} + +export type NoteOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type NoteCountOrderByAggregateInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder +} + +export type NoteAvgOrderByAggregateInput = { + order?: Prisma.SortOrder +} + +export type NoteMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder +} + +export type NoteMinOrderByAggregateInput = { + id?: Prisma.SortOrder + content?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder +} + +export type NoteSumOrderByAggregateInput = { + order?: Prisma.SortOrder +} + +export type NoteCreateNestedManyWithoutTaskInput = { + create?: Prisma.XOR | Prisma.NoteCreateWithoutTaskInput[] | Prisma.NoteUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.NoteCreateOrConnectWithoutTaskInput | Prisma.NoteCreateOrConnectWithoutTaskInput[] + createMany?: Prisma.NoteCreateManyTaskInputEnvelope + connect?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] +} + +export type NoteUncheckedCreateNestedManyWithoutTaskInput = { + create?: Prisma.XOR | Prisma.NoteCreateWithoutTaskInput[] | Prisma.NoteUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.NoteCreateOrConnectWithoutTaskInput | Prisma.NoteCreateOrConnectWithoutTaskInput[] + createMany?: Prisma.NoteCreateManyTaskInputEnvelope + connect?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] +} + +export type NoteUpdateManyWithoutTaskNestedInput = { + create?: Prisma.XOR | Prisma.NoteCreateWithoutTaskInput[] | Prisma.NoteUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.NoteCreateOrConnectWithoutTaskInput | Prisma.NoteCreateOrConnectWithoutTaskInput[] + upsert?: Prisma.NoteUpsertWithWhereUniqueWithoutTaskInput | Prisma.NoteUpsertWithWhereUniqueWithoutTaskInput[] + createMany?: Prisma.NoteCreateManyTaskInputEnvelope + set?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + disconnect?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + delete?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + connect?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + update?: Prisma.NoteUpdateWithWhereUniqueWithoutTaskInput | Prisma.NoteUpdateWithWhereUniqueWithoutTaskInput[] + updateMany?: Prisma.NoteUpdateManyWithWhereWithoutTaskInput | Prisma.NoteUpdateManyWithWhereWithoutTaskInput[] + deleteMany?: Prisma.NoteScalarWhereInput | Prisma.NoteScalarWhereInput[] +} + +export type NoteUncheckedUpdateManyWithoutTaskNestedInput = { + create?: Prisma.XOR | Prisma.NoteCreateWithoutTaskInput[] | Prisma.NoteUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.NoteCreateOrConnectWithoutTaskInput | Prisma.NoteCreateOrConnectWithoutTaskInput[] + upsert?: Prisma.NoteUpsertWithWhereUniqueWithoutTaskInput | Prisma.NoteUpsertWithWhereUniqueWithoutTaskInput[] + createMany?: Prisma.NoteCreateManyTaskInputEnvelope + set?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + disconnect?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + delete?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + connect?: Prisma.NoteWhereUniqueInput | Prisma.NoteWhereUniqueInput[] + update?: Prisma.NoteUpdateWithWhereUniqueWithoutTaskInput | Prisma.NoteUpdateWithWhereUniqueWithoutTaskInput[] + updateMany?: Prisma.NoteUpdateManyWithWhereWithoutTaskInput | Prisma.NoteUpdateManyWithWhereWithoutTaskInput[] + deleteMany?: Prisma.NoteScalarWhereInput | Prisma.NoteScalarWhereInput[] +} + +export type NoteCreateWithoutTaskInput = { + id?: string + content: string + order: number +} + +export type NoteUncheckedCreateWithoutTaskInput = { + id?: string + content: string + order: number +} + +export type NoteCreateOrConnectWithoutTaskInput = { + where: Prisma.NoteWhereUniqueInput + create: Prisma.XOR +} + +export type NoteCreateManyTaskInputEnvelope = { + data: Prisma.NoteCreateManyTaskInput | Prisma.NoteCreateManyTaskInput[] + skipDuplicates?: boolean +} + +export type NoteUpsertWithWhereUniqueWithoutTaskInput = { + where: Prisma.NoteWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type NoteUpdateWithWhereUniqueWithoutTaskInput = { + where: Prisma.NoteWhereUniqueInput + data: Prisma.XOR +} + +export type NoteUpdateManyWithWhereWithoutTaskInput = { + where: Prisma.NoteScalarWhereInput + data: Prisma.XOR +} + +export type NoteScalarWhereInput = { + AND?: Prisma.NoteScalarWhereInput | Prisma.NoteScalarWhereInput[] + OR?: Prisma.NoteScalarWhereInput[] + NOT?: Prisma.NoteScalarWhereInput | Prisma.NoteScalarWhereInput[] + id?: Prisma.StringFilter<"Note"> | string + content?: Prisma.StringFilter<"Note"> | string + taskId?: Prisma.StringFilter<"Note"> | string + order?: Prisma.IntFilter<"Note"> | number +} + +export type NoteCreateManyTaskInput = { + id?: string + content: string + order: number +} + +export type NoteUpdateWithoutTaskInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type NoteUncheckedUpdateWithoutTaskInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type NoteUncheckedUpdateManyWithoutTaskInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + + + +export type NoteSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + content?: boolean + taskId?: boolean + order?: boolean + task?: boolean | Prisma.TaskDefaultArgs +}, ExtArgs["result"]["note"]> + +export type NoteSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + content?: boolean + taskId?: boolean + order?: boolean + task?: boolean | Prisma.TaskDefaultArgs +}, ExtArgs["result"]["note"]> + +export type NoteSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + content?: boolean + taskId?: boolean + order?: boolean + task?: boolean | Prisma.TaskDefaultArgs +}, ExtArgs["result"]["note"]> + +export type NoteSelectScalar = { + id?: boolean + content?: boolean + taskId?: boolean + order?: boolean +} + +export type NoteOmit = runtime.Types.Extensions.GetOmit<"id" | "content" | "taskId" | "order", ExtArgs["result"]["note"]> +export type NoteInclude = { + task?: boolean | Prisma.TaskDefaultArgs +} +export type NoteIncludeCreateManyAndReturn = { + task?: boolean | Prisma.TaskDefaultArgs +} +export type NoteIncludeUpdateManyAndReturn = { + task?: boolean | Prisma.TaskDefaultArgs +} + +export type $NotePayload = { + name: "Note" + objects: { + task: Prisma.$TaskPayload + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + content: string + taskId: string + order: number + }, ExtArgs["result"]["note"]> + composites: {} +} + +export type NoteGetPayload = runtime.Types.Result.GetResult + +export type NoteCountArgs = + Omit & { + select?: NoteCountAggregateInputType | true + } + +export interface NoteDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Note'], meta: { name: 'Note' } } + /** + * Find zero or one Note that matches the filter. + * @param {NoteFindUniqueArgs} args - Arguments to find a Note + * @example + * // Get one Note + * const note = await prisma.note.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Note that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {NoteFindUniqueOrThrowArgs} args - Arguments to find a Note + * @example + * // Get one Note + * const note = await prisma.note.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Note 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 {NoteFindFirstArgs} args - Arguments to find a Note + * @example + * // Get one Note + * const note = await prisma.note.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Note 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 {NoteFindFirstOrThrowArgs} args - Arguments to find a Note + * @example + * // Get one Note + * const note = await prisma.note.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Notes 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 {NoteFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Notes + * const notes = await prisma.note.findMany() + * + * // Get first 10 Notes + * const notes = await prisma.note.findMany({ take: 10 }) + * + * // Only select the `id` + * const noteWithIdOnly = await prisma.note.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Note. + * @param {NoteCreateArgs} args - Arguments to create a Note. + * @example + * // Create one Note + * const Note = await prisma.note.create({ + * data: { + * // ... data to create a Note + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Notes. + * @param {NoteCreateManyArgs} args - Arguments to create many Notes. + * @example + * // Create many Notes + * const note = await prisma.note.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Notes and returns the data saved in the database. + * @param {NoteCreateManyAndReturnArgs} args - Arguments to create many Notes. + * @example + * // Create many Notes + * const note = await prisma.note.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Notes and only return the `id` + * const noteWithIdOnly = await prisma.note.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 Note. + * @param {NoteDeleteArgs} args - Arguments to delete one Note. + * @example + * // Delete one Note + * const Note = await prisma.note.delete({ + * where: { + * // ... filter to delete one Note + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Note. + * @param {NoteUpdateArgs} args - Arguments to update one Note. + * @example + * // Update one Note + * const note = await prisma.note.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Notes. + * @param {NoteDeleteManyArgs} args - Arguments to filter Notes to delete. + * @example + * // Delete a few Notes + * const { count } = await prisma.note.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Notes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Notes + * const note = await prisma.note.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Notes and returns the data updated in the database. + * @param {NoteUpdateManyAndReturnArgs} args - Arguments to update many Notes. + * @example + * // Update many Notes + * const note = await prisma.note.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Notes and only return the `id` + * const noteWithIdOnly = await prisma.note.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 Note. + * @param {NoteUpsertArgs} args - Arguments to update or create a Note. + * @example + * // Update or create a Note + * const note = await prisma.note.upsert({ + * create: { + * // ... data to create a Note + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Note we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__NoteClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Notes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteCountArgs} args - Arguments to filter Notes to count. + * @example + * // Count the number of Notes + * const count = await prisma.note.count({ + * where: { + * // ... the filter for the Notes 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 Note. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteAggregateArgs} 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 Note. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {NoteGroupByArgs} 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 NoteGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: NoteGroupByArgs['orderBy'] } + : { orderBy?: NoteGroupByArgs['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 ? GetNoteGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Note model + */ +readonly fields: NoteFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Note. + * 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__NoteClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + task = {}>(args?: Prisma.Subset>): Prisma.Prisma__TaskClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * 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 Note model + */ +export interface NoteFieldRefs { + readonly id: Prisma.FieldRef<"Note", 'String'> + readonly content: Prisma.FieldRef<"Note", 'String'> + readonly taskId: Prisma.FieldRef<"Note", 'String'> + readonly order: Prisma.FieldRef<"Note", 'Int'> +} + + +// Custom InputTypes +/** + * Note findUnique + */ +export type NoteFindUniqueArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where: Prisma.NoteWhereUniqueInput +} + +/** + * Note findUniqueOrThrow + */ +export type NoteFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where: Prisma.NoteWhereUniqueInput +} + +/** + * Note findFirst + */ +export type NoteFindFirstArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where?: Prisma.NoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Notes to fetch. + */ + orderBy?: Prisma.NoteOrderByWithRelationInput | Prisma.NoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Notes. + */ + cursor?: Prisma.NoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Notes 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` Notes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Notes. + */ + distinct?: Prisma.NoteScalarFieldEnum | Prisma.NoteScalarFieldEnum[] +} + +/** + * Note findFirstOrThrow + */ +export type NoteFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * Filter, which Note to fetch. + */ + where?: Prisma.NoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Notes to fetch. + */ + orderBy?: Prisma.NoteOrderByWithRelationInput | Prisma.NoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Notes. + */ + cursor?: Prisma.NoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Notes 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` Notes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Notes. + */ + distinct?: Prisma.NoteScalarFieldEnum | Prisma.NoteScalarFieldEnum[] +} + +/** + * Note findMany + */ +export type NoteFindManyArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * Filter, which Notes to fetch. + */ + where?: Prisma.NoteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Notes to fetch. + */ + orderBy?: Prisma.NoteOrderByWithRelationInput | Prisma.NoteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Notes. + */ + cursor?: Prisma.NoteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Notes 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` Notes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Notes. + */ + distinct?: Prisma.NoteScalarFieldEnum | Prisma.NoteScalarFieldEnum[] +} + +/** + * Note create + */ +export type NoteCreateArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * The data needed to create a Note. + */ + data: Prisma.XOR +} + +/** + * Note createMany + */ +export type NoteCreateManyArgs = { + /** + * The data used to create many Notes. + */ + data: Prisma.NoteCreateManyInput | Prisma.NoteCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Note createManyAndReturn + */ +export type NoteCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * The data used to create many Notes. + */ + data: Prisma.NoteCreateManyInput | Prisma.NoteCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteIncludeCreateManyAndReturn | null +} + +/** + * Note update + */ +export type NoteUpdateArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * The data needed to update a Note. + */ + data: Prisma.XOR + /** + * Choose, which Note to update. + */ + where: Prisma.NoteWhereUniqueInput +} + +/** + * Note updateMany + */ +export type NoteUpdateManyArgs = { + /** + * The data used to update Notes. + */ + data: Prisma.XOR + /** + * Filter which Notes to update + */ + where?: Prisma.NoteWhereInput + /** + * Limit how many Notes to update. + */ + limit?: number +} + +/** + * Note updateManyAndReturn + */ +export type NoteUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * The data used to update Notes. + */ + data: Prisma.XOR + /** + * Filter which Notes to update + */ + where?: Prisma.NoteWhereInput + /** + * Limit how many Notes to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteIncludeUpdateManyAndReturn | null +} + +/** + * Note upsert + */ +export type NoteUpsertArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * The filter to search for the Note to update in case it exists. + */ + where: Prisma.NoteWhereUniqueInput + /** + * In case the Note found by the `where` argument doesn't exist, create a new Note with this data. + */ + create: Prisma.XOR + /** + * In case the Note was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Note delete + */ +export type NoteDeleteArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + /** + * Filter which Note to delete. + */ + where: Prisma.NoteWhereUniqueInput +} + +/** + * Note deleteMany + */ +export type NoteDeleteManyArgs = { + /** + * Filter which Notes to delete + */ + where?: Prisma.NoteWhereInput + /** + * Limit how many Notes to delete. + */ + limit?: number +} + +/** + * Note without action + */ +export type NoteDefaultArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null +} diff --git a/src/generated/prisma/models/State.ts b/src/generated/prisma/models/State.ts new file mode 100644 index 0000000..959eaec --- /dev/null +++ b/src/generated/prisma/models/State.ts @@ -0,0 +1,1203 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `State` 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" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model State + * + */ +export type StateModel = runtime.Types.Result.DefaultSelection + +export type AggregateState = { + _count: StateCountAggregateOutputType | null + _min: StateMinAggregateOutputType | null + _max: StateMaxAggregateOutputType | null +} + +export type StateMinAggregateOutputType = { + name: string | null +} + +export type StateMaxAggregateOutputType = { + name: string | null +} + +export type StateCountAggregateOutputType = { + name: number + _all: number +} + + +export type StateMinAggregateInputType = { + name?: true +} + +export type StateMaxAggregateInputType = { + name?: true +} + +export type StateCountAggregateInputType = { + name?: true + _all?: true +} + +export type StateAggregateArgs = { + /** + * Filter which State to aggregate. + */ + where?: Prisma.StateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of States to fetch. + */ + orderBy?: Prisma.StateOrderByWithRelationInput | Prisma.StateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.StateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` States 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` States. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned States + **/ + _count?: true | StateCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: StateMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: StateMaxAggregateInputType +} + +export type GetStateAggregateType = { + [P in keyof T & keyof AggregateState]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type StateGroupByArgs = { + where?: Prisma.StateWhereInput + orderBy?: Prisma.StateOrderByWithAggregationInput | Prisma.StateOrderByWithAggregationInput[] + by: Prisma.StateScalarFieldEnum[] | Prisma.StateScalarFieldEnum + having?: Prisma.StateScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: StateCountAggregateInputType | true + _min?: StateMinAggregateInputType + _max?: StateMaxAggregateInputType +} + +export type StateGroupByOutputType = { + name: string + _count: StateCountAggregateOutputType | null + _min: StateMinAggregateOutputType | null + _max: StateMaxAggregateOutputType | null +} + +export type GetStateGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof StateGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type StateWhereInput = { + AND?: Prisma.StateWhereInput | Prisma.StateWhereInput[] + OR?: Prisma.StateWhereInput[] + NOT?: Prisma.StateWhereInput | Prisma.StateWhereInput[] + name?: Prisma.StringFilter<"State"> | string + tasks?: Prisma.StateHistoryListRelationFilter +} + +export type StateOrderByWithRelationInput = { + name?: Prisma.SortOrder + tasks?: Prisma.StateHistoryOrderByRelationAggregateInput +} + +export type StateWhereUniqueInput = Prisma.AtLeast<{ + name?: string + AND?: Prisma.StateWhereInput | Prisma.StateWhereInput[] + OR?: Prisma.StateWhereInput[] + NOT?: Prisma.StateWhereInput | Prisma.StateWhereInput[] + tasks?: Prisma.StateHistoryListRelationFilter +}, "name"> + +export type StateOrderByWithAggregationInput = { + name?: Prisma.SortOrder + _count?: Prisma.StateCountOrderByAggregateInput + _max?: Prisma.StateMaxOrderByAggregateInput + _min?: Prisma.StateMinOrderByAggregateInput +} + +export type StateScalarWhereWithAggregatesInput = { + AND?: Prisma.StateScalarWhereWithAggregatesInput | Prisma.StateScalarWhereWithAggregatesInput[] + OR?: Prisma.StateScalarWhereWithAggregatesInput[] + NOT?: Prisma.StateScalarWhereWithAggregatesInput | Prisma.StateScalarWhereWithAggregatesInput[] + name?: Prisma.StringWithAggregatesFilter<"State"> | string +} + +export type StateCreateInput = { + name: string + tasks?: Prisma.StateHistoryCreateNestedManyWithoutStateRefInput +} + +export type StateUncheckedCreateInput = { + name: string + tasks?: Prisma.StateHistoryUncheckedCreateNestedManyWithoutStateRefInput +} + +export type StateUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + tasks?: Prisma.StateHistoryUpdateManyWithoutStateRefNestedInput +} + +export type StateUncheckedUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + tasks?: Prisma.StateHistoryUncheckedUpdateManyWithoutStateRefNestedInput +} + +export type StateCreateManyInput = { + name: string +} + +export type StateUpdateManyMutationInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type StateUncheckedUpdateManyInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type StateCountOrderByAggregateInput = { + name?: Prisma.SortOrder +} + +export type StateMaxOrderByAggregateInput = { + name?: Prisma.SortOrder +} + +export type StateMinOrderByAggregateInput = { + name?: Prisma.SortOrder +} + +export type StateScalarRelationFilter = { + is?: Prisma.StateWhereInput + isNot?: Prisma.StateWhereInput +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type StateCreateNestedOneWithoutTasksInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.StateCreateOrConnectWithoutTasksInput + connect?: Prisma.StateWhereUniqueInput +} + +export type StateUpdateOneRequiredWithoutTasksNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.StateCreateOrConnectWithoutTasksInput + upsert?: Prisma.StateUpsertWithoutTasksInput + connect?: Prisma.StateWhereUniqueInput + update?: Prisma.XOR, Prisma.StateUncheckedUpdateWithoutTasksInput> +} + +export type StateCreateWithoutTasksInput = { + name: string +} + +export type StateUncheckedCreateWithoutTasksInput = { + name: string +} + +export type StateCreateOrConnectWithoutTasksInput = { + where: Prisma.StateWhereUniqueInput + create: Prisma.XOR +} + +export type StateUpsertWithoutTasksInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.StateWhereInput +} + +export type StateUpdateToOneWithWhereWithoutTasksInput = { + where?: Prisma.StateWhereInput + data: Prisma.XOR +} + +export type StateUpdateWithoutTasksInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type StateUncheckedUpdateWithoutTasksInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string +} + + +/** + * Count Type StateCountOutputType + */ + +export type StateCountOutputType = { + tasks: number +} + +export type StateCountOutputTypeSelect = { + tasks?: boolean | StateCountOutputTypeCountTasksArgs +} + +/** + * StateCountOutputType without action + */ +export type StateCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the StateCountOutputType + */ + select?: Prisma.StateCountOutputTypeSelect | null +} + +/** + * StateCountOutputType without action + */ +export type StateCountOutputTypeCountTasksArgs = { + where?: Prisma.StateHistoryWhereInput +} + + +export type StateSelect = runtime.Types.Extensions.GetSelect<{ + name?: boolean + tasks?: boolean | Prisma.State$tasksArgs + _count?: boolean | Prisma.StateCountOutputTypeDefaultArgs +}, ExtArgs["result"]["state"]> + +export type StateSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + name?: boolean +}, ExtArgs["result"]["state"]> + +export type StateSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + name?: boolean +}, ExtArgs["result"]["state"]> + +export type StateSelectScalar = { + name?: boolean +} + +export type StateOmit = runtime.Types.Extensions.GetOmit<"name", ExtArgs["result"]["state"]> +export type StateInclude = { + tasks?: boolean | Prisma.State$tasksArgs + _count?: boolean | Prisma.StateCountOutputTypeDefaultArgs +} +export type StateIncludeCreateManyAndReturn = {} +export type StateIncludeUpdateManyAndReturn = {} + +export type $StatePayload = { + name: "State" + objects: { + tasks: Prisma.$StateHistoryPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + name: string + }, ExtArgs["result"]["state"]> + composites: {} +} + +export type StateGetPayload = runtime.Types.Result.GetResult + +export type StateCountArgs = + Omit & { + select?: StateCountAggregateInputType | true + } + +export interface StateDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['State'], meta: { name: 'State' } } + /** + * Find zero or one State that matches the filter. + * @param {StateFindUniqueArgs} args - Arguments to find a State + * @example + * // Get one State + * const state = await prisma.state.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one State that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {StateFindUniqueOrThrowArgs} args - Arguments to find a State + * @example + * // Get one State + * const state = await prisma.state.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first State 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 {StateFindFirstArgs} args - Arguments to find a State + * @example + * // Get one State + * const state = await prisma.state.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first State 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 {StateFindFirstOrThrowArgs} args - Arguments to find a State + * @example + * // Get one State + * const state = await prisma.state.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more States 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 {StateFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all States + * const states = await prisma.state.findMany() + * + * // Get first 10 States + * const states = await prisma.state.findMany({ take: 10 }) + * + * // Only select the `name` + * const stateWithNameOnly = await prisma.state.findMany({ select: { name: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a State. + * @param {StateCreateArgs} args - Arguments to create a State. + * @example + * // Create one State + * const State = await prisma.state.create({ + * data: { + * // ... data to create a State + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many States. + * @param {StateCreateManyArgs} args - Arguments to create many States. + * @example + * // Create many States + * const state = await prisma.state.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many States and returns the data saved in the database. + * @param {StateCreateManyAndReturnArgs} args - Arguments to create many States. + * @example + * // Create many States + * const state = await prisma.state.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many States and only return the `name` + * const stateWithNameOnly = await prisma.state.createManyAndReturn({ + * select: { name: 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 State. + * @param {StateDeleteArgs} args - Arguments to delete one State. + * @example + * // Delete one State + * const State = await prisma.state.delete({ + * where: { + * // ... filter to delete one State + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one State. + * @param {StateUpdateArgs} args - Arguments to update one State. + * @example + * // Update one State + * const state = await prisma.state.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more States. + * @param {StateDeleteManyArgs} args - Arguments to filter States to delete. + * @example + * // Delete a few States + * const { count } = await prisma.state.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more States. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many States + * const state = await prisma.state.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more States and returns the data updated in the database. + * @param {StateUpdateManyAndReturnArgs} args - Arguments to update many States. + * @example + * // Update many States + * const state = await prisma.state.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more States and only return the `name` + * const stateWithNameOnly = await prisma.state.updateManyAndReturn({ + * select: { name: 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 State. + * @param {StateUpsertArgs} args - Arguments to update or create a State. + * @example + * // Update or create a State + * const state = await prisma.state.upsert({ + * create: { + * // ... data to create a State + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the State we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__StateClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of States. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateCountArgs} args - Arguments to filter States to count. + * @example + * // Count the number of States + * const count = await prisma.state.count({ + * where: { + * // ... the filter for the States 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 State. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateAggregateArgs} 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 State. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateGroupByArgs} 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 StateGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: StateGroupByArgs['orderBy'] } + : { orderBy?: StateGroupByArgs['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 ? GetStateGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the State model + */ +readonly fields: StateFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for State. + * 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__StateClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + tasks = {}>(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 State model + */ +export interface StateFieldRefs { + readonly name: Prisma.FieldRef<"State", 'String'> +} + + +// Custom InputTypes +/** + * State findUnique + */ +export type StateFindUniqueArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * Filter, which State to fetch. + */ + where: Prisma.StateWhereUniqueInput +} + +/** + * State findUniqueOrThrow + */ +export type StateFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * Filter, which State to fetch. + */ + where: Prisma.StateWhereUniqueInput +} + +/** + * State findFirst + */ +export type StateFindFirstArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * Filter, which State to fetch. + */ + where?: Prisma.StateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of States to fetch. + */ + orderBy?: Prisma.StateOrderByWithRelationInput | Prisma.StateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for States. + */ + cursor?: Prisma.StateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` States 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` States. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of States. + */ + distinct?: Prisma.StateScalarFieldEnum | Prisma.StateScalarFieldEnum[] +} + +/** + * State findFirstOrThrow + */ +export type StateFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * Filter, which State to fetch. + */ + where?: Prisma.StateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of States to fetch. + */ + orderBy?: Prisma.StateOrderByWithRelationInput | Prisma.StateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for States. + */ + cursor?: Prisma.StateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` States 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` States. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of States. + */ + distinct?: Prisma.StateScalarFieldEnum | Prisma.StateScalarFieldEnum[] +} + +/** + * State findMany + */ +export type StateFindManyArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * Filter, which States to fetch. + */ + where?: Prisma.StateWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of States to fetch. + */ + orderBy?: Prisma.StateOrderByWithRelationInput | Prisma.StateOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing States. + */ + cursor?: Prisma.StateWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` States 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` States. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of States. + */ + distinct?: Prisma.StateScalarFieldEnum | Prisma.StateScalarFieldEnum[] +} + +/** + * State create + */ +export type StateCreateArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * The data needed to create a State. + */ + data: Prisma.XOR +} + +/** + * State createMany + */ +export type StateCreateManyArgs = { + /** + * The data used to create many States. + */ + data: Prisma.StateCreateManyInput | Prisma.StateCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * State createManyAndReturn + */ +export type StateCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelectCreateManyAndReturn | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * The data used to create many States. + */ + data: Prisma.StateCreateManyInput | Prisma.StateCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * State update + */ +export type StateUpdateArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * The data needed to update a State. + */ + data: Prisma.XOR + /** + * Choose, which State to update. + */ + where: Prisma.StateWhereUniqueInput +} + +/** + * State updateMany + */ +export type StateUpdateManyArgs = { + /** + * The data used to update States. + */ + data: Prisma.XOR + /** + * Filter which States to update + */ + where?: Prisma.StateWhereInput + /** + * Limit how many States to update. + */ + limit?: number +} + +/** + * State updateManyAndReturn + */ +export type StateUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * The data used to update States. + */ + data: Prisma.XOR + /** + * Filter which States to update + */ + where?: Prisma.StateWhereInput + /** + * Limit how many States to update. + */ + limit?: number +} + +/** + * State upsert + */ +export type StateUpsertArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * The filter to search for the State to update in case it exists. + */ + where: Prisma.StateWhereUniqueInput + /** + * In case the State found by the `where` argument doesn't exist, create a new State with this data. + */ + create: Prisma.XOR + /** + * In case the State was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * State delete + */ +export type StateDeleteArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null + /** + * Filter which State to delete. + */ + where: Prisma.StateWhereUniqueInput +} + +/** + * State deleteMany + */ +export type StateDeleteManyArgs = { + /** + * Filter which States to delete + */ + where?: Prisma.StateWhereInput + /** + * Limit how many States to delete. + */ + limit?: number +} + +/** + * State.tasks + */ +export type State$tasksArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + where?: Prisma.StateHistoryWhereInput + orderBy?: Prisma.StateHistoryOrderByWithRelationInput | Prisma.StateHistoryOrderByWithRelationInput[] + cursor?: Prisma.StateHistoryWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.StateHistoryScalarFieldEnum | Prisma.StateHistoryScalarFieldEnum[] +} + +/** + * State without action + */ +export type StateDefaultArgs = { + /** + * Select specific fields to fetch from the State + */ + select?: Prisma.StateSelect | null + /** + * Omit specific fields from the State + */ + omit?: Prisma.StateOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateInclude | null +} diff --git a/src/generated/prisma/models/StateHistory.ts b/src/generated/prisma/models/StateHistory.ts new file mode 100644 index 0000000..90de026 --- /dev/null +++ b/src/generated/prisma/models/StateHistory.ts @@ -0,0 +1,1517 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `StateHistory` 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" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model StateHistory + * + */ +export type StateHistoryModel = runtime.Types.Result.DefaultSelection + +export type AggregateStateHistory = { + _count: StateHistoryCountAggregateOutputType | null + _avg: StateHistoryAvgAggregateOutputType | null + _sum: StateHistorySumAggregateOutputType | null + _min: StateHistoryMinAggregateOutputType | null + _max: StateHistoryMaxAggregateOutputType | null +} + +export type StateHistoryAvgAggregateOutputType = { + order: number | null +} + +export type StateHistorySumAggregateOutputType = { + order: number | null +} + +export type StateHistoryMinAggregateOutputType = { + id: string | null + state: string | null + date: string | null + taskId: string | null + order: number | null +} + +export type StateHistoryMaxAggregateOutputType = { + id: string | null + state: string | null + date: string | null + taskId: string | null + order: number | null +} + +export type StateHistoryCountAggregateOutputType = { + id: number + state: number + date: number + taskId: number + order: number + _all: number +} + + +export type StateHistoryAvgAggregateInputType = { + order?: true +} + +export type StateHistorySumAggregateInputType = { + order?: true +} + +export type StateHistoryMinAggregateInputType = { + id?: true + state?: true + date?: true + taskId?: true + order?: true +} + +export type StateHistoryMaxAggregateInputType = { + id?: true + state?: true + date?: true + taskId?: true + order?: true +} + +export type StateHistoryCountAggregateInputType = { + id?: true + state?: true + date?: true + taskId?: true + order?: true + _all?: true +} + +export type StateHistoryAggregateArgs = { + /** + * Filter which StateHistory to aggregate. + */ + where?: Prisma.StateHistoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of StateHistories to fetch. + */ + orderBy?: Prisma.StateHistoryOrderByWithRelationInput | Prisma.StateHistoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.StateHistoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` StateHistories 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` StateHistories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned StateHistories + **/ + _count?: true | StateHistoryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: StateHistoryAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: StateHistorySumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: StateHistoryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: StateHistoryMaxAggregateInputType +} + +export type GetStateHistoryAggregateType = { + [P in keyof T & keyof AggregateStateHistory]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type StateHistoryGroupByArgs = { + where?: Prisma.StateHistoryWhereInput + orderBy?: Prisma.StateHistoryOrderByWithAggregationInput | Prisma.StateHistoryOrderByWithAggregationInput[] + by: Prisma.StateHistoryScalarFieldEnum[] | Prisma.StateHistoryScalarFieldEnum + having?: Prisma.StateHistoryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: StateHistoryCountAggregateInputType | true + _avg?: StateHistoryAvgAggregateInputType + _sum?: StateHistorySumAggregateInputType + _min?: StateHistoryMinAggregateInputType + _max?: StateHistoryMaxAggregateInputType +} + +export type StateHistoryGroupByOutputType = { + id: string + state: string + date: string + taskId: string + order: number + _count: StateHistoryCountAggregateOutputType | null + _avg: StateHistoryAvgAggregateOutputType | null + _sum: StateHistorySumAggregateOutputType | null + _min: StateHistoryMinAggregateOutputType | null + _max: StateHistoryMaxAggregateOutputType | null +} + +export type GetStateHistoryGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof StateHistoryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type StateHistoryWhereInput = { + AND?: Prisma.StateHistoryWhereInput | Prisma.StateHistoryWhereInput[] + OR?: Prisma.StateHistoryWhereInput[] + NOT?: Prisma.StateHistoryWhereInput | Prisma.StateHistoryWhereInput[] + id?: Prisma.StringFilter<"StateHistory"> | string + state?: Prisma.StringFilter<"StateHistory"> | string + date?: Prisma.StringFilter<"StateHistory"> | string + taskId?: Prisma.StringFilter<"StateHistory"> | string + order?: Prisma.IntFilter<"StateHistory"> | number + task?: Prisma.XOR + stateRef?: Prisma.XOR +} + +export type StateHistoryOrderByWithRelationInput = { + id?: Prisma.SortOrder + state?: Prisma.SortOrder + date?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder + task?: Prisma.TaskOrderByWithRelationInput + stateRef?: Prisma.StateOrderByWithRelationInput +} + +export type StateHistoryWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.StateHistoryWhereInput | Prisma.StateHistoryWhereInput[] + OR?: Prisma.StateHistoryWhereInput[] + NOT?: Prisma.StateHistoryWhereInput | Prisma.StateHistoryWhereInput[] + state?: Prisma.StringFilter<"StateHistory"> | string + date?: Prisma.StringFilter<"StateHistory"> | string + taskId?: Prisma.StringFilter<"StateHistory"> | string + order?: Prisma.IntFilter<"StateHistory"> | number + task?: Prisma.XOR + stateRef?: Prisma.XOR +}, "id"> + +export type StateHistoryOrderByWithAggregationInput = { + id?: Prisma.SortOrder + state?: Prisma.SortOrder + date?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder + _count?: Prisma.StateHistoryCountOrderByAggregateInput + _avg?: Prisma.StateHistoryAvgOrderByAggregateInput + _max?: Prisma.StateHistoryMaxOrderByAggregateInput + _min?: Prisma.StateHistoryMinOrderByAggregateInput + _sum?: Prisma.StateHistorySumOrderByAggregateInput +} + +export type StateHistoryScalarWhereWithAggregatesInput = { + AND?: Prisma.StateHistoryScalarWhereWithAggregatesInput | Prisma.StateHistoryScalarWhereWithAggregatesInput[] + OR?: Prisma.StateHistoryScalarWhereWithAggregatesInput[] + NOT?: Prisma.StateHistoryScalarWhereWithAggregatesInput | Prisma.StateHistoryScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"StateHistory"> | string + state?: Prisma.StringWithAggregatesFilter<"StateHistory"> | string + date?: Prisma.StringWithAggregatesFilter<"StateHistory"> | string + taskId?: Prisma.StringWithAggregatesFilter<"StateHistory"> | string + order?: Prisma.IntWithAggregatesFilter<"StateHistory"> | number +} + +export type StateHistoryCreateInput = { + id?: string + date: string + order: number + task: Prisma.TaskCreateNestedOneWithoutStateHistoryInput + stateRef: Prisma.StateCreateNestedOneWithoutTasksInput +} + +export type StateHistoryUncheckedCreateInput = { + id?: string + state: string + date: string + taskId: string + order: number +} + +export type StateHistoryUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number + task?: Prisma.TaskUpdateOneRequiredWithoutStateHistoryNestedInput + stateRef?: Prisma.StateUpdateOneRequiredWithoutTasksNestedInput +} + +export type StateHistoryUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + state?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + taskId?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type StateHistoryCreateManyInput = { + id?: string + state: string + date: string + taskId: string + order: number +} + +export type StateHistoryUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type StateHistoryUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + state?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + taskId?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type StateHistoryListRelationFilter = { + every?: Prisma.StateHistoryWhereInput + some?: Prisma.StateHistoryWhereInput + none?: Prisma.StateHistoryWhereInput +} + +export type StateHistoryOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type StateHistoryCountOrderByAggregateInput = { + id?: Prisma.SortOrder + state?: Prisma.SortOrder + date?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder +} + +export type StateHistoryAvgOrderByAggregateInput = { + order?: Prisma.SortOrder +} + +export type StateHistoryMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + state?: Prisma.SortOrder + date?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder +} + +export type StateHistoryMinOrderByAggregateInput = { + id?: Prisma.SortOrder + state?: Prisma.SortOrder + date?: Prisma.SortOrder + taskId?: Prisma.SortOrder + order?: Prisma.SortOrder +} + +export type StateHistorySumOrderByAggregateInput = { + order?: Prisma.SortOrder +} + +export type StateHistoryCreateNestedManyWithoutStateRefInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutStateRefInput[] | Prisma.StateHistoryUncheckedCreateWithoutStateRefInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutStateRefInput | Prisma.StateHistoryCreateOrConnectWithoutStateRefInput[] + createMany?: Prisma.StateHistoryCreateManyStateRefInputEnvelope + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] +} + +export type StateHistoryUncheckedCreateNestedManyWithoutStateRefInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutStateRefInput[] | Prisma.StateHistoryUncheckedCreateWithoutStateRefInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutStateRefInput | Prisma.StateHistoryCreateOrConnectWithoutStateRefInput[] + createMany?: Prisma.StateHistoryCreateManyStateRefInputEnvelope + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] +} + +export type StateHistoryUpdateManyWithoutStateRefNestedInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutStateRefInput[] | Prisma.StateHistoryUncheckedCreateWithoutStateRefInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutStateRefInput | Prisma.StateHistoryCreateOrConnectWithoutStateRefInput[] + upsert?: Prisma.StateHistoryUpsertWithWhereUniqueWithoutStateRefInput | Prisma.StateHistoryUpsertWithWhereUniqueWithoutStateRefInput[] + createMany?: Prisma.StateHistoryCreateManyStateRefInputEnvelope + set?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + disconnect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + delete?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + update?: Prisma.StateHistoryUpdateWithWhereUniqueWithoutStateRefInput | Prisma.StateHistoryUpdateWithWhereUniqueWithoutStateRefInput[] + updateMany?: Prisma.StateHistoryUpdateManyWithWhereWithoutStateRefInput | Prisma.StateHistoryUpdateManyWithWhereWithoutStateRefInput[] + deleteMany?: Prisma.StateHistoryScalarWhereInput | Prisma.StateHistoryScalarWhereInput[] +} + +export type StateHistoryUncheckedUpdateManyWithoutStateRefNestedInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutStateRefInput[] | Prisma.StateHistoryUncheckedCreateWithoutStateRefInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutStateRefInput | Prisma.StateHistoryCreateOrConnectWithoutStateRefInput[] + upsert?: Prisma.StateHistoryUpsertWithWhereUniqueWithoutStateRefInput | Prisma.StateHistoryUpsertWithWhereUniqueWithoutStateRefInput[] + createMany?: Prisma.StateHistoryCreateManyStateRefInputEnvelope + set?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + disconnect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + delete?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + update?: Prisma.StateHistoryUpdateWithWhereUniqueWithoutStateRefInput | Prisma.StateHistoryUpdateWithWhereUniqueWithoutStateRefInput[] + updateMany?: Prisma.StateHistoryUpdateManyWithWhereWithoutStateRefInput | Prisma.StateHistoryUpdateManyWithWhereWithoutStateRefInput[] + deleteMany?: Prisma.StateHistoryScalarWhereInput | Prisma.StateHistoryScalarWhereInput[] +} + +export type StateHistoryCreateNestedManyWithoutTaskInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutTaskInput[] | Prisma.StateHistoryUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutTaskInput | Prisma.StateHistoryCreateOrConnectWithoutTaskInput[] + createMany?: Prisma.StateHistoryCreateManyTaskInputEnvelope + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] +} + +export type StateHistoryUncheckedCreateNestedManyWithoutTaskInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutTaskInput[] | Prisma.StateHistoryUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutTaskInput | Prisma.StateHistoryCreateOrConnectWithoutTaskInput[] + createMany?: Prisma.StateHistoryCreateManyTaskInputEnvelope + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] +} + +export type StateHistoryUpdateManyWithoutTaskNestedInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutTaskInput[] | Prisma.StateHistoryUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutTaskInput | Prisma.StateHistoryCreateOrConnectWithoutTaskInput[] + upsert?: Prisma.StateHistoryUpsertWithWhereUniqueWithoutTaskInput | Prisma.StateHistoryUpsertWithWhereUniqueWithoutTaskInput[] + createMany?: Prisma.StateHistoryCreateManyTaskInputEnvelope + set?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + disconnect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + delete?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + update?: Prisma.StateHistoryUpdateWithWhereUniqueWithoutTaskInput | Prisma.StateHistoryUpdateWithWhereUniqueWithoutTaskInput[] + updateMany?: Prisma.StateHistoryUpdateManyWithWhereWithoutTaskInput | Prisma.StateHistoryUpdateManyWithWhereWithoutTaskInput[] + deleteMany?: Prisma.StateHistoryScalarWhereInput | Prisma.StateHistoryScalarWhereInput[] +} + +export type StateHistoryUncheckedUpdateManyWithoutTaskNestedInput = { + create?: Prisma.XOR | Prisma.StateHistoryCreateWithoutTaskInput[] | Prisma.StateHistoryUncheckedCreateWithoutTaskInput[] + connectOrCreate?: Prisma.StateHistoryCreateOrConnectWithoutTaskInput | Prisma.StateHistoryCreateOrConnectWithoutTaskInput[] + upsert?: Prisma.StateHistoryUpsertWithWhereUniqueWithoutTaskInput | Prisma.StateHistoryUpsertWithWhereUniqueWithoutTaskInput[] + createMany?: Prisma.StateHistoryCreateManyTaskInputEnvelope + set?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + disconnect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + delete?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + connect?: Prisma.StateHistoryWhereUniqueInput | Prisma.StateHistoryWhereUniqueInput[] + update?: Prisma.StateHistoryUpdateWithWhereUniqueWithoutTaskInput | Prisma.StateHistoryUpdateWithWhereUniqueWithoutTaskInput[] + updateMany?: Prisma.StateHistoryUpdateManyWithWhereWithoutTaskInput | Prisma.StateHistoryUpdateManyWithWhereWithoutTaskInput[] + deleteMany?: Prisma.StateHistoryScalarWhereInput | Prisma.StateHistoryScalarWhereInput[] +} + +export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type StateHistoryCreateWithoutStateRefInput = { + id?: string + date: string + order: number + task: Prisma.TaskCreateNestedOneWithoutStateHistoryInput +} + +export type StateHistoryUncheckedCreateWithoutStateRefInput = { + id?: string + date: string + taskId: string + order: number +} + +export type StateHistoryCreateOrConnectWithoutStateRefInput = { + where: Prisma.StateHistoryWhereUniqueInput + create: Prisma.XOR +} + +export type StateHistoryCreateManyStateRefInputEnvelope = { + data: Prisma.StateHistoryCreateManyStateRefInput | Prisma.StateHistoryCreateManyStateRefInput[] + skipDuplicates?: boolean +} + +export type StateHistoryUpsertWithWhereUniqueWithoutStateRefInput = { + where: Prisma.StateHistoryWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type StateHistoryUpdateWithWhereUniqueWithoutStateRefInput = { + where: Prisma.StateHistoryWhereUniqueInput + data: Prisma.XOR +} + +export type StateHistoryUpdateManyWithWhereWithoutStateRefInput = { + where: Prisma.StateHistoryScalarWhereInput + data: Prisma.XOR +} + +export type StateHistoryScalarWhereInput = { + AND?: Prisma.StateHistoryScalarWhereInput | Prisma.StateHistoryScalarWhereInput[] + OR?: Prisma.StateHistoryScalarWhereInput[] + NOT?: Prisma.StateHistoryScalarWhereInput | Prisma.StateHistoryScalarWhereInput[] + id?: Prisma.StringFilter<"StateHistory"> | string + state?: Prisma.StringFilter<"StateHistory"> | string + date?: Prisma.StringFilter<"StateHistory"> | string + taskId?: Prisma.StringFilter<"StateHistory"> | string + order?: Prisma.IntFilter<"StateHistory"> | number +} + +export type StateHistoryCreateWithoutTaskInput = { + id?: string + date: string + order: number + stateRef: Prisma.StateCreateNestedOneWithoutTasksInput +} + +export type StateHistoryUncheckedCreateWithoutTaskInput = { + id?: string + state: string + date: string + order: number +} + +export type StateHistoryCreateOrConnectWithoutTaskInput = { + where: Prisma.StateHistoryWhereUniqueInput + create: Prisma.XOR +} + +export type StateHistoryCreateManyTaskInputEnvelope = { + data: Prisma.StateHistoryCreateManyTaskInput | Prisma.StateHistoryCreateManyTaskInput[] + skipDuplicates?: boolean +} + +export type StateHistoryUpsertWithWhereUniqueWithoutTaskInput = { + where: Prisma.StateHistoryWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type StateHistoryUpdateWithWhereUniqueWithoutTaskInput = { + where: Prisma.StateHistoryWhereUniqueInput + data: Prisma.XOR +} + +export type StateHistoryUpdateManyWithWhereWithoutTaskInput = { + where: Prisma.StateHistoryScalarWhereInput + data: Prisma.XOR +} + +export type StateHistoryCreateManyStateRefInput = { + id?: string + date: string + taskId: string + order: number +} + +export type StateHistoryUpdateWithoutStateRefInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number + task?: Prisma.TaskUpdateOneRequiredWithoutStateHistoryNestedInput +} + +export type StateHistoryUncheckedUpdateWithoutStateRefInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + taskId?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type StateHistoryUncheckedUpdateManyWithoutStateRefInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + taskId?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type StateHistoryCreateManyTaskInput = { + id?: string + state: string + date: string + order: number +} + +export type StateHistoryUpdateWithoutTaskInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number + stateRef?: Prisma.StateUpdateOneRequiredWithoutTasksNestedInput +} + +export type StateHistoryUncheckedUpdateWithoutTaskInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + state?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type StateHistoryUncheckedUpdateManyWithoutTaskInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + state?: Prisma.StringFieldUpdateOperationsInput | string + date?: Prisma.StringFieldUpdateOperationsInput | string + order?: Prisma.IntFieldUpdateOperationsInput | number +} + + + +export type StateHistorySelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + state?: boolean + date?: boolean + taskId?: boolean + order?: boolean + task?: boolean | Prisma.TaskDefaultArgs + stateRef?: boolean | Prisma.StateDefaultArgs +}, ExtArgs["result"]["stateHistory"]> + +export type StateHistorySelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + state?: boolean + date?: boolean + taskId?: boolean + order?: boolean + task?: boolean | Prisma.TaskDefaultArgs + stateRef?: boolean | Prisma.StateDefaultArgs +}, ExtArgs["result"]["stateHistory"]> + +export type StateHistorySelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + state?: boolean + date?: boolean + taskId?: boolean + order?: boolean + task?: boolean | Prisma.TaskDefaultArgs + stateRef?: boolean | Prisma.StateDefaultArgs +}, ExtArgs["result"]["stateHistory"]> + +export type StateHistorySelectScalar = { + id?: boolean + state?: boolean + date?: boolean + taskId?: boolean + order?: boolean +} + +export type StateHistoryOmit = runtime.Types.Extensions.GetOmit<"id" | "state" | "date" | "taskId" | "order", ExtArgs["result"]["stateHistory"]> +export type StateHistoryInclude = { + task?: boolean | Prisma.TaskDefaultArgs + stateRef?: boolean | Prisma.StateDefaultArgs +} +export type StateHistoryIncludeCreateManyAndReturn = { + task?: boolean | Prisma.TaskDefaultArgs + stateRef?: boolean | Prisma.StateDefaultArgs +} +export type StateHistoryIncludeUpdateManyAndReturn = { + task?: boolean | Prisma.TaskDefaultArgs + stateRef?: boolean | Prisma.StateDefaultArgs +} + +export type $StateHistoryPayload = { + name: "StateHistory" + objects: { + task: Prisma.$TaskPayload + stateRef: Prisma.$StatePayload + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + state: string + date: string + taskId: string + order: number + }, ExtArgs["result"]["stateHistory"]> + composites: {} +} + +export type StateHistoryGetPayload = runtime.Types.Result.GetResult + +export type StateHistoryCountArgs = + Omit & { + select?: StateHistoryCountAggregateInputType | true + } + +export interface StateHistoryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['StateHistory'], meta: { name: 'StateHistory' } } + /** + * Find zero or one StateHistory that matches the filter. + * @param {StateHistoryFindUniqueArgs} args - Arguments to find a StateHistory + * @example + * // Get one StateHistory + * const stateHistory = await prisma.stateHistory.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one StateHistory that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {StateHistoryFindUniqueOrThrowArgs} args - Arguments to find a StateHistory + * @example + * // Get one StateHistory + * const stateHistory = await prisma.stateHistory.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first StateHistory 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 {StateHistoryFindFirstArgs} args - Arguments to find a StateHistory + * @example + * // Get one StateHistory + * const stateHistory = await prisma.stateHistory.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first StateHistory 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 {StateHistoryFindFirstOrThrowArgs} args - Arguments to find a StateHistory + * @example + * // Get one StateHistory + * const stateHistory = await prisma.stateHistory.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more StateHistories 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 {StateHistoryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all StateHistories + * const stateHistories = await prisma.stateHistory.findMany() + * + * // Get first 10 StateHistories + * const stateHistories = await prisma.stateHistory.findMany({ take: 10 }) + * + * // Only select the `id` + * const stateHistoryWithIdOnly = await prisma.stateHistory.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a StateHistory. + * @param {StateHistoryCreateArgs} args - Arguments to create a StateHistory. + * @example + * // Create one StateHistory + * const StateHistory = await prisma.stateHistory.create({ + * data: { + * // ... data to create a StateHistory + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many StateHistories. + * @param {StateHistoryCreateManyArgs} args - Arguments to create many StateHistories. + * @example + * // Create many StateHistories + * const stateHistory = await prisma.stateHistory.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many StateHistories and returns the data saved in the database. + * @param {StateHistoryCreateManyAndReturnArgs} args - Arguments to create many StateHistories. + * @example + * // Create many StateHistories + * const stateHistory = await prisma.stateHistory.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many StateHistories and only return the `id` + * const stateHistoryWithIdOnly = await prisma.stateHistory.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 StateHistory. + * @param {StateHistoryDeleteArgs} args - Arguments to delete one StateHistory. + * @example + * // Delete one StateHistory + * const StateHistory = await prisma.stateHistory.delete({ + * where: { + * // ... filter to delete one StateHistory + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one StateHistory. + * @param {StateHistoryUpdateArgs} args - Arguments to update one StateHistory. + * @example + * // Update one StateHistory + * const stateHistory = await prisma.stateHistory.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more StateHistories. + * @param {StateHistoryDeleteManyArgs} args - Arguments to filter StateHistories to delete. + * @example + * // Delete a few StateHistories + * const { count } = await prisma.stateHistory.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more StateHistories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateHistoryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many StateHistories + * const stateHistory = await prisma.stateHistory.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more StateHistories and returns the data updated in the database. + * @param {StateHistoryUpdateManyAndReturnArgs} args - Arguments to update many StateHistories. + * @example + * // Update many StateHistories + * const stateHistory = await prisma.stateHistory.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more StateHistories and only return the `id` + * const stateHistoryWithIdOnly = await prisma.stateHistory.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 StateHistory. + * @param {StateHistoryUpsertArgs} args - Arguments to update or create a StateHistory. + * @example + * // Update or create a StateHistory + * const stateHistory = await prisma.stateHistory.upsert({ + * create: { + * // ... data to create a StateHistory + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the StateHistory we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__StateHistoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of StateHistories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateHistoryCountArgs} args - Arguments to filter StateHistories to count. + * @example + * // Count the number of StateHistories + * const count = await prisma.stateHistory.count({ + * where: { + * // ... the filter for the StateHistories 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 StateHistory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateHistoryAggregateArgs} 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 StateHistory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {StateHistoryGroupByArgs} 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 StateHistoryGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: StateHistoryGroupByArgs['orderBy'] } + : { orderBy?: StateHistoryGroupByArgs['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 ? GetStateHistoryGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the StateHistory model + */ +readonly fields: StateHistoryFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for StateHistory. + * 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__StateHistoryClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + task = {}>(args?: Prisma.Subset>): Prisma.Prisma__TaskClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + stateRef = {}>(args?: Prisma.Subset>): Prisma.Prisma__StateClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * 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 StateHistory model + */ +export interface StateHistoryFieldRefs { + readonly id: Prisma.FieldRef<"StateHistory", 'String'> + readonly state: Prisma.FieldRef<"StateHistory", 'String'> + readonly date: Prisma.FieldRef<"StateHistory", 'String'> + readonly taskId: Prisma.FieldRef<"StateHistory", 'String'> + readonly order: Prisma.FieldRef<"StateHistory", 'Int'> +} + + +// Custom InputTypes +/** + * StateHistory findUnique + */ +export type StateHistoryFindUniqueArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * Filter, which StateHistory to fetch. + */ + where: Prisma.StateHistoryWhereUniqueInput +} + +/** + * StateHistory findUniqueOrThrow + */ +export type StateHistoryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * Filter, which StateHistory to fetch. + */ + where: Prisma.StateHistoryWhereUniqueInput +} + +/** + * StateHistory findFirst + */ +export type StateHistoryFindFirstArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * Filter, which StateHistory to fetch. + */ + where?: Prisma.StateHistoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of StateHistories to fetch. + */ + orderBy?: Prisma.StateHistoryOrderByWithRelationInput | Prisma.StateHistoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for StateHistories. + */ + cursor?: Prisma.StateHistoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` StateHistories 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` StateHistories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of StateHistories. + */ + distinct?: Prisma.StateHistoryScalarFieldEnum | Prisma.StateHistoryScalarFieldEnum[] +} + +/** + * StateHistory findFirstOrThrow + */ +export type StateHistoryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * Filter, which StateHistory to fetch. + */ + where?: Prisma.StateHistoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of StateHistories to fetch. + */ + orderBy?: Prisma.StateHistoryOrderByWithRelationInput | Prisma.StateHistoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for StateHistories. + */ + cursor?: Prisma.StateHistoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` StateHistories 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` StateHistories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of StateHistories. + */ + distinct?: Prisma.StateHistoryScalarFieldEnum | Prisma.StateHistoryScalarFieldEnum[] +} + +/** + * StateHistory findMany + */ +export type StateHistoryFindManyArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * Filter, which StateHistories to fetch. + */ + where?: Prisma.StateHistoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of StateHistories to fetch. + */ + orderBy?: Prisma.StateHistoryOrderByWithRelationInput | Prisma.StateHistoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing StateHistories. + */ + cursor?: Prisma.StateHistoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` StateHistories 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` StateHistories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of StateHistories. + */ + distinct?: Prisma.StateHistoryScalarFieldEnum | Prisma.StateHistoryScalarFieldEnum[] +} + +/** + * StateHistory create + */ +export type StateHistoryCreateArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * The data needed to create a StateHistory. + */ + data: Prisma.XOR +} + +/** + * StateHistory createMany + */ +export type StateHistoryCreateManyArgs = { + /** + * The data used to create many StateHistories. + */ + data: Prisma.StateHistoryCreateManyInput | Prisma.StateHistoryCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * StateHistory createManyAndReturn + */ +export type StateHistoryCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelectCreateManyAndReturn | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * The data used to create many StateHistories. + */ + data: Prisma.StateHistoryCreateManyInput | Prisma.StateHistoryCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryIncludeCreateManyAndReturn | null +} + +/** + * StateHistory update + */ +export type StateHistoryUpdateArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * The data needed to update a StateHistory. + */ + data: Prisma.XOR + /** + * Choose, which StateHistory to update. + */ + where: Prisma.StateHistoryWhereUniqueInput +} + +/** + * StateHistory updateMany + */ +export type StateHistoryUpdateManyArgs = { + /** + * The data used to update StateHistories. + */ + data: Prisma.XOR + /** + * Filter which StateHistories to update + */ + where?: Prisma.StateHistoryWhereInput + /** + * Limit how many StateHistories to update. + */ + limit?: number +} + +/** + * StateHistory updateManyAndReturn + */ +export type StateHistoryUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelectUpdateManyAndReturn | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * The data used to update StateHistories. + */ + data: Prisma.XOR + /** + * Filter which StateHistories to update + */ + where?: Prisma.StateHistoryWhereInput + /** + * Limit how many StateHistories to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryIncludeUpdateManyAndReturn | null +} + +/** + * StateHistory upsert + */ +export type StateHistoryUpsertArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * The filter to search for the StateHistory to update in case it exists. + */ + where: Prisma.StateHistoryWhereUniqueInput + /** + * In case the StateHistory found by the `where` argument doesn't exist, create a new StateHistory with this data. + */ + create: Prisma.XOR + /** + * In case the StateHistory was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * StateHistory delete + */ +export type StateHistoryDeleteArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + /** + * Filter which StateHistory to delete. + */ + where: Prisma.StateHistoryWhereUniqueInput +} + +/** + * StateHistory deleteMany + */ +export type StateHistoryDeleteManyArgs = { + /** + * Filter which StateHistories to delete + */ + where?: Prisma.StateHistoryWhereInput + /** + * Limit how many StateHistories to delete. + */ + limit?: number +} + +/** + * StateHistory without action + */ +export type StateHistoryDefaultArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null +} diff --git a/src/generated/prisma/models/Task.ts b/src/generated/prisma/models/Task.ts new file mode 100644 index 0000000..de53c7b --- /dev/null +++ b/src/generated/prisma/models/Task.ts @@ -0,0 +1,1521 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Task` 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" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Task + * + */ +export type TaskModel = runtime.Types.Result.DefaultSelection + +export type AggregateTask = { + _count: TaskCountAggregateOutputType | null + _min: TaskMinAggregateOutputType | null + _max: TaskMaxAggregateOutputType | null +} + +export type TaskMinAggregateOutputType = { + id: string | null + title: string | null + description: string | null + dueDate: string | null + completed: boolean | null + createdAt: Date | null + updatedAt: Date | null +} + +export type TaskMaxAggregateOutputType = { + id: string | null + title: string | null + description: string | null + dueDate: string | null + completed: boolean | null + createdAt: Date | null + updatedAt: Date | null +} + +export type TaskCountAggregateOutputType = { + id: number + title: number + description: number + dueDate: number + completed: number + createdAt: number + updatedAt: number + _all: number +} + + +export type TaskMinAggregateInputType = { + id?: true + title?: true + description?: true + dueDate?: true + completed?: true + createdAt?: true + updatedAt?: true +} + +export type TaskMaxAggregateInputType = { + id?: true + title?: true + description?: true + dueDate?: true + completed?: true + createdAt?: true + updatedAt?: true +} + +export type TaskCountAggregateInputType = { + id?: true + title?: true + description?: true + dueDate?: true + completed?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type TaskAggregateArgs = { + /** + * Filter which Task to aggregate. + */ + where?: Prisma.TaskWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Tasks to fetch. + */ + orderBy?: Prisma.TaskOrderByWithRelationInput | Prisma.TaskOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.TaskWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Tasks 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` Tasks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Tasks + **/ + _count?: true | TaskCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: TaskMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: TaskMaxAggregateInputType +} + +export type GetTaskAggregateType = { + [P in keyof T & keyof AggregateTask]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type TaskGroupByArgs = { + where?: Prisma.TaskWhereInput + orderBy?: Prisma.TaskOrderByWithAggregationInput | Prisma.TaskOrderByWithAggregationInput[] + by: Prisma.TaskScalarFieldEnum[] | Prisma.TaskScalarFieldEnum + having?: Prisma.TaskScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: TaskCountAggregateInputType | true + _min?: TaskMinAggregateInputType + _max?: TaskMaxAggregateInputType +} + +export type TaskGroupByOutputType = { + id: string + title: string + description: string + dueDate: string + completed: boolean + createdAt: Date + updatedAt: Date + _count: TaskCountAggregateOutputType | null + _min: TaskMinAggregateOutputType | null + _max: TaskMaxAggregateOutputType | null +} + +export type GetTaskGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof TaskGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type TaskWhereInput = { + AND?: Prisma.TaskWhereInput | Prisma.TaskWhereInput[] + OR?: Prisma.TaskWhereInput[] + NOT?: Prisma.TaskWhereInput | Prisma.TaskWhereInput[] + id?: Prisma.StringFilter<"Task"> | string + title?: Prisma.StringFilter<"Task"> | string + description?: Prisma.StringFilter<"Task"> | string + dueDate?: Prisma.StringFilter<"Task"> | string + completed?: Prisma.BoolFilter<"Task"> | boolean + createdAt?: Prisma.DateTimeFilter<"Task"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Task"> | Date | string + stateHistory?: Prisma.StateHistoryListRelationFilter + notes?: Prisma.NoteListRelationFilter +} + +export type TaskOrderByWithRelationInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + description?: Prisma.SortOrder + dueDate?: Prisma.SortOrder + completed?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + stateHistory?: Prisma.StateHistoryOrderByRelationAggregateInput + notes?: Prisma.NoteOrderByRelationAggregateInput +} + +export type TaskWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.TaskWhereInput | Prisma.TaskWhereInput[] + OR?: Prisma.TaskWhereInput[] + NOT?: Prisma.TaskWhereInput | Prisma.TaskWhereInput[] + title?: Prisma.StringFilter<"Task"> | string + description?: Prisma.StringFilter<"Task"> | string + dueDate?: Prisma.StringFilter<"Task"> | string + completed?: Prisma.BoolFilter<"Task"> | boolean + createdAt?: Prisma.DateTimeFilter<"Task"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Task"> | Date | string + stateHistory?: Prisma.StateHistoryListRelationFilter + notes?: Prisma.NoteListRelationFilter +}, "id"> + +export type TaskOrderByWithAggregationInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + description?: Prisma.SortOrder + dueDate?: Prisma.SortOrder + completed?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.TaskCountOrderByAggregateInput + _max?: Prisma.TaskMaxOrderByAggregateInput + _min?: Prisma.TaskMinOrderByAggregateInput +} + +export type TaskScalarWhereWithAggregatesInput = { + AND?: Prisma.TaskScalarWhereWithAggregatesInput | Prisma.TaskScalarWhereWithAggregatesInput[] + OR?: Prisma.TaskScalarWhereWithAggregatesInput[] + NOT?: Prisma.TaskScalarWhereWithAggregatesInput | Prisma.TaskScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"Task"> | string + title?: Prisma.StringWithAggregatesFilter<"Task"> | string + description?: Prisma.StringWithAggregatesFilter<"Task"> | string + dueDate?: Prisma.StringWithAggregatesFilter<"Task"> | string + completed?: Prisma.BoolWithAggregatesFilter<"Task"> | boolean + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Task"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Task"> | Date | string +} + +export type TaskCreateInput = { + id?: string + title: string + description: string + dueDate: string + completed?: boolean + createdAt?: Date | string + updatedAt?: Date | string + stateHistory?: Prisma.StateHistoryCreateNestedManyWithoutTaskInput + notes?: Prisma.NoteCreateNestedManyWithoutTaskInput +} + +export type TaskUncheckedCreateInput = { + id?: string + title: string + description: string + dueDate: string + completed?: boolean + createdAt?: Date | string + updatedAt?: Date | string + stateHistory?: Prisma.StateHistoryUncheckedCreateNestedManyWithoutTaskInput + notes?: Prisma.NoteUncheckedCreateNestedManyWithoutTaskInput +} + +export type TaskUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + stateHistory?: Prisma.StateHistoryUpdateManyWithoutTaskNestedInput + notes?: Prisma.NoteUpdateManyWithoutTaskNestedInput +} + +export type TaskUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + stateHistory?: Prisma.StateHistoryUncheckedUpdateManyWithoutTaskNestedInput + notes?: Prisma.NoteUncheckedUpdateManyWithoutTaskNestedInput +} + +export type TaskCreateManyInput = { + id?: string + title: string + description: string + dueDate: string + completed?: boolean + createdAt?: Date | string + updatedAt?: Date | string +} + +export type TaskUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type TaskUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type TaskCountOrderByAggregateInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + description?: Prisma.SortOrder + dueDate?: Prisma.SortOrder + completed?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type TaskMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + description?: Prisma.SortOrder + dueDate?: Prisma.SortOrder + completed?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type TaskMinOrderByAggregateInput = { + id?: Prisma.SortOrder + title?: Prisma.SortOrder + description?: Prisma.SortOrder + dueDate?: Prisma.SortOrder + completed?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type TaskScalarRelationFilter = { + is?: Prisma.TaskWhereInput + isNot?: Prisma.TaskWhereInput +} + +export type BoolFieldUpdateOperationsInput = { + set?: boolean +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type TaskCreateNestedOneWithoutStateHistoryInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.TaskCreateOrConnectWithoutStateHistoryInput + connect?: Prisma.TaskWhereUniqueInput +} + +export type TaskUpdateOneRequiredWithoutStateHistoryNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.TaskCreateOrConnectWithoutStateHistoryInput + upsert?: Prisma.TaskUpsertWithoutStateHistoryInput + connect?: Prisma.TaskWhereUniqueInput + update?: Prisma.XOR, Prisma.TaskUncheckedUpdateWithoutStateHistoryInput> +} + +export type TaskCreateNestedOneWithoutNotesInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.TaskCreateOrConnectWithoutNotesInput + connect?: Prisma.TaskWhereUniqueInput +} + +export type TaskUpdateOneRequiredWithoutNotesNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.TaskCreateOrConnectWithoutNotesInput + upsert?: Prisma.TaskUpsertWithoutNotesInput + connect?: Prisma.TaskWhereUniqueInput + update?: Prisma.XOR, Prisma.TaskUncheckedUpdateWithoutNotesInput> +} + +export type TaskCreateWithoutStateHistoryInput = { + id?: string + title: string + description: string + dueDate: string + completed?: boolean + createdAt?: Date | string + updatedAt?: Date | string + notes?: Prisma.NoteCreateNestedManyWithoutTaskInput +} + +export type TaskUncheckedCreateWithoutStateHistoryInput = { + id?: string + title: string + description: string + dueDate: string + completed?: boolean + createdAt?: Date | string + updatedAt?: Date | string + notes?: Prisma.NoteUncheckedCreateNestedManyWithoutTaskInput +} + +export type TaskCreateOrConnectWithoutStateHistoryInput = { + where: Prisma.TaskWhereUniqueInput + create: Prisma.XOR +} + +export type TaskUpsertWithoutStateHistoryInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.TaskWhereInput +} + +export type TaskUpdateToOneWithWhereWithoutStateHistoryInput = { + where?: Prisma.TaskWhereInput + data: Prisma.XOR +} + +export type TaskUpdateWithoutStateHistoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + notes?: Prisma.NoteUpdateManyWithoutTaskNestedInput +} + +export type TaskUncheckedUpdateWithoutStateHistoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + notes?: Prisma.NoteUncheckedUpdateManyWithoutTaskNestedInput +} + +export type TaskCreateWithoutNotesInput = { + id?: string + title: string + description: string + dueDate: string + completed?: boolean + createdAt?: Date | string + updatedAt?: Date | string + stateHistory?: Prisma.StateHistoryCreateNestedManyWithoutTaskInput +} + +export type TaskUncheckedCreateWithoutNotesInput = { + id?: string + title: string + description: string + dueDate: string + completed?: boolean + createdAt?: Date | string + updatedAt?: Date | string + stateHistory?: Prisma.StateHistoryUncheckedCreateNestedManyWithoutTaskInput +} + +export type TaskCreateOrConnectWithoutNotesInput = { + where: Prisma.TaskWhereUniqueInput + create: Prisma.XOR +} + +export type TaskUpsertWithoutNotesInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.TaskWhereInput +} + +export type TaskUpdateToOneWithWhereWithoutNotesInput = { + where?: Prisma.TaskWhereInput + data: Prisma.XOR +} + +export type TaskUpdateWithoutNotesInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + stateHistory?: Prisma.StateHistoryUpdateManyWithoutTaskNestedInput +} + +export type TaskUncheckedUpdateWithoutNotesInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + dueDate?: Prisma.StringFieldUpdateOperationsInput | string + completed?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + stateHistory?: Prisma.StateHistoryUncheckedUpdateManyWithoutTaskNestedInput +} + + +/** + * Count Type TaskCountOutputType + */ + +export type TaskCountOutputType = { + stateHistory: number + notes: number +} + +export type TaskCountOutputTypeSelect = { + stateHistory?: boolean | TaskCountOutputTypeCountStateHistoryArgs + notes?: boolean | TaskCountOutputTypeCountNotesArgs +} + +/** + * TaskCountOutputType without action + */ +export type TaskCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the TaskCountOutputType + */ + select?: Prisma.TaskCountOutputTypeSelect | null +} + +/** + * TaskCountOutputType without action + */ +export type TaskCountOutputTypeCountStateHistoryArgs = { + where?: Prisma.StateHistoryWhereInput +} + +/** + * TaskCountOutputType without action + */ +export type TaskCountOutputTypeCountNotesArgs = { + where?: Prisma.NoteWhereInput +} + + +export type TaskSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + title?: boolean + description?: boolean + dueDate?: boolean + completed?: boolean + createdAt?: boolean + updatedAt?: boolean + stateHistory?: boolean | Prisma.Task$stateHistoryArgs + notes?: boolean | Prisma.Task$notesArgs + _count?: boolean | Prisma.TaskCountOutputTypeDefaultArgs +}, ExtArgs["result"]["task"]> + +export type TaskSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + title?: boolean + description?: boolean + dueDate?: boolean + completed?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["task"]> + +export type TaskSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + title?: boolean + description?: boolean + dueDate?: boolean + completed?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["task"]> + +export type TaskSelectScalar = { + id?: boolean + title?: boolean + description?: boolean + dueDate?: boolean + completed?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type TaskOmit = runtime.Types.Extensions.GetOmit<"id" | "title" | "description" | "dueDate" | "completed" | "createdAt" | "updatedAt", ExtArgs["result"]["task"]> +export type TaskInclude = { + stateHistory?: boolean | Prisma.Task$stateHistoryArgs + notes?: boolean | Prisma.Task$notesArgs + _count?: boolean | Prisma.TaskCountOutputTypeDefaultArgs +} +export type TaskIncludeCreateManyAndReturn = {} +export type TaskIncludeUpdateManyAndReturn = {} + +export type $TaskPayload = { + name: "Task" + objects: { + stateHistory: Prisma.$StateHistoryPayload[] + notes: Prisma.$NotePayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + title: string + description: string + dueDate: string + completed: boolean + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["task"]> + composites: {} +} + +export type TaskGetPayload = runtime.Types.Result.GetResult + +export type TaskCountArgs = + Omit & { + select?: TaskCountAggregateInputType | true + } + +export interface TaskDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Task'], meta: { name: 'Task' } } + /** + * Find zero or one Task that matches the filter. + * @param {TaskFindUniqueArgs} args - Arguments to find a Task + * @example + * // Get one Task + * const task = await prisma.task.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Task that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {TaskFindUniqueOrThrowArgs} args - Arguments to find a Task + * @example + * // Get one Task + * const task = await prisma.task.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Task 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 {TaskFindFirstArgs} args - Arguments to find a Task + * @example + * // Get one Task + * const task = await prisma.task.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Task 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 {TaskFindFirstOrThrowArgs} args - Arguments to find a Task + * @example + * // Get one Task + * const task = await prisma.task.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Tasks 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 {TaskFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Tasks + * const tasks = await prisma.task.findMany() + * + * // Get first 10 Tasks + * const tasks = await prisma.task.findMany({ take: 10 }) + * + * // Only select the `id` + * const taskWithIdOnly = await prisma.task.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Task. + * @param {TaskCreateArgs} args - Arguments to create a Task. + * @example + * // Create one Task + * const Task = await prisma.task.create({ + * data: { + * // ... data to create a Task + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Tasks. + * @param {TaskCreateManyArgs} args - Arguments to create many Tasks. + * @example + * // Create many Tasks + * const task = await prisma.task.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Tasks and returns the data saved in the database. + * @param {TaskCreateManyAndReturnArgs} args - Arguments to create many Tasks. + * @example + * // Create many Tasks + * const task = await prisma.task.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Tasks and only return the `id` + * const taskWithIdOnly = await prisma.task.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 Task. + * @param {TaskDeleteArgs} args - Arguments to delete one Task. + * @example + * // Delete one Task + * const Task = await prisma.task.delete({ + * where: { + * // ... filter to delete one Task + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Task. + * @param {TaskUpdateArgs} args - Arguments to update one Task. + * @example + * // Update one Task + * const task = await prisma.task.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Tasks. + * @param {TaskDeleteManyArgs} args - Arguments to filter Tasks to delete. + * @example + * // Delete a few Tasks + * const { count } = await prisma.task.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Tasks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TaskUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Tasks + * const task = await prisma.task.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Tasks and returns the data updated in the database. + * @param {TaskUpdateManyAndReturnArgs} args - Arguments to update many Tasks. + * @example + * // Update many Tasks + * const task = await prisma.task.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Tasks and only return the `id` + * const taskWithIdOnly = await prisma.task.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 Task. + * @param {TaskUpsertArgs} args - Arguments to update or create a Task. + * @example + * // Update or create a Task + * const task = await prisma.task.upsert({ + * create: { + * // ... data to create a Task + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Task we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__TaskClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Tasks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TaskCountArgs} args - Arguments to filter Tasks to count. + * @example + * // Count the number of Tasks + * const count = await prisma.task.count({ + * where: { + * // ... the filter for the Tasks 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 Task. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TaskAggregateArgs} 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 Task. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {TaskGroupByArgs} 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 TaskGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: TaskGroupByArgs['orderBy'] } + : { orderBy?: TaskGroupByArgs['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 ? GetTaskGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Task model + */ +readonly fields: TaskFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Task. + * 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__TaskClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + stateHistory = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + notes = {}>(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 Task model + */ +export interface TaskFieldRefs { + readonly id: Prisma.FieldRef<"Task", 'String'> + readonly title: Prisma.FieldRef<"Task", 'String'> + readonly description: Prisma.FieldRef<"Task", 'String'> + readonly dueDate: Prisma.FieldRef<"Task", 'String'> + readonly completed: Prisma.FieldRef<"Task", 'Boolean'> + readonly createdAt: Prisma.FieldRef<"Task", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Task", 'DateTime'> +} + + +// Custom InputTypes +/** + * Task findUnique + */ +export type TaskFindUniqueArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * Filter, which Task to fetch. + */ + where: Prisma.TaskWhereUniqueInput +} + +/** + * Task findUniqueOrThrow + */ +export type TaskFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * Filter, which Task to fetch. + */ + where: Prisma.TaskWhereUniqueInput +} + +/** + * Task findFirst + */ +export type TaskFindFirstArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * Filter, which Task to fetch. + */ + where?: Prisma.TaskWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Tasks to fetch. + */ + orderBy?: Prisma.TaskOrderByWithRelationInput | Prisma.TaskOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Tasks. + */ + cursor?: Prisma.TaskWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Tasks 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` Tasks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Tasks. + */ + distinct?: Prisma.TaskScalarFieldEnum | Prisma.TaskScalarFieldEnum[] +} + +/** + * Task findFirstOrThrow + */ +export type TaskFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * Filter, which Task to fetch. + */ + where?: Prisma.TaskWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Tasks to fetch. + */ + orderBy?: Prisma.TaskOrderByWithRelationInput | Prisma.TaskOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Tasks. + */ + cursor?: Prisma.TaskWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Tasks 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` Tasks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Tasks. + */ + distinct?: Prisma.TaskScalarFieldEnum | Prisma.TaskScalarFieldEnum[] +} + +/** + * Task findMany + */ +export type TaskFindManyArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * Filter, which Tasks to fetch. + */ + where?: Prisma.TaskWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Tasks to fetch. + */ + orderBy?: Prisma.TaskOrderByWithRelationInput | Prisma.TaskOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Tasks. + */ + cursor?: Prisma.TaskWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Tasks 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` Tasks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Tasks. + */ + distinct?: Prisma.TaskScalarFieldEnum | Prisma.TaskScalarFieldEnum[] +} + +/** + * Task create + */ +export type TaskCreateArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * The data needed to create a Task. + */ + data: Prisma.XOR +} + +/** + * Task createMany + */ +export type TaskCreateManyArgs = { + /** + * The data used to create many Tasks. + */ + data: Prisma.TaskCreateManyInput | Prisma.TaskCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Task createManyAndReturn + */ +export type TaskCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * The data used to create many Tasks. + */ + data: Prisma.TaskCreateManyInput | Prisma.TaskCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Task update + */ +export type TaskUpdateArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * The data needed to update a Task. + */ + data: Prisma.XOR + /** + * Choose, which Task to update. + */ + where: Prisma.TaskWhereUniqueInput +} + +/** + * Task updateMany + */ +export type TaskUpdateManyArgs = { + /** + * The data used to update Tasks. + */ + data: Prisma.XOR + /** + * Filter which Tasks to update + */ + where?: Prisma.TaskWhereInput + /** + * Limit how many Tasks to update. + */ + limit?: number +} + +/** + * Task updateManyAndReturn + */ +export type TaskUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * The data used to update Tasks. + */ + data: Prisma.XOR + /** + * Filter which Tasks to update + */ + where?: Prisma.TaskWhereInput + /** + * Limit how many Tasks to update. + */ + limit?: number +} + +/** + * Task upsert + */ +export type TaskUpsertArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * The filter to search for the Task to update in case it exists. + */ + where: Prisma.TaskWhereUniqueInput + /** + * In case the Task found by the `where` argument doesn't exist, create a new Task with this data. + */ + create: Prisma.XOR + /** + * In case the Task was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Task delete + */ +export type TaskDeleteArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null + /** + * Filter which Task to delete. + */ + where: Prisma.TaskWhereUniqueInput +} + +/** + * Task deleteMany + */ +export type TaskDeleteManyArgs = { + /** + * Filter which Tasks to delete + */ + where?: Prisma.TaskWhereInput + /** + * Limit how many Tasks to delete. + */ + limit?: number +} + +/** + * Task.stateHistory + */ +export type Task$stateHistoryArgs = { + /** + * Select specific fields to fetch from the StateHistory + */ + select?: Prisma.StateHistorySelect | null + /** + * Omit specific fields from the StateHistory + */ + omit?: Prisma.StateHistoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.StateHistoryInclude | null + where?: Prisma.StateHistoryWhereInput + orderBy?: Prisma.StateHistoryOrderByWithRelationInput | Prisma.StateHistoryOrderByWithRelationInput[] + cursor?: Prisma.StateHistoryWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.StateHistoryScalarFieldEnum | Prisma.StateHistoryScalarFieldEnum[] +} + +/** + * Task.notes + */ +export type Task$notesArgs = { + /** + * Select specific fields to fetch from the Note + */ + select?: Prisma.NoteSelect | null + /** + * Omit specific fields from the Note + */ + omit?: Prisma.NoteOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.NoteInclude | null + where?: Prisma.NoteWhereInput + orderBy?: Prisma.NoteOrderByWithRelationInput | Prisma.NoteOrderByWithRelationInput[] + cursor?: Prisma.NoteWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.NoteScalarFieldEnum | Prisma.NoteScalarFieldEnum[] +} + +/** + * Task without action + */ +export type TaskDefaultArgs = { + /** + * Select specific fields to fetch from the Task + */ + select?: Prisma.TaskSelect | null + /** + * Omit specific fields from the Task + */ + omit?: Prisma.TaskOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.TaskInclude | null +} diff --git a/src/infrastructure/prisma/client.ts b/src/infrastructure/prisma/client.ts new file mode 100644 index 0000000..340658f --- /dev/null +++ b/src/infrastructure/prisma/client.ts @@ -0,0 +1,11 @@ +import { PrismaClient } from "../../generated/prisma/client.js"; +import { PrismaPg } from "@prisma/adapter-pg"; + +const connectionString = process.env.DATABASE_URL; + +if (!connectionString) { + throw new Error("DATABASE_URL environment variable is not set"); +} + +const adapter = new PrismaPg({ connectionString }); +export const prisma = new PrismaClient({ adapter }); diff --git a/src/infrastructure/state/prisma-state.repository.ts b/src/infrastructure/state/prisma-state.repository.ts new file mode 100644 index 0000000..f7317bd --- /dev/null +++ b/src/infrastructure/state/prisma-state.repository.ts @@ -0,0 +1,17 @@ +import type { State } from "../../domain/state/state.entity.js"; +import type { StateRepository } from "../../domain/state/state.repository.js"; +import type { PrismaClient } from "../../generated/prisma/client.js"; + +export class PrismaStateRepository implements StateRepository { + constructor(private readonly prisma: PrismaClient) {} + + async findAll(): Promise { + const states = await this.prisma.state.findMany(); + return states.map((s) => ({ name: s.name as State["name"] })); + } + + async findByName(name: string): Promise { + const state = await this.prisma.state.findUnique({ where: { name } }); + return state ? { name: state.name as State["name"] } : undefined; + } +} diff --git a/src/infrastructure/task/prisma-task.repository.ts b/src/infrastructure/task/prisma-task.repository.ts new file mode 100644 index 0000000..09286f4 --- /dev/null +++ b/src/infrastructure/task/prisma-task.repository.ts @@ -0,0 +1,133 @@ +import type { Task as DomainTask, StateEntry } from "../../domain/task/task.entity.js"; +import type { TaskRepository } from "../../domain/task/task.repository.js"; +import type { PrismaClient } from "../../generated/prisma/client.js"; + +export class PrismaTaskRepository implements TaskRepository { + constructor(private readonly prisma: PrismaClient) {} + + async findAll(): Promise { + const tasks = await this.prisma.task.findMany({ + where: { deletedAt: null }, + include: { + stateHistory: { orderBy: { order: "asc" } }, + notes: { orderBy: { order: "asc" } }, + }, + }); + return tasks.map(this.toDomain); + } + + async findById(id: string): Promise { + const task = await this.prisma.task.findFirst({ + where: { id, deletedAt: null }, + include: { + stateHistory: { orderBy: { order: "asc" } }, + notes: { orderBy: { order: "asc" } }, + }, + }); + return task ? this.toDomain(task) : undefined; + } + + async create(task: DomainTask): Promise { + const created = await this.prisma.task.create({ + data: { + id: task.id, + title: task.title, + description: task.description, + dueDate: task.dueDate, + completed: task.completed, + stateHistory: { + create: task.stateHistory.map((entry, index) => ({ + state: entry.state, + date: entry.date, + order: index, + })), + }, + notes: { + create: task.notes.map((content, index) => ({ + content, + order: index, + })), + }, + }, + include: { + stateHistory: { orderBy: { order: "asc" } }, + notes: { orderBy: { order: "asc" } }, + }, + }); + + return this.toDomain(created); + } + + async update(id: string, updates: Partial): Promise { + const existing = await this.prisma.task.findFirst({ where: { id, deletedAt: null } }); + if (!existing) return undefined; + + const { stateHistory, notes, ...taskFields } = updates; + + await this.prisma.task.update({ + where: { id }, + data: taskFields, + }); + + if (stateHistory) { + await this.prisma.stateHistory.deleteMany({ where: { taskId: id } }); + await this.prisma.stateHistory.createMany({ + data: stateHistory.map((entry, index) => ({ + state: entry.state, + date: entry.date, + taskId: id, + order: index, + })), + }); + } + + if (notes) { + await this.prisma.note.deleteMany({ where: { taskId: id } }); + await this.prisma.note.createMany({ + data: notes.map((content, index) => ({ + content, + taskId: id, + order: index, + })), + }); + } + + return this.findById(id); + } + + async delete(id: string): Promise { + try { + await this.prisma.task.update({ + where: { id }, + data: { deletedAt: new Date() }, + }); + return true; + } catch { + return false; + } + } + + private toDomain(task: { + id: string; + title: string; + description: string; + dueDate: string; + completed: boolean; + deletedAt: Date | null; + stateHistory: { state: string; date: string }[]; + notes: { content: string }[]; + }): DomainTask { + return { + id: task.id, + title: task.title, + description: task.description, + dueDate: task.dueDate, + completed: task.completed, + deletedAt: task.deletedAt, + stateHistory: task.stateHistory.map( + (entry) => ({ state: entry.state as DomainTask["stateHistory"][number]["state"], date: entry.date } as StateEntry) + ), + notes: task.notes.map((n) => n.content), + }; + } +}