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