zele 0.2.0 → 0.3.5

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 (158) hide show
  1. package/README.md +38 -1
  2. package/bin/zele +27 -0
  3. package/dist/api-utils.d.ts +51 -2
  4. package/dist/api-utils.js +89 -3
  5. package/dist/api-utils.js.map +1 -1
  6. package/dist/auth.d.ts +27 -6
  7. package/dist/auth.js +185 -129
  8. package/dist/auth.js.map +1 -1
  9. package/dist/calendar-client.d.ts +16 -9
  10. package/dist/calendar-client.js +163 -59
  11. package/dist/calendar-client.js.map +1 -1
  12. package/dist/cli.js +28 -1
  13. package/dist/cli.js.map +1 -1
  14. package/dist/commands/attachment.js +17 -15
  15. package/dist/commands/attachment.js.map +1 -1
  16. package/dist/commands/auth-cmd.js +20 -9
  17. package/dist/commands/auth-cmd.js.map +1 -1
  18. package/dist/commands/calendar.js +67 -78
  19. package/dist/commands/calendar.js.map +1 -1
  20. package/dist/commands/draft.js +25 -18
  21. package/dist/commands/draft.js.map +1 -1
  22. package/dist/commands/label.js +33 -45
  23. package/dist/commands/label.js.map +1 -1
  24. package/dist/commands/mail-actions.js +11 -13
  25. package/dist/commands/mail-actions.js.map +1 -1
  26. package/dist/commands/mail.js +114 -128
  27. package/dist/commands/mail.js.map +1 -1
  28. package/dist/commands/profile.js +18 -21
  29. package/dist/commands/profile.js.map +1 -1
  30. package/dist/commands/watch.d.ts +2 -0
  31. package/dist/commands/watch.js +73 -0
  32. package/dist/commands/watch.js.map +1 -0
  33. package/dist/db.js +12 -13
  34. package/dist/db.js.map +1 -1
  35. package/dist/generated/browser.d.ts +12 -27
  36. package/dist/generated/client.d.ts +13 -28
  37. package/dist/generated/client.js +1 -1
  38. package/dist/generated/commonInputTypes.d.ts +90 -26
  39. package/dist/generated/enums.d.ts +0 -4
  40. package/dist/generated/enums.js +0 -3
  41. package/dist/generated/enums.js.map +1 -1
  42. package/dist/generated/internal/class.d.ts +22 -55
  43. package/dist/generated/internal/class.js +12 -4
  44. package/dist/generated/internal/class.js.map +1 -1
  45. package/dist/generated/internal/prismaNamespace.d.ts +272 -511
  46. package/dist/generated/internal/prismaNamespace.js +54 -66
  47. package/dist/generated/internal/prismaNamespace.js.map +1 -1
  48. package/dist/generated/internal/prismaNamespaceBrowser.d.ts +60 -74
  49. package/dist/generated/internal/prismaNamespaceBrowser.js +50 -62
  50. package/dist/generated/internal/prismaNamespaceBrowser.js.map +1 -1
  51. package/dist/generated/models/Account.d.ts +1637 -0
  52. package/dist/generated/models/Account.js +2 -0
  53. package/dist/generated/models/Account.js.map +1 -0
  54. package/dist/generated/models/CalendarList.d.ts +1161 -0
  55. package/dist/generated/models/CalendarList.js +2 -0
  56. package/dist/generated/models/CalendarList.js.map +1 -0
  57. package/dist/generated/models/Label.d.ts +1161 -0
  58. package/dist/generated/models/Label.js +2 -0
  59. package/dist/generated/models/Label.js.map +1 -0
  60. package/dist/generated/models/Profile.d.ts +1269 -0
  61. package/dist/generated/models/Profile.js +2 -0
  62. package/dist/generated/models/Profile.js.map +1 -0
  63. package/dist/generated/models/SyncState.d.ts +1130 -0
  64. package/dist/generated/models/SyncState.js +2 -0
  65. package/dist/generated/models/SyncState.js.map +1 -0
  66. package/dist/generated/models/Thread.d.ts +1608 -0
  67. package/dist/generated/models/Thread.js +2 -0
  68. package/dist/generated/models/Thread.js.map +1 -0
  69. package/dist/generated/models.d.ts +6 -9
  70. package/dist/gmail-client.d.ts +119 -94
  71. package/dist/gmail-client.js +862 -315
  72. package/dist/gmail-client.js.map +1 -1
  73. package/dist/mail-tui.d.ts +1 -0
  74. package/dist/mail-tui.js +517 -0
  75. package/dist/mail-tui.js.map +1 -0
  76. package/dist/output.d.ts +6 -4
  77. package/dist/output.js +124 -17
  78. package/dist/output.js.map +1 -1
  79. package/package.json +39 -11
  80. package/schema.prisma +81 -113
  81. package/src/api-utils.ts +103 -5
  82. package/src/auth.ts +224 -143
  83. package/src/calendar-client.ts +196 -89
  84. package/src/cli.ts +32 -1
  85. package/src/commands/attachment.ts +18 -19
  86. package/src/commands/auth-cmd.ts +19 -9
  87. package/src/commands/calendar.ts +42 -85
  88. package/src/commands/draft.ts +19 -22
  89. package/src/commands/label.ts +21 -57
  90. package/src/commands/mail-actions.ts +11 -19
  91. package/src/commands/mail.ts +104 -149
  92. package/src/commands/profile.ts +12 -28
  93. package/src/commands/watch.ts +88 -0
  94. package/src/db.ts +13 -16
  95. package/src/generated/browser.ts +49 -0
  96. package/src/generated/client.ts +71 -0
  97. package/src/generated/commonInputTypes.ts +332 -0
  98. package/src/generated/enums.ts +17 -0
  99. package/src/generated/internal/class.ts +250 -0
  100. package/src/generated/internal/prismaNamespace.ts +1198 -0
  101. package/src/generated/internal/prismaNamespaceBrowser.ts +169 -0
  102. package/src/generated/models/Account.ts +1848 -0
  103. package/src/generated/models/CalendarList.ts +1331 -0
  104. package/src/generated/models/Label.ts +1331 -0
  105. package/src/generated/models/Profile.ts +1439 -0
  106. package/src/generated/models/SyncState.ts +1300 -0
  107. package/src/generated/models/Thread.ts +1787 -0
  108. package/src/generated/models.ts +17 -0
  109. package/src/gmail-client.test.ts +59 -0
  110. package/src/gmail-client.ts +1034 -422
  111. package/src/mail-tui.tsx +1061 -0
  112. package/src/output.test.ts +1093 -0
  113. package/src/output.ts +128 -20
  114. package/src/schema.sql +58 -68
  115. package/src/test-fixtures/email-html/safe-claude-event.html +28 -0
  116. package/src/test-fixtures/email-html/safe-product-announcement.html +25 -0
  117. package/src/test-fixtures/email-html/safe-tracked-links.html +27 -0
  118. package/src/test-fixtures/email-html-snapshots/safe-claude-event.html.md +9 -0
  119. package/src/test-fixtures/email-html-snapshots/safe-product-announcement.html.md +13 -0
  120. package/src/test-fixtures/email-html-snapshots/safe-tracked-links.html.md +7 -0
  121. package/AGENTS.md +0 -26
  122. package/CHANGELOG.md +0 -36
  123. package/dist/generated/models/accounts.d.ts +0 -2000
  124. package/dist/generated/models/accounts.js +0 -2
  125. package/dist/generated/models/accounts.js.map +0 -1
  126. package/dist/generated/models/calendar_events.d.ts +0 -1433
  127. package/dist/generated/models/calendar_events.js +0 -2
  128. package/dist/generated/models/calendar_events.js.map +0 -1
  129. package/dist/generated/models/calendar_lists.d.ts +0 -1131
  130. package/dist/generated/models/calendar_lists.js +0 -2
  131. package/dist/generated/models/calendar_lists.js.map +0 -1
  132. package/dist/generated/models/label_counts.d.ts +0 -1131
  133. package/dist/generated/models/label_counts.js +0 -2
  134. package/dist/generated/models/label_counts.js.map +0 -1
  135. package/dist/generated/models/labels.d.ts +0 -1131
  136. package/dist/generated/models/labels.js +0 -2
  137. package/dist/generated/models/labels.js.map +0 -1
  138. package/dist/generated/models/profiles.d.ts +0 -1131
  139. package/dist/generated/models/profiles.js +0 -2
  140. package/dist/generated/models/profiles.js.map +0 -1
  141. package/dist/generated/models/sync_states.d.ts +0 -1107
  142. package/dist/generated/models/sync_states.js +0 -2
  143. package/dist/generated/models/sync_states.js.map +0 -1
  144. package/dist/generated/models/thread_lists.d.ts +0 -1404
  145. package/dist/generated/models/thread_lists.js +0 -2
  146. package/dist/generated/models/thread_lists.js.map +0 -1
  147. package/dist/generated/models/threads.d.ts +0 -1247
  148. package/dist/generated/models/threads.js +0 -2
  149. package/dist/generated/models/threads.js.map +0 -1
  150. package/dist/gmail-cache.d.ts +0 -60
  151. package/dist/gmail-cache.js +0 -264
  152. package/dist/gmail-cache.js.map +0 -1
  153. package/docs/gogcli-gmail-implementation.md +0 -599
  154. package/scripts/test-device-code-clients.ts +0 -186
  155. package/scripts/test-micropython-scopes.ts +0 -72
  156. package/scripts/test-oauth-clients.ts +0 -257
  157. package/src/gmail-cache.ts +0 -339
  158. package/tsconfig.json +0 -16
