auth-vir 1.3.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +27 -18
  2. package/dist/auth-client/backend-auth.client.d.ts +177 -0
  3. package/dist/auth-client/backend-auth.client.js +232 -0
  4. package/dist/auth-client/frontend-auth.client.d.ts +64 -0
  5. package/dist/auth-client/frontend-auth.client.js +107 -0
  6. package/dist/auth.d.ts +33 -47
  7. package/dist/auth.js +36 -36
  8. package/dist/cookie.d.ts +15 -4
  9. package/dist/cookie.js +17 -5
  10. package/dist/csrf-token.d.ts +113 -3
  11. package/dist/csrf-token.js +101 -5
  12. package/dist/generated/browser.d.ts +9 -0
  13. package/dist/generated/browser.js +16 -0
  14. package/dist/generated/client.d.ts +26 -0
  15. package/dist/generated/client.js +31 -0
  16. package/dist/generated/commonInputTypes.d.ts +122 -0
  17. package/dist/generated/enums.d.ts +1 -0
  18. package/dist/generated/enums.js +9 -0
  19. package/dist/generated/internal/class.d.ts +126 -0
  20. package/dist/generated/internal/class.js +84 -0
  21. package/dist/generated/internal/prismaNamespace.d.ts +544 -0
  22. package/dist/generated/internal/prismaNamespace.js +101 -0
  23. package/dist/generated/internal/prismaNamespaceBrowser.d.ts +75 -0
  24. package/dist/generated/internal/prismaNamespaceBrowser.js +69 -0
  25. package/dist/generated/models/User.d.ts +983 -0
  26. package/dist/generated/models/User.js +1 -0
  27. package/dist/generated/models.d.ts +2 -0
  28. package/dist/generated/models.js +1 -0
  29. package/dist/generated/shapes.gen.d.ts +8 -0
  30. package/dist/generated/shapes.gen.js +11 -0
  31. package/dist/headers.d.ts +20 -0
  32. package/dist/headers.js +33 -0
  33. package/dist/index.d.ts +5 -3
  34. package/dist/index.js +5 -3
  35. package/dist/jwt/jwt-keys.script.d.ts +1 -0
  36. package/dist/{jwt.d.ts → jwt/jwt.d.ts} +11 -2
  37. package/dist/{jwt.js → jwt/jwt.js} +14 -3
  38. package/dist/{user-jwt.d.ts → jwt/user-jwt.d.ts} +8 -8
  39. package/dist/{user-jwt.js → jwt/user-jwt.js} +12 -9
  40. package/package.json +17 -12
  41. package/src/auth-client/backend-auth.client.ts +500 -0
  42. package/src/auth-client/frontend-auth.client.ts +182 -0
  43. package/src/auth.ts +100 -78
  44. package/src/cookie.ts +20 -8
  45. package/src/csrf-token.ts +196 -5
  46. package/src/generated/browser.ts +23 -0
  47. package/src/generated/client.ts +47 -0
  48. package/src/generated/commonInputTypes.ts +147 -0
  49. package/src/generated/enums.ts +14 -0
  50. package/src/generated/internal/class.ts +236 -0
  51. package/src/generated/internal/prismaNamespace.ts +761 -0
  52. package/src/generated/internal/prismaNamespaceBrowser.ts +102 -0
  53. package/src/generated/models/User.ts +1135 -0
  54. package/src/generated/models.ts +11 -0
  55. package/src/generated/shapes.gen.ts +15 -0
  56. package/src/headers.ts +35 -0
  57. package/src/index.ts +5 -3
  58. package/src/{jwt.ts → jwt/jwt.ts} +34 -5
  59. package/src/{user-jwt.ts → jwt/user-jwt.ts} +22 -13
  60. /package/dist/{jwt-keys.script.d.ts → generated/commonInputTypes.js} +0 -0
  61. /package/dist/{jwt-keys.d.ts → jwt/jwt-keys.d.ts} +0 -0
  62. /package/dist/{jwt-keys.js → jwt/jwt-keys.js} +0 -0
  63. /package/dist/{jwt-keys.script.js → jwt/jwt-keys.script.js} +0 -0
  64. /package/src/{jwt-keys.script.ts → jwt/jwt-keys.script.ts} +0 -0
  65. /package/src/{jwt-keys.ts → jwt/jwt-keys.ts} +0 -0
