@vestcards/server-types 1.1.0 → 1.2.0

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.
@@ -65,7 +65,7 @@ declare const app: Elysia<"", {
65
65
  route: string;
66
66
  request: Request;
67
67
  store: {};
68
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
68
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
69
69
  readonly 100: "Continue";
70
70
  readonly 101: "Switching Protocols";
71
71
  readonly 102: "Processing";
@@ -239,7 +239,7 @@ declare const app: Elysia<"", {
239
239
  route: string;
240
240
  request: Request;
241
241
  store: {};
242
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
242
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
243
243
  readonly 100: "Continue";
244
244
  readonly 101: "Switching Protocols";
245
245
  readonly 102: "Processing";
@@ -450,13 +450,13 @@ declare const app: Elysia<"", {
450
450
  headers: {};
451
451
  response: {
452
452
  200: {
453
+ status: "not-reviewed" | "card-updated" | "demand-rejected" | "card-removed";
453
454
  type: string;
454
455
  createdAt: Date;
455
456
  updatedAt: Date;
456
457
  userId: string;
457
- status: "not-reviewed" | "card-updated" | "demand-rejected" | "card-removed";
458
- cardId: string;
459
458
  content: string;
459
+ cardId: string;
460
460
  } | null;
461
461
  422: {
462
462
  type: "validation";
@@ -479,8 +479,8 @@ declare const app: Elysia<"", {
479
479
  post: {
480
480
  body: {
481
481
  type: string;
482
- cardId: string;
483
482
  content: string;
483
+ cardId: string;
484
484
  };
485
485
  params: {};
486
486
  query: {};
@@ -1190,8 +1190,8 @@ declare const app: Elysia<"", {
1190
1190
  "complete-profile": {
1191
1191
  post: {
1192
1192
  body: {
1193
- dayTimeReminder?: string | undefined;
1194
1193
  university?: number | undefined;
1194
+ dayTimeReminder?: string | undefined;
1195
1195
  course?: number | undefined;
1196
1196
  goal: string;
1197
1197
  hoursStudied: string;
@@ -2,8 +2,8 @@ export declare const config: {
2
2
  databaseUrl: string;
3
3
  baseUrl: string;
4
4
  webAppUrl: string;
5
- redisUrl: string | undefined;
6
- redisToken: string | undefined;
5
+ redisUrl: string;
6
+ redisToken: string;
7
7
  betterAuthSecret: string;
8
8
  googleClientId: string;
9
9
  googleClientSecret: string;
@@ -41,7 +41,7 @@ export declare const authModule: Elysia<"/v1", {
41
41
  route: string;
42
42
  request: Request;
43
43
  store: {};
44
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
44
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
45
45
  readonly 100: "Continue";
46
46
  readonly 101: "Switching Protocols";
47
47
  readonly 102: "Processing";
@@ -215,7 +215,7 @@ export declare const authModule: Elysia<"/v1", {
215
215
  route: string;
216
216
  request: Request;
217
217
  store: {};
218
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
218
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
219
219
  readonly 100: "Continue";
220
220
  readonly 101: "Switching Protocols";
221
221
  readonly 102: "Processing";
@@ -94,6 +94,23 @@ export declare const auth: import("better-auth").Auth<{
94
94
  }>;
95
95
  };
96
96
  options: import("@better-auth/expo").ExpoOptions | undefined;
97
+ }, {
98
+ id: "bearer";
99
+ hooks: {
100
+ before: {
101
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
102
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
103
+ context: {
104
+ headers: Headers;
105
+ };
106
+ } | undefined>;
107
+ }[];
108
+ after: {
109
+ matcher(context: import("better-auth").HookEndpointContext): true;
110
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
111
+ }[];
112
+ };
113
+ options: import("better-auth/plugins").BearerOptions | undefined;
97
114
  }, {
98
115
  id: "custom-session";
99
116
  hooks: {
@@ -217,11 +234,11 @@ export declare const auth: import("better-auth").Auth<{
217
234
  baseURL: string;
218
235
  basePath: string;
219
236
  database: (options: BetterAuthOptions) => import("better-auth").DBAdapter<BetterAuthOptions>;
220
- secondaryStorage: import("better-auth").SecondaryStorage | undefined;
237
+ secondaryStorage: import("better-auth").SecondaryStorage;
221
238
  emailAndPassword: {
222
239
  enabled: true;
223
- autoSignIn: false;
224
- requireEmailVerification: boolean;
240
+ autoSignIn: true;
241
+ requireEmailVerification: false;
225
242
  minPasswordLength: number;
226
243
  maxPasswordLength: number;
227
244
  password: {
@@ -268,6 +285,10 @@ export declare const auth: import("better-auth").Auth<{
268
285
  google: {
269
286
  clientId: string;
270
287
  clientSecret: string;
288
+ mapProfileToUser: (profile: import("better-auth").GoogleProfile) => {
289
+ name: string;
290
+ surname: string;
291
+ };
271
292
  };
272
293
  apple: {
273
294
  clientId: string;
@@ -318,16 +339,41 @@ export declare const auth: import("better-auth").Auth<{
318
339
  }>;
319
340
  };
320
341
  };
342
+ session: {
343
+ create: {
344
+ before: (session: {
345
+ id: string;
346
+ createdAt: Date;
347
+ updatedAt: Date;
348
+ userId: string;
349
+ expiresAt: Date;
350
+ token: string;
351
+ ipAddress?: string | null | undefined;
352
+ userAgent?: string | null | undefined;
353
+ } & Record<string, unknown>) => Promise<{
354
+ data: {
355
+ id: string;
356
+ createdAt: Date;
357
+ updatedAt: Date;
358
+ userId: string;
359
+ expiresAt: Date;
360
+ token: string;
361
+ ipAddress?: string | null | undefined;
362
+ userAgent?: string | null | undefined;
363
+ } & Record<string, unknown>;
364
+ }>;
365
+ };
366
+ };
321
367
  };
322
368
  logger: {
323
- log(level: "info" | "debug" | "warn" | "error", message: string, ...args: any[]): void;
369
+ log(level: "error" | "warn" | "info" | "debug", message: string, ...args: any[]): void;
324
370
  };
325
371
  advanced: {
326
372
  useSecureCookies: boolean;
327
373
  disableOriginCheck: true;
328
374
  cookiePrefix: string;
329
375
  defaultCookieAttributes: {
330
- sameSite: "none" | "lax";
376
+ sameSite: "lax" | "none";
331
377
  secure: boolean;
332
378
  };
333
379
  database: {
@@ -335,5 +381,8 @@ export declare const auth: import("better-auth").Auth<{
335
381
  };
336
382
  };
337
383
  trustedOrigins: string[];
384
+ hooks: {
385
+ before: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
386
+ };
338
387
  }>;
339
388
  export type Auth = typeof auth;
@@ -1,4 +1,5 @@
1
1
  import type { BetterAuthOptions } from 'better-auth';
2
+ export declare function assertCredentialAccount(userId: string): Promise<void>;
2
3
  type SendVerificationEmail = NonNullable<BetterAuthOptions['emailVerification']>['sendVerificationEmail'];
3
4
  export declare const sendVerificationEmail: SendVerificationEmail;
4
5
  type SendResetPassword = NonNullable<BetterAuthOptions['emailAndPassword']>['sendResetPassword'];
@@ -42,7 +42,7 @@ export declare const cardModule: Elysia<"/v1/card", {
42
42
  route: string;
43
43
  request: Request;
44
44
  store: {};
45
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
45
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
46
46
  readonly 100: "Continue";
47
47
  readonly 101: "Switching Protocols";
48
48
  readonly 102: "Processing";
@@ -216,7 +216,7 @@ export declare const cardModule: Elysia<"/v1/card", {
216
216
  route: string;
217
217
  request: Request;
218
218
  store: {};
219
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
219
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
220
220
  readonly 100: "Continue";
221
221
  readonly 101: "Switching Protocols";
222
222
  readonly 102: "Processing";
@@ -392,13 +392,13 @@ export declare const cardModule: Elysia<"/v1/card", {
392
392
  headers: {};
393
393
  response: {
394
394
  200: {
395
+ status: "not-reviewed" | "card-updated" | "demand-rejected" | "card-removed";
395
396
  type: string;
396
397
  createdAt: Date;
397
398
  updatedAt: Date;
398
399
  userId: string;
399
- status: "not-reviewed" | "card-updated" | "demand-rejected" | "card-removed";
400
- cardId: string;
401
400
  content: string;
401
+ cardId: string;
402
402
  } | null;
403
403
  422: {
404
404
  type: "validation";
@@ -421,8 +421,8 @@ export declare const cardModule: Elysia<"/v1/card", {
421
421
  post: {
422
422
  body: {
423
423
  type: string;
424
- cardId: string;
425
424
  content: string;
425
+ cardId: string;
426
426
  };
427
427
  params: {};
428
428
  query: {};
@@ -42,7 +42,7 @@ export declare const deckModule: Elysia<"/v1/decks", {
42
42
  route: string;
43
43
  request: Request;
44
44
  store: {};
45
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
45
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
46
46
  readonly 100: "Continue";
47
47
  readonly 101: "Switching Protocols";
48
48
  readonly 102: "Processing";
@@ -216,7 +216,7 @@ export declare const deckModule: Elysia<"/v1/decks", {
216
216
  route: string;
217
217
  request: Request;
218
218
  store: {};
219
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
219
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
220
220
  readonly 100: "Continue";
221
221
  readonly 101: "Switching Protocols";
222
222
  readonly 102: "Processing";
@@ -42,7 +42,7 @@ export declare const libraryModule: Elysia<"/v1/library", {
42
42
  route: string;
43
43
  request: Request;
44
44
  store: {};
45
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
45
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
46
46
  readonly 100: "Continue";
47
47
  readonly 101: "Switching Protocols";
48
48
  readonly 102: "Processing";
@@ -216,7 +216,7 @@ export declare const libraryModule: Elysia<"/v1/library", {
216
216
  route: string;
217
217
  request: Request;
218
218
  store: {};
219
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
219
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
220
220
  readonly 100: "Continue";
221
221
  readonly 101: "Switching Protocols";
222
222
  readonly 102: "Processing";
@@ -42,7 +42,7 @@ export declare const studyModule: Elysia<"/v1/study", {
42
42
  route: string;
43
43
  request: Request;
44
44
  store: {};
45
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
45
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
46
46
  readonly 100: "Continue";
47
47
  readonly 101: "Switching Protocols";
48
48
  readonly 102: "Processing";
@@ -216,7 +216,7 @@ export declare const studyModule: Elysia<"/v1/study", {
216
216
  route: string;
217
217
  request: Request;
218
218
  store: {};
219
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
219
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
220
220
  readonly 100: "Continue";
221
221
  readonly 101: "Switching Protocols";
222
222
  readonly 102: "Processing";
@@ -42,7 +42,7 @@ export declare const topicModule: Elysia<"/v1/topics", {
42
42
  route: string;
43
43
  request: Request;
44
44
  store: {};
45
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
45
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
46
46
  readonly 100: "Continue";
47
47
  readonly 101: "Switching Protocols";
48
48
  readonly 102: "Processing";
@@ -216,7 +216,7 @@ export declare const topicModule: Elysia<"/v1/topics", {
216
216
  route: string;
217
217
  request: Request;
218
218
  store: {};
219
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
219
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
220
220
  readonly 100: "Continue";
221
221
  readonly 101: "Switching Protocols";
222
222
  readonly 102: "Processing";
@@ -42,7 +42,7 @@ export declare const userModule: Elysia<"/v1/user", {
42
42
  route: string;
43
43
  request: Request;
44
44
  store: {};
45
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
45
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
46
46
  readonly 100: "Continue";
47
47
  readonly 101: "Switching Protocols";
48
48
  readonly 102: "Processing";
@@ -216,7 +216,7 @@ export declare const userModule: Elysia<"/v1/user", {
216
216
  route: string;
217
217
  request: Request;
218
218
  store: {};
219
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
219
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 404 | 409 | 429 | 500 | 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
220
220
  readonly 100: "Continue";
221
221
  readonly 101: "Switching Protocols";
222
222
  readonly 102: "Processing";
@@ -482,8 +482,8 @@ export declare const userModule: Elysia<"/v1/user", {
482
482
  "complete-profile": {
483
483
  post: {
484
484
  body: {
485
- dayTimeReminder?: string | undefined;
486
485
  university?: number | undefined;
486
+ dayTimeReminder?: string | undefined;
487
487
  course?: number | undefined;
488
488
  goal: string;
489
489
  hoursStudied: string;
@@ -41,7 +41,7 @@ export interface IDeck {
41
41
  subject: Subject;
42
42
  topic?: string;
43
43
  topicIcon?: string | null;
44
- ownerId: string;
44
+ ownerInfo?: IOwnerInfo;
45
45
  }
46
46
  export interface IDeckDetail extends IDeck {
47
47
  subject: Subject;
@@ -1,5 +1,8 @@
1
1
  import { Entitlement, UserRole } from './user';
2
2
  export declare const PERMISSIONS: {
3
+ readonly APP: {
4
+ readonly ACCESS: "app:access";
5
+ };
3
6
  readonly DECK: {
4
7
  readonly CREATE_OWN: "deck:create:own";
5
8
  readonly CREATE_PUBLIC: "deck:create:public";
@@ -64,6 +67,7 @@ export type Permission = ValueOf<{
64
67
  [K in keyof typeof PERMISSIONS]: ValueOf<(typeof PERMISSIONS)[K]>;
65
68
  }>;
66
69
  export declare const Permission: {
70
+ readonly APP_ACCESS: "app:access";
67
71
  readonly DECK_CREATE_OWN: "deck:create:own";
68
72
  readonly DECK_CREATE_PUBLIC: "deck:create:public";
69
73
  readonly DECK_READ_OWN: "deck:read:own";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vestcards/server-types",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {