suparisma 1.2.2 → 1.2.6

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 (131) hide show
  1. package/README.md +51 -2
  2. package/dist/generators/coreGenerator.js +200 -15
  3. package/dist/generators/hookGenerator.js +20 -2
  4. package/dist/generators/typeGenerator.js +55 -5
  5. package/dist/index.js +6 -1
  6. package/package.json +1 -1
  7. package/tmp/generated-test/hooks/useSuparismaAsset.ts +94 -0
  8. package/tmp/generated-test/hooks/useSuparismaChapter.ts +96 -0
  9. package/tmp/generated-test/hooks/useSuparismaCourse.ts +96 -0
  10. package/tmp/generated-test/hooks/useSuparismaDeviceSession.ts +94 -0
  11. package/tmp/generated-test/hooks/useSuparismaEnrollment.ts +92 -0
  12. package/tmp/generated-test/hooks/useSuparismaLesson.ts +96 -0
  13. package/tmp/generated-test/hooks/useSuparismaLessonPurchase.ts +92 -0
  14. package/tmp/generated-test/hooks/useSuparismaLessonQuestion.ts +96 -0
  15. package/tmp/generated-test/hooks/useSuparismaPayoutMethod.ts +96 -0
  16. package/tmp/generated-test/hooks/useSuparismaPayoutRequest.ts +96 -0
  17. package/tmp/generated-test/hooks/useSuparismaQuestionOption.ts +92 -0
  18. package/tmp/generated-test/hooks/useSuparismaSavedPaymentMethod.ts +96 -0
  19. package/tmp/generated-test/hooks/useSuparismaTeacherPayoutInfo.ts +96 -0
  20. package/tmp/generated-test/hooks/useSuparismaThing.ts +96 -0
  21. package/tmp/generated-test/hooks/useSuparismaUser.ts +96 -0
  22. package/tmp/generated-test/hooks/useSuparismaVideoNote.ts +96 -0
  23. package/tmp/generated-test/hooks/useSuparismaWallet.ts +96 -0
  24. package/tmp/generated-test/hooks/useSuparismaWalletTransaction.ts +96 -0
  25. package/tmp/generated-test/hooks/useSuparismaWatchProgress.ts +96 -0
  26. package/tmp/generated-test/index.ts +140 -0
  27. package/tmp/generated-test/types/AssetTypes.ts +485 -0
  28. package/tmp/generated-test/types/ChapterTypes.ts +488 -0
  29. package/tmp/generated-test/types/CourseTypes.ts +519 -0
  30. package/tmp/generated-test/types/DeviceSessionTypes.ts +489 -0
  31. package/tmp/generated-test/types/EnrollmentTypes.ts +495 -0
  32. package/tmp/generated-test/types/LessonPurchaseTypes.ts +490 -0
  33. package/tmp/generated-test/types/LessonQuestionTypes.ts +496 -0
  34. package/tmp/generated-test/types/LessonTypes.ts +517 -0
  35. package/tmp/generated-test/types/PayoutMethodTypes.ts +517 -0
  36. package/tmp/generated-test/types/PayoutRequestTypes.ts +528 -0
  37. package/tmp/generated-test/types/QuestionOptionTypes.ts +479 -0
  38. package/tmp/generated-test/types/SavedPaymentMethodTypes.ts +497 -0
  39. package/tmp/generated-test/types/TeacherPayoutInfoTypes.ts +480 -0
  40. package/tmp/generated-test/types/ThingTypes.ts +482 -0
  41. package/tmp/generated-test/types/UserTypes.ts +487 -0
  42. package/tmp/generated-test/types/VideoNoteTypes.ts +489 -0
  43. package/tmp/generated-test/types/WalletTransactionTypes.ts +505 -0
  44. package/tmp/generated-test/types/WalletTypes.ts +480 -0
  45. package/tmp/generated-test/types/WatchProgressTypes.ts +493 -0
  46. package/tmp/generated-test/utils/core.ts +2306 -0
  47. package/tmp/generated-test/utils/supabase-client.ts +17 -0
  48. package/tmp/generated-test2/hooks/useSuparismaAsset.ts +94 -0
  49. package/tmp/generated-test2/hooks/useSuparismaChapter.ts +96 -0
  50. package/tmp/generated-test2/hooks/useSuparismaCourse.ts +96 -0
  51. package/tmp/generated-test2/hooks/useSuparismaDeviceSession.ts +94 -0
  52. package/tmp/generated-test2/hooks/useSuparismaEnrollment.ts +92 -0
  53. package/tmp/generated-test2/hooks/useSuparismaLesson.ts +96 -0
  54. package/tmp/generated-test2/hooks/useSuparismaLessonPurchase.ts +92 -0
  55. package/tmp/generated-test2/hooks/useSuparismaLessonQuestion.ts +96 -0
  56. package/tmp/generated-test2/hooks/useSuparismaPayoutMethod.ts +96 -0
  57. package/tmp/generated-test2/hooks/useSuparismaPayoutRequest.ts +96 -0
  58. package/tmp/generated-test2/hooks/useSuparismaQuestionOption.ts +92 -0
  59. package/tmp/generated-test2/hooks/useSuparismaSavedPaymentMethod.ts +96 -0
  60. package/tmp/generated-test2/hooks/useSuparismaTeacherPayoutInfo.ts +96 -0
  61. package/tmp/generated-test2/hooks/useSuparismaThing.ts +96 -0
  62. package/tmp/generated-test2/hooks/useSuparismaUser.ts +96 -0
  63. package/tmp/generated-test2/hooks/useSuparismaVideoNote.ts +96 -0
  64. package/tmp/generated-test2/hooks/useSuparismaWallet.ts +96 -0
  65. package/tmp/generated-test2/hooks/useSuparismaWalletTransaction.ts +96 -0
  66. package/tmp/generated-test2/hooks/useSuparismaWatchProgress.ts +96 -0
  67. package/tmp/generated-test2/index.ts +140 -0
  68. package/tmp/generated-test2/types/AssetTypes.ts +485 -0
  69. package/tmp/generated-test2/types/ChapterTypes.ts +488 -0
  70. package/tmp/generated-test2/types/CourseTypes.ts +522 -0
  71. package/tmp/generated-test2/types/DeviceSessionTypes.ts +489 -0
  72. package/tmp/generated-test2/types/EnrollmentTypes.ts +495 -0
  73. package/tmp/generated-test2/types/LessonPurchaseTypes.ts +490 -0
  74. package/tmp/generated-test2/types/LessonQuestionTypes.ts +496 -0
  75. package/tmp/generated-test2/types/LessonTypes.ts +517 -0
  76. package/tmp/generated-test2/types/PayoutMethodTypes.ts +517 -0
  77. package/tmp/generated-test2/types/PayoutRequestTypes.ts +528 -0
  78. package/tmp/generated-test2/types/QuestionOptionTypes.ts +479 -0
  79. package/tmp/generated-test2/types/SavedPaymentMethodTypes.ts +497 -0
  80. package/tmp/generated-test2/types/TeacherPayoutInfoTypes.ts +480 -0
  81. package/tmp/generated-test2/types/ThingTypes.ts +482 -0
  82. package/tmp/generated-test2/types/UserTypes.ts +490 -0
  83. package/tmp/generated-test2/types/VideoNoteTypes.ts +489 -0
  84. package/tmp/generated-test2/types/WalletTransactionTypes.ts +505 -0
  85. package/tmp/generated-test2/types/WalletTypes.ts +480 -0
  86. package/tmp/generated-test2/types/WatchProgressTypes.ts +493 -0
  87. package/tmp/generated-test2/utils/core.ts +2306 -0
  88. package/tmp/generated-test2/utils/supabase-client.ts +17 -0
  89. package/tmp/generated-test3/hooks/useSuparismaAsset.ts +94 -0
  90. package/tmp/generated-test3/hooks/useSuparismaChapter.ts +98 -0
  91. package/tmp/generated-test3/hooks/useSuparismaCourse.ts +98 -0
  92. package/tmp/generated-test3/hooks/useSuparismaDeviceSession.ts +94 -0
  93. package/tmp/generated-test3/hooks/useSuparismaEnrollment.ts +94 -0
  94. package/tmp/generated-test3/hooks/useSuparismaLesson.ts +98 -0
  95. package/tmp/generated-test3/hooks/useSuparismaLessonPurchase.ts +94 -0
  96. package/tmp/generated-test3/hooks/useSuparismaLessonQuestion.ts +98 -0
  97. package/tmp/generated-test3/hooks/useSuparismaPayoutMethod.ts +96 -0
  98. package/tmp/generated-test3/hooks/useSuparismaPayoutRequest.ts +96 -0
  99. package/tmp/generated-test3/hooks/useSuparismaQuestionOption.ts +94 -0
  100. package/tmp/generated-test3/hooks/useSuparismaSavedPaymentMethod.ts +96 -0
  101. package/tmp/generated-test3/hooks/useSuparismaTeacherPayoutInfo.ts +98 -0
  102. package/tmp/generated-test3/hooks/useSuparismaThing.ts +96 -0
  103. package/tmp/generated-test3/hooks/useSuparismaUser.ts +98 -0
  104. package/tmp/generated-test3/hooks/useSuparismaVideoNote.ts +98 -0
  105. package/tmp/generated-test3/hooks/useSuparismaWallet.ts +98 -0
  106. package/tmp/generated-test3/hooks/useSuparismaWalletTransaction.ts +98 -0
  107. package/tmp/generated-test3/hooks/useSuparismaWatchProgress.ts +98 -0
  108. package/tmp/generated-test3/index.ts +140 -0
  109. package/tmp/generated-test3/types/AssetTypes.ts +485 -0
  110. package/tmp/generated-test3/types/ChapterTypes.ts +488 -0
  111. package/tmp/generated-test3/types/CourseTypes.ts +522 -0
  112. package/tmp/generated-test3/types/DeviceSessionTypes.ts +489 -0
  113. package/tmp/generated-test3/types/EnrollmentTypes.ts +495 -0
  114. package/tmp/generated-test3/types/LessonPurchaseTypes.ts +490 -0
  115. package/tmp/generated-test3/types/LessonQuestionTypes.ts +496 -0
  116. package/tmp/generated-test3/types/LessonTypes.ts +517 -0
  117. package/tmp/generated-test3/types/PayoutMethodTypes.ts +517 -0
  118. package/tmp/generated-test3/types/PayoutRequestTypes.ts +528 -0
  119. package/tmp/generated-test3/types/QuestionOptionTypes.ts +479 -0
  120. package/tmp/generated-test3/types/SavedPaymentMethodTypes.ts +497 -0
  121. package/tmp/generated-test3/types/TeacherPayoutInfoTypes.ts +480 -0
  122. package/tmp/generated-test3/types/ThingTypes.ts +482 -0
  123. package/tmp/generated-test3/types/UserTypes.ts +490 -0
  124. package/tmp/generated-test3/types/VideoNoteTypes.ts +489 -0
  125. package/tmp/generated-test3/types/WalletTransactionTypes.ts +505 -0
  126. package/tmp/generated-test3/types/WalletTypes.ts +480 -0
  127. package/tmp/generated-test3/types/WatchProgressTypes.ts +493 -0
  128. package/tmp/generated-test3/utils/core.ts +2316 -0
  129. package/tmp/generated-test3/utils/supabase-client.ts +17 -0
  130. package/tmp/prisma-test-schema-2.prisma +339 -0
  131. package/tmp/prisma-test-schema.prisma +317 -0
@@ -0,0 +1,489 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead
3
+
4
+ import type { DeviceSession } from '@prisma/client';
5
+ import type { ModelResult, SuparismaOptions, SearchQuery, SearchState, FilterOperators, IncludeValue } from '../utils/core';
6
+
7
+
8
+ /**
9
+ * Extended DeviceSession type that includes relation fields.
10
+ * This represents the complete shape of DeviceSession records returned from the database.
11
+ */
12
+ export interface DeviceSessionWithRelations {
13
+ id: string;
14
+ studentId: string;
15
+ courseId: string;
16
+ deviceId: string;
17
+ deviceName?: string;
18
+ deviceType?: string;
19
+ lastActiveAt: Date;
20
+ createdAt: Date;
21
+ }
22
+
23
+ /**
24
+ * Input type for creating a new DeviceSession record.
25
+ * Fields with default values are optional and will be filled automatically if not provided.
26
+ *
27
+ * @example
28
+ * // Create a minimal devicesession
29
+ * devicesession.create({
30
+ * // Required fields only
31
+ * studentId: string,
32
+ * courseId: string,
33
+ * });
34
+ *
35
+ * @example
36
+ * // Create with optional fields
37
+ * devicesession.create({
38
+ * // All fields including optional ones
39
+ * id?: string,
40
+ * studentId: string,
41
+ * courseId: string,
42
+ * });
43
+ */
44
+ export interface DeviceSessionCreateInput {
45
+ id?: string;
46
+ studentId: string;
47
+ courseId: string;
48
+ deviceId: string;
49
+ deviceName?: string;
50
+ deviceType?: string;
51
+ lastActiveAt?: Date;
52
+ }
53
+
54
+ /**
55
+ * Input type for updating an existing DeviceSession record.
56
+ * All fields are optional since you only need to specify the fields you want to change.
57
+ *
58
+ * @example
59
+ * // Update a devicesession's fields
60
+ * devicesession.update({
61
+ * where: { id: "123" },
62
+ * data: {
63
+ * id?: string,
64
+ * studentId: string,
65
+ * }
66
+ * });
67
+ */
68
+ export type DeviceSessionUpdateInput = Partial<DeviceSessionCreateInput>;
69
+
70
+ /**
71
+ * Filter type for querying DeviceSession records.
72
+ * You can filter by any field in the model using equality or advanced filter operators.
73
+ * Supports OR and AND logical operations for complex queries.
74
+ *
75
+ * @example
76
+ * // Basic filtering
77
+ * devicesession.findMany({
78
+ * where: {
79
+ * id: "value",
80
+ * studentId: "value"
81
+ * }
82
+ * });
83
+ *
84
+ * @example
85
+ * // Advanced filtering
86
+ * devicesession.findMany({
87
+ * where: {
88
+ * // Use advanced operators
89
+ * id: { contains: "partial" }
90
+ * }
91
+ * });
92
+ *
93
+ * @example
94
+ * // OR conditions - match ANY condition
95
+ * devicesession.findMany({
96
+ * where: {
97
+ * OR: [
98
+ * { id: "value1" },
99
+ * { studentId: { contains: "value2" } }
100
+ * ]
101
+ * }
102
+ * });
103
+ *
104
+ * @example
105
+ * // AND conditions - match ALL conditions
106
+ * devicesession.findMany({
107
+ * where: {
108
+ * AND: [
109
+ * { id: "value1" },
110
+ * { studentId: { gt: 100 } }
111
+ * ]
112
+ * }
113
+ * });
114
+ *
115
+ * @example
116
+ * // Complex nested logic
117
+ * devicesession.findMany({
118
+ * where: {
119
+ * active: true, // Regular condition (implicit AND)
120
+ * OR: [
121
+ * { role: "admin" },
122
+ * { role: "moderator" }
123
+ * ]
124
+ * }
125
+ * });
126
+ *
127
+ * @example
128
+ * // Array filtering (for array fields)
129
+ * devicesession.findMany({
130
+ * where: {
131
+ * // Array contains specific items
132
+
133
+ * }
134
+ * });
135
+ */
136
+ export type DeviceSessionWhereInput = {
137
+ id?: string | FilterOperators<string>;
138
+ studentId?: string | FilterOperators<string>;
139
+ courseId?: string | FilterOperators<string>;
140
+ deviceId?: string | FilterOperators<string>;
141
+ deviceName?: string | FilterOperators<string>;
142
+ deviceType?: string | FilterOperators<string>;
143
+ lastActiveAt?: Date | FilterOperators<Date>;
144
+ createdAt?: Date | FilterOperators<Date>;
145
+ } & {
146
+ /** Match ANY of the provided conditions */
147
+ OR?: DeviceSessionWhereInput[];
148
+ /** Match ALL of the provided conditions */
149
+ AND?: DeviceSessionWhereInput[];
150
+ };
151
+
152
+ /**
153
+ * Unique identifier for finding a specific DeviceSession record.
154
+ * Usually uses the ID field but can be any field marked as @unique in the schema.
155
+ *
156
+ * @example
157
+ * // Find by ID
158
+ * devicesession.findUnique({ id: "123" });
159
+ *
160
+ * @example
161
+ * // Delete by ID
162
+ * devicesession.delete({ id: "123" });
163
+ */
164
+ export type DeviceSessionWhereUniqueInput = {
165
+ id: string;
166
+ };
167
+
168
+ /**
169
+ * Sort options for DeviceSession queries.
170
+ * Specify the field to sort by and the direction ('asc' or 'desc').
171
+ *
172
+ * @example
173
+ * // Sort by creation date, newest first
174
+ * devicesession.findMany({
175
+ * orderBy: { created_at: 'desc' }
176
+ * });
177
+ *
178
+ * @example
179
+ * // Sort alphabetically
180
+ * devicesession.findMany({
181
+ * orderBy: { name: 'asc' }
182
+ * });
183
+ */
184
+ export type DeviceSessionOrderByInput = {
185
+ [key in keyof DeviceSessionSelectInput]?: 'asc' | 'desc';
186
+ };
187
+
188
+ /**
189
+ * Select specific scalar fields to return from DeviceSession queries.
190
+ * Relation fields are intentionally excluded; use `include` for relations.
191
+ */
192
+ export type DeviceSessionSelectInput = {
193
+ id?: boolean;
194
+ studentId?: boolean;
195
+ courseId?: boolean;
196
+ deviceId?: boolean;
197
+ deviceName?: boolean;
198
+ deviceType?: boolean;
199
+ lastActiveAt?: boolean;
200
+ createdAt?: boolean;
201
+ };
202
+
203
+ /**
204
+ * Include related records when querying DeviceSession.
205
+ * Only real Prisma relation fields are allowed here.
206
+ */
207
+ export type DeviceSessionIncludeInput = {
208
+
209
+ };
210
+
211
+ /**
212
+ * Result type for operations that return a single DeviceSession record.
213
+ */
214
+ export type DeviceSessionSingleResult = ModelResult<DeviceSessionWithRelations>;
215
+
216
+ /**
217
+ * Result type for operations that return multiple DeviceSession records.
218
+ */
219
+ export type DeviceSessionManyResult = ModelResult<DeviceSessionWithRelations[]>;
220
+
221
+ /**
222
+ * Configuration options for the DeviceSession hook.
223
+ * Includes where filters, ordering, pagination, and field selection.
224
+ */
225
+ export type UseDeviceSessionOptions = SuparismaOptions<
226
+ DeviceSessionWhereInput,
227
+ DeviceSessionOrderByInput,
228
+ DeviceSessionSelectInput,
229
+ DeviceSessionIncludeInput
230
+ >;
231
+
232
+ /**
233
+ * The complete API for interacting with DeviceSession records.
234
+ * This interface defines all available operations and state properties.
235
+ */
236
+ export interface DeviceSessionHookApi {
237
+ /**
238
+ * Current array of DeviceSession records.
239
+ * This is automatically updated when:
240
+ * - The initial data is loaded
241
+ * - Mutations are performed (create, update, delete)
242
+ * - Real-time updates are received from other clients
243
+ * - The refresh method is called
244
+ *
245
+ * @example
246
+ * // Render a list of devicesession records
247
+ * const { data } = devicesession;
248
+ * return (
249
+ * <ul>
250
+ * {data.map(item => (
251
+ * <li key={item.id}>{item.name}</li>
252
+ * ))}
253
+ * </ul>
254
+ * );
255
+ */
256
+ data: DeviceSessionWithRelations[];
257
+
258
+ /**
259
+ * Error object if the last operation failed, null otherwise.
260
+ *
261
+ * @example
262
+ * // Handle potential errors
263
+ * const { error } = devicesession;
264
+ * if (error) {
265
+ * return <div>Error: {error.message}</div>;
266
+ * }
267
+ */
268
+ error: Error | null;
269
+
270
+ /**
271
+ * Boolean indicating if an operation is in progress.
272
+ *
273
+ * @example
274
+ * // Show loading state
275
+ * const { loading } = devicesession;
276
+ * if (loading) {
277
+ * return <div>Loading...</div>;
278
+ * }
279
+ */
280
+ loading: boolean;
281
+
282
+ /**
283
+ * The current count of records matching the filter criteria.
284
+ * This automatically updates with the data, including realtime updates.
285
+ * It always reflects the current length of the data array, respecting any filters.
286
+ *
287
+ * @example
288
+ * // Display the count in the UI
289
+ * const { count } = devicesession;
290
+ * return <div>Total records: {count}</div>;
291
+ */
292
+ count: number;
293
+
294
+
295
+
296
+ /**
297
+ * Find a single DeviceSession record by its unique identifier.
298
+ *
299
+ * @param where - The unique identifier to find the record by
300
+ * @returns A promise with the found record or error
301
+ *
302
+ * @example
303
+ * // Find devicesession by ID
304
+ * const result = await devicesession.findUnique({ id: "123" });
305
+ * if (result.data) {
306
+ * console.log("Found devicesession:", result.data);
307
+ * }
308
+ */
309
+ findUnique: (where: DeviceSessionWhereUniqueInput) => DeviceSessionSingleResult;
310
+
311
+ /**
312
+ * Find multiple DeviceSession records matching the filter criteria.
313
+ * Supports filtering, sorting, and pagination.
314
+ *
315
+ * @param params - Optional query parameters
316
+ * @returns A promise with the matching records or error
317
+ *
318
+ * @example
319
+ * // Get all devicesession records
320
+ * const result = await devicesession.findMany();
321
+ *
322
+ * @example
323
+ * // Filter and sort records
324
+ * const result = await devicesession.findMany({
325
+ * where: { active: true },
326
+ * orderBy: { created_at: 'desc' },
327
+ * take: 10,
328
+ * skip: 0
329
+ * });
330
+ */
331
+ findMany: (params?: {
332
+ where?: DeviceSessionWhereInput;
333
+ orderBy?: DeviceSessionOrderByInput;
334
+ take?: number;
335
+ skip?: number;
336
+ }) => DeviceSessionManyResult;
337
+
338
+ /**
339
+ * Find the first DeviceSession record matching the filter criteria.
340
+ *
341
+ * @param params - Optional query parameters
342
+ * @returns A promise with the first matching record or error
343
+ *
344
+ * @example
345
+ * // Find the first active devicesession
346
+ * const result = await devicesession.findFirst({
347
+ * where: { active: true }
348
+ * });
349
+ *
350
+ * @example
351
+ * // Find the oldest devicesession
352
+ * const result = await devicesession.findFirst({
353
+ * orderBy: { created_at: 'asc' }
354
+ * });
355
+ */
356
+ findFirst: (params?: {
357
+ where?: DeviceSessionWhereInput;
358
+ orderBy?: DeviceSessionOrderByInput;
359
+ }) => DeviceSessionSingleResult;
360
+
361
+ /**
362
+ * Create a new DeviceSession record.
363
+ * Fields with default values are optional and will use their defaults if not provided.
364
+ *
365
+ * @param data - The data for the new record
366
+ * @returns A promise with the created record or error
367
+ *
368
+ * @example
369
+ * // Create a new devicesession
370
+ * const result = await devicesession.create({
371
+ * studentId: "value",
372
+ * courseId: "value"
373
+ * });
374
+ *
375
+ * @example
376
+ * // Create with custom ID (overriding default)
377
+ * const result = await devicesession.create({
378
+ * id: "custom-id",
379
+ * studentId: "value"
380
+ * });
381
+ */
382
+ create: (data: DeviceSessionCreateInput) => DeviceSessionSingleResult;
383
+
384
+ /**
385
+ * Update an existing DeviceSession record.
386
+ *
387
+ * @param params - Object with the record identifier and fields to update
388
+ * @returns A promise with the updated record or error
389
+ *
390
+ * @example
391
+ * // Update a devicesession's fields
392
+ * const result = await devicesession.update({
393
+ * where: { id: "123" },
394
+ * data: {
395
+ * id?: "updated value",
396
+ * studentId: "updated value"
397
+ * }
398
+ * });
399
+ */
400
+ update: (params: {
401
+ where: DeviceSessionWhereUniqueInput;
402
+ data: DeviceSessionUpdateInput;
403
+ }) => DeviceSessionSingleResult;
404
+
405
+ /**
406
+ * Delete a DeviceSession record by its unique identifier.
407
+ *
408
+ * @param where - The unique identifier of the record to delete
409
+ * @returns A promise with the deleted record or error
410
+ *
411
+ * @example
412
+ * // Delete a devicesession by ID
413
+ * const result = await devicesession.delete({ id: "123" });
414
+ * if (result.data) {
415
+ * console.log("Deleted devicesession:", result.data);
416
+ * }
417
+ */
418
+ delete: (where: DeviceSessionWhereUniqueInput) => DeviceSessionSingleResult;
419
+
420
+ /**
421
+ * Delete multiple DeviceSession records matching the filter criteria.
422
+ *
423
+ * @param params - Optional filter parameters
424
+ * @returns A promise with the count of deleted records or error
425
+ *
426
+ * @example
427
+ * // Delete all inactive devicesession records
428
+ * const result = await devicesession.deleteMany({
429
+ * where: { active: false }
430
+ * });
431
+ * console.log(`Deleted ${result.count} records`);
432
+ *
433
+ * @example
434
+ * // Delete all devicesession records (use with caution!)
435
+ * const result = await devicesession.deleteMany();
436
+ */
437
+ deleteMany: (params?: {
438
+ where?: DeviceSessionWhereInput;
439
+ }) => Promise<{ count: number; error: Error | null }>;
440
+
441
+ /**
442
+ * Create a record if it doesn't exist, or update it if it does.
443
+ *
444
+ * @param params - Object with the identifier, update data, and create data
445
+ * @returns A promise with the created or updated record or error
446
+ *
447
+ * @example
448
+ * // Upsert a devicesession by ID
449
+ * const result = await devicesession.upsert({
450
+ * where: { id: "123" },
451
+ * update: { name: "Updated Name" },
452
+ * create: {
453
+ * id: "123",
454
+ * name: "New Name",
455
+ * studentId: "value"
456
+ * }
457
+ * });
458
+ */
459
+ upsert: (params: {
460
+ where: DeviceSessionWhereUniqueInput;
461
+ update: DeviceSessionUpdateInput;
462
+ create: DeviceSessionCreateInput;
463
+ }) => DeviceSessionSingleResult;
464
+
465
+ /**
466
+ * Manually refresh the data with current filter settings.
467
+ * Useful after external operations or when realtime is disabled.
468
+ *
469
+ * @param params - Optional override parameters for this specific refresh
470
+ * @returns A promise with the refreshed data or error
471
+ *
472
+ * @example
473
+ * // Refresh with current filter settings
474
+ * await devicesession.refresh();
475
+ *
476
+ * @example
477
+ * // Refresh with different filters for this call only
478
+ * await devicesession.refresh({
479
+ * where: { active: true },
480
+ * orderBy: { name: 'asc' }
481
+ * });
482
+ */
483
+ refresh: (params?: {
484
+ where?: DeviceSessionWhereInput;
485
+ orderBy?: DeviceSessionOrderByInput;
486
+ take?: number;
487
+ skip?: number;
488
+ }) => DeviceSessionManyResult;
489
+ }