@aeolus-fleet/trierarch-plugin 0.33.0 → 0.34.0

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