@goscribe/server 1.2.0 → 1.3.1

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 (126) hide show
  1. package/check-difficulty.cjs +14 -0
  2. package/check-questions.cjs +14 -0
  3. package/db-summary.cjs +22 -0
  4. package/dist/context.d.ts +5 -1
  5. package/dist/lib/activity_human_description.d.ts +13 -0
  6. package/dist/lib/activity_human_description.js +221 -0
  7. package/dist/lib/activity_human_description.test.d.ts +1 -0
  8. package/dist/lib/activity_human_description.test.js +16 -0
  9. package/dist/lib/activity_log_service.d.ts +87 -0
  10. package/dist/lib/activity_log_service.js +276 -0
  11. package/dist/lib/activity_log_service.test.d.ts +1 -0
  12. package/dist/lib/activity_log_service.test.js +27 -0
  13. package/dist/lib/ai-session.d.ts +15 -2
  14. package/dist/lib/ai-session.js +147 -85
  15. package/dist/lib/constants.d.ts +13 -0
  16. package/dist/lib/constants.js +12 -0
  17. package/dist/lib/email.d.ts +11 -0
  18. package/dist/lib/email.js +193 -0
  19. package/dist/lib/env.d.ts +13 -0
  20. package/dist/lib/env.js +16 -0
  21. package/dist/lib/inference.d.ts +4 -1
  22. package/dist/lib/inference.js +3 -3
  23. package/dist/lib/logger.d.ts +4 -4
  24. package/dist/lib/logger.js +30 -8
  25. package/dist/lib/notification-service.d.ts +152 -0
  26. package/dist/lib/notification-service.js +473 -0
  27. package/dist/lib/notification-service.test.d.ts +1 -0
  28. package/dist/lib/notification-service.test.js +87 -0
  29. package/dist/lib/prisma.d.ts +2 -1
  30. package/dist/lib/prisma.js +5 -1
  31. package/dist/lib/pusher.d.ts +23 -0
  32. package/dist/lib/pusher.js +69 -5
  33. package/dist/lib/retry.d.ts +15 -0
  34. package/dist/lib/retry.js +37 -0
  35. package/dist/lib/storage.js +2 -2
  36. package/dist/lib/stripe.d.ts +9 -0
  37. package/dist/lib/stripe.js +36 -0
  38. package/dist/lib/subscription_service.d.ts +37 -0
  39. package/dist/lib/subscription_service.js +654 -0
  40. package/dist/lib/usage_service.d.ts +26 -0
  41. package/dist/lib/usage_service.js +59 -0
  42. package/dist/lib/worksheet-generation.d.ts +91 -0
  43. package/dist/lib/worksheet-generation.js +95 -0
  44. package/dist/lib/worksheet-generation.test.d.ts +1 -0
  45. package/dist/lib/worksheet-generation.test.js +20 -0
  46. package/dist/lib/workspace-access.d.ts +18 -0
  47. package/dist/lib/workspace-access.js +13 -0
  48. package/dist/routers/_app.d.ts +1349 -253
  49. package/dist/routers/_app.js +10 -0
  50. package/dist/routers/admin.d.ts +361 -0
  51. package/dist/routers/admin.js +633 -0
  52. package/dist/routers/annotations.d.ts +219 -0
  53. package/dist/routers/annotations.js +187 -0
  54. package/dist/routers/auth.d.ts +88 -7
  55. package/dist/routers/auth.js +339 -19
  56. package/dist/routers/chat.d.ts +6 -12
  57. package/dist/routers/copilot.d.ts +199 -0
  58. package/dist/routers/copilot.js +571 -0
  59. package/dist/routers/flashcards.d.ts +47 -81
  60. package/dist/routers/flashcards.js +143 -27
  61. package/dist/routers/members.d.ts +36 -7
  62. package/dist/routers/members.js +200 -19
  63. package/dist/routers/notifications.d.ts +99 -0
  64. package/dist/routers/notifications.js +127 -0
  65. package/dist/routers/payment.d.ts +89 -0
  66. package/dist/routers/payment.js +403 -0
  67. package/dist/routers/podcast.d.ts +8 -13
  68. package/dist/routers/podcast.js +54 -31
  69. package/dist/routers/studyguide.d.ts +1 -29
  70. package/dist/routers/studyguide.js +80 -71
  71. package/dist/routers/worksheets.d.ts +105 -38
  72. package/dist/routers/worksheets.js +258 -68
  73. package/dist/routers/workspace.d.ts +139 -60
  74. package/dist/routers/workspace.js +455 -315
  75. package/dist/scripts/purge-deleted-users.d.ts +1 -0
  76. package/dist/scripts/purge-deleted-users.js +149 -0
  77. package/dist/server.js +130 -10
  78. package/dist/services/flashcard-progress.service.d.ts +18 -66
  79. package/dist/services/flashcard-progress.service.js +51 -42
  80. package/dist/trpc.d.ts +20 -21
  81. package/dist/trpc.js +150 -1
  82. package/mcq-test.cjs +36 -0
  83. package/package.json +9 -2
  84. package/prisma/migrations/20260413143206_init/migration.sql +873 -0
  85. package/prisma/schema.prisma +471 -324
  86. package/src/context.ts +4 -1
  87. package/src/lib/activity_human_description.test.ts +28 -0
  88. package/src/lib/activity_human_description.ts +239 -0
  89. package/src/lib/activity_log_service.test.ts +37 -0
  90. package/src/lib/activity_log_service.ts +353 -0
  91. package/src/lib/ai-session.ts +79 -51
  92. package/src/lib/email.ts +213 -29
  93. package/src/lib/env.ts +23 -6
  94. package/src/lib/inference.ts +2 -2
  95. package/src/lib/notification-service.test.ts +106 -0
  96. package/src/lib/notification-service.ts +677 -0
  97. package/src/lib/prisma.ts +6 -1
  98. package/src/lib/pusher.ts +86 -2
  99. package/src/lib/stripe.ts +39 -0
  100. package/src/lib/subscription_service.ts +722 -0
  101. package/src/lib/usage_service.ts +74 -0
  102. package/src/lib/worksheet-generation.test.ts +31 -0
  103. package/src/lib/worksheet-generation.ts +139 -0
  104. package/src/routers/_app.ts +9 -0
  105. package/src/routers/admin.ts +710 -0
  106. package/src/routers/annotations.ts +41 -0
  107. package/src/routers/auth.ts +338 -28
  108. package/src/routers/copilot.ts +719 -0
  109. package/src/routers/flashcards.ts +201 -68
  110. package/src/routers/members.ts +280 -80
  111. package/src/routers/notifications.ts +142 -0
  112. package/src/routers/payment.ts +448 -0
  113. package/src/routers/podcast.ts +112 -83
  114. package/src/routers/studyguide.ts +12 -0
  115. package/src/routers/worksheets.ts +289 -66
  116. package/src/routers/workspace.ts +329 -122
  117. package/src/scripts/purge-deleted-users.ts +167 -0
  118. package/src/server.ts +137 -11
  119. package/src/services/flashcard-progress.service.ts +49 -37
  120. package/src/trpc.ts +184 -5
  121. package/test-generate.js +30 -0
  122. package/test-ratio.cjs +9 -0
  123. package/zod-test.cjs +22 -0
  124. package/prisma/migrations/20250826124819_add_worksheet_difficulty_and_estimated_time/migration.sql +0 -213
  125. package/prisma/migrations/20250826133236_add_worksheet_question_progress/migration.sql +0 -31
  126. package/prisma/seed.mjs +0 -135
