zele 0.3.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 (157) hide show
  1. package/README.md +1 -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 +26 -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 +112 -126
  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.js +33 -261
  31. package/dist/commands/watch.js.map +1 -1
  32. package/dist/db.js +12 -13
  33. package/dist/db.js.map +1 -1
  34. package/dist/generated/browser.d.ts +12 -27
  35. package/dist/generated/client.d.ts +13 -28
  36. package/dist/generated/client.js +1 -1
  37. package/dist/generated/commonInputTypes.d.ts +90 -26
  38. package/dist/generated/enums.d.ts +0 -4
  39. package/dist/generated/enums.js +0 -3
  40. package/dist/generated/enums.js.map +1 -1
  41. package/dist/generated/internal/class.d.ts +22 -55
  42. package/dist/generated/internal/class.js +12 -4
  43. package/dist/generated/internal/class.js.map +1 -1
  44. package/dist/generated/internal/prismaNamespace.d.ts +272 -511
  45. package/dist/generated/internal/prismaNamespace.js +54 -66
  46. package/dist/generated/internal/prismaNamespace.js.map +1 -1
  47. package/dist/generated/internal/prismaNamespaceBrowser.d.ts +60 -74
  48. package/dist/generated/internal/prismaNamespaceBrowser.js +50 -62
  49. package/dist/generated/internal/prismaNamespaceBrowser.js.map +1 -1
  50. package/dist/generated/models/Account.d.ts +1637 -0
  51. package/dist/generated/models/Account.js +2 -0
  52. package/dist/generated/models/Account.js.map +1 -0
  53. package/dist/generated/models/CalendarList.d.ts +1161 -0
  54. package/dist/generated/models/CalendarList.js +2 -0
  55. package/dist/generated/models/CalendarList.js.map +1 -0
  56. package/dist/generated/models/Label.d.ts +1161 -0
  57. package/dist/generated/models/Label.js +2 -0
  58. package/dist/generated/models/Label.js.map +1 -0
  59. package/dist/generated/models/Profile.d.ts +1269 -0
  60. package/dist/generated/models/Profile.js +2 -0
  61. package/dist/generated/models/Profile.js.map +1 -0
  62. package/dist/generated/models/SyncState.d.ts +1130 -0
  63. package/dist/generated/models/SyncState.js +2 -0
  64. package/dist/generated/models/SyncState.js.map +1 -0
  65. package/dist/generated/models/Thread.d.ts +1608 -0
  66. package/dist/generated/models/Thread.js +2 -0
  67. package/dist/generated/models/Thread.js.map +1 -0
  68. package/dist/generated/models.d.ts +6 -9
  69. package/dist/gmail-client.d.ts +119 -94
  70. package/dist/gmail-client.js +862 -322
  71. package/dist/gmail-client.js.map +1 -1
  72. package/dist/mail-tui.d.ts +1 -0
  73. package/dist/mail-tui.js +517 -0
  74. package/dist/mail-tui.js.map +1 -0
  75. package/dist/output.d.ts +6 -0
  76. package/dist/output.js +124 -11
  77. package/dist/output.js.map +1 -1
  78. package/package.json +39 -11
  79. package/schema.prisma +81 -113
  80. package/src/api-utils.ts +103 -5
  81. package/src/auth.ts +224 -143
  82. package/src/calendar-client.ts +196 -89
  83. package/src/cli.ts +30 -1
  84. package/src/commands/attachment.ts +18 -19
  85. package/src/commands/auth-cmd.ts +19 -9
  86. package/src/commands/calendar.ts +42 -85
  87. package/src/commands/draft.ts +19 -22
  88. package/src/commands/label.ts +21 -57
  89. package/src/commands/mail-actions.ts +11 -19
  90. package/src/commands/mail.ts +102 -147
  91. package/src/commands/profile.ts +12 -28
  92. package/src/commands/watch.ts +37 -304
  93. package/src/db.ts +13 -16
  94. package/src/generated/browser.ts +49 -0
  95. package/src/generated/client.ts +71 -0
  96. package/src/generated/commonInputTypes.ts +332 -0
  97. package/src/generated/enums.ts +17 -0
  98. package/src/generated/internal/class.ts +250 -0
  99. package/src/generated/internal/prismaNamespace.ts +1198 -0
  100. package/src/generated/internal/prismaNamespaceBrowser.ts +169 -0
  101. package/src/generated/models/Account.ts +1848 -0
  102. package/src/generated/models/CalendarList.ts +1331 -0
  103. package/src/generated/models/Label.ts +1331 -0
  104. package/src/generated/models/Profile.ts +1439 -0
  105. package/src/generated/models/SyncState.ts +1300 -0
  106. package/src/generated/models/Thread.ts +1787 -0
  107. package/src/generated/models.ts +17 -0
  108. package/src/gmail-client.test.ts +59 -0
  109. package/src/gmail-client.ts +1034 -429
  110. package/src/mail-tui.tsx +1061 -0
  111. package/src/output.test.ts +1093 -0
  112. package/src/output.ts +128 -13
  113. package/src/schema.sql +58 -68
  114. package/src/test-fixtures/email-html/safe-claude-event.html +28 -0
  115. package/src/test-fixtures/email-html/safe-product-announcement.html +25 -0
  116. package/src/test-fixtures/email-html/safe-tracked-links.html +27 -0
  117. package/src/test-fixtures/email-html-snapshots/safe-claude-event.html.md +9 -0
  118. package/src/test-fixtures/email-html-snapshots/safe-product-announcement.html.md +13 -0
  119. package/src/test-fixtures/email-html-snapshots/safe-tracked-links.html.md +7 -0
  120. package/AGENTS.md +0 -26
  121. package/CHANGELOG.md +0 -43
  122. package/dist/generated/models/accounts.d.ts +0 -2000
  123. package/dist/generated/models/accounts.js +0 -2
  124. package/dist/generated/models/accounts.js.map +0 -1
  125. package/dist/generated/models/calendar_events.d.ts +0 -1433
  126. package/dist/generated/models/calendar_events.js +0 -2
  127. package/dist/generated/models/calendar_events.js.map +0 -1
  128. package/dist/generated/models/calendar_lists.d.ts +0 -1131
  129. package/dist/generated/models/calendar_lists.js +0 -2
  130. package/dist/generated/models/calendar_lists.js.map +0 -1
  131. package/dist/generated/models/label_counts.d.ts +0 -1131
  132. package/dist/generated/models/label_counts.js +0 -2
  133. package/dist/generated/models/label_counts.js.map +0 -1
  134. package/dist/generated/models/labels.d.ts +0 -1131
  135. package/dist/generated/models/labels.js +0 -2
  136. package/dist/generated/models/labels.js.map +0 -1
  137. package/dist/generated/models/profiles.d.ts +0 -1131
  138. package/dist/generated/models/profiles.js +0 -2
  139. package/dist/generated/models/profiles.js.map +0 -1
  140. package/dist/generated/models/sync_states.d.ts +0 -1107
  141. package/dist/generated/models/sync_states.js +0 -2
  142. package/dist/generated/models/sync_states.js.map +0 -1
  143. package/dist/generated/models/thread_lists.d.ts +0 -1404
  144. package/dist/generated/models/thread_lists.js +0 -2
  145. package/dist/generated/models/thread_lists.js.map +0 -1
  146. package/dist/generated/models/threads.d.ts +0 -1247
  147. package/dist/generated/models/threads.js +0 -2
  148. package/dist/generated/models/threads.js.map +0 -1
  149. package/dist/gmail-cache.d.ts +0 -60
  150. package/dist/gmail-cache.js +0 -264
  151. package/dist/gmail-cache.js.map +0 -1
  152. package/docs/gogcli-gmail-implementation.md +0 -599
  153. package/scripts/test-device-code-clients.ts +0 -186
  154. package/scripts/test-micropython-scopes.ts +0 -72
  155. package/scripts/test-oauth-clients.ts +0 -257
  156. package/src/gmail-cache.ts +0 -339
  157. package/tsconfig.json +0 -16