package/src/db.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Prisma singleton for zele.
2
- // Manages a single SQLite database at ~/.zele/zele.db for all state:
2
+ // Manages a single SQLite database at ~/.zele/sqlite.db for all state:
3
3
  // accounts (OAuth tokens), cache (threads, labels, profiles), and sync state.
4
- // Runs idempotent schema migration on every startup using src/schema.sql.
4
+ // Runs idempotent schema setup on every startup using src/schema.sql.
5
5
 
6
6
  import fs from 'node:fs'
7
7
  import path from 'node:path'
@@ -16,7 +16,7 @@ const __filename = fileURLToPath(import.meta.url)
16
16
  const __dirname = path.dirname(__filename)
17
17
 
18
18
  const ZELE_DIR = path.join(os.homedir(), '.zele')
19
- const DB_PATH = path.join(ZELE_DIR, 'zele.db')
19
+ const DB_PATH = path.join(ZELE_DIR, 'sqlite.db')
20
20
 
21
21
  let prismaInstance: PrismaClient | null = null
22
22
  let initPromise: Promise<PrismaClient> | null = null
@@ -44,14 +44,21 @@ async function initializePrisma(): Promise<PrismaClient> {
44
44
  const adapter = new PrismaLibSql({ url: `file:${DB_PATH}` })
45
45
  const prisma = new PrismaClient({ adapter })
46
46
 
47
- // Always run migrations schema.sql uses IF NOT EXISTS so it's idempotent
48
- await migrateSchema(prisma)
47
+ // WAL mode: allows concurrent readers + single writer, persists on the DB file.
48
+ // busy_timeout: wait up to 5s for locks to clear instead of failing instantly.
49
+ // Prevents "database is locked" errors when multiple processes (TUI, watch, CLI)
50
+ // access the DB, or after macOS sleep/wake leaves stale locks.
51
+ await prisma.$executeRawUnsafe('PRAGMA journal_mode = WAL')
52
+ await prisma.$executeRawUnsafe('PRAGMA busy_timeout = 5000')
53
+
54
+ // Run schema.sql — uses CREATE TABLE IF NOT EXISTS so it's idempotent
55
+ await applySchema(prisma)
49
56
 
50
57
  prismaInstance = prisma
51
58
  return prisma
52
59
  }
