From 1760303dbdd172c0f669947c2c9779ddcdfe245f Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 26 Jun 2026 13:39:55 +0100 Subject: [PATCH] chore: generate prisma --- generated/prisma/browser.ts | 5 + generated/prisma/client.ts | 9 +- generated/prisma/commonInputTypes.ts | 212 +-- generated/prisma/internal/class.ts | 32 +- generated/prisma/internal/prismaNamespace.ts | 120 +- .../prisma/internal/prismaNamespaceBrowser.ts | 12 + generated/prisma/models.ts | 1 + generated/prisma/models/BlogPost.ts | 1155 +++++++++++++++++ generated/prisma/models/PhotoPost.ts | 15 +- 9 files changed, 1424 insertions(+), 137 deletions(-) create mode 100644 generated/prisma/models/BlogPost.ts diff --git a/generated/prisma/browser.ts b/generated/prisma/browser.ts index c86ef78..d7cebba 100644 --- a/generated/prisma/browser.ts +++ b/generated/prisma/browser.ts @@ -17,6 +17,11 @@ import * as Prisma from './internal/prismaNamespaceBrowser.js' export { Prisma } export * as $Enums from './enums.js' export * from './enums.js'; +/** + * Model BlogPost + * + */ +export type BlogPost = Prisma.BlogPostModel /** * Model PhotoPost * diff --git a/generated/prisma/client.ts b/generated/prisma/client.ts index 58b15e2..20be407 100644 --- a/generated/prisma/client.ts +++ b/generated/prisma/client.ts @@ -31,8 +31,8 @@ export * from "./enums.js" * const prisma = new PrismaClient({ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) * }) - * // Fetch zero or more PhotoPosts - * const photoPosts = await prisma.photoPost.findMany() + * // Fetch zero or more BlogPosts + * const blogPosts = await prisma.blogPost.findMany() * ``` * * Read more in our [docs](https://pris.ly/d/client). @@ -41,6 +41,11 @@ export const PrismaClient = $Class.getPrismaClientClass() export type PrismaClient = $Class.PrismaClient export { Prisma } +/** + * Model BlogPost + * + */ +export type BlogPost = Prisma.BlogPostModel /** * Model PhotoPost * diff --git a/generated/prisma/commonInputTypes.ts b/generated/prisma/commonInputTypes.ts index 7a5e3ac..34dac58 100644 --- a/generated/prisma/commonInputTypes.ts +++ b/generated/prisma/commonInputTypes.ts @@ -14,15 +14,18 @@ import * as $Enums from "./enums.js" import type * as Prisma from "./internal/prismaNamespace.js" -export type IntFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - 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 StringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + 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 DateTimeFilter<$PrismaModel = never> = { @@ -36,18 +39,7 @@ export type DateTimeFilter<$PrismaModel = never> = { not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string } -export type DateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null - 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.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null -} - -export type StringFilter<$PrismaModel = never> = { +export type StringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] @@ -58,7 +50,46 @@ export type StringFilter<$PrismaModel = never> = { contains?: string | Prisma.StringFieldRefInput<$PrismaModel> startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringFilter<$PrismaModel> | string + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + 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[] + notIn?: number[] + 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 DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + 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.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } export type StringNullableFilter<$PrismaModel = never> = { @@ -96,20 +127,6 @@ export type IntWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedIntFilter<$PrismaModel> } -export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] - 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 DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null in?: Date[] | string[] | null @@ -124,23 +141,6 @@ export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> } -export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - 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 StringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null in?: string[] | null @@ -158,15 +158,18 @@ export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedStringNullableFilter<$PrismaModel> } -export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> - in?: number[] - notIn?: number[] - 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 NestedStringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + 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 NestedDateTimeFilter<$PrismaModel = never> = { @@ -180,18 +183,7 @@ export type NestedDateTimeFilter<$PrismaModel = never> = { not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string } -export type NestedDateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | null - notIn?: Date[] | string[] | null - 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.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null -} - -export type NestedStringFilter<$PrismaModel = never> = { +export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] @@ -202,7 +194,46 @@ export type NestedStringFilter<$PrismaModel = never> = { contains?: string | Prisma.StringFieldRefInput<$PrismaModel> startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - not?: Prisma.NestedStringFilter<$PrismaModel> | string + 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[] + notIn?: number[] + 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 NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + 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 NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + 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.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } export type NestedStringNullableFilter<$PrismaModel = never> = { @@ -246,20 +277,6 @@ export type NestedFloatFilter<$PrismaModel = never> = { not?: Prisma.NestedFloatFilter<$PrismaModel> | number } -export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> - in?: Date[] | string[] - notIn?: Date[] | string[] - 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 NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null in?: Date[] | string[] | null @@ -285,23 +302,6 @@ export type NestedIntNullableFilter<$PrismaModel = never> = { not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null } -export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> - in?: string[] - notIn?: string[] - 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 NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null in?: string[] | null diff --git a/generated/prisma/internal/class.ts b/generated/prisma/internal/class.ts index ee12b52..94249c8 100644 --- a/generated/prisma/internal/class.ts +++ b/generated/prisma/internal/class.ts @@ -17,10 +17,10 @@ import type * as Prisma from "./prismaNamespace.js" const config: runtime.GetPrismaClientConfig = { "previewFeatures": [], - "clientVersion": "7.4.2", - "engineVersion": "94a226be1cf2967af2541cca5529f0f7ba866919", + "clientVersion": "7.8.0", + "engineVersion": "3c6e192761c0362d496ed980de936e2f3cebcd3a", "activeProvider": "sqlite", - "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel PhotoPost {\n id Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n deletedAt DateTime?\n publishedAt DateTime?\n filePath String\n fileName String\n title String\n description String?\n}\n", + "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel BlogPost {\n id String @id @default(uuid())\n slug String\n title String\n publishedAt DateTime\n preview String\n}\n\nmodel PhotoPost {\n id Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n deletedAt DateTime?\n publishedAt DateTime?\n filePath String\n fileName String\n title String\n description String?\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -32,10 +32,10 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"PhotoPost\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"publishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"filePath\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fileName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"BlogPost\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"slug\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"publishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"preview\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null},\"PhotoPost\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"publishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"filePath\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fileName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") config.parameterizationSchema = { - strings: JSON.parse("[\"where\",\"PhotoPost.findUnique\",\"PhotoPost.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"PhotoPost.findFirst\",\"PhotoPost.findFirstOrThrow\",\"PhotoPost.findMany\",\"data\",\"PhotoPost.createOne\",\"PhotoPost.createMany\",\"PhotoPost.createManyAndReturn\",\"PhotoPost.updateOne\",\"PhotoPost.updateMany\",\"PhotoPost.updateManyAndReturn\",\"create\",\"update\",\"PhotoPost.upsertOne\",\"PhotoPost.deleteOne\",\"PhotoPost.deleteMany\",\"having\",\"_count\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"PhotoPost.groupBy\",\"PhotoPost.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"createdAt\",\"deletedAt\",\"publishedAt\",\"filePath\",\"fileName\",\"title\",\"description\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"contains\",\"startsWith\",\"endsWith\",\"not\",\"set\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), - graph: "PAsQCxwAACwAMB0AAAQAEB4AACwAMB8CAAAAASBAAC4AISFAAC8AISJAAC8AISMBADAAISQBADAAISUBADAAISYBADEAIQEAAAABACABAAAAAQAgCxwAACwAMB0AAAQAEB4AACwAMB8CAC0AISBAAC4AISFAAC8AISJAAC8AISMBADAAISQBADAAISUBADAAISYBADEAIQMhAAAyACAiAAAyACAmAAAyACADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAMAAAAEACADAAAFADAEAAABACAIHwIAAAABIEAAAAABIUAAAAABIkAAAAABIwEAAAABJAEAAAABJQEAAAABJgEAAAABAQgAAAkAIAgfAgAAAAEgQAAAAAEhQAAAAAEiQAAAAAEjAQAAAAEkAQAAAAElAQAAAAEmAQAAAAEBCAAACwAwAQgAAAsAMAgfAgA8ACEgQAA4ACEhQAA5ACEiQAA5ACEjAQA6ACEkAQA6ACElAQA6ACEmAQA7ACECAAAAAQAgCAAADgAgCB8CADwAISBAADgAISFAADkAISJAADkAISMBADoAISQBADoAISUBADoAISYBADsAIQIAAAAEACAIAAAQACACAAAABAAgCAAAEAAgAwAAAAEAIA8AAAkAIBAAAA4AIAEAAAABACABAAAABAAgCBUAADMAIBYAADQAIBcAADcAIBgAADYAIBkAADUAICEAADIAICIAADIAICYAADIAIAscAAAaADAdAAAXABAeAAAaADAfAgAbACEgQAAcACEhQAAdACEiQAAdACEjAQAeACEkAQAeACElAQAeACEmAQAfACEDAAAABAAgAwAAFgAwFAAAFwAgAwAAAAQAIAMAAAUAMAQAAAEAIAscAAAaADAdAAAXABAeAAAaADAfAgAbACEgQAAcACEhQAAdACEiQAAdACEjAQAeACEkAQAeACElAQAeACEmAQAfACENFQAAJAAgFgAAKwAgFwAAJAAgGAAAJAAgGQAAJAAgJwIAAAABKAIAAAAEKQIAAAAEKgIAAAABKwIAAAABLAIAAAABLQIAAAABMQIAKgAhCxUAACQAIBgAACkAIBkAACkAICdAAAAAAShAAAAABClAAAAABCpAAAAAAStAAAAAASxAAAAAAS1AAAAAATFAACgAIQsVAAAhACAYAAAnACAZAAAnACAnQAAAAAEoQAAAAAUpQAAAAAUqQAAAAAErQAAAAAEsQAAAAAEtQAAAAAExQAAmACEOFQAAJAAgGAAAJQAgGQAAJQAgJwEAAAABKAEAAAAEKQEAAAAEKgEAAAABKwEAAAABLAEAAAABLQEAAAABLgEAAAABLwEAAAABMAEAAAABMQEAIwAhDhUAACEAIBgAACIAIBkAACIAICcBAAAAASgBAAAABSkBAAAABSoBAAAAASsBAAAAASwBAAAAAS0BAAAAAS4BAAAAAS8BAAAAATABAAAAATEBACAAIQ4VAAAhACAYAAAiACAZAAAiACAnAQAAAAEoAQAAAAUpAQAAAAUqAQAAAAErAQAAAAEsAQAAAAEtAQAAAAEuAQAAAAEvAQAAAAEwAQAAAAExAQAgACEIJwIAAAABKAIAAAAFKQIAAAAFKgIAAAABKwIAAAABLAIAAAABLQIAAAABMQIAIQAhCycBAAAAASgBAAAABSkBAAAABSoBAAAAASsBAAAAASwBAAAAAS0BAAAAAS4BAAAAAS8BAAAAATABAAAAATEBACIAIQ4VAAAkACAYAAAlACAZAAAlACAnAQAAAAEoAQAAAAQpAQAAAAQqAQAAAAErAQAAAAEsAQAAAAEtAQAAAAEuAQAAAAEvAQAAAAEwAQAAAAExAQAjACEIJwIAAAABKAIAAAAEKQIAAAAEKgIAAAABKwIAAAABLAIAAAABLQIAAAABMQIAJAAhCycBAAAAASgBAAAABCkBAAAABCoBAAAAASsBAAAAASwBAAAAAS0BAAAAAS4BAAAAAS8BAAAAATABAAAAATEBACUAIQsVAAAhACAYAAAnACAZAAAnACAnQAAAAAEoQAAAAAUpQAAAAAUqQAAAAAErQAAAAAEsQAAAAAEtQAAAAAExQAAmACEIJ0AAAAABKEAAAAAFKUAAAAAFKkAAAAABK0AAAAABLEAAAAABLUAAAAABMUAAJwAhCxUAACQAIBgAACkAIBkAACkAICdAAAAAAShAAAAABClAAAAABCpAAAAAAStAAAAAASxAAAAAAS1AAAAAATFAACgAIQgnQAAAAAEoQAAAAAQpQAAAAAQqQAAAAAErQAAAAAEsQAAAAAEtQAAAAAExQAApACENFQAAJAAgFgAAKwAgFwAAJAAgGAAAJAAgGQAAJAAgJwIAAAABKAIAAAAEKQIAAAAEKgIAAAABKwIAAAABLAIAAAABLQIAAAABMQIAKgAhCCcIAAAAASgIAAAABCkIAAAABCoIAAAAASsIAAAAASwIAAAAAS0IAAAAATEIACsAIQscAAAsADAdAAAEABAeAAAsADAfAgAtACEgQAAuACEhQAAvACEiQAAvACEjAQAwACEkAQAwACElAQAwACEmAQAxACEIJwIAAAABKAIAAAAEKQIAAAAEKgIAAAABKwIAAAABLAIAAAABLQIAAAABMQIAJAAhCCdAAAAAAShAAAAABClAAAAABCpAAAAAAStAAAAAASxAAAAAAS1AAAAAATFAACkAIQgnQAAAAAEoQAAAAAUpQAAAAAUqQAAAAAErQAAAAAEsQAAAAAEtQAAAAAExQAAnACELJwEAAAABKAEAAAAEKQEAAAAEKgEAAAABKwEAAAABLAEAAAABLQEAAAABLgEAAAABLwEAAAABMAEAAAABMQEAJQAhCycBAAAAASgBAAAABSkBAAAABSoBAAAAASsBAAAAASwBAAAAAS0BAAAAAS4BAAAAAS8BAAAAATABAAAAATEBACIAIQAAAAAAAAEyQAAAAAEBMkAAAAABATIBAAAAAQEyAQAAAAEFMgIAAAABMwIAAAABNAIAAAABNQIAAAABNgIAAAABAAAAAAUVAAYWAAcXAAgYAAkZAAoAAAAAAAUVAAYWAAcXAAgYAAkZAAoBAgECAwEFBgEGBwEHCAEJCgEKDAILDQMMDwENEQIOEgQREwESFAETFQIaGAUbGQs" + strings: JSON.parse("[\"where\",\"BlogPost.findUnique\",\"BlogPost.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"BlogPost.findFirst\",\"BlogPost.findFirstOrThrow\",\"BlogPost.findMany\",\"data\",\"BlogPost.createOne\",\"BlogPost.createMany\",\"BlogPost.createManyAndReturn\",\"BlogPost.updateOne\",\"BlogPost.updateMany\",\"BlogPost.updateManyAndReturn\",\"create\",\"update\",\"BlogPost.upsertOne\",\"BlogPost.deleteOne\",\"BlogPost.deleteMany\",\"having\",\"_count\",\"_min\",\"_max\",\"BlogPost.groupBy\",\"BlogPost.aggregate\",\"PhotoPost.findUnique\",\"PhotoPost.findUniqueOrThrow\",\"PhotoPost.findFirst\",\"PhotoPost.findFirstOrThrow\",\"PhotoPost.findMany\",\"PhotoPost.createOne\",\"PhotoPost.createMany\",\"PhotoPost.createManyAndReturn\",\"PhotoPost.updateOne\",\"PhotoPost.updateMany\",\"PhotoPost.updateManyAndReturn\",\"PhotoPost.upsertOne\",\"PhotoPost.deleteOne\",\"PhotoPost.deleteMany\",\"_avg\",\"_sum\",\"PhotoPost.groupBy\",\"PhotoPost.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"createdAt\",\"deletedAt\",\"publishedAt\",\"filePath\",\"fileName\",\"title\",\"description\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"contains\",\"startsWith\",\"endsWith\",\"not\",\"slug\",\"preview\",\"set\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), + graph: "WhMgCCwAAEwAMC0AAAQAEC4AAEwAMC8BAAAAATJAAEcAITUBAEkAIUIBAEkAIUMBAEkAIQEAAAABACABAAAAAQAgCCwAAEwAMC0AAAQAEC4AAEwAMC8BAEkAITJAAEcAITUBAEkAIUIBAEkAIUMBAEkAIQADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAMAAAAEACADAAAFADAEAAABACAFLwEAAAABMkAAAAABNQEAAAABQgEAAAABQwEAAAABAQgAAAkAIAUvAQAAAAEyQAAAAAE1AQAAAAFCAQAAAAFDAQAAAAEBCAAACwAwAQgAAAsAMAUvAQBVACEyQABTACE1AQBVACFCAQBVACFDAQBVACECAAAAAQAgCAAADgAgBS8BAFUAITJAAFMAITUBAFUAIUIBAFUAIUMBAFUAIQIAAAAEACAIAAAQACACAAAABAAgCAAAEAAgAwAAAAEAIA8AAAkAIBAAAA4AIAEAAAABACABAAAABAAgAxUAAFgAIBYAAFoAIBcAAFkAIAgsAABLADAtAAAXABAuAABLADAvAQA3ACEyQAA1ACE1AQA3ACFCAQA3ACFDAQA3ACEDAAAABAAgAwAAFgAwFAAAFwAgAwAAAAQAIAMAAAUAMAQAAAEAIAssAABFADAtAAAdABAuAABFADAvAgAAAAEwQABHACExQABIACEyQABIACEzAQBJACE0AQBJACE1AQBJACE2AQBKACEBAAAAGgAgAQAAABoAIAssAABFADAtAAAdABAuAABFADAvAgBGACEwQABHACExQABIACEyQABIACEzAQBJACE0AQBJACE1AQBJACE2AQBKACEDMQAATQAgMgAATQAgNgAATQAgAwAAAB0AIAMAAB4AMAQAABoAIAMAAAAdACADAAAeADAEAAAaACADAAAAHQAgAwAAHgAwBAAAGgAgCC8CAAAAATBAAAAAATFAAAAAATJAAAAAATMBAAAAATQBAAAAATUBAAAAATYBAAAAAQEIAAAiACAILwIAAAABMEAAAAABMUAAAAABMkAAAAABMwEAAAABNAEAAAABNQEAAAABNgEAAAABAQgAACQAMAEIAAAkADAILwIAVwAhMEAAUwAhMUAAVAAhMkAAVAAhMwEAVQAhNAEAVQAhNQEAVQAhNgEAVgAhAgAAABoAIAgAACcAIAgvAgBXACEwQABTACExQABUACEyQABUACEzAQBVACE0AQBVACE1AQBVACE2AQBWACECAAAAHQAgCAAAKQAgAgAAAB0AIAgAACkAIAMAAAAaACAPAAAiACAQAAAnACABAAAAGgAgAQAAAB0AIAgVAABOACAWAABRACAXAABQACAoAABPACApAABSACAxAABNACAyAABNACA2AABNACALLAAAMwAwLQAAMAAQLgAAMwAwLwIANAAhMEAANQAhMUAANgAhMkAANgAhMwEANwAhNAEANwAhNQEANwAhNgEAOAAhAwAAAB0AIAMAAC8AMBQAADAAIAMAAAAdACADAAAeADAEAAAaACALLAAAMwAwLQAAMAAQLgAAMwAwLwIANAAhMEAANQAhMUAANgAhMkAANgAhMwEANwAhNAEANwAhNQEANwAhNgEAOAAhDRUAAD0AIBYAAD0AIBcAAD0AICgAAEQAICkAAD0AIDcCAAAAATgCAAAABDkCAAAABDoCAAAAATsCAAAAATwCAAAAAT0CAAAAAUECAEMAIQsVAAA9ACAWAABCACAXAABCACA3QAAAAAE4QAAAAAQ5QAAAAAQ6QAAAAAE7QAAAAAE8QAAAAAE9QAAAAAFBQABBACELFQAAOgAgFgAAQAAgFwAAQAAgN0AAAAABOEAAAAAFOUAAAAAFOkAAAAABO0AAAAABPEAAAAABPUAAAAABQUAAPwAhDhUAAD0AIBYAAD4AIBcAAD4AIDcBAAAAATgBAAAABDkBAAAABDoBAAAAATsBAAAAATwBAAAAAT0BAAAAAT4BAAAAAT8BAAAAAUABAAAAAUEBADwAIQ4VAAA6ACAWAAA7ACAXAAA7ACA3AQAAAAE4AQAAAAU5AQAAAAU6AQAAAAE7AQAAAAE8AQAAAAE9AQAAAAE-AQAAAAE_AQAAAAFAAQAAAAFBAQA5ACEOFQAAOgAgFgAAOwAgFwAAOwAgNwEAAAABOAEAAAAFOQEAAAAFOgEAAAABOwEAAAABPAEAAAABPQEAAAABPgEAAAABPwEAAAABQAEAAAABQQEAOQAhCDcCAAAAATgCAAAABTkCAAAABToCAAAAATsCAAAAATwCAAAAAT0CAAAAAUECADoAIQs3AQAAAAE4AQAAAAU5AQAAAAU6AQAAAAE7AQAAAAE8AQAAAAE9AQAAAAE-AQAAAAE_AQAAAAFAAQAAAAFBAQA7ACEOFQAAPQAgFgAAPgAgFwAAPgAgNwEAAAABOAEAAAAEOQEAAAAEOgEAAAABOwEAAAABPAEAAAABPQEAAAABPgEAAAABPwEAAAABQAEAAAABQQEAPAAhCDcCAAAAATgCAAAABDkCAAAABDoCAAAAATsCAAAAATwCAAAAAT0CAAAAAUECAD0AIQs3AQAAAAE4AQAAAAQ5AQAAAAQ6AQAAAAE7AQAAAAE8AQAAAAE9AQAAAAE-AQAAAAE_AQAAAAFAAQAAAAFBAQA-ACELFQAAOgAgFgAAQAAgFwAAQAAgN0AAAAABOEAAAAAFOUAAAAAFOkAAAAABO0AAAAABPEAAAAABPUAAAAABQUAAPwAhCDdAAAAAAThAAAAABTlAAAAABTpAAAAAATtAAAAAATxAAAAAAT1AAAAAAUFAAEAAIQsVAAA9ACAWAABCACAXAABCACA3QAAAAAE4QAAAAAQ5QAAAAAQ6QAAAAAE7QAAAAAE8QAAAAAE9QAAAAAFBQABBACEIN0AAAAABOEAAAAAEOUAAAAAEOkAAAAABO0AAAAABPEAAAAABPUAAAAABQUAAQgAhDRUAAD0AIBYAAD0AIBcAAD0AICgAAEQAICkAAD0AIDcCAAAAATgCAAAABDkCAAAABDoCAAAAATsCAAAAATwCAAAAAT0CAAAAAUECAEMAIQg3CAAAAAE4CAAAAAQ5CAAAAAQ6CAAAAAE7CAAAAAE8CAAAAAE9CAAAAAFBCABEACELLAAARQAwLQAAHQAQLgAARQAwLwIARgAhMEAARwAhMUAASAAhMkAASAAhMwEASQAhNAEASQAhNQEASQAhNgEASgAhCDcCAAAAATgCAAAABDkCAAAABDoCAAAAATsCAAAAATwCAAAAAT0CAAAAAUECAD0AIQg3QAAAAAE4QAAAAAQ5QAAAAAQ6QAAAAAE7QAAAAAE8QAAAAAE9QAAAAAFBQABCACEIN0AAAAABOEAAAAAFOUAAAAAFOkAAAAABO0AAAAABPEAAAAABPUAAAAABQUAAQAAhCzcBAAAAATgBAAAABDkBAAAABDoBAAAAATsBAAAAATwBAAAAAT0BAAAAAT4BAAAAAT8BAAAAAUABAAAAAUEBAD4AIQs3AQAAAAE4AQAAAAU5AQAAAAU6AQAAAAE7AQAAAAE8AQAAAAE9AQAAAAE-AQAAAAE_AQAAAAFAAQAAAAFBAQA7ACEILAAASwAwLQAAFwAQLgAASwAwLwEANwAhMkAANQAhNQEANwAhQgEANwAhQwEANwAhCCwAAEwAMC0AAAQAEC4AAEwAMC8BAEkAITJAAEcAITUBAEkAIUIBAEkAIUMBAEkAIQAAAAAAAAFEQAAAAAEBREAAAAABAUQBAAAAAQFEAQAAAAEFRAIAAAABRQIAAAABRgIAAAABRwIAAAABSAIAAAABAAAAAAAAAAMVAAYWAAcXAAgAAAADFQAGFgAHFwAIAAAABRUADhYAERcAEigADykAEAAAAAAABRUADhYAERcAEigADykAEAECAQIDAQUGAQYHAQcIAQkKAQoMAgsNAwwPAQ0RAg4SBBETARIUARMVAhgYBRkZCRobChscChwfCh0gCh4hCh8jCiAlAiEmCyIoCiMqAiQrDCUsCiYtCicuAioxDSsyEw" } async function decodeBase64AsWasm(wasmBase64: string): Promise { @@ -70,8 +70,8 @@ export interface PrismaClientConstructor { * const prisma = new PrismaClient({ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) * }) - * // Fetch zero or more PhotoPosts - * const photoPosts = await prisma.photoPost.findMany() + * // Fetch zero or more BlogPosts + * const blogPosts = await prisma.blogPost.findMany() * ``` * * Read more in our [docs](https://pris.ly/d/client). @@ -94,8 +94,8 @@ export interface PrismaClientConstructor { * const prisma = new PrismaClient({ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) * }) - * // Fetch zero or more PhotoPosts - * const photoPosts = await prisma.photoPost.findMany() + * // Fetch zero or more BlogPosts + * const blogPosts = await prisma.blogPost.findMany() * ``` * * Read more in our [docs](https://pris.ly/d/client). @@ -180,7 +180,7 @@ export interface PrismaClient< * * Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions). */ - $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise> + $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 @@ -189,6 +189,16 @@ export interface PrismaClient< }>> /** + * `prisma.blogPost`: Exposes CRUD operations for the **BlogPost** model. + * Example usage: + * ```ts + * // Fetch zero or more BlogPosts + * const blogPosts = await prisma.blogPost.findMany() + * ``` + */ + get blogPost(): Prisma.BlogPostDelegate; + + /** * `prisma.photoPost`: Exposes CRUD operations for the **PhotoPost** model. * Example usage: * ```ts diff --git a/generated/prisma/internal/prismaNamespace.ts b/generated/prisma/internal/prismaNamespace.ts index 78ae0b2..6f83ab7 100644 --- a/generated/prisma/internal/prismaNamespace.ts +++ b/generated/prisma/internal/prismaNamespace.ts @@ -80,12 +80,12 @@ export type PrismaVersion = { } /** - * Prisma Client JS version: 7.4.2 - * Query Engine version: 94a226be1cf2967af2541cca5529f0f7ba866919 + * Prisma Client JS version: 7.8.0 + * Query Engine version: 3c6e192761c0362d496ed980de936e2f3cebcd3a */ export const prismaVersion: PrismaVersion = { - client: "7.4.2", - engine: "94a226be1cf2967af2541cca5529f0f7ba866919" + client: "7.8.0", + engine: "3c6e192761c0362d496ed980de936e2f3cebcd3a" } /** @@ -384,6 +384,7 @@ type FieldRefInputType = Model extends never ? never : FieldRe export const ModelName = { + BlogPost: 'BlogPost', PhotoPost: 'PhotoPost' } as const @@ -400,10 +401,84 @@ export type TypeMap + fields: Prisma.BlogPostFieldRefs + operations: { + findUnique: { + args: Prisma.BlogPostFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.BlogPostFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.BlogPostFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.BlogPostFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.BlogPostFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.BlogPostCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.BlogPostCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.BlogPostCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.BlogPostDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.BlogPostUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.BlogPostDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.BlogPostUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.BlogPostUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.BlogPostUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.BlogPostAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.BlogPostGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.BlogPostCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } PhotoPost: { payload: Prisma.$PhotoPostPayload fields: Prisma.PhotoPostFieldRefs @@ -514,6 +589,17 @@ export const TransactionIsolationLevel = runtime.makeStrictEnum({ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] +export const BlogPostScalarFieldEnum = { + id: 'id', + slug: 'slug', + title: 'title', + publishedAt: 'publishedAt', + preview: 'preview' +} as const + +export type BlogPostScalarFieldEnum = (typeof BlogPostScalarFieldEnum)[keyof typeof BlogPostScalarFieldEnum] + + export const PhotoPostScalarFieldEnum = { id: 'id', createdAt: 'createdAt', @@ -551,9 +637,9 @@ export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] /** - * Reference to a field of type 'Int' + * Reference to a field of type 'String' */ -export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> +export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> @@ -565,9 +651,9 @@ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel /** - * Reference to a field of type 'String' + * Reference to a field of type 'Int' */ -export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> @@ -670,8 +756,24 @@ export type PrismaClientOptions = ({ * ``` */ 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 = { + blogPost?: Prisma.BlogPostOmit photoPost?: Prisma.PhotoPostOmit } diff --git a/generated/prisma/internal/prismaNamespaceBrowser.ts b/generated/prisma/internal/prismaNamespaceBrowser.ts index 039fa28..42133e7 100644 --- a/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -51,6 +51,7 @@ export const AnyNull = runtime.AnyNull export const ModelName = { + BlogPost: 'BlogPost', PhotoPost: 'PhotoPost' } as const @@ -67,6 +68,17 @@ export const TransactionIsolationLevel = runtime.makeStrictEnum({ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] +export const BlogPostScalarFieldEnum = { + id: 'id', + slug: 'slug', + title: 'title', + publishedAt: 'publishedAt', + preview: 'preview' +} as const + +export type BlogPostScalarFieldEnum = (typeof BlogPostScalarFieldEnum)[keyof typeof BlogPostScalarFieldEnum] + + export const PhotoPostScalarFieldEnum = { id: 'id', createdAt: 'createdAt', diff --git a/generated/prisma/models.ts b/generated/prisma/models.ts index 0e7c04a..9afd83b 100644 --- a/generated/prisma/models.ts +++ b/generated/prisma/models.ts @@ -8,5 +8,6 @@ * * 🟢 You can import this file directly. */ +export type * from './models/BlogPost.js' export type * from './models/PhotoPost.js' export type * from './commonInputTypes.js' \ No newline at end of file diff --git a/generated/prisma/models/BlogPost.ts b/generated/prisma/models/BlogPost.ts new file mode 100644 index 0000000..d56e171 --- /dev/null +++ b/generated/prisma/models/BlogPost.ts @@ -0,0 +1,1155 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `BlogPost` 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.js" +import type * as Prisma from "../internal/prismaNamespace.js" + +/** + * Model BlogPost + * + */ +export type BlogPostModel = runtime.Types.Result.DefaultSelection + +export type AggregateBlogPost = { + _count: BlogPostCountAggregateOutputType | null + _min: BlogPostMinAggregateOutputType | null + _max: BlogPostMaxAggregateOutputType | null +} + +export type BlogPostMinAggregateOutputType = { + id: string | null + slug: string | null + title: string | null + publishedAt: Date | null + preview: string | null +} + +export type BlogPostMaxAggregateOutputType = { + id: string | null + slug: string | null + title: string | null + publishedAt: Date | null + preview: string | null +} + +export type BlogPostCountAggregateOutputType = { + id: number + slug: number + title: number + publishedAt: number + preview: number + _all: number +} + + +export type BlogPostMinAggregateInputType = { + id?: true + slug?: true + title?: true + publishedAt?: true + preview?: true +} + +export type BlogPostMaxAggregateInputType = { + id?: true + slug?: true + title?: true + publishedAt?: true + preview?: true +} + +export type BlogPostCountAggregateInputType = { + id?: true + slug?: true + title?: true + publishedAt?: true + preview?: true + _all?: true +} + +export type BlogPostAggregateArgs = { + /** + * Filter which BlogPost to aggregate. + */ + where?: Prisma.BlogPostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of BlogPosts to fetch. + */ + orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.BlogPostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` BlogPosts 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` BlogPosts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned BlogPosts + **/ + _count?: true | BlogPostCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: BlogPostMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: BlogPostMaxAggregateInputType +} + +export type GetBlogPostAggregateType = { + [P in keyof T & keyof AggregateBlogPost]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type BlogPostGroupByArgs = { + where?: Prisma.BlogPostWhereInput + orderBy?: Prisma.BlogPostOrderByWithAggregationInput | Prisma.BlogPostOrderByWithAggregationInput[] + by: Prisma.BlogPostScalarFieldEnum[] | Prisma.BlogPostScalarFieldEnum + having?: Prisma.BlogPostScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: BlogPostCountAggregateInputType | true + _min?: BlogPostMinAggregateInputType + _max?: BlogPostMaxAggregateInputType +} + +export type BlogPostGroupByOutputType = { + id: string + slug: string + title: string + publishedAt: Date + preview: string + _count: BlogPostCountAggregateOutputType | null + _min: BlogPostMinAggregateOutputType | null + _max: BlogPostMaxAggregateOutputType | null +} + +export type GetBlogPostGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof BlogPostGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type BlogPostWhereInput = { + AND?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[] + OR?: Prisma.BlogPostWhereInput[] + NOT?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[] + id?: Prisma.StringFilter<"BlogPost"> | string + slug?: Prisma.StringFilter<"BlogPost"> | string + title?: Prisma.StringFilter<"BlogPost"> | string + publishedAt?: Prisma.DateTimeFilter<"BlogPost"> | Date | string + preview?: Prisma.StringFilter<"BlogPost"> | string +} + +export type BlogPostOrderByWithRelationInput = { + id?: Prisma.SortOrder + slug?: Prisma.SortOrder + title?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + preview?: Prisma.SortOrder +} + +export type BlogPostWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[] + OR?: Prisma.BlogPostWhereInput[] + NOT?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[] + slug?: Prisma.StringFilter<"BlogPost"> | string + title?: Prisma.StringFilter<"BlogPost"> | string + publishedAt?: Prisma.DateTimeFilter<"BlogPost"> | Date | string + preview?: Prisma.StringFilter<"BlogPost"> | string +}, "id"> + +export type BlogPostOrderByWithAggregationInput = { + id?: Prisma.SortOrder + slug?: Prisma.SortOrder + title?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + preview?: Prisma.SortOrder + _count?: Prisma.BlogPostCountOrderByAggregateInput + _max?: Prisma.BlogPostMaxOrderByAggregateInput + _min?: Prisma.BlogPostMinOrderByAggregateInput +} + +export type BlogPostScalarWhereWithAggregatesInput = { + AND?: Prisma.BlogPostScalarWhereWithAggregatesInput | Prisma.BlogPostScalarWhereWithAggregatesInput[] + OR?: Prisma.BlogPostScalarWhereWithAggregatesInput[] + NOT?: Prisma.BlogPostScalarWhereWithAggregatesInput | Prisma.BlogPostScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string + slug?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string + title?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string + publishedAt?: Prisma.DateTimeWithAggregatesFilter<"BlogPost"> | Date | string + preview?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string +} + +export type BlogPostCreateInput = { + id?: string + slug: string + title: string + publishedAt: Date | string + preview: string +} + +export type BlogPostUncheckedCreateInput = { + id?: string + slug: string + title: string + publishedAt: Date | string + preview: string +} + +export type BlogPostUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + slug?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + preview?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type BlogPostUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + slug?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + preview?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type BlogPostCreateManyInput = { + id?: string + slug: string + title: string + publishedAt: Date | string + preview: string +} + +export type BlogPostUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + slug?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + preview?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type BlogPostUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + slug?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + preview?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type BlogPostCountOrderByAggregateInput = { + id?: Prisma.SortOrder + slug?: Prisma.SortOrder + title?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + preview?: Prisma.SortOrder +} + +export type BlogPostMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + slug?: Prisma.SortOrder + title?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + preview?: Prisma.SortOrder +} + +export type BlogPostMinOrderByAggregateInput = { + id?: Prisma.SortOrder + slug?: Prisma.SortOrder + title?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + preview?: Prisma.SortOrder +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + + + +export type BlogPostSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + slug?: boolean + title?: boolean + publishedAt?: boolean + preview?: boolean +}, ExtArgs["result"]["blogPost"]> + +export type BlogPostSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + slug?: boolean + title?: boolean + publishedAt?: boolean + preview?: boolean +}, ExtArgs["result"]["blogPost"]> + +export type BlogPostSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + slug?: boolean + title?: boolean + publishedAt?: boolean + preview?: boolean +}, ExtArgs["result"]["blogPost"]> + +export type BlogPostSelectScalar = { + id?: boolean + slug?: boolean + title?: boolean + publishedAt?: boolean + preview?: boolean +} + +export type BlogPostOmit = runtime.Types.Extensions.GetOmit<"id" | "slug" | "title" | "publishedAt" | "preview", ExtArgs["result"]["blogPost"]> + +export type $BlogPostPayload = { + name: "BlogPost" + objects: {} + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + slug: string + title: string + publishedAt: Date + preview: string + }, ExtArgs["result"]["blogPost"]> + composites: {} +} + +export type BlogPostGetPayload = runtime.Types.Result.GetResult + +export type BlogPostCountArgs = + Omit & { + select?: BlogPostCountAggregateInputType | true + } + +export interface BlogPostDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['BlogPost'], meta: { name: 'BlogPost' } } + /** + * Find zero or one BlogPost that matches the filter. + * @param {BlogPostFindUniqueArgs} args - Arguments to find a BlogPost + * @example + * // Get one BlogPost + * const blogPost = await prisma.blogPost.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one BlogPost that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {BlogPostFindUniqueOrThrowArgs} args - Arguments to find a BlogPost + * @example + * // Get one BlogPost + * const blogPost = await prisma.blogPost.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first BlogPost 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 {BlogPostFindFirstArgs} args - Arguments to find a BlogPost + * @example + * // Get one BlogPost + * const blogPost = await prisma.blogPost.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first BlogPost 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 {BlogPostFindFirstOrThrowArgs} args - Arguments to find a BlogPost + * @example + * // Get one BlogPost + * const blogPost = await prisma.blogPost.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more BlogPosts 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 {BlogPostFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all BlogPosts + * const blogPosts = await prisma.blogPost.findMany() + * + * // Get first 10 BlogPosts + * const blogPosts = await prisma.blogPost.findMany({ take: 10 }) + * + * // Only select the `id` + * const blogPostWithIdOnly = await prisma.blogPost.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a BlogPost. + * @param {BlogPostCreateArgs} args - Arguments to create a BlogPost. + * @example + * // Create one BlogPost + * const BlogPost = await prisma.blogPost.create({ + * data: { + * // ... data to create a BlogPost + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many BlogPosts. + * @param {BlogPostCreateManyArgs} args - Arguments to create many BlogPosts. + * @example + * // Create many BlogPosts + * const blogPost = await prisma.blogPost.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many BlogPosts and returns the data saved in the database. + * @param {BlogPostCreateManyAndReturnArgs} args - Arguments to create many BlogPosts. + * @example + * // Create many BlogPosts + * const blogPost = await prisma.blogPost.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many BlogPosts and only return the `id` + * const blogPostWithIdOnly = await prisma.blogPost.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 BlogPost. + * @param {BlogPostDeleteArgs} args - Arguments to delete one BlogPost. + * @example + * // Delete one BlogPost + * const BlogPost = await prisma.blogPost.delete({ + * where: { + * // ... filter to delete one BlogPost + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one BlogPost. + * @param {BlogPostUpdateArgs} args - Arguments to update one BlogPost. + * @example + * // Update one BlogPost + * const blogPost = await prisma.blogPost.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more BlogPosts. + * @param {BlogPostDeleteManyArgs} args - Arguments to filter BlogPosts to delete. + * @example + * // Delete a few BlogPosts + * const { count } = await prisma.blogPost.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more BlogPosts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BlogPostUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many BlogPosts + * const blogPost = await prisma.blogPost.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more BlogPosts and returns the data updated in the database. + * @param {BlogPostUpdateManyAndReturnArgs} args - Arguments to update many BlogPosts. + * @example + * // Update many BlogPosts + * const blogPost = await prisma.blogPost.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more BlogPosts and only return the `id` + * const blogPostWithIdOnly = await prisma.blogPost.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 BlogPost. + * @param {BlogPostUpsertArgs} args - Arguments to update or create a BlogPost. + * @example + * // Update or create a BlogPost + * const blogPost = await prisma.blogPost.upsert({ + * create: { + * // ... data to create a BlogPost + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the BlogPost we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__BlogPostClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of BlogPosts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BlogPostCountArgs} args - Arguments to filter BlogPosts to count. + * @example + * // Count the number of BlogPosts + * const count = await prisma.blogPost.count({ + * where: { + * // ... the filter for the BlogPosts 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 BlogPost. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BlogPostAggregateArgs} 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 BlogPost. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {BlogPostGroupByArgs} 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 BlogPostGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: BlogPostGroupByArgs['orderBy'] } + : { orderBy?: BlogPostGroupByArgs['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 ? GetBlogPostGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the BlogPost model + */ +readonly fields: BlogPostFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for BlogPost. + * 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__BlogPostClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the BlogPost model + */ +export interface BlogPostFieldRefs { + readonly id: Prisma.FieldRef<"BlogPost", 'String'> + readonly slug: Prisma.FieldRef<"BlogPost", 'String'> + readonly title: Prisma.FieldRef<"BlogPost", 'String'> + readonly publishedAt: Prisma.FieldRef<"BlogPost", 'DateTime'> + readonly preview: Prisma.FieldRef<"BlogPost", 'String'> +} + + +// Custom InputTypes +/** + * BlogPost findUnique + */ +export type BlogPostFindUniqueArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * Filter, which BlogPost to fetch. + */ + where: Prisma.BlogPostWhereUniqueInput +} + +/** + * BlogPost findUniqueOrThrow + */ +export type BlogPostFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * Filter, which BlogPost to fetch. + */ + where: Prisma.BlogPostWhereUniqueInput +} + +/** + * BlogPost findFirst + */ +export type BlogPostFindFirstArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * Filter, which BlogPost to fetch. + */ + where?: Prisma.BlogPostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of BlogPosts to fetch. + */ + orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for BlogPosts. + */ + cursor?: Prisma.BlogPostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` BlogPosts 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` BlogPosts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of BlogPosts. + */ + distinct?: Prisma.BlogPostScalarFieldEnum | Prisma.BlogPostScalarFieldEnum[] +} + +/** + * BlogPost findFirstOrThrow + */ +export type BlogPostFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * Filter, which BlogPost to fetch. + */ + where?: Prisma.BlogPostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of BlogPosts to fetch. + */ + orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for BlogPosts. + */ + cursor?: Prisma.BlogPostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` BlogPosts 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` BlogPosts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of BlogPosts. + */ + distinct?: Prisma.BlogPostScalarFieldEnum | Prisma.BlogPostScalarFieldEnum[] +} + +/** + * BlogPost findMany + */ +export type BlogPostFindManyArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * Filter, which BlogPosts to fetch. + */ + where?: Prisma.BlogPostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of BlogPosts to fetch. + */ + orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing BlogPosts. + */ + cursor?: Prisma.BlogPostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` BlogPosts 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` BlogPosts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of BlogPosts. + */ + distinct?: Prisma.BlogPostScalarFieldEnum | Prisma.BlogPostScalarFieldEnum[] +} + +/** + * BlogPost create + */ +export type BlogPostCreateArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * The data needed to create a BlogPost. + */ + data: Prisma.XOR +} + +/** + * BlogPost createMany + */ +export type BlogPostCreateManyArgs = { + /** + * The data used to create many BlogPosts. + */ + data: Prisma.BlogPostCreateManyInput | Prisma.BlogPostCreateManyInput[] +} + +/** + * BlogPost createManyAndReturn + */ +export type BlogPostCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelectCreateManyAndReturn | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * The data used to create many BlogPosts. + */ + data: Prisma.BlogPostCreateManyInput | Prisma.BlogPostCreateManyInput[] +} + +/** + * BlogPost update + */ +export type BlogPostUpdateArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * The data needed to update a BlogPost. + */ + data: Prisma.XOR + /** + * Choose, which BlogPost to update. + */ + where: Prisma.BlogPostWhereUniqueInput +} + +/** + * BlogPost updateMany + */ +export type BlogPostUpdateManyArgs = { + /** + * The data used to update BlogPosts. + */ + data: Prisma.XOR + /** + * Filter which BlogPosts to update + */ + where?: Prisma.BlogPostWhereInput + /** + * Limit how many BlogPosts to update. + */ + limit?: number +} + +/** + * BlogPost updateManyAndReturn + */ +export type BlogPostUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * The data used to update BlogPosts. + */ + data: Prisma.XOR + /** + * Filter which BlogPosts to update + */ + where?: Prisma.BlogPostWhereInput + /** + * Limit how many BlogPosts to update. + */ + limit?: number +} + +/** + * BlogPost upsert + */ +export type BlogPostUpsertArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * The filter to search for the BlogPost to update in case it exists. + */ + where: Prisma.BlogPostWhereUniqueInput + /** + * In case the BlogPost found by the `where` argument doesn't exist, create a new BlogPost with this data. + */ + create: Prisma.XOR + /** + * In case the BlogPost was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * BlogPost delete + */ +export type BlogPostDeleteArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null + /** + * Filter which BlogPost to delete. + */ + where: Prisma.BlogPostWhereUniqueInput +} + +/** + * BlogPost deleteMany + */ +export type BlogPostDeleteManyArgs = { + /** + * Filter which BlogPosts to delete + */ + where?: Prisma.BlogPostWhereInput + /** + * Limit how many BlogPosts to delete. + */ + limit?: number +} + +/** + * BlogPost without action + */ +export type BlogPostDefaultArgs = { + /** + * Select specific fields to fetch from the BlogPost + */ + select?: Prisma.BlogPostSelect | null + /** + * Omit specific fields from the BlogPost + */ + omit?: Prisma.BlogPostOmit | null +} diff --git a/generated/prisma/models/PhotoPost.ts b/generated/prisma/models/PhotoPost.ts index a756e76..5603308 100644 --- a/generated/prisma/models/PhotoPost.ts +++ b/generated/prisma/models/PhotoPost.ts @@ -213,7 +213,7 @@ export type PhotoPostGroupByOutputType = { _max: PhotoPostMaxAggregateOutputType | null } -type GetPhotoPostGroupByPayload = Prisma.PrismaPromise< +export type GetPhotoPostGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { @@ -412,18 +412,10 @@ export type PhotoPostSumOrderByAggregateInput = { id?: Prisma.SortOrder } -export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string -} - export type NullableDateTimeFieldUpdateOperationsInput = { set?: Date | string | null } -export type StringFieldUpdateOperationsInput = { - set?: string -} - export type NullableStringFieldUpdateOperationsInput = { set?: string | null } @@ -1103,6 +1095,11 @@ export type PhotoPostFindManyArgs