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,480 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead
3
+
4
+ import type { Wallet } from '@prisma/client';
5
+ import type { ModelResult, SuparismaOptions, SearchQuery, SearchState, FilterOperators, IncludeValue } from '../utils/core';
6
+ import type { WalletTransactionWithRelations, WalletTransactionSelectInput } from './WalletTransactionTypes';
7
+
8
+ /**
9
+ * Extended Wallet type that includes relation fields.
10
+ * This represents the complete shape of Wallet records returned from the database.
11
+ */
12
+ export interface WalletWithRelations {
13
+ id: string;
14
+ userId: string;
15
+ balance: number;
16
+ currency: string;
17
+ createdAt: Date;
18
+ updatedAt: Date;
19
+ userId: string;
20
+ transactions?: WalletTransactionWithRelations[];
21
+ }
22
+
23
+ /**
24
+ * Input type for creating a new Wallet record.
25
+ * Fields with default values are optional and will be filled automatically if not provided.
26
+ *
27
+ * @example
28
+ * // Create a minimal wallet
29
+ * wallet.create({
30
+ * // Required fields only
31
+ * userId: string,
32
+ * });
33
+ *
34
+ * @example
35
+ * // Create with optional fields
36
+ * wallet.create({
37
+ * // All fields including optional ones
38
+ * id?: string,
39
+ * balance?: number,
40
+ * currency?: string,
41
+ * });
42
+ */
43
+ export interface WalletCreateInput {
44
+ id?: string;
45
+ balance?: number;
46
+ currency?: string;
47
+ userId: string;
48
+ }
49
+
50
+ /**
51
+ * Input type for updating an existing Wallet record.
52
+ * All fields are optional since you only need to specify the fields you want to change.
53
+ *
54
+ * @example
55
+ * // Update a wallet's fields
56
+ * wallet.update({
57
+ * where: { id: "123" },
58
+ * data: {
59
+ * id?: string,
60
+ * balance?: number,
61
+ * }
62
+ * });
63
+ */
64
+ export type WalletUpdateInput = Partial<WalletCreateInput>;
65
+
66
+ /**
67
+ * Filter type for querying Wallet 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
+ * wallet.findMany({
74
+ * where: {
75
+ * id: "value",
76
+ * userId: "value"
77
+ * }
78
+ * });
79
+ *
80
+ * @example
81
+ * // Advanced filtering
82
+ * wallet.findMany({
83
+ * where: {
84
+ * // Use advanced operators
85
+ * id: { contains: "partial" }
86
+ * }
87
+ * });
88
+ *
89
+ * @example
90
+ * // OR conditions - match ANY condition
91
+ * wallet.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
+ * wallet.findMany({
103
+ * where: {
104
+ * AND: [
105
+ * { id: "value1" },
106
+ * { userId: { gt: 100 } }
107
+ * ]
108
+ * }
109
+ * });
110
+ *
111
+ * @example
112
+ * // Complex nested logic
113
+ * wallet.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
+ * wallet.findMany({
126
+ * where: {
127
+ * // Array contains specific items
128
+ * transactions?: { has: ["item1", "item2"] }
129
+ * }
130
+ * });
131
+ */
132
+ export type WalletWhereInput = {
133
+ id?: string | FilterOperators<string>;
134
+ balance?: number | FilterOperators<number>;
135
+ currency?: string | FilterOperators<string>;
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?: WalletWhereInput[];
142
+ /** Match ALL of the provided conditions */
143
+ AND?: WalletWhereInput[];
144
+ };
145
+
146
+ /**
147
+ * Unique identifier for finding a specific Wallet 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
+ * wallet.findUnique({ id: "123" });
153
+ *
154
+ * @example
155
+ * // Delete by ID
156
+ * wallet.delete({ id: "123" });
157
+ */
158
+ export type WalletWhereUniqueInput = {
159
+ id: string;
160
+ };
161
+
162
+ /**
163
+ * Sort options for Wallet 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
+ * wallet.findMany({
169
+ * orderBy: { created_at: 'desc' }
170
+ * });
171
+ *
172
+ * @example
173
+ * // Sort alphabetically
174
+ * wallet.findMany({
175
+ * orderBy: { name: 'asc' }
176
+ * });
177
+ */
178
+ export type WalletOrderByInput = {
179
+ [key in keyof WalletSelectInput]?: 'asc' | 'desc';
180
+ };
181
+
182
+ /**
183
+ * Select specific scalar fields to return from Wallet queries.
184
+ * Relation fields are intentionally excluded; use `include` for relations.
185
+ */
186
+ export type WalletSelectInput = {
187
+ id?: boolean;
188
+ userId?: boolean;
189
+ balance?: boolean;
190
+ currency?: boolean;
191
+ createdAt?: boolean;
192
+ updatedAt?: boolean;
193
+ };
194
+
195
+ /**
196
+ * Include related records when querying Wallet.
197
+ * Only real Prisma relation fields are allowed here.
198
+ */
199
+ export type WalletIncludeInput = {
200
+ transactions?: IncludeValue | { select?: WalletTransactionSelectInput };
201
+ };
202
+
203
+ /**
204
+ * Result type for operations that return a single Wallet record.
205
+ */
206
+ export type WalletSingleResult = ModelResult<WalletWithRelations>;
207
+
208
+ /**
209
+ * Result type for operations that return multiple Wallet records.
210
+ */
211
+ export type WalletManyResult = ModelResult<WalletWithRelations[]>;
212
+
213
+ /**
214
+ * Configuration options for the Wallet hook.
215
+ * Includes where filters, ordering, pagination, and field selection.
216
+ */
217
+ export type UseWalletOptions = SuparismaOptions<
218
+ WalletWhereInput,
219
+ WalletOrderByInput,
220
+ WalletSelectInput,
221
+ WalletIncludeInput
222
+ >;
223
+
224
+ /**
225
+ * The complete API for interacting with Wallet records.
226
+ * This interface defines all available operations and state properties.
227
+ */
228
+ export interface WalletHookApi {
229
+ /**
230
+ * Current array of Wallet 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 wallet records
239
+ * const { data } = wallet;
240
+ * return (
241
+ * <ul>
242
+ * {data.map(item => (
243
+ * <li key={item.id}>{item.name}</li>
244
+ * ))}
245
+ * </ul>
246
+ * );
247
+ */
248
+ data: WalletWithRelations[];
249
+
250
+ /**
251
+ * Error object if the last operation failed, null otherwise.
252
+ *
253
+ * @example
254
+ * // Handle potential errors
255
+ * const { error } = wallet;
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 } = wallet;
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 } = wallet;
282
+ * return <div>Total records: {count}</div>;
283
+ */
284
+ count: number;
285
+
286
+
287
+
288
+ /**
289
+ * Find a single Wallet 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 wallet by ID
296
+ * const result = await wallet.findUnique({ id: "123" });
297
+ * if (result.data) {
298
+ * console.log("Found wallet:", result.data);
299
+ * }
300
+ */
301
+ findUnique: (where: WalletWhereUniqueInput) => WalletSingleResult;
302
+
303
+ /**
304
+ * Find multiple Wallet 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 wallet records
312
+ * const result = await wallet.findMany();
313
+ *
314
+ * @example
315
+ * // Filter and sort records
316
+ * const result = await wallet.findMany({
317
+ * where: { active: true },
318
+ * orderBy: { created_at: 'desc' },
319
+ * take: 10,
320
+ * skip: 0
321
+ * });
322
+ */
323
+ findMany: (params?: {
324
+ where?: WalletWhereInput;
325
+ orderBy?: WalletOrderByInput;
326
+ take?: number;
327
+ skip?: number;
328
+ }) => WalletManyResult;
329
+
330
+ /**
331
+ * Find the first Wallet 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 wallet
338
+ * const result = await wallet.findFirst({
339
+ * where: { active: true }
340
+ * });
341
+ *
342
+ * @example
343
+ * // Find the oldest wallet
344
+ * const result = await wallet.findFirst({
345
+ * orderBy: { created_at: 'asc' }
346
+ * });
347
+ */
348
+ findFirst: (params?: {
349
+ where?: WalletWhereInput;
350
+ orderBy?: WalletOrderByInput;
351
+ }) => WalletSingleResult;
352
+
353
+ /**
354
+ * Create a new Wallet 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 wallet
362
+ * const result = await wallet.create({
363
+ * userId: "value"
364
+ * });
365
+ *
366
+ * @example
367
+ * // Create with custom ID (overriding default)
368
+ * const result = await wallet.create({
369
+ * id: "custom-id",
370
+ * userId: "value"
371
+ * });
372
+ */
373
+ create: (data: WalletCreateInput) => WalletSingleResult;
374
+
375
+ /**
376
+ * Update an existing Wallet 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 wallet's fields
383
+ * const result = await wallet.update({
384
+ * where: { id: "123" },
385
+ * data: {
386
+ * id?: "updated value",
387
+ * balance?: 42
388
+ * }
389
+ * });
390
+ */
391
+ update: (params: {
392
+ where: WalletWhereUniqueInput;
393
+ data: WalletUpdateInput;
394
+ }) => WalletSingleResult;
395
+
396
+ /**
397
+ * Delete a Wallet 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 wallet by ID
404
+ * const result = await wallet.delete({ id: "123" });
405
+ * if (result.data) {
406
+ * console.log("Deleted wallet:", result.data);
407
+ * }
408
+ */
409
+ delete: (where: WalletWhereUniqueInput) => WalletSingleResult;
410
+
411
+ /**
412
+ * Delete multiple Wallet 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 wallet records
419
+ * const result = await wallet.deleteMany({
420
+ * where: { active: false }
421
+ * });
422
+ * console.log(`Deleted ${result.count} records`);
423
+ *
424
+ * @example
425
+ * // Delete all wallet records (use with caution!)
426
+ * const result = await wallet.deleteMany();
427
+ */
428
+ deleteMany: (params?: {
429
+ where?: WalletWhereInput;
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 wallet by ID
440
+ * const result = await wallet.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: WalletWhereUniqueInput;
452
+ update: WalletUpdateInput;
453
+ create: WalletCreateInput;
454
+ }) => WalletSingleResult;
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 wallet.refresh();
466
+ *
467
+ * @example
468
+ * // Refresh with different filters for this call only
469
+ * await wallet.refresh({
470
+ * where: { active: true },
471
+ * orderBy: { name: 'asc' }
472
+ * });
473
+ */
474
+ refresh: (params?: {
475
+ where?: WalletWhereInput;
476
+ orderBy?: WalletOrderByInput;
477
+ take?: number;
478
+ skip?: number;
479
+ }) => WalletManyResult;
480
+ }