@@ -0,0 +1,219 @@
1
+ export declare const annotations: import("@trpc/server").TRPCBuiltRouter<{
2
+ ctx: import("../context.js").Context;
3
+ meta: object;
4
+ errorShape: {
5
+ data: {
6
+ zodError: string | null;
7
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
8
+ httpStatus: number;
9
+ path?: string;
10
+ stack?: string;
11
+ };
12
+ message: string;
13
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
14
+ };
15
+ transformer: true;
16
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
17
+ listHighlights: import("@trpc/server").TRPCQueryProcedure<{
18
+ input: {
19
+ artifactVersionId: string;
20
+ };
21
+ output: ({
22
+ user: {
23
+ name: string | null;
24
+ id: string;
25
+ profilePicture: {
26
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
27
+ name: string;
28
+ id: string;
29
+ createdAt: Date;
30
+ workspaceId: string | null;
31
+ userId: string | null;
32
+ mimeType: string;
33
+ size: number;
34
+ bucket: string | null;
35
+ objectKey: string | null;
36
+ url: string | null;
37
+ checksum: string | null;
38
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
39
+ } | null;
40
+ };
41
+ comments: ({
42
+ user: {
43
+ name: string | null;
44
+ id: string;
45
+ profilePicture: {
46
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
47
+ name: string;
48
+ id: string;
49
+ createdAt: Date;
50
+ workspaceId: string | null;
51
+ userId: string | null;
52
+ mimeType: string;
53
+ size: number;
54
+ bucket: string | null;
55
+ objectKey: string | null;
56
+ url: string | null;
57
+ checksum: string | null;
58
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
59
+ } | null;
60
+ };
61
+ } & {
62
+ id: string;
63
+ createdAt: Date;
64
+ updatedAt: Date;
65
+ content: string;
66
+ userId: string;
67
+ highlightId: string;
68
+ })[];
69
+ } & {
70
+ id: string;
71
+ createdAt: Date;
72
+ updatedAt: Date;
73
+ userId: string;
74
+ color: string;
75
+ artifactVersionId: string;
76
+ startOffset: number;
77
+ endOffset: number;
78
+ selectedText: string;
79
+ })[];
80
+ meta: object;
81
+ }>;
82
+ createHighlight: import("@trpc/server").TRPCMutationProcedure<{
83
+ input: {
84
+ artifactVersionId: string;
85
+ startOffset: number;
86
+ endOffset: number;
87
+ selectedText: string;
88
+ color?: string | undefined;
89
+ };
90
+ output: {
91
+ user: {
92
+ name: string | null;
93
+ id: string;
94
+ profilePicture: {
95
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
96
+ name: string;
97
+ id: string;
98
+ createdAt: Date;
99
+ workspaceId: string | null;
100
+ userId: string | null;
101
+ mimeType: string;
102
+ size: number;
103
+ bucket: string | null;
104
+ objectKey: string | null;
105
+ url: string | null;
106
+ checksum: string | null;
107
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
108
+ } | null;
109
+ };
110
+ comments: {
111
+ id: string;
112
+ createdAt: Date;
113
+ updatedAt: Date;
114
+ content: string;
115
+ userId: string;
116
+ highlightId: string;
117
+ }[];
118
+ } & {
119
+ id: string;
120
+ createdAt: Date;
121
+ updatedAt: Date;
122
+ userId: string;
123
+ color: string;
124
+ artifactVersionId: string;
125
+ startOffset: number;
126
+ endOffset: number;
127
+ selectedText: string;
128
+ };
129
+ meta: object;
130
+ }>;
131
+ deleteHighlight: import("@trpc/server").TRPCMutationProcedure<{
132
+ input: {
133
+ highlightId: string;
134
+ };
135
+ output: {
136
+ success: boolean;
137
+ };
138
+ meta: object;
139
+ }>;
140
+ addComment: import("@trpc/server").TRPCMutationProcedure<{
141
+ input: {
142
+ highlightId: string;
143
+ content: string;
144
+ };
145
+ output: {
146
+ user: {
147
+ name: string | null;
148
+ id: string;
149
+ profilePicture: {
150
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
151
+ name: string;
152
+ id: string;
153
+ createdAt: Date;
154
+ workspaceId: string | null;
155
+ userId: string | null;
156
+ mimeType: string;
157
+ size: number;
158
+ bucket: string | null;
159
+ objectKey: string | null;
160
+ url: string | null;
161
+ checksum: string | null;
162
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
163
+ } | null;
164
+ };
165
+ } & {
166
+ id: string;
167
+ createdAt: Date;
168
+ updatedAt: Date;
169
+ content: string;
170
+ userId: string;
171
+ highlightId: string;
172
+ };
173
+ meta: object;
174
+ }>;
175
+ updateComment: import("@trpc/server").TRPCMutationProcedure<{
176
+ input: {
177
+ commentId: string;
178
+ content: string;
179
+ };
180
+ output: {
181
+ user: {
182
+ name: string | null;
183
+ id: string;
184
+ profilePicture: {
185
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
186
+ name: string;
187
+ id: string;
188
+ createdAt: Date;
189
+ workspaceId: string | null;
190
+ userId: string | null;
191
+ mimeType: string;
192
+ size: number;
193
+ bucket: string | null;
194
+ objectKey: string | null;
195
+ url: string | null;
196
+ checksum: string | null;
197
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
198
+ } | null;
199
+ };
200
+ } & {
201
+ id: string;
202
+ createdAt: Date;
203
+ updatedAt: Date;
204
+ content: string;
205
+ userId: string;
206
+ highlightId: string;
207
+ };
208
+ meta: object;
209
+ }>;
210
+ deleteComment: import("@trpc/server").TRPCMutationProcedure<{
211
+ input: {
212
+ commentId: string;
213
+ };
214
+ output: {
215
+ success: boolean;
216
+ };
217
+ meta: object;
218
+ }>;
219
+ }>>;
@@ -0,0 +1,187 @@
1
+ import { z } from 'zod';
2
+ import { TRPCError } from '@trpc/server';
3
+ import { router, authedProcedure } from '../trpc.js';
4
+ import { notifyStudyGuideCommentAdded } from '../lib/notification-service.js';
5
+ export const annotations = router({
6
+ // List all highlights (with nested comments) for an artifact version
7
+ listHighlights: authedProcedure
8
+ .input(z.object({
9
+ artifactVersionId: z.string(),
10
+ }))
11
+ .query(async ({ ctx, input }) => {
12
+ const highlights = await ctx.db.studyGuideHighlight.findMany({
13
+ where: { artifactVersionId: input.artifactVersionId },
14
+ include: {
15
+ comments: {
16
+ include: {
17
+ user: { select: { id: true, name: true, profilePicture: true } },
18
+ },
19
+ orderBy: { createdAt: 'asc' },
20
+ },
21
+ user: { select: { id: true, name: true, profilePicture: true } },
22
+ },
23
+ orderBy: { startOffset: 'asc' },
24
+ });
25
+ return highlights;
26
+ }),
27
+ // Create a new highlight
28
+ createHighlight: authedProcedure
29
+ .input(z.object({
30
+ artifactVersionId: z.string(),
31
+ startOffset: z.number().int().min(0),
32
+ endOffset: z.number().int().min(0),
33
+ selectedText: z.string().min(1),
34
+ color: z.string().optional(),
35
+ }))
36
+ .mutation(async ({ ctx, input }) => {
37
+ // Verify the artifact version exists
38
+ const version = await ctx.db.artifactVersion.findUnique({
39
+ where: { id: input.artifactVersionId },
40
+ });
41
+ if (!version) {
42
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'Artifact version not found' });
43
+ }
44
+ const highlight = await ctx.db.studyGuideHighlight.create({
45
+ data: {
46
+ artifactVersionId: input.artifactVersionId,
47
+ userId: ctx.session.user.id,
48
+ startOffset: input.startOffset,
49
+ endOffset: input.endOffset,
50
+ selectedText: input.selectedText,
51
+ ...(input.color && { color: input.color }),
52
+ },
53
+ include: {
54
+ comments: true,
55
+ user: { select: { id: true, name: true, profilePicture: true } },
56
+ },
57
+ });
58
+ return highlight;
59
+ }),
60
+ // Delete a highlight (and its comments via cascade)
61
+ deleteHighlight: authedProcedure
62
+ .input(z.object({
63
+ highlightId: z.string(),
64
+ }))
65
+ .mutation(async ({ ctx, input }) => {
66
+ const highlight = await ctx.db.studyGuideHighlight.findUnique({
67
+ where: { id: input.highlightId },
68
+ });
69
+ if (!highlight) {
70
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'Highlight not found' });
71
+ }
72
+ if (highlight.userId !== ctx.session.user.id) {
73
+ throw new TRPCError({ code: 'FORBIDDEN', message: 'You can only delete your own highlights' });
74
+ }
75
+ await ctx.db.studyGuideHighlight.delete({
76
+ where: { id: input.highlightId },
77
+ });
78
+ return { success: true };
79
+ }),
80
+ // Add a comment to a highlight
81
+ addComment: authedProcedure
82
+ .input(z.object({
83
+ highlightId: z.string(),
84
+ content: z.string().min(1),
85
+ }))
86
+ .mutation(async ({ ctx, input }) => {
87
+ const highlight = await ctx.db.studyGuideHighlight.findUnique({
88
+ where: { id: input.highlightId },
89
+ });
90
+ if (!highlight) {
91
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'Highlight not found' });
92
+ }
93
+ const comment = await ctx.db.studyGuideComment.create({
94
+ data: {
95
+ highlightId: input.highlightId,
96
+ userId: ctx.session.user.id,
97
+ content: input.content,
98
+ },
99
+ include: {
100
+ user: { select: { id: true, name: true, profilePicture: true } },
101
+ },
102
+ });
103
+ const after = await ctx.db.studyGuideHighlight.findUnique({
104
+ where: { id: input.highlightId },
105
+ include: {
106
+ comments: { select: { userId: true } },
107
+ artifactVersion: {
108
+ include: {
109
+ artifact: {
110
+ select: { id: true, title: true, workspaceId: true, type: true },
111
+ },
112
+ },
113
+ },
114
+ },
115
+ });
116
+ if (after?.artifactVersion?.artifact) {
117
+ const art = after.artifactVersion.artifact;
118
+ const recipientIds = new Set();
119
+ if (after.userId !== ctx.session.user.id) {
120
+ recipientIds.add(after.userId);
121
+ }
122
+ for (const c of after.comments) {
123
+ if (c.userId !== ctx.session.user.id) {
124
+ recipientIds.add(c.userId);
125
+ }
126
+ }
127
+ const authorName = comment.user.name?.trim() || 'Someone';
128
+ await notifyStudyGuideCommentAdded(ctx.db, {
129
+ authorUserId: ctx.session.user.id,
130
+ authorName,
131
+ content: input.content,
132
+ highlightId: input.highlightId,
133
+ commentId: comment.id,
134
+ workspaceId: art.workspaceId,
135
+ artifactId: art.id,
136
+ artifactTitle: art.title,
137
+ recipientUserIds: [...recipientIds],
138
+ }).catch(() => { });
139
+ }
140
+ return comment;
141
+ }),
142
+ // Update a comment
143
+ updateComment: authedProcedure
144
+ .input(z.object({
145
+ commentId: z.string(),
146
+ content: z.string().min(1),
147
+ }))
148
+ .mutation(async ({ ctx, input }) => {
149
+ const comment = await ctx.db.studyGuideComment.findUnique({
150
+ where: { id: input.commentId },
151
+ });
152
+ if (!comment) {
153
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'Comment not found' });
154
+ }
155
+ if (comment.userId !== ctx.session.user.id) {
156
+ throw new TRPCError({ code: 'FORBIDDEN', message: 'You can only edit your own comments' });
157
+ }
158
+ const updated = await ctx.db.studyGuideComment.update({
159
+ where: { id: input.commentId },
160
+ data: { content: input.content },
161
+ include: {
162
+ user: { select: { id: true, name: true, profilePicture: true } },
163
+ },
164
+ });
165
+ return updated;
166
+ }),
167
+ // Delete a comment
168
+ deleteComment: authedProcedure
169
+ .input(z.object({
170
+ commentId: z.string(),
171
+ }))
172
+ .mutation(async ({ ctx, input }) => {
173
+ const comment = await ctx.db.studyGuideComment.findUnique({
174
+ where: { id: input.commentId },
175
+ });
176
+ if (!comment) {
177
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'Comment not found' });
178
+ }
179
+ if (comment.userId !== ctx.session.user.id) {
180
+ throw new TRPCError({ code: 'FORBIDDEN', message: 'You can only delete your own comments' });
181
+ }
182
+ await ctx.db.studyGuideComment.delete({
183
+ where: { id: input.commentId },
184
+ });
185
+ return { success: true };
186
+ }),
187
+ });
@@ -1,11 +1,5 @@
1
1
  export declare const auth: import("@trpc/server").TRPCBuiltRouter<{
2
- ctx: {
3
- db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
4
- session: any;
5
- req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
6
- res: import("express").Response<any, Record<string, any>>;
7
- cookies: Record<string, string | undefined>;
8
- };
2
+ ctx: import("../context.js").Context;
9
3
  meta: object;
10
4
  errorShape: {
11
5
  data: {
@@ -30,6 +24,17 @@ export declare const auth: import("@trpc/server").TRPCBuiltRouter<{
30
24
  };
31
25
  meta: object;
32
26
  }>;
27
+ changePassword: import("@trpc/server").TRPCMutationProcedure<{
28
+ input: {
29
+ currentPassword: string;
30
+ newPassword: string;
31
+ };
32
+ output: {
33
+ success: boolean;
34
+ message: string;
35
+ };
36
+ meta: object;
37
+ }>;
33
38
  uploadProfilePicture: import("@trpc/server").TRPCMutationProcedure<{
34
39
  input: void;
35
40
  output: {
@@ -39,6 +44,13 @@ export declare const auth: import("@trpc/server").TRPCBuiltRouter<{
39
44
  };
40
45
  meta: object;
41
46
  }>;
47
+ confirmProfileUpdate: import("@trpc/server").TRPCMutationProcedure<{
48
+ input: void;
49
+ output: {
50
+ success: boolean;
51
+ };
52
+ meta: object;
53
+ }>;
42
54
  signup: import("@trpc/server").TRPCMutationProcedure<{
43
55
  input: {
44
56
  name: string;
@@ -52,6 +64,24 @@ export declare const auth: import("@trpc/server").TRPCBuiltRouter<{
52
64
  };
53
65
  meta: object;
54
66
  }>;
67
+ verifyEmail: import("@trpc/server").TRPCMutationProcedure<{
68
+ input: {
69
+ token: string;
70
+ };
71
+ output: {
72
+ success: boolean;
73
+ message: string;
74
+ };
75
+ meta: object;
76
+ }>;
77
+ resendVerification: import("@trpc/server").TRPCMutationProcedure<{
78
+ input: void;
79
+ output: {
80
+ success: boolean;
81
+ message: string;
82
+ };
83
+ meta: object;
84
+ }>;
55
85
  login: import("@trpc/server").TRPCMutationProcedure<{
56
86
  input: {
57
87
  email: string;
@@ -65,6 +95,33 @@ export declare const auth: import("@trpc/server").TRPCBuiltRouter<{
65
95
  };
66
96
  meta: object;
67
97
  }>;
98
+ /**
99
+ * Request a password reset email. Always returns the same message (no email enumeration).
100
+ */
101
+ requestPasswordReset: import("@trpc/server").TRPCMutationProcedure<{
102
+ input: {
103
+ email: string;
104
+ };
105
+ output: {
106
+ success: true;
107
+ message: string;
108
+ };
109
+ meta: object;
110
+ }>;
111
+ /**
112
+ * Complete password reset using the token from the email link.
113
+ */
114
+ resetPassword: import("@trpc/server").TRPCMutationProcedure<{
115
+ input: {
116
+ token: string;
117
+ newPassword: string;
118
+ };
119
+ output: {
120
+ success: boolean;
121
+ message: string;
122
+ };
123
+ meta: object;
124
+ }>;
68
125
  getSession: import("@trpc/server").TRPCQueryProcedure<{
69
126
  input: void;
70
127
  output: {
@@ -72,10 +129,34 @@ export declare const auth: import("@trpc/server").TRPCBuiltRouter<{
72
129
  id: string;
73
130
  email: string | null;
74
131
  name: string | null;
132
+ emailVerified: boolean;
133
+ profilePicture: string | null;
134
+ role: {
135
+ name: string;
136
+ id: string;
137
+ } | null;
75
138
  };
76
139
  };
77
140
  meta: object;
78
141
  }>;
142
+ requestAccountDeletion: import("@trpc/server").TRPCMutationProcedure<{
143
+ input: void;
144
+ output: {
145
+ success: boolean;
146
+ message: string;
147
+ };
148
+ meta: object;
149
+ }>;
150
+ restoreAccount: import("@trpc/server").TRPCMutationProcedure<{
151
+ input: {
152
+ token: string;
153
+ };
154
+ output: {
155
+ success: boolean;
156
+ message: string;
157
+ };
158
+ meta: object;
159
+ }>;
79
160
  logout: import("@trpc/server").TRPCMutationProcedure<{
80
161
  input: void;
81
162
  output: {