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