@@ -0,0 +1,147 @@
1
+ // @ts-nocheck
2
+ import {type UtcIsoString} from 'date-vir';
3
+
4
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
5
+ /* eslint-disable */
6
+ /*
7
+ * This file exports various common sort, input & filter types that are not directly linked to a particular model.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+
12
+ import type * as runtime from "@prisma/client/runtime/client"
13
+ import * as $Enums from "./enums.js"
14
+ import type * as Prisma from "./internal/prismaNamespace.js"
15
+
16
+
17
+ export type StringFilter<$PrismaModel = never, FieldType = string> = {
18
+ equals?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
19
+ in?: FieldType[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
20
+ notIn?: FieldType[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
21
+ lt?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
22
+ lte?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
23
+ gt?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
24
+ gte?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
25
+ contains?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
26
+ startsWith?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
27
+ endsWith?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
28
+ mode?: Prisma.QueryMode | runtime.Types.Skip
29
+ not?: Prisma.NestedStringFilter<$PrismaModel> | FieldType | runtime.Types.Skip
30
+ }
31
+
32
+ export type DateTimeFilter<$PrismaModel = never> = {
33
+ equals?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
34
+ in?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
35
+ notIn?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
36
+ lt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
37
+ lte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
38
+ gt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
39
+ gte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
40
+ not?: Prisma.NestedDateTimeFilter<$PrismaModel> | UtcIsoString | runtime.Types.Skip
41
+ }
42
+
43
+ export type StringWithAggregatesFilter<$PrismaModel = never, FieldType = string> = {
44
+ equals?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
45
+ in?: FieldType[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
46
+ notIn?: FieldType[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
47
+ lt?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
48
+ lte?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
49
+ gt?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
50
+ gte?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
51
+ contains?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
52
+ startsWith?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
53
+ endsWith?: FieldType | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
54
+ mode?: Prisma.QueryMode | runtime.Types.Skip
55
+ not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | FieldType | runtime.Types.Skip
56
+ _count?: Prisma.NestedIntFilter<$PrismaModel> | runtime.Types.Skip
57
+ _min?: Prisma.NestedStringFilter<$PrismaModel> | runtime.Types.Skip
58
+ _max?: Prisma.NestedStringFilter<$PrismaModel> | runtime.Types.Skip
59
+ }
60
+
61
+ export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
62
+ equals?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
63
+ in?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
64
+ notIn?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
65
+ lt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
66
+ lte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
67
+ gt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
68
+ gte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
69
+ not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | UtcIsoString | runtime.Types.Skip
70
+ _count?: Prisma.NestedIntFilter<$PrismaModel> | runtime.Types.Skip
71
+ _min?: Prisma.NestedDateTimeFilter<$PrismaModel> | runtime.Types.Skip
72
+ _max?: Prisma.NestedDateTimeFilter<$PrismaModel> | runtime.Types.Skip
73
+ }
74
+
75
+ export type NestedStringFilter<$PrismaModel = never> = {
76
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
77
+ in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
78
+ notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
79
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
80
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
81
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
82
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
83
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
84
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
85
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
86
+ not?: Prisma.NestedStringFilter<$PrismaModel> | string | runtime.Types.Skip
87
+ }
88
+
89
+ export type NestedDateTimeFilter<$PrismaModel = never> = {
90
+ equals?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
91
+ in?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
92
+ notIn?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
93
+ lt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
94
+ lte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
95
+ gt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
96
+ gte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
97
+ not?: Prisma.NestedDateTimeFilter<$PrismaModel> | UtcIsoString | runtime.Types.Skip
98
+ }
99
+
100
+ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
101
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
102
+ in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
103
+ notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | runtime.Types.Skip
104
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
105
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
106
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
107
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
108
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
109
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
110
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> | runtime.Types.Skip
111
+ not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string | runtime.Types.Skip
112
+ _count?: Prisma.NestedIntFilter<$PrismaModel> | runtime.Types.Skip
113
+ _min?: Prisma.NestedStringFilter<$PrismaModel> | runtime.Types.Skip
114
+ _max?: Prisma.NestedStringFilter<$PrismaModel> | runtime.Types.Skip
115
+ }
116
+
117
+ export type NestedIntFilter<$PrismaModel = never> = {
118
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | runtime.Types.Skip
119
+ in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | runtime.Types.Skip
120
+ notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | runtime.Types.Skip
121
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel> | runtime.Types.Skip
122
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel> | runtime.Types.Skip
123
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel> | runtime.Types.Skip
124
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel> | runtime.Types.Skip
125
+ not?: Prisma.NestedIntFilter<$PrismaModel> | number | runtime.Types.Skip
126
+ }
127
+
128
+ export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
129
+ equals?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
130
+ in?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
131
+ notIn?: UtcIsoString[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
132
+ lt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
133
+ lte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
134
+ gt?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
135
+ gte?: UtcIsoString | Prisma.DateTimeFieldRefInput<$PrismaModel> | runtime.Types.Skip
136
+ not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | UtcIsoString | runtime.Types.Skip
137
+ _count?: Prisma.NestedIntFilter<$PrismaModel> | runtime.Types.Skip
138
+ _min?: Prisma.NestedDateTimeFilter<$PrismaModel> | runtime.Types.Skip
139
+ _max?: Prisma.NestedDateTimeFilter<$PrismaModel> | runtime.Types.Skip
140
+ }
141
+
142
+
143
+
144
+
145
+ export type StringFieldUpdateOperationsInput<FieldType = string> = {
146
+ set?: FieldType | runtime.Types.Skip
147
+ }
@@ -0,0 +1,14 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ /*
6
+ * This file exports all enum related types from the schema.
7
+ *
8
+ * 🟢 You can import this file directly.
9
+ */
10
+
11
+
12
+
13
+ // This file is empty because there are no enums in the schema.
14
+ export {}
@@ -0,0 +1,236 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ /*
6
+ * WARNING: This is an internal file that is subject to change!
7
+ *
8
+ * 🛑 Under no circumstances should you import this file directly! 🛑
9
+ *
10
+ * Please import the `PrismaClient` class from the `client.ts` file instead.
11
+ */
12
+
13
+ import * as runtime from "@prisma/client/runtime/client"
14
+ import type * as Prisma from "./prismaNamespace.js"
15
+
16
+
17
+ const config: runtime.GetPrismaClientConfig = {
18
+ "generator": {
19
+ "name": "jsClient",
20
+ "provider": {
21
+ "fromEnvVar": null,
22
+ "value": "prisma-client"
23
+ },
24
+ "output": {
25
+ "value": "/Users/electrovir/repos/electrovir/auth-vir/packages/auth-vir/src/generated",
26
+ "fromEnvVar": null
27
+ },
28
+ "config": {
29
+ "engineType": "client",
30
+ "moduleFormat": "esm"
31
+ },
32
+ "binaryTargets": [
33
+ {
34
+ "fromEnvVar": null,
35
+ "value": "darwin-arm64",
36
+ "native": true
37
+ }
38
+ ],
39
+ "previewFeatures": [
40
+ "relationJoins",
41
+ "strictUndefinedChecks"
42
+ ],
43
+ "sourceFilePath": "/Users/electrovir/repos/electrovir/auth-vir/packages/auth-vir/test-files/schema.prisma",
44
+ "isCustomOutput": true
45
+ },
46
+ "relativePath": "../../test-files",
47
+ "clientVersion": "6.17.1",
48
+ "engineVersion": "272a37d34178c2894197e17273bf937f25acdeac",
49
+ "datasourceNames": [
50
+ "db"
51
+ ],
52
+ "activeProvider": "postgresql",
53
+ "postinstall": false,
54
+ "inlineDatasources": {
55
+ "db": {
56
+ "url": {
57
+ "fromEnvVar": "DATABASE_URL",
58
+ "value": null
59
+ }
60
+ }
61
+ },
62
+ "inlineSchema": "generator jsClient {\n provider = \"prisma-client\"\n previewFeatures = [\"strictUndefinedChecks\", \"relationJoins\"]\n output = \"../src/generated\"\n engineType = \"client\"\n moduleFormat = \"esm\"\n}\n\ngenerator shapes {\n provider = \"prisma-shapes\"\n output = \"../src/generated\"\n}\n\ngenerator stringDates {\n provider = \"prisma-string-dates\"\n output = \"../src/generated\"\n}\n\ngenerator taggedIds {\n provider = \"prisma-tagged-ids\"\n output = \"../src/generated\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid(2))\n createdAt DateTime @default(now())\n updatedAt DateTime @default(now()) @updatedAt\n\n name String\n}\n",
63
+ "inlineSchemaHash": "7d1ca802697687a0d28701b345324b445a425e1f524d6377a89cbc48895f7110",
64
+ "copyEngine": true,
65
+ "runtimeDataModel": {
66
+ "models": {},
67
+ "enums": {},
68
+ "types": {}
69
+ },
70
+ "dirname": ""
71
+ }
72
+
73
+ config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
74
+ config.engineWasm = undefined
75
+
76
+ async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
77
+ const { Buffer } = await import('node:buffer')
78
+ const wasmArray = Buffer.from(wasmBase64, 'base64')
79
+ return new WebAssembly.Module(wasmArray)
80
+ }
81
+
82
+ config.compilerWasm = {
83
+ getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.mjs"),
84
+
85
+ getQueryCompilerWasmModule: async () => {
86
+ const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs")
87
+ return await decodeBase64AsWasm(wasm)
88
+ }
89
+ }
90
+
91
+
92
+
93
+
94
+ export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
95
+ 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
96
+
97
+ export interface PrismaClientConstructor {
98
+ /**
99
+ * ## Prisma Client
100
+ *
101
+ * Type-safe database client for TypeScript
102
+ * @example
103
+ * ```
104
+ * const prisma = new PrismaClient()
105
+ * // Fetch zero or more Users
106
+ * const users = await prisma.user.findMany()
107
+ * ```
108
+ *
109
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
110
+ */
111
+
112
+ new <
113
+ Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
114
+ LogOpts extends LogOptions<Options> = LogOptions<Options>,
115
+ OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
116
+ ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
117
+ >(options?: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
118
+ }
119
+
120
+ /**
121
+ * ## Prisma Client
122
+ *
123
+ * Type-safe database client for TypeScript
124
+ * @example
125
+ * ```
126
+ * const prisma = new PrismaClient()
127
+ * // Fetch zero or more Users
128
+ * const users = await prisma.user.findMany()
129
+ * ```
130
+ *
131
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
132
+ */
133
+
134
+ export interface PrismaClient<
135
+ in LogOpts extends Prisma.LogLevel = never,
136
+ in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'],
137
+ in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
138
+ > {
139
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
140
+
141
+ $on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
142
+
143
+ /**
144
+ * Connect with the database
145
+ */
146
+ $connect(): runtime.Types.Utils.JsPromise<void>;
147
+
148
+ /**
149
+ * Disconnect from the database
150
+ */
151
+ $disconnect(): runtime.Types.Utils.JsPromise<void>;
152
+
153
+ /**
154
+ * Executes a prepared raw query and returns the number of affected rows.
155
+ * @example
156
+ * ```
157
+ * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
158
+ * ```
159
+ *
160
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
161
+ */
162
+ $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
163
+
164
+ /**
165
+ * Executes a raw query and returns the number of affected rows.
166
+ * Susceptible to SQL injections, see documentation.
167
+ * @example
168
+ * ```
169
+ * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
170
+ * ```
171
+ *
172
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
173
+ */
174
+ $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
175
+
176
+ /**
177
+ * Performs a prepared raw query and returns the `SELECT` data.
178
+ * @example
179
+ * ```
180
+ * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
181
+ * ```
182
+ *
183
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
184
+ */
185
+ $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
186
+
187
+ /**
188
+ * Performs a raw query and returns the `SELECT` data.
189
+ * Susceptible to SQL injections, see documentation.
190
+ * @example
191
+ * ```
192
+ * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
193
+ * ```
194
+ *
195
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
196
+ */
197
+ $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
198
+
199
+
200
+ /**
201
+ * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
202
+ * @example
203
+ * ```
204
+ * const [george, bob, alice] = await prisma.$transaction([
205
+ * prisma.user.create({ data: { name: 'George' } }),
206
+ * prisma.user.create({ data: { name: 'Bob' } }),
207
+ * prisma.user.create({ data: { name: 'Alice' } }),
208
+ * ])
209
+ * ```
210
+ *
211
+ * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
212
+ */
213
+ $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
214
+
215
+ $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
216
+
217
+
218
+ $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
219
+ extArgs: ExtArgs
220
+ }>>
221
+
222
+ /**
223
+ * `prisma.user`: Exposes CRUD operations for the **User** model.
224
+ * Example usage:
225
+ * ```ts
226
+ * // Fetch zero or more Users
227
+ * const users = await prisma.user.findMany()
228
+ * ```
229
+ */
230
+ get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>;
231
+ }
232
+
233
+ export function getPrismaClientClass(dirname: string): PrismaClientConstructor {
234
+ config.dirname = dirname
235
+ return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
236
+ }