@@ -0,0 +1,1331 @@
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 the `Label` model and its related types.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+ import type * as runtime from "@prisma/client/runtime/client"
12
+ import type * as $Enums from "../enums.js"
13
+ import type * as Prisma from "../internal/prismaNamespace.js"
14
+
15
+ /**
16
+ * Model Label
17
+ *
18
+ */
19
+ export type LabelModel = runtime.Types.Result.DefaultSelection<Prisma.$LabelPayload>
20
+
21
+ export type AggregateLabel = {
22
+ _count: LabelCountAggregateOutputType | null
23
+ _avg: LabelAvgAggregateOutputType | null
24
+ _sum: LabelSumAggregateOutputType | null
25
+ _min: LabelMinAggregateOutputType | null
26
+ _max: LabelMaxAggregateOutputType | null
27
+ }
28
+
29
+ export type LabelAvgAggregateOutputType = {
30
+ ttlMs: number | null
31
+ }
32
+
33
+ export type LabelSumAggregateOutputType = {
34
+ ttlMs: number | null
35
+ }
36
+
37
+ export type LabelMinAggregateOutputType = {
38
+ email: string | null
39
+ appId: string | null
40
+ rawData: string | null
41
+ ttlMs: number | null
42
+ createdAt: Date | null
43
+ }
44
+
45
+ export type LabelMaxAggregateOutputType = {
46
+ email: string | null
47
+ appId: string | null
48
+ rawData: string | null
49
+ ttlMs: number | null
50
+ createdAt: Date | null
51
+ }
52
+
53
+ export type LabelCountAggregateOutputType = {
54
+ email: number
55
+ appId: number
56
+ rawData: number
57
+ ttlMs: number
58
+ createdAt: number
59
+ _all: number
60
+ }
61
+
62
+
63
+ export type LabelAvgAggregateInputType = {
64
+ ttlMs?: true
65
+ }
66
+
67
+ export type LabelSumAggregateInputType = {
68
+ ttlMs?: true
69
+ }
70
+
71
+ export type LabelMinAggregateInputType = {
72
+ email?: true
73
+ appId?: true
74
+ rawData?: true
75
+ ttlMs?: true
76
+ createdAt?: true
77
+ }
78
+
79
+ export type LabelMaxAggregateInputType = {
80
+ email?: true
81
+ appId?: true
82
+ rawData?: true
83
+ ttlMs?: true
84
+ createdAt?: true
85
+ }
86
+
87
+ export type LabelCountAggregateInputType = {
88
+ email?: true
89
+ appId?: true
90
+ rawData?: true
91
+ ttlMs?: true
92
+ createdAt?: true
93
+ _all?: true
94
+ }
95
+
96
+ export type LabelAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
97
+ /**
98
+ * Filter which Label to aggregate.
99
+ */
100
+ where?: Prisma.LabelWhereInput
101
+ /**
102
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
103
+ *
104
+ * Determine the order of Labels to fetch.
105
+ */
106
+ orderBy?: Prisma.LabelOrderByWithRelationInput | Prisma.LabelOrderByWithRelationInput[]
107
+ /**
108
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
109
+ *
110
+ * Sets the start position
111
+ */
112
+ cursor?: Prisma.LabelWhereUniqueInput
113
+ /**
114
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
115
+ *
116
+ * Take `±n` Labels from the position of the cursor.
117
+ */
118
+ take?: number
119
+ /**
120
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
121
+ *
122
+ * Skip the first `n` Labels.
123
+ */
124
+ skip?: number
125
+ /**
126
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
127
+ *
128
+ * Count returned Labels
129
+ **/
130
+ _count?: true | LabelCountAggregateInputType
131
+ /**
132
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
133
+ *
134
+ * Select which fields to average
135
+ **/
136
+ _avg?: LabelAvgAggregateInputType
137
+ /**
138
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
139
+ *
140
+ * Select which fields to sum
141
+ **/
142
+ _sum?: LabelSumAggregateInputType
143
+ /**
144
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
145
+ *
146
+ * Select which fields to find the minimum value
147
+ **/
148
+ _min?: LabelMinAggregateInputType
149
+ /**
150
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
151
+ *
152
+ * Select which fields to find the maximum value
153
+ **/
154
+ _max?: LabelMaxAggregateInputType
155
+ }
156
+
157
+ export type GetLabelAggregateType<T extends LabelAggregateArgs> = {
158
+ [P in keyof T & keyof AggregateLabel]: P extends '_count' | 'count'
159
+ ? T[P] extends true
160
+ ? number
161
+ : Prisma.GetScalarType<T[P], AggregateLabel[P]>
162
+ : Prisma.GetScalarType<T[P], AggregateLabel[P]>
163
+ }
164
+
165
+
166
+
167
+
168
+ export type LabelGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
169
+ where?: Prisma.LabelWhereInput
170
+ orderBy?: Prisma.LabelOrderByWithAggregationInput | Prisma.LabelOrderByWithAggregationInput[]
171
+ by: Prisma.LabelScalarFieldEnum[] | Prisma.LabelScalarFieldEnum
172
+ having?: Prisma.LabelScalarWhereWithAggregatesInput
173
+ take?: number
174
+ skip?: number
175
+ _count?: LabelCountAggregateInputType | true
176
+ _avg?: LabelAvgAggregateInputType
177
+ _sum?: LabelSumAggregateInputType
178
+ _min?: LabelMinAggregateInputType
179
+ _max?: LabelMaxAggregateInputType
180
+ }
181
+
182
+ export type LabelGroupByOutputType = {
183
+ email: string
184
+ appId: string
185
+ rawData: string
186
+ ttlMs: number
187
+ createdAt: Date
188
+ _count: LabelCountAggregateOutputType | null
189
+ _avg: LabelAvgAggregateOutputType | null
190
+ _sum: LabelSumAggregateOutputType | null
191
+ _min: LabelMinAggregateOutputType | null
192
+ _max: LabelMaxAggregateOutputType | null
193
+ }
194
+
195
+ type GetLabelGroupByPayload<T extends LabelGroupByArgs> = Prisma.PrismaPromise<
196
+ Array<
197
+ Prisma.PickEnumerable<LabelGroupByOutputType, T['by']> &
198
+ {
199
+ [P in ((keyof T) & (keyof LabelGroupByOutputType))]: P extends '_count'
200
+ ? T[P] extends boolean
201
+ ? number
202
+ : Prisma.GetScalarType<T[P], LabelGroupByOutputType[P]>
203
+ : Prisma.GetScalarType<T[P], LabelGroupByOutputType[P]>
204
+ }
205
+ >
206
+ >
207
+
208
+
209
+
210
+ export type LabelWhereInput = {
211
+ AND?: Prisma.LabelWhereInput | Prisma.LabelWhereInput[]
212
+ OR?: Prisma.LabelWhereInput[]
213
+ NOT?: Prisma.LabelWhereInput | Prisma.LabelWhereInput[]
214
+ email?: Prisma.StringFilter<"Label"> | string
215
+ appId?: Prisma.StringFilter<"Label"> | string
216
+ rawData?: Prisma.StringFilter<"Label"> | string
217
+ ttlMs?: Prisma.IntFilter<"Label"> | number
218
+ createdAt?: Prisma.DateTimeFilter<"Label"> | Date | string
219
+ account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
220
+ }
221
+
222
+ export type LabelOrderByWithRelationInput = {
223
+ email?: Prisma.SortOrder
224
+ appId?: Prisma.SortOrder
225
+ rawData?: Prisma.SortOrder
226
+ ttlMs?: Prisma.SortOrder
227
+ createdAt?: Prisma.SortOrder
228
+ account?: Prisma.AccountOrderByWithRelationInput
229
+ }
230
+
231
+ export type LabelWhereUniqueInput = Prisma.AtLeast<{
232
+ email_appId?: Prisma.LabelEmailAppIdCompoundUniqueInput
233
+ AND?: Prisma.LabelWhereInput | Prisma.LabelWhereInput[]
234
+ OR?: Prisma.LabelWhereInput[]
235
+ NOT?: Prisma.LabelWhereInput | Prisma.LabelWhereInput[]
236
+ email?: Prisma.StringFilter<"Label"> | string
237
+ appId?: Prisma.StringFilter<"Label"> | string
238
+ rawData?: Prisma.StringFilter<"Label"> | string
239
+ ttlMs?: Prisma.IntFilter<"Label"> | number
240
+ createdAt?: Prisma.DateTimeFilter<"Label"> | Date | string
241
+ account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
242
+ }, "email_appId">
243
+
244
+ export type LabelOrderByWithAggregationInput = {
245
+ email?: Prisma.SortOrder
246
+ appId?: Prisma.SortOrder
247
+ rawData?: Prisma.SortOrder
248
+ ttlMs?: Prisma.SortOrder
249
+ createdAt?: Prisma.SortOrder
250
+ _count?: Prisma.LabelCountOrderByAggregateInput
251
+ _avg?: Prisma.LabelAvgOrderByAggregateInput
252
+ _max?: Prisma.LabelMaxOrderByAggregateInput
253
+ _min?: Prisma.LabelMinOrderByAggregateInput
254
+ _sum?: Prisma.LabelSumOrderByAggregateInput
255
+ }
256
+
257
+ export type LabelScalarWhereWithAggregatesInput = {
258
+ AND?: Prisma.LabelScalarWhereWithAggregatesInput | Prisma.LabelScalarWhereWithAggregatesInput[]
259
+ OR?: Prisma.LabelScalarWhereWithAggregatesInput[]
260
+ NOT?: Prisma.LabelScalarWhereWithAggregatesInput | Prisma.LabelScalarWhereWithAggregatesInput[]
261
+ email?: Prisma.StringWithAggregatesFilter<"Label"> | string
262
+ appId?: Prisma.StringWithAggregatesFilter<"Label"> | string
263
+ rawData?: Prisma.StringWithAggregatesFilter<"Label"> | string
264
+ ttlMs?: Prisma.IntWithAggregatesFilter<"Label"> | number
265
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"Label"> | Date | string
266
+ }
267
+
268
+ export type LabelCreateInput = {
269
+ rawData: string
270
+ ttlMs: number
271
+ createdAt: Date | string
272
+ account: Prisma.AccountCreateNestedOneWithoutLabelsInput
273
+ }
274
+
275
+ export type LabelUncheckedCreateInput = {
276
+ email: string
277
+ appId: string
278
+ rawData: string
279
+ ttlMs: number
280
+ createdAt: Date | string
281
+ }
282
+
283
+ export type LabelUpdateInput = {
284
+ rawData?: Prisma.StringFieldUpdateOperationsInput | string
285
+ ttlMs?: Prisma.IntFieldUpdateOperationsInput | number
286
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
287
+ account?: Prisma.AccountUpdateOneRequiredWithoutLabelsNestedInput
288
+ }
289
+
290
+ export type LabelUncheckedUpdateInput = {
291
+ email?: Prisma.StringFieldUpdateOperationsInput | string
292
+ appId?: Prisma.StringFieldUpdateOperationsInput | string
293
+ rawData?: Prisma.StringFieldUpdateOperationsInput | string
294
+ ttlMs?: Prisma.IntFieldUpdateOperationsInput | number
295
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
296
+ }
297
+
298
+ export type LabelCreateManyInput = {
299
+ email: string
300
+ appId: string
301
+ rawData: string
302
+ ttlMs: number
303
+ createdAt: Date | string
304
+ }
305
+
306
+ export type LabelUpdateManyMutationInput = {
307
+ rawData?: Prisma.StringFieldUpdateOperationsInput | string
308
+ ttlMs?: Prisma.IntFieldUpdateOperationsInput | number
309
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
310
+ }
311
+
312
+ export type LabelUncheckedUpdateManyInput = {
313
+ email?: Prisma.StringFieldUpdateOperationsInput | string
314
+ appId?: Prisma.StringFieldUpdateOperationsInput | string
315
+ rawData?: Prisma.StringFieldUpdateOperationsInput | string
316
+ ttlMs?: Prisma.IntFieldUpdateOperationsInput | number
317
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
318
+ }
319
+
320
+ export type LabelNullableScalarRelationFilter = {
321
+ is?: Prisma.LabelWhereInput | null
322
+ isNot?: Prisma.LabelWhereInput | null
323
+ }
324
+
325
+ export type LabelEmailAppIdCompoundUniqueInput = {
326
+ email: string
327
+ appId: string
328
+ }
329
+
330
+ export type LabelCountOrderByAggregateInput = {
331
+ email?: Prisma.SortOrder
332
+ appId?: Prisma.SortOrder
333
+ rawData?: Prisma.SortOrder
334
+ ttlMs?: Prisma.SortOrder
335
+ createdAt?: Prisma.SortOrder
336
+ }
337
+
338
+ export type LabelAvgOrderByAggregateInput = {
339
+ ttlMs?: Prisma.SortOrder
340
+ }
341
+
342
+ export type LabelMaxOrderByAggregateInput = {
343
+ email?: Prisma.SortOrder
344
+ appId?: Prisma.SortOrder
345
+ rawData?: Prisma.SortOrder
346
+ ttlMs?: Prisma.SortOrder
347
+ createdAt?: Prisma.SortOrder
348
+ }
349
+
350
+ export type LabelMinOrderByAggregateInput = {
351
+ email?: Prisma.SortOrder
352
+ appId?: Prisma.SortOrder
353
+ rawData?: Prisma.SortOrder
354
+ ttlMs?: Prisma.SortOrder
355
+ createdAt?: Prisma.SortOrder
356
+ }
357
+
358
+ export type LabelSumOrderByAggregateInput = {
359
+ ttlMs?: Prisma.SortOrder
360
+ }
361
+
362
+ export type LabelCreateNestedOneWithoutAccountInput = {
363
+ create?: Prisma.XOR<Prisma.LabelCreateWithoutAccountInput, Prisma.LabelUncheckedCreateWithoutAccountInput>
364
+ connectOrCreate?: Prisma.LabelCreateOrConnectWithoutAccountInput
365
+ connect?: Prisma.LabelWhereUniqueInput
366
+ }
367
+
368
+ export type LabelUncheckedCreateNestedOneWithoutAccountInput = {
369
+ create?: Prisma.XOR<Prisma.LabelCreateWithoutAccountInput, Prisma.LabelUncheckedCreateWithoutAccountInput>
370
+ connectOrCreate?: Prisma.LabelCreateOrConnectWithoutAccountInput
371
+ connect?: Prisma.LabelWhereUniqueInput
372
+ }
373
+
374
+ export type LabelUpdateOneWithoutAccountNestedInput = {
375
+ create?: Prisma.XOR<Prisma.LabelCreateWithoutAccountInput, Prisma.LabelUncheckedCreateWithoutAccountInput>
376
+ connectOrCreate?: Prisma.LabelCreateOrConnectWithoutAccountInput
377
+ upsert?: Prisma.LabelUpsertWithoutAccountInput
378
+ disconnect?: Prisma.LabelWhereInput | boolean
379
+ delete?: Prisma.LabelWhereInput | boolean
380
+ connect?: Prisma.LabelWhereUniqueInput
381
+ update?: Prisma.XOR<Prisma.XOR<Prisma.LabelUpdateToOneWithWhereWithoutAccountInput, Prisma.LabelUpdateWithoutAccountInput>, Prisma.LabelUncheckedUpdateWithoutAccountInput>
382
+ }
383
+
384
+ export type LabelUncheckedUpdateOneWithoutAccountNestedInput = {
385
+ create?: Prisma.XOR<Prisma.LabelCreateWithoutAccountInput, Prisma.LabelUncheckedCreateWithoutAccountInput>
386
+ connectOrCreate?: Prisma.LabelCreateOrConnectWithoutAccountInput
387
+ upsert?: Prisma.LabelUpsertWithoutAccountInput
388
+ disconnect?: Prisma.LabelWhereInput | boolean
389
+ delete?: Prisma.LabelWhereInput | boolean
390
+ connect?: Prisma.LabelWhereUniqueInput
391
+ update?: Prisma.XOR<Prisma.XOR<Prisma.LabelUpdateToOneWithWhereWithoutAccountInput, Prisma.LabelUpdateWithoutAccountInput>, Prisma.LabelUncheckedUpdateWithoutAccountInput>
392
+ }
393
+
394
+ export type LabelCreateWithoutAccountInput = {
395
+ rawData: string
396
+ ttlMs: number
397
+ createdAt: Date | string
398
+ }
399
+
400
+ export type LabelUncheckedCreateWithoutAccountInput = {
401
+ rawData: string
402
+ ttlMs: number
403
+ createdAt: Date | string
404
+ }
405
+
406
+ export type LabelCreateOrConnectWithoutAccountInput = {
407
+ where: Prisma.LabelWhereUniqueInput
408
+ create: Prisma.XOR<Prisma.LabelCreateWithoutAccountInput, Prisma.LabelUncheckedCreateWithoutAccountInput>
409
+ }
410
+
411
+ export type LabelUpsertWithoutAccountInput = {
412
+ update: Prisma.XOR<Prisma.LabelUpdateWithoutAccountInput, Prisma.LabelUncheckedUpdateWithoutAccountInput>
413
+ create: Prisma.XOR<Prisma.LabelCreateWithoutAccountInput, Prisma.LabelUncheckedCreateWithoutAccountInput>
414
+ where?: Prisma.LabelWhereInput
415
+ }
416
+
417
+ export type LabelUpdateToOneWithWhereWithoutAccountInput = {
418
+ where?: Prisma.LabelWhereInput
419
+ data: Prisma.XOR<Prisma.LabelUpdateWithoutAccountInput, Prisma.LabelUncheckedUpdateWithoutAccountInput>
420
+ }
421
+
422
+ export type LabelUpdateWithoutAccountInput = {
423
+ rawData?: Prisma.StringFieldUpdateOperationsInput | string
424
+ ttlMs?: Prisma.IntFieldUpdateOperationsInput | number
425
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
426
+ }
427
+
428
+ export type LabelUncheckedUpdateWithoutAccountInput = {
429
+ rawData?: Prisma.StringFieldUpdateOperationsInput | string
430
+ ttlMs?: Prisma.IntFieldUpdateOperationsInput | number
431
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
432
+ }
433
+
434
+
435
+
436
+ export type LabelSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
437
+ email?: boolean
438
+ appId?: boolean
439
+ rawData?: boolean
440
+ ttlMs?: boolean
441
+ createdAt?: boolean
442
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
443
+ }, ExtArgs["result"]["label"]>
444
+
445
+ export type LabelSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
446
+ email?: boolean
447
+ appId?: boolean
448
+ rawData?: boolean
449
+ ttlMs?: boolean
450
+ createdAt?: boolean
451
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
452
+ }, ExtArgs["result"]["label"]>
453
+
454
+ export type LabelSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
455
+ email?: boolean
456
+ appId?: boolean
457
+ rawData?: boolean
458
+ ttlMs?: boolean
459
+ createdAt?: boolean
460
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
461
+ }, ExtArgs["result"]["label"]>
462
+
463
+ export type LabelSelectScalar = {
464
+ email?: boolean
465
+ appId?: boolean
466
+ rawData?: boolean
467
+ ttlMs?: boolean
468
+ createdAt?: boolean
469
+ }
470
+
471
+ export type LabelOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"email" | "appId" | "rawData" | "ttlMs" | "createdAt", ExtArgs["result"]["label"]>
472
+ export type LabelInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
473
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
474
+ }
475
+ export type LabelIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
476
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
477
+ }
478
+ export type LabelIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
479
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
480
+ }
481
+
482
+ export type $LabelPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
483
+ name: "Label"
484
+ objects: {
485
+ account: Prisma.$AccountPayload<ExtArgs>
486
+ }
487
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
488
+ email: string
489
+ appId: string
490
+ rawData: string
491
+ ttlMs: number
492
+ createdAt: Date
493
+ }, ExtArgs["result"]["label"]>
494
+ composites: {}
495
+ }
496
+
497
+ export type LabelGetPayload<S extends boolean | null | undefined | LabelDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$LabelPayload, S>
498
+
499
+ export type LabelCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
500
+ Omit<LabelFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
501
+ select?: LabelCountAggregateInputType | true
502
+ }
503
+
504
+ export interface LabelDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
505
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Label'], meta: { name: 'Label' } }
506
+ /**
507
+ * Find zero or one Label that matches the filter.
508
+ * @param {LabelFindUniqueArgs} args - Arguments to find a Label
509
+ * @example
510
+ * // Get one Label
511
+ * const label = await prisma.label.findUnique({
512
+ * where: {
513
+ * // ... provide filter here
514
+ * }
515
+ * })
516
+ */
517
+ findUnique<T extends LabelFindUniqueArgs>(args: Prisma.SelectSubset<T, LabelFindUniqueArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
518
+
519
+ /**
520
+ * Find one Label that matches the filter or throw an error with `error.code='P2025'`
521
+ * if no matches were found.
522
+ * @param {LabelFindUniqueOrThrowArgs} args - Arguments to find a Label
523
+ * @example
524
+ * // Get one Label
525
+ * const label = await prisma.label.findUniqueOrThrow({
526
+ * where: {
527
+ * // ... provide filter here
528
+ * }
529
+ * })
530
+ */
531
+ findUniqueOrThrow<T extends LabelFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, LabelFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
532
+
533
+ /**
534
+ * Find the first Label that matches the filter.
535
+ * Note, that providing `undefined` is treated as the value not being there.
536
+ * Read more here: https://pris.ly/d/null-undefined
537
+ * @param {LabelFindFirstArgs} args - Arguments to find a Label
538
+ * @example
539
+ * // Get one Label
540
+ * const label = await prisma.label.findFirst({
541
+ * where: {
542
+ * // ... provide filter here
543
+ * }
544
+ * })
545
+ */
546
+ findFirst<T extends LabelFindFirstArgs>(args?: Prisma.SelectSubset<T, LabelFindFirstArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
547
+
548
+ /**
549
+ * Find the first Label that matches the filter or
550
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
551
+ * Note, that providing `undefined` is treated as the value not being there.
552
+ * Read more here: https://pris.ly/d/null-undefined
553
+ * @param {LabelFindFirstOrThrowArgs} args - Arguments to find a Label
554
+ * @example
555
+ * // Get one Label
556
+ * const label = await prisma.label.findFirstOrThrow({
557
+ * where: {
558
+ * // ... provide filter here
559
+ * }
560
+ * })
561
+ */
562
+ findFirstOrThrow<T extends LabelFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, LabelFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
563
+
564
+ /**
565
+ * Find zero or more Labels that matches the filter.
566
+ * Note, that providing `undefined` is treated as the value not being there.
567
+ * Read more here: https://pris.ly/d/null-undefined
568
+ * @param {LabelFindManyArgs} args - Arguments to filter and select certain fields only.
569
+ * @example
570
+ * // Get all Labels
571
+ * const labels = await prisma.label.findMany()
572
+ *
573
+ * // Get first 10 Labels
574
+ * const labels = await prisma.label.findMany({ take: 10 })
575
+ *
576
+ * // Only select the `email`
577
+ * const labelWithEmailOnly = await prisma.label.findMany({ select: { email: true } })
578
+ *
579
+ */
580
+ findMany<T extends LabelFindManyArgs>(args?: Prisma.SelectSubset<T, LabelFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
581
+
582
+ /**
583
+ * Create a Label.
584
+ * @param {LabelCreateArgs} args - Arguments to create a Label.
585
+ * @example
586
+ * // Create one Label
587
+ * const Label = await prisma.label.create({
588
+ * data: {
589
+ * // ... data to create a Label
590
+ * }
591
+ * })
592
+ *
593
+ */
594
+ create<T extends LabelCreateArgs>(args: Prisma.SelectSubset<T, LabelCreateArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
595
+
596
+ /**
597
+ * Create many Labels.
598
+ * @param {LabelCreateManyArgs} args - Arguments to create many Labels.
599
+ * @example
600
+ * // Create many Labels
601
+ * const label = await prisma.label.createMany({
602
+ * data: [
603
+ * // ... provide data here
604
+ * ]
605
+ * })
606
+ *
607
+ */
608
+ createMany<T extends LabelCreateManyArgs>(args?: Prisma.SelectSubset<T, LabelCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
609
+
610
+ /**
611
+ * Create many Labels and returns the data saved in the database.
612
+ * @param {LabelCreateManyAndReturnArgs} args - Arguments to create many Labels.
613
+ * @example
614
+ * // Create many Labels
615
+ * const label = await prisma.label.createManyAndReturn({
616
+ * data: [
617
+ * // ... provide data here
618
+ * ]
619
+ * })
620
+ *
621
+ * // Create many Labels and only return the `email`
622
+ * const labelWithEmailOnly = await prisma.label.createManyAndReturn({
623
+ * select: { email: true },
624
+ * data: [
625
+ * // ... provide data here
626
+ * ]
627
+ * })
628
+ * Note, that providing `undefined` is treated as the value not being there.
629
+ * Read more here: https://pris.ly/d/null-undefined
630
+ *
631
+ */
632
+ createManyAndReturn<T extends LabelCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, LabelCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
633
+
634
+ /**
635
+ * Delete a Label.
636
+ * @param {LabelDeleteArgs} args - Arguments to delete one Label.
637
+ * @example
638
+ * // Delete one Label
639
+ * const Label = await prisma.label.delete({
640
+ * where: {
641
+ * // ... filter to delete one Label
642
+ * }
643
+ * })
644
+ *
645
+ */
646
+ delete<T extends LabelDeleteArgs>(args: Prisma.SelectSubset<T, LabelDeleteArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
647
+
648
+ /**
649
+ * Update one Label.
650
+ * @param {LabelUpdateArgs} args - Arguments to update one Label.
651
+ * @example
652
+ * // Update one Label
653
+ * const label = await prisma.label.update({
654
+ * where: {
655
+ * // ... provide filter here
656
+ * },
657
+ * data: {
658
+ * // ... provide data here
659
+ * }
660
+ * })
661
+ *
662
+ */
663
+ update<T extends LabelUpdateArgs>(args: Prisma.SelectSubset<T, LabelUpdateArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
664
+
665
+ /**
666
+ * Delete zero or more Labels.
667
+ * @param {LabelDeleteManyArgs} args - Arguments to filter Labels to delete.
668
+ * @example
669
+ * // Delete a few Labels
670
+ * const { count } = await prisma.label.deleteMany({
671
+ * where: {
672
+ * // ... provide filter here
673
+ * }
674
+ * })
675
+ *
676
+ */
677
+ deleteMany<T extends LabelDeleteManyArgs>(args?: Prisma.SelectSubset<T, LabelDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
678
+
679
+ /**
680
+ * Update zero or more Labels.
681
+ * Note, that providing `undefined` is treated as the value not being there.
682
+ * Read more here: https://pris.ly/d/null-undefined
683
+ * @param {LabelUpdateManyArgs} args - Arguments to update one or more rows.
684
+ * @example
685
+ * // Update many Labels
686
+ * const label = await prisma.label.updateMany({
687
+ * where: {
688
+ * // ... provide filter here
689
+ * },
690
+ * data: {
691
+ * // ... provide data here
692
+ * }
693
+ * })
694
+ *
695
+ */
696
+ updateMany<T extends LabelUpdateManyArgs>(args: Prisma.SelectSubset<T, LabelUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
697
+
698
+ /**
699
+ * Update zero or more Labels and returns the data updated in the database.
700
+ * @param {LabelUpdateManyAndReturnArgs} args - Arguments to update many Labels.
701
+ * @example
702
+ * // Update many Labels
703
+ * const label = await prisma.label.updateManyAndReturn({
704
+ * where: {
705
+ * // ... provide filter here
706
+ * },
707
+ * data: [
708
+ * // ... provide data here
709
+ * ]
710
+ * })
711
+ *
712
+ * // Update zero or more Labels and only return the `email`
713
+ * const labelWithEmailOnly = await prisma.label.updateManyAndReturn({
714
+ * select: { email: true },
715
+ * where: {
716
+ * // ... provide filter here
717
+ * },
718
+ * data: [
719
+ * // ... provide data here
720
+ * ]
721
+ * })
722
+ * Note, that providing `undefined` is treated as the value not being there.
723
+ * Read more here: https://pris.ly/d/null-undefined
724
+ *
725
+ */
726
+ updateManyAndReturn<T extends LabelUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, LabelUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
727
+
728
+ /**
729
+ * Create or update one Label.
730
+ * @param {LabelUpsertArgs} args - Arguments to update or create a Label.
731
+ * @example
732
+ * // Update or create a Label
733
+ * const label = await prisma.label.upsert({
734
+ * create: {
735
+ * // ... data to create a Label
736
+ * },
737
+ * update: {
738
+ * // ... in case it already exists, update
739
+ * },
740
+ * where: {
741
+ * // ... the filter for the Label we want to update
742
+ * }
743
+ * })
744
+ */
745
+ upsert<T extends LabelUpsertArgs>(args: Prisma.SelectSubset<T, LabelUpsertArgs<ExtArgs>>): Prisma.Prisma__LabelClient<runtime.Types.Result.GetResult<Prisma.$LabelPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
746
+
747
+
748
+ /**
749
+ * Count the number of Labels.
750
+ * Note, that providing `undefined` is treated as the value not being there.
751
+ * Read more here: https://pris.ly/d/null-undefined
752
+ * @param {LabelCountArgs} args - Arguments to filter Labels to count.
753
+ * @example
754
+ * // Count the number of Labels
755
+ * const count = await prisma.label.count({
756
+ * where: {
757
+ * // ... the filter for the Labels we want to count
758
+ * }
759
+ * })
760
+ **/
761
+ count<T extends LabelCountArgs>(
762
+ args?: Prisma.Subset<T, LabelCountArgs>,
763
+ ): Prisma.PrismaPromise<
764
+ T extends runtime.Types.Utils.Record<'select', any>
765
+ ? T['select'] extends true
766
+ ? number
767
+ : Prisma.GetScalarType<T['select'], LabelCountAggregateOutputType>
768
+ : number
769
+ >
770
+
771
+ /**
772
+ * Allows you to perform aggregations operations on a Label.
773
+ * Note, that providing `undefined` is treated as the value not being there.
774
+ * Read more here: https://pris.ly/d/null-undefined
775
+ * @param {LabelAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
776
+ * @example
777
+ * // Ordered by age ascending
778
+ * // Where email contains prisma.io
779
+ * // Limited to the 10 users
780
+ * const aggregations = await prisma.user.aggregate({
781
+ * _avg: {
782
+ * age: true,
783
+ * },
784
+ * where: {
785
+ * email: {
786
+ * contains: "prisma.io",
787
+ * },
788
+ * },
789
+ * orderBy: {
790
+ * age: "asc",
791
+ * },
792
+ * take: 10,
793
+ * })
794
+ **/
795
+ aggregate<T extends LabelAggregateArgs>(args: Prisma.Subset<T, LabelAggregateArgs>): Prisma.PrismaPromise<GetLabelAggregateType<T>>
796
+
797
+ /**
798
+ * Group by Label.
799
+ * Note, that providing `undefined` is treated as the value not being there.
800
+ * Read more here: https://pris.ly/d/null-undefined
801
+ * @param {LabelGroupByArgs} args - Group by arguments.
802
+ * @example
803
+ * // Group by city, order by createdAt, get count
804
+ * const result = await prisma.user.groupBy({
805
+ * by: ['city', 'createdAt'],
806
+ * orderBy: {
807
+ * createdAt: true
808
+ * },
809
+ * _count: {
810
+ * _all: true
811
+ * },
812
+ * })
813
+ *
814
+ **/
815
+ groupBy<
816
+ T extends LabelGroupByArgs,
817
+ HasSelectOrTake extends Prisma.Or<
818
+ Prisma.Extends<'skip', Prisma.Keys<T>>,
819
+ Prisma.Extends<'take', Prisma.Keys<T>>
820
+ >,
821
+ OrderByArg extends Prisma.True extends HasSelectOrTake
822
+ ? { orderBy: LabelGroupByArgs['orderBy'] }
823
+ : { orderBy?: LabelGroupByArgs['orderBy'] },
824
+ OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
825
+ ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
826
+ ByValid extends Prisma.Has<ByFields, OrderFields>,
827
+ HavingFields extends Prisma.GetHavingFields<T['having']>,
828
+ HavingValid extends Prisma.Has<ByFields, HavingFields>,
829
+ ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
830
+ InputErrors extends ByEmpty extends Prisma.True
831
+ ? `Error: "by" must not be empty.`
832
+ : HavingValid extends Prisma.False
833
+ ? {
834
+ [P in HavingFields]: P extends ByFields
835
+ ? never
836
+ : P extends string
837
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
838
+ : [
839
+ Error,
840
+ 'Field ',
841
+ P,
842
+ ` in "having" needs to be provided in "by"`,
843
+ ]
844
+ }[HavingFields]
845
+ : 'take' extends Prisma.Keys<T>
846
+ ? 'orderBy' extends Prisma.Keys<T>
847
+ ? ByValid extends Prisma.True
848
+ ? {}
849
+ : {
850
+ [P in OrderFields]: P extends ByFields
851
+ ? never
852
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
853
+ }[OrderFields]
854
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
855
+ : 'skip' extends Prisma.Keys<T>
856
+ ? 'orderBy' extends Prisma.Keys<T>
857
+ ? ByValid extends Prisma.True
858
+ ? {}
859
+ : {
860
+ [P in OrderFields]: P extends ByFields
861
+ ? never
862
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
863
+ }[OrderFields]
864
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
865
+ : ByValid extends Prisma.True
866
+ ? {}
867
+ : {
868
+ [P in OrderFields]: P extends ByFields
869
+ ? never
870
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
871
+ }[OrderFields]
872
+ >(args: Prisma.SubsetIntersection<T, LabelGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetLabelGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
873
+ /**
874
+ * Fields of the Label model
875
+ */
876
+ readonly fields: LabelFieldRefs;
877
+ }
878
+
879
+ /**
880
+ * The delegate class that acts as a "Promise-like" for Label.
881
+ * Why is this prefixed with `Prisma__`?
882
+ * Because we want to prevent naming conflicts as mentioned in
883
+ * https://github.com/prisma/prisma-client-js/issues/707
884
+ */
885
+ export interface Prisma__LabelClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
886
+ readonly [Symbol.toStringTag]: "PrismaPromise"
887
+ account<T extends Prisma.AccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AccountDefaultArgs<ExtArgs>>): Prisma.Prisma__AccountClient<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
888
+ /**
889
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
890
+ * @param onfulfilled The callback to execute when the Promise is resolved.
891
+ * @param onrejected The callback to execute when the Promise is rejected.
892
+ * @returns A Promise for the completion of which ever callback is executed.
893
+ */
894
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
895
+ /**
896
+ * Attaches a callback for only the rejection of the Promise.
897
+ * @param onrejected The callback to execute when the Promise is rejected.
898
+ * @returns A Promise for the completion of the callback.
899
+ */
900
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
901
+ /**
902
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
903
+ * resolved value cannot be modified from the callback.
904
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
905
+ * @returns A Promise for the completion of the callback.
906
+ */
907
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
908
+ }
909
+
910
+
911
+
912
+
913
+ /**
914
+ * Fields of the Label model
915
+ */
916
+ export interface LabelFieldRefs {
917
+ readonly email: Prisma.FieldRef<"Label", 'String'>
918
+ readonly appId: Prisma.FieldRef<"Label", 'String'>
919
+ readonly rawData: Prisma.FieldRef<"Label", 'String'>
920
+ readonly ttlMs: Prisma.FieldRef<"Label", 'Int'>
921
+ readonly createdAt: Prisma.FieldRef<"Label", 'DateTime'>
922
+ }
923
+
924
+
925
+ // Custom InputTypes
926
+ /**
927
+ * Label findUnique
928
+ */
929
+ export type LabelFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
930
+ /**
931
+ * Select specific fields to fetch from the Label
932
+ */
933
+ select?: Prisma.LabelSelect<ExtArgs> | null
934
+ /**
935
+ * Omit specific fields from the Label
936
+ */
937
+ omit?: Prisma.LabelOmit<ExtArgs> | null
938
+ /**
939
+ * Choose, which related nodes to fetch as well
940
+ */
941
+ include?: Prisma.LabelInclude<ExtArgs> | null
942
+ /**
943
+ * Filter, which Label to fetch.
944
+ */
945
+ where: Prisma.LabelWhereUniqueInput
946
+ }
947
+
948
+ /**
949
+ * Label findUniqueOrThrow
950
+ */
951
+ export type LabelFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
952
+ /**
953
+ * Select specific fields to fetch from the Label
954
+ */
955
+ select?: Prisma.LabelSelect<ExtArgs> | null
956
+ /**
957
+ * Omit specific fields from the Label
958
+ */
959
+ omit?: Prisma.LabelOmit<ExtArgs> | null
960
+ /**
961
+ * Choose, which related nodes to fetch as well
962
+ */
963
+ include?: Prisma.LabelInclude<ExtArgs> | null
964
+ /**
965
+ * Filter, which Label to fetch.
966
+ */
967
+ where: Prisma.LabelWhereUniqueInput
968
+ }
969
+
970
+ /**
971
+ * Label findFirst
972
+ */
973
+ export type LabelFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
974
+ /**
975
+ * Select specific fields to fetch from the Label
976
+ */
977
+ select?: Prisma.LabelSelect<ExtArgs> | null
978
+ /**
979
+ * Omit specific fields from the Label
980
+ */
981
+ omit?: Prisma.LabelOmit<ExtArgs> | null
982
+ /**
983
+ * Choose, which related nodes to fetch as well
984
+ */
985
+ include?: Prisma.LabelInclude<ExtArgs> | null
986
+ /**
987
+ * Filter, which Label to fetch.
988
+ */
989
+ where?: Prisma.LabelWhereInput
990
+ /**
991
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
992
+ *
993
+ * Determine the order of Labels to fetch.
994
+ */
995
+ orderBy?: Prisma.LabelOrderByWithRelationInput | Prisma.LabelOrderByWithRelationInput[]
996
+ /**
997
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
998
+ *
999
+ * Sets the position for searching for Labels.
1000
+ */
1001
+ cursor?: Prisma.LabelWhereUniqueInput
1002
+ /**
1003
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1004
+ *
1005
+ * Take `±n` Labels from the position of the cursor.
1006
+ */
1007
+ take?: number
1008
+ /**
1009
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1010
+ *
1011
+ * Skip the first `n` Labels.
1012
+ */
1013
+ skip?: number
1014
+ /**
1015
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1016
+ *
1017
+ * Filter by unique combinations of Labels.
1018
+ */
1019
+ distinct?: Prisma.LabelScalarFieldEnum | Prisma.LabelScalarFieldEnum[]
1020
+ }
1021
+
1022
+ /**
1023
+ * Label findFirstOrThrow
1024
+ */
1025
+ export type LabelFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1026
+ /**
1027
+ * Select specific fields to fetch from the Label
1028
+ */
1029
+ select?: Prisma.LabelSelect<ExtArgs> | null
1030
+ /**
1031
+ * Omit specific fields from the Label
1032
+ */
1033
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1034
+ /**
1035
+ * Choose, which related nodes to fetch as well
1036
+ */
1037
+ include?: Prisma.LabelInclude<ExtArgs> | null
1038
+ /**
1039
+ * Filter, which Label to fetch.
1040
+ */
1041
+ where?: Prisma.LabelWhereInput
1042
+ /**
1043
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1044
+ *
1045
+ * Determine the order of Labels to fetch.
1046
+ */
1047
+ orderBy?: Prisma.LabelOrderByWithRelationInput | Prisma.LabelOrderByWithRelationInput[]
1048
+ /**
1049
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1050
+ *
1051
+ * Sets the position for searching for Labels.
1052
+ */
1053
+ cursor?: Prisma.LabelWhereUniqueInput
1054
+ /**
1055
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1056
+ *
1057
+ * Take `±n` Labels from the position of the cursor.
1058
+ */
1059
+ take?: number
1060
+ /**
1061
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1062
+ *
1063
+ * Skip the first `n` Labels.
1064
+ */
1065
+ skip?: number
1066
+ /**
1067
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1068
+ *
1069
+ * Filter by unique combinations of Labels.
1070
+ */
1071
+ distinct?: Prisma.LabelScalarFieldEnum | Prisma.LabelScalarFieldEnum[]
1072
+ }
1073
+
1074
+ /**
1075
+ * Label findMany
1076
+ */
1077
+ export type LabelFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1078
+ /**
1079
+ * Select specific fields to fetch from the Label
1080
+ */
1081
+ select?: Prisma.LabelSelect<ExtArgs> | null
1082
+ /**
1083
+ * Omit specific fields from the Label
1084
+ */
1085
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1086
+ /**
1087
+ * Choose, which related nodes to fetch as well
1088
+ */
1089
+ include?: Prisma.LabelInclude<ExtArgs> | null
1090
+ /**
1091
+ * Filter, which Labels to fetch.
1092
+ */
1093
+ where?: Prisma.LabelWhereInput
1094
+ /**
1095
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1096
+ *
1097
+ * Determine the order of Labels to fetch.
1098
+ */
1099
+ orderBy?: Prisma.LabelOrderByWithRelationInput | Prisma.LabelOrderByWithRelationInput[]
1100
+ /**
1101
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1102
+ *
1103
+ * Sets the position for listing Labels.
1104
+ */
1105
+ cursor?: Prisma.LabelWhereUniqueInput
1106
+ /**
1107
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1108
+ *
1109
+ * Take `±n` Labels from the position of the cursor.
1110
+ */
1111
+ take?: number
1112
+ /**
1113
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1114
+ *
1115
+ * Skip the first `n` Labels.
1116
+ */
1117
+ skip?: number
1118
+ distinct?: Prisma.LabelScalarFieldEnum | Prisma.LabelScalarFieldEnum[]
1119
+ }
1120
+
1121
+ /**
1122
+ * Label create
1123
+ */
1124
+ export type LabelCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1125
+ /**
1126
+ * Select specific fields to fetch from the Label
1127
+ */
1128
+ select?: Prisma.LabelSelect<ExtArgs> | null
1129
+ /**
1130
+ * Omit specific fields from the Label
1131
+ */
1132
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1133
+ /**
1134
+ * Choose, which related nodes to fetch as well
1135
+ */
1136
+ include?: Prisma.LabelInclude<ExtArgs> | null
1137
+ /**
1138
+ * The data needed to create a Label.
1139
+ */
1140
+ data: Prisma.XOR<Prisma.LabelCreateInput, Prisma.LabelUncheckedCreateInput>
1141
+ }
1142
+
1143
+ /**
1144
+ * Label createMany
1145
+ */
1146
+ export type LabelCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1147
+ /**
1148
+ * The data used to create many Labels.
1149
+ */
1150
+ data: Prisma.LabelCreateManyInput | Prisma.LabelCreateManyInput[]
1151
+ }
1152
+
1153
+ /**
1154
+ * Label createManyAndReturn
1155
+ */
1156
+ export type LabelCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1157
+ /**
1158
+ * Select specific fields to fetch from the Label
1159
+ */
1160
+ select?: Prisma.LabelSelectCreateManyAndReturn<ExtArgs> | null
1161
+ /**
1162
+ * Omit specific fields from the Label
1163
+ */
1164
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1165
+ /**
1166
+ * The data used to create many Labels.
1167
+ */
1168
+ data: Prisma.LabelCreateManyInput | Prisma.LabelCreateManyInput[]
1169
+ /**
1170
+ * Choose, which related nodes to fetch as well
1171
+ */
1172
+ include?: Prisma.LabelIncludeCreateManyAndReturn<ExtArgs> | null
1173
+ }
1174
+
1175
+ /**
1176
+ * Label update
1177
+ */
1178
+ export type LabelUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1179
+ /**
1180
+ * Select specific fields to fetch from the Label
1181
+ */
1182
+ select?: Prisma.LabelSelect<ExtArgs> | null
1183
+ /**
1184
+ * Omit specific fields from the Label
1185
+ */
1186
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1187
+ /**
1188
+ * Choose, which related nodes to fetch as well
1189
+ */
1190
+ include?: Prisma.LabelInclude<ExtArgs> | null
1191
+ /**
1192
+ * The data needed to update a Label.
1193
+ */
1194
+ data: Prisma.XOR<Prisma.LabelUpdateInput, Prisma.LabelUncheckedUpdateInput>
1195
+ /**
1196
+ * Choose, which Label to update.
1197
+ */
1198
+ where: Prisma.LabelWhereUniqueInput
1199
+ }
1200
+
1201
+ /**
1202
+ * Label updateMany
1203
+ */
1204
+ export type LabelUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1205
+ /**
1206
+ * The data used to update Labels.
1207
+ */
1208
+ data: Prisma.XOR<Prisma.LabelUpdateManyMutationInput, Prisma.LabelUncheckedUpdateManyInput>
1209
+ /**
1210
+ * Filter which Labels to update
1211
+ */
1212
+ where?: Prisma.LabelWhereInput
1213
+ /**
1214
+ * Limit how many Labels to update.
1215
+ */
1216
+ limit?: number
1217
+ }
1218
+
1219
+ /**
1220
+ * Label updateManyAndReturn
1221
+ */
1222
+ export type LabelUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1223
+ /**
1224
+ * Select specific fields to fetch from the Label
1225
+ */
1226
+ select?: Prisma.LabelSelectUpdateManyAndReturn<ExtArgs> | null
1227
+ /**
1228
+ * Omit specific fields from the Label
1229
+ */
1230
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1231
+ /**
1232
+ * The data used to update Labels.
1233
+ */
1234
+ data: Prisma.XOR<Prisma.LabelUpdateManyMutationInput, Prisma.LabelUncheckedUpdateManyInput>
1235
+ /**
1236
+ * Filter which Labels to update
1237
+ */
1238
+ where?: Prisma.LabelWhereInput
1239
+ /**
1240
+ * Limit how many Labels to update.
1241
+ */
1242
+ limit?: number
1243
+ /**
1244
+ * Choose, which related nodes to fetch as well
1245
+ */
1246
+ include?: Prisma.LabelIncludeUpdateManyAndReturn<ExtArgs> | null
1247
+ }
1248
+
1249
+ /**
1250
+ * Label upsert
1251
+ */
1252
+ export type LabelUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1253
+ /**
1254
+ * Select specific fields to fetch from the Label
1255
+ */
1256
+ select?: Prisma.LabelSelect<ExtArgs> | null
1257
+ /**
1258
+ * Omit specific fields from the Label
1259
+ */
1260
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1261
+ /**
1262
+ * Choose, which related nodes to fetch as well
1263
+ */
1264
+ include?: Prisma.LabelInclude<ExtArgs> | null
1265
+ /**
1266
+ * The filter to search for the Label to update in case it exists.
1267
+ */
1268
+ where: Prisma.LabelWhereUniqueInput
1269
+ /**
1270
+ * In case the Label found by the `where` argument doesn't exist, create a new Label with this data.
1271
+ */
1272
+ create: Prisma.XOR<Prisma.LabelCreateInput, Prisma.LabelUncheckedCreateInput>
1273
+ /**
1274
+ * In case the Label was found with the provided `where` argument, update it with this data.
1275
+ */
1276
+ update: Prisma.XOR<Prisma.LabelUpdateInput, Prisma.LabelUncheckedUpdateInput>
1277
+ }
1278
+
1279
+ /**
1280
+ * Label delete
1281
+ */
1282
+ export type LabelDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1283
+ /**
1284
+ * Select specific fields to fetch from the Label
1285
+ */
1286
+ select?: Prisma.LabelSelect<ExtArgs> | null
1287
+ /**
1288
+ * Omit specific fields from the Label
1289
+ */
1290
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1291
+ /**
1292
+ * Choose, which related nodes to fetch as well
1293
+ */
1294
+ include?: Prisma.LabelInclude<ExtArgs> | null
1295
+ /**
1296
+ * Filter which Label to delete.
1297
+ */
1298
+ where: Prisma.LabelWhereUniqueInput
1299
+ }
1300
+
1301
+ /**
1302
+ * Label deleteMany
1303
+ */
1304
+ export type LabelDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1305
+ /**
1306
+ * Filter which Labels to delete
1307
+ */
1308
+ where?: Prisma.LabelWhereInput
1309
+ /**
1310
+ * Limit how many Labels to delete.
1311
+ */
1312
+ limit?: number
1313
+ }
1314
+
1315
+ /**
1316
+ * Label without action
1317
+ */
1318
+ export type LabelDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1319
+ /**
1320
+ * Select specific fields to fetch from the Label
1321
+ */
1322
+ select?: Prisma.LabelSelect<ExtArgs> | null
1323
+ /**
1324
+ * Omit specific fields from the Label
1325
+ */
1326
+ omit?: Prisma.LabelOmit<ExtArgs> | null
1327
+ /**
1328
+ * Choose, which related nodes to fetch as well
1329
+ */
1330
+ include?: Prisma.LabelInclude<ExtArgs> | null
1331
+ }