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,94 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead: scripts/generate-realtime-hooks.ts
3
+
4
+ // Corrected import for core hook factory
5
+ import { createSuparismaHook } from '../utils/core';
6
+ import type {
7
+ DeviceSessionWithRelations,
8
+ DeviceSessionCreateInput,
9
+ DeviceSessionUpdateInput,
10
+ DeviceSessionWhereInput,
11
+ DeviceSessionWhereUniqueInput,
12
+ DeviceSessionOrderByInput,
13
+ DeviceSessionSelectInput,
14
+ DeviceSessionIncludeInput,
15
+ DeviceSessionHookApi,
16
+ UseDeviceSessionOptions
17
+ } from '../types/DeviceSessionTypes';
18
+
19
+ /**
20
+ * A Prisma-like hook for interacting with DeviceSession records with real-time capabilities.
21
+ *
22
+ * This hook provides CRUD operations, real-time updates, and search functionality.
23
+ *
24
+ * @param options - Optional configuration options for the hook
25
+ * @returns An object with data state and methods for interacting with DeviceSession records
26
+ *
27
+ * @example
28
+ * // Basic usage - get all DeviceSession records with realtime updates
29
+ * const devicesession = useSuparismaDeviceSession();
30
+ * const { data, loading, error } = devicesession;
31
+ *
32
+ * @example
33
+ * // With filtering and ordering
34
+ * const devicesession = useSuparismaDeviceSession({
35
+ * where: { active: true },
36
+ * orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
37
+ * limit: 10
38
+ * });
39
+ *
40
+ * @example
41
+ * // Create a new record
42
+ * const result = await devicesession.create({
43
+ * name: "Example Name",
44
+ * // other fields...
45
+ * });
46
+ *
47
+ * @example
48
+ * // Update a record
49
+ * const result = await devicesession.update({
50
+ * where: { id: "123" },
51
+ * data: { name: "Updated Name" }
52
+ * });
53
+ *
54
+ * @example
55
+ * // Delete a record
56
+ * const result = await devicesession.delete({ id: "123" });
57
+ *
58
+ * @example
59
+ * // Find records with specific criteria
60
+ * const result = await devicesession.findMany({
61
+ * where: { // filters },
62
+ * orderBy: { // ordering },
63
+ * take: 20 // limit
64
+ * });
65
+ *
66
+ * @example
67
+ * // Select specific fields only
68
+ * const devicesession = useSuparismaDeviceSession({
69
+ * select: { id: true, name: true }
70
+ * });
71
+ *
72
+ * @example
73
+ * // Include related records
74
+ * const devicesession = useSuparismaDeviceSession({
75
+ * include: { relatedModel: true }
76
+ * });
77
+ */
78
+ export const useSuparismaDeviceSession = createSuparismaHook<
79
+ DeviceSessionWithRelations,
80
+ DeviceSessionWithRelations,
81
+ DeviceSessionCreateInput,
82
+ DeviceSessionUpdateInput,
83
+ DeviceSessionWhereInput,
84
+ DeviceSessionWhereUniqueInput,
85
+ DeviceSessionOrderByInput
86
+ >({
87
+ tableName: 'DeviceSession',
88
+ hasCreatedAt: true,
89
+ hasUpdatedAt: false,
90
+ // Default values from schema
91
+ defaultValues: {"id":"uuid(","lastActiveAt":"now(","createdAt":"now("},
92
+ // Field name for createdAt from Prisma schema
93
+ createdAtField: "createdAt"
94
+ }) as unknown as (options?: UseDeviceSessionOptions) => DeviceSessionHookApi;
@@ -0,0 +1,92 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead: scripts/generate-realtime-hooks.ts
3
+
4
+ // Corrected import for core hook factory
5
+ import { createSuparismaHook } from '../utils/core';
6
+ import type {
7
+ EnrollmentWithRelations,
8
+ EnrollmentCreateInput,
9
+ EnrollmentUpdateInput,
10
+ EnrollmentWhereInput,
11
+ EnrollmentWhereUniqueInput,
12
+ EnrollmentOrderByInput,
13
+ EnrollmentSelectInput,
14
+ EnrollmentIncludeInput,
15
+ EnrollmentHookApi,
16
+ UseEnrollmentOptions
17
+ } from '../types/EnrollmentTypes';
18
+
19
+ /**
20
+ * A Prisma-like hook for interacting with Enrollment records with real-time capabilities.
21
+ *
22
+ * This hook provides CRUD operations, real-time updates, and search functionality.
23
+ *
24
+ * @param options - Optional configuration options for the hook
25
+ * @returns An object with data state and methods for interacting with Enrollment records
26
+ *
27
+ * @example
28
+ * // Basic usage - get all Enrollment records with realtime updates
29
+ * const enrollment = useSuparismaEnrollment();
30
+ * const { data, loading, error } = enrollment;
31
+ *
32
+ * @example
33
+ * // With filtering and ordering
34
+ * const enrollment = useSuparismaEnrollment({
35
+ * where: { active: true },
36
+ * orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
37
+ * limit: 10
38
+ * });
39
+ *
40
+ * @example
41
+ * // Create a new record
42
+ * const result = await enrollment.create({
43
+ * name: "Example Name",
44
+ * // other fields...
45
+ * });
46
+ *
47
+ * @example
48
+ * // Update a record
49
+ * const result = await enrollment.update({
50
+ * where: { id: "123" },
51
+ * data: { name: "Updated Name" }
52
+ * });
53
+ *
54
+ * @example
55
+ * // Delete a record
56
+ * const result = await enrollment.delete({ id: "123" });
57
+ *
58
+ * @example
59
+ * // Find records with specific criteria
60
+ * const result = await enrollment.findMany({
61
+ * where: { // filters },
62
+ * orderBy: { // ordering },
63
+ * take: 20 // limit
64
+ * });
65
+ *
66
+ * @example
67
+ * // Select specific fields only
68
+ * const enrollment = useSuparismaEnrollment({
69
+ * select: { id: true, name: true }
70
+ * });
71
+ *
72
+ * @example
73
+ * // Include related records
74
+ * const enrollment = useSuparismaEnrollment({
75
+ * include: { relatedModel: true }
76
+ * });
77
+ */
78
+ export const useSuparismaEnrollment = createSuparismaHook<
79
+ EnrollmentWithRelations,
80
+ EnrollmentWithRelations,
81
+ EnrollmentCreateInput,
82
+ EnrollmentUpdateInput,
83
+ EnrollmentWhereInput,
84
+ EnrollmentWhereUniqueInput,
85
+ EnrollmentOrderByInput
86
+ >({
87
+ tableName: 'Enrollment',
88
+ hasCreatedAt: false,
89
+ hasUpdatedAt: false,
90
+ // Default values from schema
91
+ defaultValues: {"id":"uuid(","enrolledAt":"now(","screenshotAttempts":"0","screenRecordingAttempts":"0"}
92
+ }) as unknown as (options?: UseEnrollmentOptions) => EnrollmentHookApi;
@@ -0,0 +1,96 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead: scripts/generate-realtime-hooks.ts
3
+
4
+ // Corrected import for core hook factory
5
+ import { createSuparismaHook } from '../utils/core';
6
+ import type {
7
+ LessonWithRelations,
8
+ LessonCreateInput,
9
+ LessonUpdateInput,
10
+ LessonWhereInput,
11
+ LessonWhereUniqueInput,
12
+ LessonOrderByInput,
13
+ LessonSelectInput,
14
+ LessonIncludeInput,
15
+ LessonHookApi,
16
+ UseLessonOptions
17
+ } from '../types/LessonTypes';
18
+
19
+ /**
20
+ * A Prisma-like hook for interacting with Lesson records with real-time capabilities.
21
+ *
22
+ * This hook provides CRUD operations, real-time updates, and search functionality.
23
+ *
24
+ * @param options - Optional configuration options for the hook
25
+ * @returns An object with data state and methods for interacting with Lesson records
26
+ *
27
+ * @example
28
+ * // Basic usage - get all Lesson records with realtime updates
29
+ * const lesson = useSuparismaLesson();
30
+ * const { data, loading, error } = lesson;
31
+ *
32
+ * @example
33
+ * // With filtering and ordering
34
+ * const lesson = useSuparismaLesson({
35
+ * where: { active: true },
36
+ * orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
37
+ * limit: 10
38
+ * });
39
+ *
40
+ * @example
41
+ * // Create a new record
42
+ * const result = await lesson.create({
43
+ * name: "Example Name",
44
+ * // other fields...
45
+ * });
46
+ *
47
+ * @example
48
+ * // Update a record
49
+ * const result = await lesson.update({
50
+ * where: { id: "123" },
51
+ * data: { name: "Updated Name" }
52
+ * });
53
+ *
54
+ * @example
55
+ * // Delete a record
56
+ * const result = await lesson.delete({ id: "123" });
57
+ *
58
+ * @example
59
+ * // Find records with specific criteria
60
+ * const result = await lesson.findMany({
61
+ * where: { // filters },
62
+ * orderBy: { // ordering },
63
+ * take: 20 // limit
64
+ * });
65
+ *
66
+ * @example
67
+ * // Select specific fields only
68
+ * const lesson = useSuparismaLesson({
69
+ * select: { id: true, name: true }
70
+ * });
71
+ *
72
+ * @example
73
+ * // Include related records
74
+ * const lesson = useSuparismaLesson({
75
+ * include: { relatedModel: true }
76
+ * });
77
+ */
78
+ export const useSuparismaLesson = createSuparismaHook<
79
+ LessonWithRelations,
80
+ LessonWithRelations,
81
+ LessonCreateInput,
82
+ LessonUpdateInput,
83
+ LessonWhereInput,
84
+ LessonWhereUniqueInput,
85
+ LessonOrderByInput
86
+ >({
87
+ tableName: 'Lesson',
88
+ hasCreatedAt: true,
89
+ hasUpdatedAt: true,
90
+ // Default values from schema
91
+ defaultValues: {"id":"uuid(","order":"0","createdAt":"now(","isFree":"false","price":"0"},
92
+ // Field name for createdAt from Prisma schema
93
+ createdAtField: "createdAt",
94
+ // Field name for updatedAt from Prisma schema
95
+ updatedAtField: "updatedAt"
96
+ }) as unknown as (options?: UseLessonOptions) => LessonHookApi;
@@ -0,0 +1,92 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead: scripts/generate-realtime-hooks.ts
3
+
4
+ // Corrected import for core hook factory
5
+ import { createSuparismaHook } from '../utils/core';
6
+ import type {
7
+ LessonPurchaseWithRelations,
8
+ LessonPurchaseCreateInput,
9
+ LessonPurchaseUpdateInput,
10
+ LessonPurchaseWhereInput,
11
+ LessonPurchaseWhereUniqueInput,
12
+ LessonPurchaseOrderByInput,
13
+ LessonPurchaseSelectInput,
14
+ LessonPurchaseIncludeInput,
15
+ LessonPurchaseHookApi,
16
+ UseLessonPurchaseOptions
17
+ } from '../types/LessonPurchaseTypes';
18
+
19
+ /**
20
+ * A Prisma-like hook for interacting with LessonPurchase records with real-time capabilities.
21
+ *
22
+ * This hook provides CRUD operations, real-time updates, and search functionality.
23
+ *
24
+ * @param options - Optional configuration options for the hook
25
+ * @returns An object with data state and methods for interacting with LessonPurchase records
26
+ *
27
+ * @example
28
+ * // Basic usage - get all LessonPurchase records with realtime updates
29
+ * const lessonpurchase = useSuparismaLessonPurchase();
30
+ * const { data, loading, error } = lessonpurchase;
31
+ *
32
+ * @example
33
+ * // With filtering and ordering
34
+ * const lessonpurchase = useSuparismaLessonPurchase({
35
+ * where: { active: true },
36
+ * orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
37
+ * limit: 10
38
+ * });
39
+ *
40
+ * @example
41
+ * // Create a new record
42
+ * const result = await lessonpurchase.create({
43
+ * name: "Example Name",
44
+ * // other fields...
45
+ * });
46
+ *
47
+ * @example
48
+ * // Update a record
49
+ * const result = await lessonpurchase.update({
50
+ * where: { id: "123" },
51
+ * data: { name: "Updated Name" }
52
+ * });
53
+ *
54
+ * @example
55
+ * // Delete a record
56
+ * const result = await lessonpurchase.delete({ id: "123" });
57
+ *
58
+ * @example
59
+ * // Find records with specific criteria
60
+ * const result = await lessonpurchase.findMany({
61
+ * where: { // filters },
62
+ * orderBy: { // ordering },
63
+ * take: 20 // limit
64
+ * });
65
+ *
66
+ * @example
67
+ * // Select specific fields only
68
+ * const lessonpurchase = useSuparismaLessonPurchase({
69
+ * select: { id: true, name: true }
70
+ * });
71
+ *
72
+ * @example
73
+ * // Include related records
74
+ * const lessonpurchase = useSuparismaLessonPurchase({
75
+ * include: { relatedModel: true }
76
+ * });
77
+ */
78
+ export const useSuparismaLessonPurchase = createSuparismaHook<
79
+ LessonPurchaseWithRelations,
80
+ LessonPurchaseWithRelations,
81
+ LessonPurchaseCreateInput,
82
+ LessonPurchaseUpdateInput,
83
+ LessonPurchaseWhereInput,
84
+ LessonPurchaseWhereUniqueInput,
85
+ LessonPurchaseOrderByInput
86
+ >({
87
+ tableName: 'LessonPurchase',
88
+ hasCreatedAt: false,
89
+ hasUpdatedAt: false,
90
+ // Default values from schema
91
+ defaultValues: {"id":"uuid(","purchasedAt":"now("}
92
+ }) as unknown as (options?: UseLessonPurchaseOptions) => LessonPurchaseHookApi;
@@ -0,0 +1,96 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead: scripts/generate-realtime-hooks.ts
3
+
4
+ // Corrected import for core hook factory
5
+ import { createSuparismaHook } from '../utils/core';
6
+ import type {
7
+ LessonQuestionWithRelations,
8
+ LessonQuestionCreateInput,
9
+ LessonQuestionUpdateInput,
10
+ LessonQuestionWhereInput,
11
+ LessonQuestionWhereUniqueInput,
12
+ LessonQuestionOrderByInput,
13
+ LessonQuestionSelectInput,
14
+ LessonQuestionIncludeInput,
15
+ LessonQuestionHookApi,
16
+ UseLessonQuestionOptions
17
+ } from '../types/LessonQuestionTypes';
18
+
19
+ /**
20
+ * A Prisma-like hook for interacting with LessonQuestion records with real-time capabilities.
21
+ *
22
+ * This hook provides CRUD operations, real-time updates, and search functionality.
23
+ *
24
+ * @param options - Optional configuration options for the hook
25
+ * @returns An object with data state and methods for interacting with LessonQuestion records
26
+ *
27
+ * @example
28
+ * // Basic usage - get all LessonQuestion records with realtime updates
29
+ * const lessonquestion = useSuparismaLessonQuestion();
30
+ * const { data, loading, error } = lessonquestion;
31
+ *
32
+ * @example
33
+ * // With filtering and ordering
34
+ * const lessonquestion = useSuparismaLessonQuestion({
35
+ * where: { active: true },
36
+ * orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
37
+ * limit: 10
38
+ * });
39
+ *
40
+ * @example
41
+ * // Create a new record
42
+ * const result = await lessonquestion.create({
43
+ * name: "Example Name",
44
+ * // other fields...
45
+ * });
46
+ *
47
+ * @example
48
+ * // Update a record
49
+ * const result = await lessonquestion.update({
50
+ * where: { id: "123" },
51
+ * data: { name: "Updated Name" }
52
+ * });
53
+ *
54
+ * @example
55
+ * // Delete a record
56
+ * const result = await lessonquestion.delete({ id: "123" });
57
+ *
58
+ * @example
59
+ * // Find records with specific criteria
60
+ * const result = await lessonquestion.findMany({
61
+ * where: { // filters },
62
+ * orderBy: { // ordering },
63
+ * take: 20 // limit
64
+ * });
65
+ *
66
+ * @example
67
+ * // Select specific fields only
68
+ * const lessonquestion = useSuparismaLessonQuestion({
69
+ * select: { id: true, name: true }
70
+ * });
71
+ *
72
+ * @example
73
+ * // Include related records
74
+ * const lessonquestion = useSuparismaLessonQuestion({
75
+ * include: { relatedModel: true }
76
+ * });
77
+ */
78
+ export const useSuparismaLessonQuestion = createSuparismaHook<
79
+ LessonQuestionWithRelations,
80
+ LessonQuestionWithRelations,
81
+ LessonQuestionCreateInput,
82
+ LessonQuestionUpdateInput,
83
+ LessonQuestionWhereInput,
84
+ LessonQuestionWhereUniqueInput,
85
+ LessonQuestionOrderByInput
86
+ >({
87
+ tableName: 'LessonQuestion',
88
+ hasCreatedAt: true,
89
+ hasUpdatedAt: true,
90
+ // Default values from schema
91
+ defaultValues: {"id":"uuid(","type":"\"multiple_choice\"","order":"0","points":"1","createdAt":"now("},
92
+ // Field name for createdAt from Prisma schema
93
+ createdAtField: "createdAt",
94
+ // Field name for updatedAt from Prisma schema
95
+ updatedAtField: "updatedAt"
96
+ }) as unknown as (options?: UseLessonQuestionOptions) => LessonQuestionHookApi;
@@ -0,0 +1,96 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead: scripts/generate-realtime-hooks.ts
3
+
4
+ // Corrected import for core hook factory
5
+ import { createSuparismaHook } from '../utils/core';
6
+ import type {
7
+ PayoutMethodWithRelations,
8
+ PayoutMethodCreateInput,
9
+ PayoutMethodUpdateInput,
10
+ PayoutMethodWhereInput,
11
+ PayoutMethodWhereUniqueInput,
12
+ PayoutMethodOrderByInput,
13
+ PayoutMethodSelectInput,
14
+ PayoutMethodIncludeInput,
15
+ PayoutMethodHookApi,
16
+ UsePayoutMethodOptions
17
+ } from '../types/PayoutMethodTypes';
18
+
19
+ /**
20
+ * A Prisma-like hook for interacting with PayoutMethod records with real-time capabilities.
21
+ *
22
+ * This hook provides CRUD operations, real-time updates, and search functionality.
23
+ *
24
+ * @param options - Optional configuration options for the hook
25
+ * @returns An object with data state and methods for interacting with PayoutMethod records
26
+ *
27
+ * @example
28
+ * // Basic usage - get all PayoutMethod records with realtime updates
29
+ * const payoutmethod = useSuparismaPayoutMethod();
30
+ * const { data, loading, error } = payoutmethod;
31
+ *
32
+ * @example
33
+ * // With filtering and ordering
34
+ * const payoutmethod = useSuparismaPayoutMethod({
35
+ * where: { active: true },
36
+ * orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
37
+ * limit: 10
38
+ * });
39
+ *
40
+ * @example
41
+ * // Create a new record
42
+ * const result = await payoutmethod.create({
43
+ * name: "Example Name",
44
+ * // other fields...
45
+ * });
46
+ *
47
+ * @example
48
+ * // Update a record
49
+ * const result = await payoutmethod.update({
50
+ * where: { id: "123" },
51
+ * data: { name: "Updated Name" }
52
+ * });
53
+ *
54
+ * @example
55
+ * // Delete a record
56
+ * const result = await payoutmethod.delete({ id: "123" });
57
+ *
58
+ * @example
59
+ * // Find records with specific criteria
60
+ * const result = await payoutmethod.findMany({
61
+ * where: { // filters },
62
+ * orderBy: { // ordering },
63
+ * take: 20 // limit
64
+ * });
65
+ *
66
+ * @example
67
+ * // Select specific fields only
68
+ * const payoutmethod = useSuparismaPayoutMethod({
69
+ * select: { id: true, name: true }
70
+ * });
71
+ *
72
+ * @example
73
+ * // Include related records
74
+ * const payoutmethod = useSuparismaPayoutMethod({
75
+ * include: { relatedModel: true }
76
+ * });
77
+ */
78
+ export const useSuparismaPayoutMethod = createSuparismaHook<
79
+ PayoutMethodWithRelations,
80
+ PayoutMethodWithRelations,
81
+ PayoutMethodCreateInput,
82
+ PayoutMethodUpdateInput,
83
+ PayoutMethodWhereInput,
84
+ PayoutMethodWhereUniqueInput,
85
+ PayoutMethodOrderByInput
86
+ >({
87
+ tableName: 'PayoutMethod',
88
+ hasCreatedAt: true,
89
+ hasUpdatedAt: true,
90
+ // Default values from schema
91
+ defaultValues: {"id":"uuid(","isDefault":"false","isVerified":"false","createdAt":"now("},
92
+ // Field name for createdAt from Prisma schema
93
+ createdAtField: "createdAt",
94
+ // Field name for updatedAt from Prisma schema
95
+ updatedAtField: "updatedAt"
96
+ }) as unknown as (options?: UsePayoutMethodOptions) => PayoutMethodHookApi;
@@ -0,0 +1,96 @@
1
+ // THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
2
+ // Edit the generator script instead: scripts/generate-realtime-hooks.ts
3
+
4
+ // Corrected import for core hook factory
5
+ import { createSuparismaHook } from '../utils/core';
6
+ import type {
7
+ PayoutRequestWithRelations,
8
+ PayoutRequestCreateInput,
9
+ PayoutRequestUpdateInput,
10
+ PayoutRequestWhereInput,
11
+ PayoutRequestWhereUniqueInput,
12
+ PayoutRequestOrderByInput,
13
+ PayoutRequestSelectInput,
14
+ PayoutRequestIncludeInput,
15
+ PayoutRequestHookApi,
16
+ UsePayoutRequestOptions
17
+ } from '../types/PayoutRequestTypes';
18
+
19
+ /**
20
+ * A Prisma-like hook for interacting with PayoutRequest records with real-time capabilities.
21
+ *
22
+ * This hook provides CRUD operations, real-time updates, and search functionality.
23
+ *
24
+ * @param options - Optional configuration options for the hook
25
+ * @returns An object with data state and methods for interacting with PayoutRequest records
26
+ *
27
+ * @example
28
+ * // Basic usage - get all PayoutRequest records with realtime updates
29
+ * const payoutrequest = useSuparismaPayoutRequest();
30
+ * const { data, loading, error } = payoutrequest;
31
+ *
32
+ * @example
33
+ * // With filtering and ordering
34
+ * const payoutrequest = useSuparismaPayoutRequest({
35
+ * where: { active: true },
36
+ * orderBy: { createdAt: 'desc' }, // Note: Using actual Prisma field name
37
+ * limit: 10
38
+ * });
39
+ *
40
+ * @example
41
+ * // Create a new record
42
+ * const result = await payoutrequest.create({
43
+ * name: "Example Name",
44
+ * // other fields...
45
+ * });
46
+ *
47
+ * @example
48
+ * // Update a record
49
+ * const result = await payoutrequest.update({
50
+ * where: { id: "123" },
51
+ * data: { name: "Updated Name" }
52
+ * });
53
+ *
54
+ * @example
55
+ * // Delete a record
56
+ * const result = await payoutrequest.delete({ id: "123" });
57
+ *
58
+ * @example
59
+ * // Find records with specific criteria
60
+ * const result = await payoutrequest.findMany({
61
+ * where: { // filters },
62
+ * orderBy: { // ordering },
63
+ * take: 20 // limit
64
+ * });
65
+ *
66
+ * @example
67
+ * // Select specific fields only
68
+ * const payoutrequest = useSuparismaPayoutRequest({
69
+ * select: { id: true, name: true }
70
+ * });
71
+ *
72
+ * @example
73
+ * // Include related records
74
+ * const payoutrequest = useSuparismaPayoutRequest({
75
+ * include: { relatedModel: true }
76
+ * });
77
+ */
78
+ export const useSuparismaPayoutRequest = createSuparismaHook<
79
+ PayoutRequestWithRelations,
80
+ PayoutRequestWithRelations,
81
+ PayoutRequestCreateInput,
82
+ PayoutRequestUpdateInput,
83
+ PayoutRequestWhereInput,
84
+ PayoutRequestWhereUniqueInput,
85
+ PayoutRequestOrderByInput
86
+ >({
87
+ tableName: 'PayoutRequest',
88
+ hasCreatedAt: true,
89
+ hasUpdatedAt: true,
90
+ // Default values from schema
91
+ defaultValues: {"id":"uuid(","status":"\"pending\"","createdAt":"now("},
92
+ // Field name for createdAt from Prisma schema
93
+ createdAtField: "createdAt",
94
+ // Field name for updatedAt from Prisma schema
95
+ updatedAtField: "updatedAt"
96
+ }) as unknown as (options?: UsePayoutRequestOptions) => PayoutRequestHookApi;