53
60
 
54
- async function migrateSchema(prisma: PrismaClient): Promise<void> {
61
+ async function applySchema(prisma: PrismaClient): Promise<void> {
55
62
  // When running from source (tsx), __dirname is src/
56
63
  // When running from dist, __dirname is dist/ and schema.sql is at ../src/schema.sql
57
64
  let schemaPath = path.join(__dirname, 'schema.sql')
@@ -74,16 +81,6 @@ async function migrateSchema(prisma: PrismaClient): Promise<void> {
74
81
  .map((s) => s.replace(/^CREATE\s+UNIQUE\s+INDEX\b(?!\s+IF)/i, 'CREATE UNIQUE INDEX IF NOT EXISTS')
75
82
  .replace(/^CREATE\s+INDEX\b(?!\s+IF)/i, 'CREATE INDEX IF NOT EXISTS'))
76
83
 
77
- // Compatibility migration: older DBs may not have account_status yet.
78
- try {
79
- await prisma.$executeRawUnsafe(
80
- "ALTER TABLE \"accounts\" ADD COLUMN \"account_status\" TEXT NOT NULL DEFAULT 'active'",
81
- )
82
- } catch {
83
- // Column already exists.
84
- }
85
-
86
-
87
84
  for (const statement of statements) {
88
85
  await prisma.$executeRawUnsafe(statement)
89
86
  }
@@ -0,0 +1,49 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file should be your main import to use Prisma-related types and utilities in a browser.
8
+ * Use it to get access to models, enums, and input types.
9
+ *
10
+ * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
11
+ * See `client.ts` for the standard, server-side entry point.
12
+ *
13
+ * 🟢 You can import this file directly.
14
+ */
15
+
16
+ import * as Prisma from './internal/prismaNamespaceBrowser.js'
17
+ export { Prisma }
18
+ export * as $Enums from './enums.js'
19
+ export * from './enums.js';
20
+ /**
21
+ * Model Account
22
+ *
23
+ */
24
+ export type Account = Prisma.AccountModel
25
+ /**
26
+ * Model Thread
27
+ *
28
+ */
29
+ export type Thread = Prisma.ThreadModel
30
+ /**
31
+ * Model Label
32
+ *
33
+ */
34
+ export type Label = Prisma.LabelModel
35
+ /**
36
+ * Model Profile
37
+ *
38
+ */
39
+ export type Profile = Prisma.ProfileModel
40
+ /**
41
+ * Model CalendarList
42
+ *
43
+ */
44
+ export type CalendarList = Prisma.CalendarListModel
45
+ /**
46
+ * Model SyncState
47
+ *
48
+ */
49
+ export type SyncState = Prisma.SyncStateModel
@@ -0,0 +1,71 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
8
+ * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
9
+ *
10
+ * 🟢 You can import this file directly.
11
+ */
12
+
13
+ import * as process from 'node:process'
14
+ import * as path from 'node:path'
15
+ import { fileURLToPath } from 'node:url'
16
+ globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url))
17
+
18
+ import * as runtime from "@prisma/client/runtime/client"
19
+ import * as $Enums from "./enums.js"
20
+ import * as $Class from "./internal/class.js"
21
+ import * as Prisma from "./internal/prismaNamespace.js"
22
+
23
+ export * as $Enums from './enums.js'
24
+ export * from "./enums.js"
25
+ /**
26
+ * ## Prisma Client
27
+ *
28
+ * Type-safe database client for TypeScript
29
+ * @example
30
+ * ```
31
+ * const prisma = new PrismaClient()
32
+ * // Fetch zero or more Accounts
33
+ * const accounts = await prisma.account.findMany()
34
+ * ```
35
+ *
36
+ * Read more in our [docs](https://pris.ly/d/client).
37
+ */
38
+ export const PrismaClient = $Class.getPrismaClientClass()
39
+ export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
40
+ export { Prisma }
41
+
42
+ /**
43
+ * Model Account
44
+ *
45
+ */
46
+ export type Account = Prisma.AccountModel
47
+ /**
48
+ * Model Thread
49
+ *
50
+ */
51
+ export type Thread = Prisma.ThreadModel
52
+ /**
53
+ * Model Label
54
+ *
55
+ */
56
+ export type Label = Prisma.LabelModel
57
+ /**
58
+ * Model Profile
59
+ *
60
+ */
61
+ export type Profile = Prisma.ProfileModel
62
+ /**
63
+ * Model CalendarList
64
+ *
65
+ */
66
+ export type CalendarList = Prisma.CalendarListModel
67
+ /**
68
+ * Model SyncState
69
+ *
70
+ */
71
+ export type SyncState = Prisma.SyncStateModel
@@ -0,0 +1,332 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
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> = {
18
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
19
+ in?: string[]
20
+ notIn?: string[]
21
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
22
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
23
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
24
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
25
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
26
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
27
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
28
+ not?: Prisma.NestedStringFilter<$PrismaModel> | string
29
+ }
30
+
31
+ export type EnumAccountStatusFilter<$PrismaModel = never> = {
32
+ equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
33
+ in?: $Enums.AccountStatus[]
34
+ notIn?: $Enums.AccountStatus[]
35
+ not?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel> | $Enums.AccountStatus
36
+ }
37
+
38
+ export type DateTimeFilter<$PrismaModel = never> = {
39
+ equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
40
+ in?: Date[] | string[]
41
+ notIn?: Date[] | string[]
42
+ lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
43
+ lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
44
+ gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
45
+ gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
46
+ not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
47
+ }
48
+
49
+ export type StringWithAggregatesFilter<$PrismaModel = never> = {
50
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
51
+ in?: string[]
52
+ notIn?: string[]
53
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
54
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
55
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
56
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
57
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
58
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
59
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
60
+ not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
61
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
62
+ _min?: Prisma.NestedStringFilter<$PrismaModel>
63
+ _max?: Prisma.NestedStringFilter<$PrismaModel>
64
+ }
65
+
66
+ export type EnumAccountStatusWithAggregatesFilter<$PrismaModel = never> = {
67
+ equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
68
+ in?: $Enums.AccountStatus[]
69
+ notIn?: $Enums.AccountStatus[]
70
+ not?: Prisma.NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountStatus
71
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
72
+ _min?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
73
+ _max?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
74
+ }
75
+
76
+ export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
77
+ equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
78
+ in?: Date[] | string[]
79
+ notIn?: Date[] | string[]
80
+ lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
81
+ lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
82
+ gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
83
+ gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
84
+ not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
85
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
86
+ _min?: Prisma.NestedDateTimeFilter<$PrismaModel>
87
+ _max?: Prisma.NestedDateTimeFilter<$PrismaModel>
88
+ }
89
+
90
+ export type IntFilter<$PrismaModel = never> = {
91
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
92
+ in?: number[]
93
+ notIn?: number[]
94
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
95
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
96
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
97
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
98
+ not?: Prisma.NestedIntFilter<$PrismaModel> | number
99
+ }
100
+
101
+ export type BoolFilter<$PrismaModel = never> = {
102
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
103
+ not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
104
+ }
105
+
106
+ export type StringNullableFilter<$PrismaModel = never> = {
107
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
108
+ in?: string[] | null
109
+ notIn?: string[] | null
110
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
111
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
112
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
113
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
114
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
115
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
116
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
117
+ not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
118
+ }
119
+
120
+ export type SortOrderInput = {
121
+ sort: Prisma.SortOrder
122
+ nulls?: Prisma.NullsOrder
123
+ }
124
+
125
+ export type IntWithAggregatesFilter<$PrismaModel = never> = {
126
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
127
+ in?: number[]
128
+ notIn?: number[]
129
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
130
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
131
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
132
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
133
+ not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
134
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
135
+ _avg?: Prisma.NestedFloatFilter<$PrismaModel>
136
+ _sum?: Prisma.NestedIntFilter<$PrismaModel>
137
+ _min?: Prisma.NestedIntFilter<$PrismaModel>
138
+ _max?: Prisma.NestedIntFilter<$PrismaModel>
139
+ }
140
+
141
+ export type BoolWithAggregatesFilter<$PrismaModel = never> = {
142
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
143
+ not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
144
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
145
+ _min?: Prisma.NestedBoolFilter<$PrismaModel>
146
+ _max?: Prisma.NestedBoolFilter<$PrismaModel>
147
+ }
148
+
149
+ export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
150
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
151
+ in?: string[] | null
152
+ notIn?: string[] | null
153
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
154
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
155
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
156
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
157
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
158
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
159
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
160
+ not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
161
+ _count?: Prisma.NestedIntNullableFilter<$PrismaModel>
162
+ _min?: Prisma.NestedStringNullableFilter<$PrismaModel>
163
+ _max?: Prisma.NestedStringNullableFilter<$PrismaModel>
164
+ }
165
+
166
+ export type NestedStringFilter<$PrismaModel = never> = {
167
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
168
+ in?: string[]
169
+ notIn?: string[]
170
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
171
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
172
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
173
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
174
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
175
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
176
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
177
+ not?: Prisma.NestedStringFilter<$PrismaModel> | string
178
+ }
179
+
180
+ export type NestedEnumAccountStatusFilter<$PrismaModel = never> = {
181
+ equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
182
+ in?: $Enums.AccountStatus[]
183
+ notIn?: $Enums.AccountStatus[]
184
+ not?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel> | $Enums.AccountStatus
185
+ }
186
+
187
+ export type NestedDateTimeFilter<$PrismaModel = never> = {
188
+ equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
189
+ in?: Date[] | string[]
190
+ notIn?: Date[] | string[]
191
+ lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
192
+ lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
193
+ gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
194
+ gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
195
+ not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
196
+ }
197
+
198
+ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
199
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
200
+ in?: string[]
201
+ notIn?: string[]
202
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
203
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
204
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
205
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
206
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
207
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
208
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
209
+ not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
210
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
211
+ _min?: Prisma.NestedStringFilter<$PrismaModel>
212
+ _max?: Prisma.NestedStringFilter<$PrismaModel>
213
+ }
214
+
215
+ export type NestedIntFilter<$PrismaModel = never> = {
216
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
217
+ in?: number[]
218
+ notIn?: number[]
219
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
220
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
221
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
222
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
223
+ not?: Prisma.NestedIntFilter<$PrismaModel> | number
224
+ }
225
+
226
+ export type NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel = never> = {
227
+ equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
228
+ in?: $Enums.AccountStatus[]
229
+ notIn?: $Enums.AccountStatus[]
230
+ not?: Prisma.NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountStatus
231
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
232
+ _min?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
233
+ _max?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
234
+ }
235
+
236
+ export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
237
+ equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
238
+ in?: Date[] | string[]
239
+ notIn?: Date[] | string[]
240
+ lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
241
+ lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
242
+ gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
243
+ gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
244
+ not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
245
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
246
+ _min?: Prisma.NestedDateTimeFilter<$PrismaModel>
247
+ _max?: Prisma.NestedDateTimeFilter<$PrismaModel>
248
+ }
249
+
250
+ export type NestedBoolFilter<$PrismaModel = never> = {
251
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
252
+ not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
253
+ }
254
+
255
+ export type NestedStringNullableFilter<$PrismaModel = never> = {
256
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
257
+ in?: string[] | null
258
+ notIn?: string[] | null
259
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
260
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
261
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
262
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
263
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
264
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
265
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
266
+ not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
267
+ }
268
+
269
+ export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
270
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
271
+ in?: number[]
272
+ notIn?: number[]
273
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
274
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
275
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
276
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
277
+ not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
278
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
279
+ _avg?: Prisma.NestedFloatFilter<$PrismaModel>
280
+ _sum?: Prisma.NestedIntFilter<$PrismaModel>
281
+ _min?: Prisma.NestedIntFilter<$PrismaModel>
282
+ _max?: Prisma.NestedIntFilter<$PrismaModel>
283
+ }
284
+
285
+ export type NestedFloatFilter<$PrismaModel = never> = {
286
+ equals?: number | Prisma.FloatFieldRefInput<$PrismaModel>
287
+ in?: number[]
288
+ notIn?: number[]
289
+ lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
290
+ lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
291
+ gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
292
+ gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
293
+ not?: Prisma.NestedFloatFilter<$PrismaModel> | number
294
+ }
295
+
296
+ export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
297
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
298
+ not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
299
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
300
+ _min?: Prisma.NestedBoolFilter<$PrismaModel>
301
+ _max?: Prisma.NestedBoolFilter<$PrismaModel>
302
+ }
303
+
304
+ export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
305
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
306
+ in?: string[] | null
307
+ notIn?: string[] | null
308
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
309
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
310
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
311
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
312
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
313
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
314
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
315
+ not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
316
+ _count?: Prisma.NestedIntNullableFilter<$PrismaModel>
317
+ _min?: Prisma.NestedStringNullableFilter<$PrismaModel>
318
+ _max?: Prisma.NestedStringNullableFilter<$PrismaModel>
319
+ }
320
+
321
+ export type NestedIntNullableFilter<$PrismaModel = never> = {
322
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
323
+ in?: number[] | null
324
+ notIn?: number[] | null
325
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
326
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
327
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
328
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
329
+ not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
330
+ }
331
+
332
+
@@ -0,0 +1,17 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file exports all enum related types from the schema.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+
12
+ export const AccountStatus = {
13
+ active: 'active',
14
+ disabled: 'disabled'
15
+ } as const
16
+
17
+ export type AccountStatus = (typeof AccountStatus)[keyof typeof AccountStatus]