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,1130 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace.js";
3
+ /**
4
+ * Model SyncState
5
+ *
6
+ */
7
+ export type SyncStateModel = runtime.Types.Result.DefaultSelection<Prisma.$SyncStatePayload>;
8
+ export type AggregateSyncState = {
9
+ _count: SyncStateCountAggregateOutputType | null;
10
+ _min: SyncStateMinAggregateOutputType | null;
11
+ _max: SyncStateMaxAggregateOutputType | null;
12
+ };
13
+ export type SyncStateMinAggregateOutputType = {
14
+ email: string | null;
15
+ appId: string | null;
16
+ key: string | null;
17
+ value: string | null;
18
+ };
19
+ export type SyncStateMaxAggregateOutputType = {
20
+ email: string | null;
21
+ appId: string | null;
22
+ key: string | null;
23
+ value: string | null;
24
+ };
25
+ export type SyncStateCountAggregateOutputType = {
26
+ email: number;
27
+ appId: number;
28
+ key: number;
29
+ value: number;
30
+ _all: number;
31
+ };
32
+ export type SyncStateMinAggregateInputType = {
33
+ email?: true;
34
+ appId?: true;
35
+ key?: true;
36
+ value?: true;
37
+ };
38
+ export type SyncStateMaxAggregateInputType = {
39
+ email?: true;
40
+ appId?: true;
41
+ key?: true;
42
+ value?: true;
43
+ };
44
+ export type SyncStateCountAggregateInputType = {
45
+ email?: true;
46
+ appId?: true;
47
+ key?: true;
48
+ value?: true;
49
+ _all?: true;
50
+ };
51
+ export type SyncStateAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
52
+ /**
53
+ * Filter which SyncState to aggregate.
54
+ */
55
+ where?: Prisma.SyncStateWhereInput;
56
+ /**
57
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
58
+ *
59
+ * Determine the order of SyncStates to fetch.
60
+ */
61
+ orderBy?: Prisma.SyncStateOrderByWithRelationInput | Prisma.SyncStateOrderByWithRelationInput[];
62
+ /**
63
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
64
+ *
65
+ * Sets the start position
66
+ */
67
+ cursor?: Prisma.SyncStateWhereUniqueInput;
68
+ /**
69
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
70
+ *
71
+ * Take `±n` SyncStates from the position of the cursor.
72
+ */
73
+ take?: number;
74
+ /**
75
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
76
+ *
77
+ * Skip the first `n` SyncStates.
78
+ */
79
+ skip?: number;
80
+ /**
81
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
82
+ *
83
+ * Count returned SyncStates
84
+ **/
85
+ _count?: true | SyncStateCountAggregateInputType;
86
+ /**
87
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
88
+ *
89
+ * Select which fields to find the minimum value
90
+ **/
91
+ _min?: SyncStateMinAggregateInputType;
92
+ /**
93
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
94
+ *
95
+ * Select which fields to find the maximum value
96
+ **/
97
+ _max?: SyncStateMaxAggregateInputType;
98
+ };
99
+ export type GetSyncStateAggregateType<T extends SyncStateAggregateArgs> = {
100
+ [P in keyof T & keyof AggregateSyncState]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateSyncState[P]> : Prisma.GetScalarType<T[P], AggregateSyncState[P]>;
101
+ };
102
+ export type SyncStateGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
103
+ where?: Prisma.SyncStateWhereInput;
104
+ orderBy?: Prisma.SyncStateOrderByWithAggregationInput | Prisma.SyncStateOrderByWithAggregationInput[];
105
+ by: Prisma.SyncStateScalarFieldEnum[] | Prisma.SyncStateScalarFieldEnum;
106
+ having?: Prisma.SyncStateScalarWhereWithAggregatesInput;
107
+ take?: number;
108
+ skip?: number;
109
+ _count?: SyncStateCountAggregateInputType | true;
110
+ _min?: SyncStateMinAggregateInputType;
111
+ _max?: SyncStateMaxAggregateInputType;
112
+ };
113
+ export type SyncStateGroupByOutputType = {
114
+ email: string;
115
+ appId: string;
116
+ key: string;
117
+ value: string;
118
+ _count: SyncStateCountAggregateOutputType | null;
119
+ _min: SyncStateMinAggregateOutputType | null;
120
+ _max: SyncStateMaxAggregateOutputType | null;
121
+ };
122
+ type GetSyncStateGroupByPayload<T extends SyncStateGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<SyncStateGroupByOutputType, T['by']> & {
123
+ [P in ((keyof T) & (keyof SyncStateGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], SyncStateGroupByOutputType[P]> : Prisma.GetScalarType<T[P], SyncStateGroupByOutputType[P]>;
124
+ }>>;
125
+ export type SyncStateWhereInput = {
126
+ AND?: Prisma.SyncStateWhereInput | Prisma.SyncStateWhereInput[];
127
+ OR?: Prisma.SyncStateWhereInput[];
128
+ NOT?: Prisma.SyncStateWhereInput | Prisma.SyncStateWhereInput[];
129
+ email?: Prisma.StringFilter<"SyncState"> | string;
130
+ appId?: Prisma.StringFilter<"SyncState"> | string;
131
+ key?: Prisma.StringFilter<"SyncState"> | string;
132
+ value?: Prisma.StringFilter<"SyncState"> | string;
133
+ account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>;
134
+ };
135
+ export type SyncStateOrderByWithRelationInput = {
136
+ email?: Prisma.SortOrder;
137
+ appId?: Prisma.SortOrder;
138
+ key?: Prisma.SortOrder;
139
+ value?: Prisma.SortOrder;
140
+ account?: Prisma.AccountOrderByWithRelationInput;
141
+ };
142
+ export type SyncStateWhereUniqueInput = Prisma.AtLeast<{
143
+ email_appId_key?: Prisma.SyncStateEmailAppIdKeyCompoundUniqueInput;
144
+ AND?: Prisma.SyncStateWhereInput | Prisma.SyncStateWhereInput[];
145
+ OR?: Prisma.SyncStateWhereInput[];
146
+ NOT?: Prisma.SyncStateWhereInput | Prisma.SyncStateWhereInput[];
147
+ email?: Prisma.StringFilter<"SyncState"> | string;
148
+ appId?: Prisma.StringFilter<"SyncState"> | string;
149
+ key?: Prisma.StringFilter<"SyncState"> | string;
150
+ value?: Prisma.StringFilter<"SyncState"> | string;
151
+ account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>;
152
+ }, "email_appId_key">;
153
+ export type SyncStateOrderByWithAggregationInput = {
154
+ email?: Prisma.SortOrder;
155
+ appId?: Prisma.SortOrder;
156
+ key?: Prisma.SortOrder;
157
+ value?: Prisma.SortOrder;
158
+ _count?: Prisma.SyncStateCountOrderByAggregateInput;
159
+ _max?: Prisma.SyncStateMaxOrderByAggregateInput;
160
+ _min?: Prisma.SyncStateMinOrderByAggregateInput;
161
+ };
162
+ export type SyncStateScalarWhereWithAggregatesInput = {
163
+ AND?: Prisma.SyncStateScalarWhereWithAggregatesInput | Prisma.SyncStateScalarWhereWithAggregatesInput[];
164
+ OR?: Prisma.SyncStateScalarWhereWithAggregatesInput[];
165
+ NOT?: Prisma.SyncStateScalarWhereWithAggregatesInput | Prisma.SyncStateScalarWhereWithAggregatesInput[];
166
+ email?: Prisma.StringWithAggregatesFilter<"SyncState"> | string;
167
+ appId?: Prisma.StringWithAggregatesFilter<"SyncState"> | string;
168
+ key?: Prisma.StringWithAggregatesFilter<"SyncState"> | string;
169
+ value?: Prisma.StringWithAggregatesFilter<"SyncState"> | string;
170
+ };
171
+ export type SyncStateCreateInput = {
172
+ key: string;
173
+ value: string;
174
+ account: Prisma.AccountCreateNestedOneWithoutSyncStatesInput;
175
+ };
176
+ export type SyncStateUncheckedCreateInput = {
177
+ email: string;
178
+ appId: string;
179
+ key: string;
180
+ value: string;
181
+ };
182
+ export type SyncStateUpdateInput = {
183
+ key?: Prisma.StringFieldUpdateOperationsInput | string;
184
+ value?: Prisma.StringFieldUpdateOperationsInput | string;
185
+ account?: Prisma.AccountUpdateOneRequiredWithoutSyncStatesNestedInput;
186
+ };
187
+ export type SyncStateUncheckedUpdateInput = {
188
+ email?: Prisma.StringFieldUpdateOperationsInput | string;
189
+ appId?: Prisma.StringFieldUpdateOperationsInput | string;
190
+ key?: Prisma.StringFieldUpdateOperationsInput | string;
191
+ value?: Prisma.StringFieldUpdateOperationsInput | string;
192
+ };
193
+ export type SyncStateCreateManyInput = {
194
+ email: string;
195
+ appId: string;
196
+ key: string;
197
+ value: string;
198
+ };
199
+ export type SyncStateUpdateManyMutationInput = {
200
+ key?: Prisma.StringFieldUpdateOperationsInput | string;
201
+ value?: Prisma.StringFieldUpdateOperationsInput | string;
202
+ };
203
+ export type SyncStateUncheckedUpdateManyInput = {
204
+ email?: Prisma.StringFieldUpdateOperationsInput | string;
205
+ appId?: Prisma.StringFieldUpdateOperationsInput | string;
206
+ key?: Prisma.StringFieldUpdateOperationsInput | string;
207
+ value?: Prisma.StringFieldUpdateOperationsInput | string;
208
+ };
209
+ export type SyncStateListRelationFilter = {
210
+ every?: Prisma.SyncStateWhereInput;
211
+ some?: Prisma.SyncStateWhereInput;
212
+ none?: Prisma.SyncStateWhereInput;
213
+ };
214
+ export type SyncStateOrderByRelationAggregateInput = {
215
+ _count?: Prisma.SortOrder;
216
+ };
217
+ export type SyncStateEmailAppIdKeyCompoundUniqueInput = {
218
+ email: string;
219
+ appId: string;
220
+ key: string;
221
+ };
222
+ export type SyncStateCountOrderByAggregateInput = {
223
+ email?: Prisma.SortOrder;
224
+ appId?: Prisma.SortOrder;
225
+ key?: Prisma.SortOrder;
226
+ value?: Prisma.SortOrder;
227
+ };
228
+ export type SyncStateMaxOrderByAggregateInput = {
229
+ email?: Prisma.SortOrder;
230
+ appId?: Prisma.SortOrder;
231
+ key?: Prisma.SortOrder;
232
+ value?: Prisma.SortOrder;
233
+ };
234
+ export type SyncStateMinOrderByAggregateInput = {
235
+ email?: Prisma.SortOrder;
236
+ appId?: Prisma.SortOrder;
237
+ key?: Prisma.SortOrder;
238
+ value?: Prisma.SortOrder;
239
+ };
240
+ export type SyncStateCreateNestedManyWithoutAccountInput = {
241
+ create?: Prisma.XOR<Prisma.SyncStateCreateWithoutAccountInput, Prisma.SyncStateUncheckedCreateWithoutAccountInput> | Prisma.SyncStateCreateWithoutAccountInput[] | Prisma.SyncStateUncheckedCreateWithoutAccountInput[];
242
+ connectOrCreate?: Prisma.SyncStateCreateOrConnectWithoutAccountInput | Prisma.SyncStateCreateOrConnectWithoutAccountInput[];
243
+ createMany?: Prisma.SyncStateCreateManyAccountInputEnvelope;
244
+ connect?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
245
+ };
246
+ export type SyncStateUncheckedCreateNestedManyWithoutAccountInput = {
247
+ create?: Prisma.XOR<Prisma.SyncStateCreateWithoutAccountInput, Prisma.SyncStateUncheckedCreateWithoutAccountInput> | Prisma.SyncStateCreateWithoutAccountInput[] | Prisma.SyncStateUncheckedCreateWithoutAccountInput[];
248
+ connectOrCreate?: Prisma.SyncStateCreateOrConnectWithoutAccountInput | Prisma.SyncStateCreateOrConnectWithoutAccountInput[];
249
+ createMany?: Prisma.SyncStateCreateManyAccountInputEnvelope;
250
+ connect?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
251
+ };
252
+ export type SyncStateUpdateManyWithoutAccountNestedInput = {
253
+ create?: Prisma.XOR<Prisma.SyncStateCreateWithoutAccountInput, Prisma.SyncStateUncheckedCreateWithoutAccountInput> | Prisma.SyncStateCreateWithoutAccountInput[] | Prisma.SyncStateUncheckedCreateWithoutAccountInput[];
254
+ connectOrCreate?: Prisma.SyncStateCreateOrConnectWithoutAccountInput | Prisma.SyncStateCreateOrConnectWithoutAccountInput[];
255
+ upsert?: Prisma.SyncStateUpsertWithWhereUniqueWithoutAccountInput | Prisma.SyncStateUpsertWithWhereUniqueWithoutAccountInput[];
256
+ createMany?: Prisma.SyncStateCreateManyAccountInputEnvelope;
257
+ set?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
258
+ disconnect?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
259
+ delete?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
260
+ connect?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
261
+ update?: Prisma.SyncStateUpdateWithWhereUniqueWithoutAccountInput | Prisma.SyncStateUpdateWithWhereUniqueWithoutAccountInput[];
262
+ updateMany?: Prisma.SyncStateUpdateManyWithWhereWithoutAccountInput | Prisma.SyncStateUpdateManyWithWhereWithoutAccountInput[];
263
+ deleteMany?: Prisma.SyncStateScalarWhereInput | Prisma.SyncStateScalarWhereInput[];
264
+ };
265
+ export type SyncStateUncheckedUpdateManyWithoutAccountNestedInput = {
266
+ create?: Prisma.XOR<Prisma.SyncStateCreateWithoutAccountInput, Prisma.SyncStateUncheckedCreateWithoutAccountInput> | Prisma.SyncStateCreateWithoutAccountInput[] | Prisma.SyncStateUncheckedCreateWithoutAccountInput[];
267
+ connectOrCreate?: Prisma.SyncStateCreateOrConnectWithoutAccountInput | Prisma.SyncStateCreateOrConnectWithoutAccountInput[];
268
+ upsert?: Prisma.SyncStateUpsertWithWhereUniqueWithoutAccountInput | Prisma.SyncStateUpsertWithWhereUniqueWithoutAccountInput[];
269
+ createMany?: Prisma.SyncStateCreateManyAccountInputEnvelope;
270
+ set?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
271
+ disconnect?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
272
+ delete?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
273
+ connect?: Prisma.SyncStateWhereUniqueInput | Prisma.SyncStateWhereUniqueInput[];
274
+ update?: Prisma.SyncStateUpdateWithWhereUniqueWithoutAccountInput | Prisma.SyncStateUpdateWithWhereUniqueWithoutAccountInput[];
275
+ updateMany?: Prisma.SyncStateUpdateManyWithWhereWithoutAccountInput | Prisma.SyncStateUpdateManyWithWhereWithoutAccountInput[];
276
+ deleteMany?: Prisma.SyncStateScalarWhereInput | Prisma.SyncStateScalarWhereInput[];
277
+ };
278
+ export type SyncStateCreateWithoutAccountInput = {
279
+ key: string;
280
+ value: string;
281
+ };
282
+ export type SyncStateUncheckedCreateWithoutAccountInput = {
283
+ key: string;
284
+ value: string;
285
+ };
286
+ export type SyncStateCreateOrConnectWithoutAccountInput = {
287
+ where: Prisma.SyncStateWhereUniqueInput;
288
+ create: Prisma.XOR<Prisma.SyncStateCreateWithoutAccountInput, Prisma.SyncStateUncheckedCreateWithoutAccountInput>;
289
+ };
290
+ export type SyncStateCreateManyAccountInputEnvelope = {
291
+ data: Prisma.SyncStateCreateManyAccountInput | Prisma.SyncStateCreateManyAccountInput[];
292
+ };
293
+ export type SyncStateUpsertWithWhereUniqueWithoutAccountInput = {
294
+ where: Prisma.SyncStateWhereUniqueInput;
295
+ update: Prisma.XOR<Prisma.SyncStateUpdateWithoutAccountInput, Prisma.SyncStateUncheckedUpdateWithoutAccountInput>;
296
+ create: Prisma.XOR<Prisma.SyncStateCreateWithoutAccountInput, Prisma.SyncStateUncheckedCreateWithoutAccountInput>;
297
+ };
298
+ export type SyncStateUpdateWithWhereUniqueWithoutAccountInput = {
299
+ where: Prisma.SyncStateWhereUniqueInput;
300
+ data: Prisma.XOR<Prisma.SyncStateUpdateWithoutAccountInput, Prisma.SyncStateUncheckedUpdateWithoutAccountInput>;
301
+ };
302
+ export type SyncStateUpdateManyWithWhereWithoutAccountInput = {
303
+ where: Prisma.SyncStateScalarWhereInput;
304
+ data: Prisma.XOR<Prisma.SyncStateUpdateManyMutationInput, Prisma.SyncStateUncheckedUpdateManyWithoutAccountInput>;
305
+ };
306
+ export type SyncStateScalarWhereInput = {
307
+ AND?: Prisma.SyncStateScalarWhereInput | Prisma.SyncStateScalarWhereInput[];
308
+ OR?: Prisma.SyncStateScalarWhereInput[];
309
+ NOT?: Prisma.SyncStateScalarWhereInput | Prisma.SyncStateScalarWhereInput[];
310
+ email?: Prisma.StringFilter<"SyncState"> | string;
311
+ appId?: Prisma.StringFilter<"SyncState"> | string;
312
+ key?: Prisma.StringFilter<"SyncState"> | string;
313
+ value?: Prisma.StringFilter<"SyncState"> | string;
314
+ };
315
+ export type SyncStateCreateManyAccountInput = {
316
+ key: string;
317
+ value: string;
318
+ };
319
+ export type SyncStateUpdateWithoutAccountInput = {
320
+ key?: Prisma.StringFieldUpdateOperationsInput | string;
321
+ value?: Prisma.StringFieldUpdateOperationsInput | string;
322
+ };
323
+ export type SyncStateUncheckedUpdateWithoutAccountInput = {
324
+ key?: Prisma.StringFieldUpdateOperationsInput | string;
325
+ value?: Prisma.StringFieldUpdateOperationsInput | string;
326
+ };
327
+ export type SyncStateUncheckedUpdateManyWithoutAccountInput = {
328
+ key?: Prisma.StringFieldUpdateOperationsInput | string;
329
+ value?: Prisma.StringFieldUpdateOperationsInput | string;
330
+ };
331
+ export type SyncStateSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
332
+ email?: boolean;
333
+ appId?: boolean;
334
+ key?: boolean;
335
+ value?: boolean;
336
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>;
337
+ }, ExtArgs["result"]["syncState"]>;
338
+ export type SyncStateSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
339
+ email?: boolean;
340
+ appId?: boolean;
341
+ key?: boolean;
342
+ value?: boolean;
343
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>;
344
+ }, ExtArgs["result"]["syncState"]>;
345
+ export type SyncStateSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
346
+ email?: boolean;
347
+ appId?: boolean;
348
+ key?: boolean;
349
+ value?: boolean;
350
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>;
351
+ }, ExtArgs["result"]["syncState"]>;
352
+ export type SyncStateSelectScalar = {
353
+ email?: boolean;
354
+ appId?: boolean;
355
+ key?: boolean;
356
+ value?: boolean;
357
+ };
358
+ export type SyncStateOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"email" | "appId" | "key" | "value", ExtArgs["result"]["syncState"]>;
359
+ export type SyncStateInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
360
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>;
361
+ };
362
+ export type SyncStateIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
363
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>;
364
+ };
365
+ export type SyncStateIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
366
+ account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>;
367
+ };
368
+ export type $SyncStatePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
369
+ name: "SyncState";
370
+ objects: {
371
+ account: Prisma.$AccountPayload<ExtArgs>;
372
+ };
373
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
374
+ email: string;
375
+ appId: string;
376
+ key: string;
377
+ value: string;
378
+ }, ExtArgs["result"]["syncState"]>;
379
+ composites: {};
380
+ };
381
+ export type SyncStateGetPayload<S extends boolean | null | undefined | SyncStateDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$SyncStatePayload, S>;
382
+ export type SyncStateCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<SyncStateFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
383
+ select?: SyncStateCountAggregateInputType | true;
384
+ };
385
+ export interface SyncStateDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
386
+ [K: symbol]: {
387
+ types: Prisma.TypeMap<ExtArgs>['model']['SyncState'];
388
+ meta: {
389
+ name: 'SyncState';
390
+ };
391
+ };
392
+ /**
393
+ * Find zero or one SyncState that matches the filter.
394
+ * @param {SyncStateFindUniqueArgs} args - Arguments to find a SyncState
395
+ * @example
396
+ * // Get one SyncState
397
+ * const syncState = await prisma.syncState.findUnique({
398
+ * where: {
399
+ * // ... provide filter here
400
+ * }
401
+ * })
402
+ */
403
+ findUnique<T extends SyncStateFindUniqueArgs>(args: Prisma.SelectSubset<T, SyncStateFindUniqueArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
404
+ /**
405
+ * Find one SyncState that matches the filter or throw an error with `error.code='P2025'`
406
+ * if no matches were found.
407
+ * @param {SyncStateFindUniqueOrThrowArgs} args - Arguments to find a SyncState
408
+ * @example
409
+ * // Get one SyncState
410
+ * const syncState = await prisma.syncState.findUniqueOrThrow({
411
+ * where: {
412
+ * // ... provide filter here
413
+ * }
414
+ * })
415
+ */
416
+ findUniqueOrThrow<T extends SyncStateFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, SyncStateFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
417
+ /**
418
+ * Find the first SyncState that matches the filter.
419
+ * Note, that providing `undefined` is treated as the value not being there.
420
+ * Read more here: https://pris.ly/d/null-undefined
421
+ * @param {SyncStateFindFirstArgs} args - Arguments to find a SyncState
422
+ * @example
423
+ * // Get one SyncState
424
+ * const syncState = await prisma.syncState.findFirst({
425
+ * where: {
426
+ * // ... provide filter here
427
+ * }
428
+ * })
429
+ */
430
+ findFirst<T extends SyncStateFindFirstArgs>(args?: Prisma.SelectSubset<T, SyncStateFindFirstArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
431
+ /**
432
+ * Find the first SyncState that matches the filter or
433
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
434
+ * Note, that providing `undefined` is treated as the value not being there.
435
+ * Read more here: https://pris.ly/d/null-undefined
436
+ * @param {SyncStateFindFirstOrThrowArgs} args - Arguments to find a SyncState
437
+ * @example
438
+ * // Get one SyncState
439
+ * const syncState = await prisma.syncState.findFirstOrThrow({
440
+ * where: {
441
+ * // ... provide filter here
442
+ * }
443
+ * })
444
+ */
445
+ findFirstOrThrow<T extends SyncStateFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, SyncStateFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
446
+ /**
447
+ * Find zero or more SyncStates that matches the filter.
448
+ * Note, that providing `undefined` is treated as the value not being there.
449
+ * Read more here: https://pris.ly/d/null-undefined
450
+ * @param {SyncStateFindManyArgs} args - Arguments to filter and select certain fields only.
451
+ * @example
452
+ * // Get all SyncStates
453
+ * const syncStates = await prisma.syncState.findMany()
454
+ *
455
+ * // Get first 10 SyncStates
456
+ * const syncStates = await prisma.syncState.findMany({ take: 10 })
457
+ *
458
+ * // Only select the `email`
459
+ * const syncStateWithEmailOnly = await prisma.syncState.findMany({ select: { email: true } })
460
+ *
461
+ */
462
+ findMany<T extends SyncStateFindManyArgs>(args?: Prisma.SelectSubset<T, SyncStateFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
463
+ /**
464
+ * Create a SyncState.
465
+ * @param {SyncStateCreateArgs} args - Arguments to create a SyncState.
466
+ * @example
467
+ * // Create one SyncState
468
+ * const SyncState = await prisma.syncState.create({
469
+ * data: {
470
+ * // ... data to create a SyncState
471
+ * }
472
+ * })
473
+ *
474
+ */
475
+ create<T extends SyncStateCreateArgs>(args: Prisma.SelectSubset<T, SyncStateCreateArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
476
+ /**
477
+ * Create many SyncStates.
478
+ * @param {SyncStateCreateManyArgs} args - Arguments to create many SyncStates.
479
+ * @example
480
+ * // Create many SyncStates
481
+ * const syncState = await prisma.syncState.createMany({
482
+ * data: [
483
+ * // ... provide data here
484
+ * ]
485
+ * })
486
+ *
487
+ */
488
+ createMany<T extends SyncStateCreateManyArgs>(args?: Prisma.SelectSubset<T, SyncStateCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
489
+ /**
490
+ * Create many SyncStates and returns the data saved in the database.
491
+ * @param {SyncStateCreateManyAndReturnArgs} args - Arguments to create many SyncStates.
492
+ * @example
493
+ * // Create many SyncStates
494
+ * const syncState = await prisma.syncState.createManyAndReturn({
495
+ * data: [
496
+ * // ... provide data here
497
+ * ]
498
+ * })
499
+ *
500
+ * // Create many SyncStates and only return the `email`
501
+ * const syncStateWithEmailOnly = await prisma.syncState.createManyAndReturn({
502
+ * select: { email: true },
503
+ * data: [
504
+ * // ... provide data here
505
+ * ]
506
+ * })
507
+ * Note, that providing `undefined` is treated as the value not being there.
508
+ * Read more here: https://pris.ly/d/null-undefined
509
+ *
510
+ */
511
+ createManyAndReturn<T extends SyncStateCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, SyncStateCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
512
+ /**
513
+ * Delete a SyncState.
514
+ * @param {SyncStateDeleteArgs} args - Arguments to delete one SyncState.
515
+ * @example
516
+ * // Delete one SyncState
517
+ * const SyncState = await prisma.syncState.delete({
518
+ * where: {
519
+ * // ... filter to delete one SyncState
520
+ * }
521
+ * })
522
+ *
523
+ */
524
+ delete<T extends SyncStateDeleteArgs>(args: Prisma.SelectSubset<T, SyncStateDeleteArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
525
+ /**
526
+ * Update one SyncState.
527
+ * @param {SyncStateUpdateArgs} args - Arguments to update one SyncState.
528
+ * @example
529
+ * // Update one SyncState
530
+ * const syncState = await prisma.syncState.update({
531
+ * where: {
532
+ * // ... provide filter here
533
+ * },
534
+ * data: {
535
+ * // ... provide data here
536
+ * }
537
+ * })
538
+ *
539
+ */
540
+ update<T extends SyncStateUpdateArgs>(args: Prisma.SelectSubset<T, SyncStateUpdateArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
541
+ /**
542
+ * Delete zero or more SyncStates.
543
+ * @param {SyncStateDeleteManyArgs} args - Arguments to filter SyncStates to delete.
544
+ * @example
545
+ * // Delete a few SyncStates
546
+ * const { count } = await prisma.syncState.deleteMany({
547
+ * where: {
548
+ * // ... provide filter here
549
+ * }
550
+ * })
551
+ *
552
+ */
553
+ deleteMany<T extends SyncStateDeleteManyArgs>(args?: Prisma.SelectSubset<T, SyncStateDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
554
+ /**
555
+ * Update zero or more SyncStates.
556
+ * Note, that providing `undefined` is treated as the value not being there.
557
+ * Read more here: https://pris.ly/d/null-undefined
558
+ * @param {SyncStateUpdateManyArgs} args - Arguments to update one or more rows.
559
+ * @example
560
+ * // Update many SyncStates
561
+ * const syncState = await prisma.syncState.updateMany({
562
+ * where: {
563
+ * // ... provide filter here
564
+ * },
565
+ * data: {
566
+ * // ... provide data here
567
+ * }
568
+ * })
569
+ *
570
+ */
571
+ updateMany<T extends SyncStateUpdateManyArgs>(args: Prisma.SelectSubset<T, SyncStateUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
572
+ /**
573
+ * Update zero or more SyncStates and returns the data updated in the database.
574
+ * @param {SyncStateUpdateManyAndReturnArgs} args - Arguments to update many SyncStates.
575
+ * @example
576
+ * // Update many SyncStates
577
+ * const syncState = await prisma.syncState.updateManyAndReturn({
578
+ * where: {
579
+ * // ... provide filter here
580
+ * },
581
+ * data: [
582
+ * // ... provide data here
583
+ * ]
584
+ * })
585
+ *
586
+ * // Update zero or more SyncStates and only return the `email`
587
+ * const syncStateWithEmailOnly = await prisma.syncState.updateManyAndReturn({
588
+ * select: { email: true },
589
+ * where: {
590
+ * // ... provide filter here
591
+ * },
592
+ * data: [
593
+ * // ... provide data here
594
+ * ]
595
+ * })
596
+ * Note, that providing `undefined` is treated as the value not being there.
597
+ * Read more here: https://pris.ly/d/null-undefined
598
+ *
599
+ */
600
+ updateManyAndReturn<T extends SyncStateUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, SyncStateUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
601
+ /**
602
+ * Create or update one SyncState.
603
+ * @param {SyncStateUpsertArgs} args - Arguments to update or create a SyncState.
604
+ * @example
605
+ * // Update or create a SyncState
606
+ * const syncState = await prisma.syncState.upsert({
607
+ * create: {
608
+ * // ... data to create a SyncState
609
+ * },
610
+ * update: {
611
+ * // ... in case it already exists, update
612
+ * },
613
+ * where: {
614
+ * // ... the filter for the SyncState we want to update
615
+ * }
616
+ * })
617
+ */
618
+ upsert<T extends SyncStateUpsertArgs>(args: Prisma.SelectSubset<T, SyncStateUpsertArgs<ExtArgs>>): Prisma.Prisma__SyncStateClient<runtime.Types.Result.GetResult<Prisma.$SyncStatePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
619
+ /**
620
+ * Count the number of SyncStates.
621
+ * Note, that providing `undefined` is treated as the value not being there.
622
+ * Read more here: https://pris.ly/d/null-undefined
623
+ * @param {SyncStateCountArgs} args - Arguments to filter SyncStates to count.
624
+ * @example
625
+ * // Count the number of SyncStates
626
+ * const count = await prisma.syncState.count({
627
+ * where: {
628
+ * // ... the filter for the SyncStates we want to count
629
+ * }
630
+ * })
631
+ **/
632
+ count<T extends SyncStateCountArgs>(args?: Prisma.Subset<T, SyncStateCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], SyncStateCountAggregateOutputType> : number>;
633
+ /**
634
+ * Allows you to perform aggregations operations on a SyncState.
635
+ * Note, that providing `undefined` is treated as the value not being there.
636
+ * Read more here: https://pris.ly/d/null-undefined
637
+ * @param {SyncStateAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
638
+ * @example
639
+ * // Ordered by age ascending
640
+ * // Where email contains prisma.io
641
+ * // Limited to the 10 users
642
+ * const aggregations = await prisma.user.aggregate({
643
+ * _avg: {
644
+ * age: true,
645
+ * },
646
+ * where: {
647
+ * email: {
648
+ * contains: "prisma.io",
649
+ * },
650
+ * },
651
+ * orderBy: {
652
+ * age: "asc",
653
+ * },
654
+ * take: 10,
655
+ * })
656
+ **/
657
+ aggregate<T extends SyncStateAggregateArgs>(args: Prisma.Subset<T, SyncStateAggregateArgs>): Prisma.PrismaPromise<GetSyncStateAggregateType<T>>;
658
+ /**
659
+ * Group by SyncState.
660
+ * Note, that providing `undefined` is treated as the value not being there.
661
+ * Read more here: https://pris.ly/d/null-undefined
662
+ * @param {SyncStateGroupByArgs} args - Group by arguments.
663
+ * @example
664
+ * // Group by city, order by createdAt, get count
665
+ * const result = await prisma.user.groupBy({
666
+ * by: ['city', 'createdAt'],
667
+ * orderBy: {
668
+ * createdAt: true
669
+ * },
670
+ * _count: {
671
+ * _all: true
672
+ * },
673
+ * })
674
+ *
675
+ **/
676
+ groupBy<T extends SyncStateGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
677
+ orderBy: SyncStateGroupByArgs['orderBy'];
678
+ } : {
679
+ orderBy?: SyncStateGroupByArgs['orderBy'];
680
+ }, OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>, ByFields extends Prisma.MaybeTupleToUnion<T['by']>, ByValid extends Prisma.Has<ByFields, OrderFields>, HavingFields extends Prisma.GetHavingFields<T['having']>, HavingValid extends Prisma.Has<ByFields, HavingFields>, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? {
681
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
682
+ Error,
683
+ 'Field ',
684
+ P,
685
+ ` in "having" needs to be provided in "by"`
686
+ ];
687
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
688
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
689
+ }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
690
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
691
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
692
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
693
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, SyncStateGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSyncStateGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
694
+ /**
695
+ * Fields of the SyncState model
696
+ */
697
+ readonly fields: SyncStateFieldRefs;
698
+ }
699
+ /**
700
+ * The delegate class that acts as a "Promise-like" for SyncState.
701
+ * Why is this prefixed with `Prisma__`?
702
+ * Because we want to prevent naming conflicts as mentioned in
703
+ * https://github.com/prisma/prisma-client-js/issues/707
704
+ */
705
+ export interface Prisma__SyncStateClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
706
+ readonly [Symbol.toStringTag]: "PrismaPromise";
707
+ 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>;
708
+ /**
709
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
710
+ * @param onfulfilled The callback to execute when the Promise is resolved.
711
+ * @param onrejected The callback to execute when the Promise is rejected.
712
+ * @returns A Promise for the completion of which ever callback is executed.
713
+ */
714
+ 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>;
715
+ /**
716
+ * Attaches a callback for only the rejection of the Promise.
717
+ * @param onrejected The callback to execute when the Promise is rejected.
718
+ * @returns A Promise for the completion of the callback.
719
+ */
720
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
721
+ /**
722
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
723
+ * resolved value cannot be modified from the callback.
724
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
725
+ * @returns A Promise for the completion of the callback.
726
+ */
727
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
728
+ }
729
+ /**
730
+ * Fields of the SyncState model
731
+ */
732
+ export interface SyncStateFieldRefs {
733
+ readonly email: Prisma.FieldRef<"SyncState", 'String'>;
734
+ readonly appId: Prisma.FieldRef<"SyncState", 'String'>;
735
+ readonly key: Prisma.FieldRef<"SyncState", 'String'>;
736
+ readonly value: Prisma.FieldRef<"SyncState", 'String'>;
737
+ }
738
+ /**
739
+ * SyncState findUnique
740
+ */
741
+ export type SyncStateFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
742
+ /**
743
+ * Select specific fields to fetch from the SyncState
744
+ */
745
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
746
+ /**
747
+ * Omit specific fields from the SyncState
748
+ */
749
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
750
+ /**
751
+ * Choose, which related nodes to fetch as well
752
+ */
753
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
754
+ /**
755
+ * Filter, which SyncState to fetch.
756
+ */
757
+ where: Prisma.SyncStateWhereUniqueInput;
758
+ };
759
+ /**
760
+ * SyncState findUniqueOrThrow
761
+ */
762
+ export type SyncStateFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
763
+ /**
764
+ * Select specific fields to fetch from the SyncState
765
+ */
766
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
767
+ /**
768
+ * Omit specific fields from the SyncState
769
+ */
770
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
771
+ /**
772
+ * Choose, which related nodes to fetch as well
773
+ */
774
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
775
+ /**
776
+ * Filter, which SyncState to fetch.
777
+ */
778
+ where: Prisma.SyncStateWhereUniqueInput;
779
+ };
780
+ /**
781
+ * SyncState findFirst
782
+ */
783
+ export type SyncStateFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
784
+ /**
785
+ * Select specific fields to fetch from the SyncState
786
+ */
787
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
788
+ /**
789
+ * Omit specific fields from the SyncState
790
+ */
791
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
792
+ /**
793
+ * Choose, which related nodes to fetch as well
794
+ */
795
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
796
+ /**
797
+ * Filter, which SyncState to fetch.
798
+ */
799
+ where?: Prisma.SyncStateWhereInput;
800
+ /**
801
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
802
+ *
803
+ * Determine the order of SyncStates to fetch.
804
+ */
805
+ orderBy?: Prisma.SyncStateOrderByWithRelationInput | Prisma.SyncStateOrderByWithRelationInput[];
806
+ /**
807
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
808
+ *
809
+ * Sets the position for searching for SyncStates.
810
+ */
811
+ cursor?: Prisma.SyncStateWhereUniqueInput;
812
+ /**
813
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
814
+ *
815
+ * Take `±n` SyncStates from the position of the cursor.
816
+ */
817
+ take?: number;
818
+ /**
819
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
820
+ *
821
+ * Skip the first `n` SyncStates.
822
+ */
823
+ skip?: number;
824
+ /**
825
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
826
+ *
827
+ * Filter by unique combinations of SyncStates.
828
+ */
829
+ distinct?: Prisma.SyncStateScalarFieldEnum | Prisma.SyncStateScalarFieldEnum[];
830
+ };
831
+ /**
832
+ * SyncState findFirstOrThrow
833
+ */
834
+ export type SyncStateFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
835
+ /**
836
+ * Select specific fields to fetch from the SyncState
837
+ */
838
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
839
+ /**
840
+ * Omit specific fields from the SyncState
841
+ */
842
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
843
+ /**
844
+ * Choose, which related nodes to fetch as well
845
+ */
846
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
847
+ /**
848
+ * Filter, which SyncState to fetch.
849
+ */
850
+ where?: Prisma.SyncStateWhereInput;
851
+ /**
852
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
853
+ *
854
+ * Determine the order of SyncStates to fetch.
855
+ */
856
+ orderBy?: Prisma.SyncStateOrderByWithRelationInput | Prisma.SyncStateOrderByWithRelationInput[];
857
+ /**
858
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
859
+ *
860
+ * Sets the position for searching for SyncStates.
861
+ */
862
+ cursor?: Prisma.SyncStateWhereUniqueInput;
863
+ /**
864
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
865
+ *
866
+ * Take `±n` SyncStates from the position of the cursor.
867
+ */
868
+ take?: number;
869
+ /**
870
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
871
+ *
872
+ * Skip the first `n` SyncStates.
873
+ */
874
+ skip?: number;
875
+ /**
876
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
877
+ *
878
+ * Filter by unique combinations of SyncStates.
879
+ */
880
+ distinct?: Prisma.SyncStateScalarFieldEnum | Prisma.SyncStateScalarFieldEnum[];
881
+ };
882
+ /**
883
+ * SyncState findMany
884
+ */
885
+ export type SyncStateFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
886
+ /**
887
+ * Select specific fields to fetch from the SyncState
888
+ */
889
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
890
+ /**
891
+ * Omit specific fields from the SyncState
892
+ */
893
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
894
+ /**
895
+ * Choose, which related nodes to fetch as well
896
+ */
897
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
898
+ /**
899
+ * Filter, which SyncStates to fetch.
900
+ */
901
+ where?: Prisma.SyncStateWhereInput;
902
+ /**
903
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
904
+ *
905
+ * Determine the order of SyncStates to fetch.
906
+ */
907
+ orderBy?: Prisma.SyncStateOrderByWithRelationInput | Prisma.SyncStateOrderByWithRelationInput[];
908
+ /**
909
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
910
+ *
911
+ * Sets the position for listing SyncStates.
912
+ */
913
+ cursor?: Prisma.SyncStateWhereUniqueInput;
914
+ /**
915
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
916
+ *
917
+ * Take `±n` SyncStates from the position of the cursor.
918
+ */
919
+ take?: number;
920
+ /**
921
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
922
+ *
923
+ * Skip the first `n` SyncStates.
924
+ */
925
+ skip?: number;
926
+ distinct?: Prisma.SyncStateScalarFieldEnum | Prisma.SyncStateScalarFieldEnum[];
927
+ };
928
+ /**
929
+ * SyncState create
930
+ */
931
+ export type SyncStateCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
932
+ /**
933
+ * Select specific fields to fetch from the SyncState
934
+ */
935
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
936
+ /**
937
+ * Omit specific fields from the SyncState
938
+ */
939
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
940
+ /**
941
+ * Choose, which related nodes to fetch as well
942
+ */
943
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
944
+ /**
945
+ * The data needed to create a SyncState.
946
+ */
947
+ data: Prisma.XOR<Prisma.SyncStateCreateInput, Prisma.SyncStateUncheckedCreateInput>;
948
+ };
949
+ /**
950
+ * SyncState createMany
951
+ */
952
+ export type SyncStateCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
953
+ /**
954
+ * The data used to create many SyncStates.
955
+ */
956
+ data: Prisma.SyncStateCreateManyInput | Prisma.SyncStateCreateManyInput[];
957
+ };
958
+ /**
959
+ * SyncState createManyAndReturn
960
+ */
961
+ export type SyncStateCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
962
+ /**
963
+ * Select specific fields to fetch from the SyncState
964
+ */
965
+ select?: Prisma.SyncStateSelectCreateManyAndReturn<ExtArgs> | null;
966
+ /**
967
+ * Omit specific fields from the SyncState
968
+ */
969
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
970
+ /**
971
+ * The data used to create many SyncStates.
972
+ */
973
+ data: Prisma.SyncStateCreateManyInput | Prisma.SyncStateCreateManyInput[];
974
+ /**
975
+ * Choose, which related nodes to fetch as well
976
+ */
977
+ include?: Prisma.SyncStateIncludeCreateManyAndReturn<ExtArgs> | null;
978
+ };
979
+ /**
980
+ * SyncState update
981
+ */
982
+ export type SyncStateUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
983
+ /**
984
+ * Select specific fields to fetch from the SyncState
985
+ */
986
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
987
+ /**
988
+ * Omit specific fields from the SyncState
989
+ */
990
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
991
+ /**
992
+ * Choose, which related nodes to fetch as well
993
+ */
994
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
995
+ /**
996
+ * The data needed to update a SyncState.
997
+ */
998
+ data: Prisma.XOR<Prisma.SyncStateUpdateInput, Prisma.SyncStateUncheckedUpdateInput>;
999
+ /**
1000
+ * Choose, which SyncState to update.
1001
+ */
1002
+ where: Prisma.SyncStateWhereUniqueInput;
1003
+ };
1004
+ /**
1005
+ * SyncState updateMany
1006
+ */
1007
+ export type SyncStateUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1008
+ /**
1009
+ * The data used to update SyncStates.
1010
+ */
1011
+ data: Prisma.XOR<Prisma.SyncStateUpdateManyMutationInput, Prisma.SyncStateUncheckedUpdateManyInput>;
1012
+ /**
1013
+ * Filter which SyncStates to update
1014
+ */
1015
+ where?: Prisma.SyncStateWhereInput;
1016
+ /**
1017
+ * Limit how many SyncStates to update.
1018
+ */
1019
+ limit?: number;
1020
+ };
1021
+ /**
1022
+ * SyncState updateManyAndReturn
1023
+ */
1024
+ export type SyncStateUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1025
+ /**
1026
+ * Select specific fields to fetch from the SyncState
1027
+ */
1028
+ select?: Prisma.SyncStateSelectUpdateManyAndReturn<ExtArgs> | null;
1029
+ /**
1030
+ * Omit specific fields from the SyncState
1031
+ */
1032
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
1033
+ /**
1034
+ * The data used to update SyncStates.
1035
+ */
1036
+ data: Prisma.XOR<Prisma.SyncStateUpdateManyMutationInput, Prisma.SyncStateUncheckedUpdateManyInput>;
1037
+ /**
1038
+ * Filter which SyncStates to update
1039
+ */
1040
+ where?: Prisma.SyncStateWhereInput;
1041
+ /**
1042
+ * Limit how many SyncStates to update.
1043
+ */
1044
+ limit?: number;
1045
+ /**
1046
+ * Choose, which related nodes to fetch as well
1047
+ */
1048
+ include?: Prisma.SyncStateIncludeUpdateManyAndReturn<ExtArgs> | null;
1049
+ };
1050
+ /**
1051
+ * SyncState upsert
1052
+ */
1053
+ export type SyncStateUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1054
+ /**
1055
+ * Select specific fields to fetch from the SyncState
1056
+ */
1057
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
1058
+ /**
1059
+ * Omit specific fields from the SyncState
1060
+ */
1061
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
1062
+ /**
1063
+ * Choose, which related nodes to fetch as well
1064
+ */
1065
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
1066
+ /**
1067
+ * The filter to search for the SyncState to update in case it exists.
1068
+ */
1069
+ where: Prisma.SyncStateWhereUniqueInput;
1070
+ /**
1071
+ * In case the SyncState found by the `where` argument doesn't exist, create a new SyncState with this data.
1072
+ */
1073
+ create: Prisma.XOR<Prisma.SyncStateCreateInput, Prisma.SyncStateUncheckedCreateInput>;
1074
+ /**
1075
+ * In case the SyncState was found with the provided `where` argument, update it with this data.
1076
+ */
1077
+ update: Prisma.XOR<Prisma.SyncStateUpdateInput, Prisma.SyncStateUncheckedUpdateInput>;
1078
+ };
1079
+ /**
1080
+ * SyncState delete
1081
+ */
1082
+ export type SyncStateDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1083
+ /**
1084
+ * Select specific fields to fetch from the SyncState
1085
+ */
1086
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
1087
+ /**
1088
+ * Omit specific fields from the SyncState
1089
+ */
1090
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
1091
+ /**
1092
+ * Choose, which related nodes to fetch as well
1093
+ */
1094
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
1095
+ /**
1096
+ * Filter which SyncState to delete.
1097
+ */
1098
+ where: Prisma.SyncStateWhereUniqueInput;
1099
+ };
1100
+ /**
1101
+ * SyncState deleteMany
1102
+ */
1103
+ export type SyncStateDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1104
+ /**
1105
+ * Filter which SyncStates to delete
1106
+ */
1107
+ where?: Prisma.SyncStateWhereInput;
1108
+ /**
1109
+ * Limit how many SyncStates to delete.
1110
+ */
1111
+ limit?: number;
1112
+ };
1113
+ /**
1114
+ * SyncState without action
1115
+ */
1116
+ export type SyncStateDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1117
+ /**
1118
+ * Select specific fields to fetch from the SyncState
1119
+ */
1120
+ select?: Prisma.SyncStateSelect<ExtArgs> | null;
1121
+ /**
1122
+ * Omit specific fields from the SyncState
1123
+ */
1124
+ omit?: Prisma.SyncStateOmit<ExtArgs> | null;
1125
+ /**
1126
+ * Choose, which related nodes to fetch as well
1127
+ */
1128
+ include?: Prisma.SyncStateInclude<ExtArgs> | null;
1129
+ };
1130
+ export {};