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