@vestcards/server-types 1.2.0 → 1.4.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.
- package/dist/apps/server/src/app.d.ts +437 -16
- package/dist/apps/server/src/config/env.d.ts +7 -1
- package/dist/apps/server/src/lib/metrics.d.ts +4 -0
- package/dist/apps/server/src/lib/posthog.d.ts +2 -0
- package/dist/apps/server/src/libs/mappers.d.ts +5 -0
- package/dist/apps/server/src/middleware/errorHandler.d.ts +1 -1
- package/dist/apps/server/src/middleware/logger.d.ts +12 -29
- package/dist/apps/server/src/modules/auth/lib.d.ts +45 -17
- package/dist/apps/server/src/modules/auth/profile.d.ts +5 -0
- package/dist/apps/server/src/modules/auth/utils.d.ts +1 -0
- package/dist/apps/server/src/modules/card/index.d.ts +89 -0
- package/dist/apps/server/src/modules/card/model.d.ts +17 -0
- package/dist/apps/server/src/modules/card/service.d.ts +8 -1
- package/dist/apps/server/src/modules/cron/cron.test.d.ts +1 -0
- package/dist/apps/server/src/modules/cron/index.d.ts +53 -0
- package/dist/apps/server/src/modules/cron/jobs/expire-memberships.d.ts +1 -0
- package/dist/apps/server/src/modules/cron/jobs/payment-expiry-reminder.d.ts +1 -0
- package/dist/apps/server/src/modules/deck/index.d.ts +19 -1
- package/dist/apps/server/src/modules/deck/model.d.ts +4 -0
- package/dist/apps/server/src/modules/deck/service.d.ts +5 -1
- package/dist/apps/server/src/modules/ranking/index.d.ts +412 -0
- package/dist/apps/server/src/modules/ranking/model.d.ts +28 -0
- package/dist/apps/server/src/modules/ranking/ranking.test.d.ts +1 -0
- package/dist/apps/server/src/modules/ranking/service.d.ts +4 -0
- package/dist/apps/server/src/modules/stats/index.d.ts +446 -0
- package/dist/apps/server/src/modules/stats/model.d.ts +85 -0
- package/dist/apps/server/src/modules/stats/service.d.ts +27 -0
- package/dist/apps/server/src/modules/stats/stats.test.d.ts +1 -0
- package/dist/apps/server/src/modules/study/service.d.ts +7 -7
- package/dist/apps/server/src/modules/user/errors.d.ts +3 -0
- package/dist/apps/server/src/modules/user/index.d.ts +94 -15
- package/dist/apps/server/src/modules/user/model.d.ts +17 -1
- package/dist/apps/server/src/modules/user/service.d.ts +17 -29
- package/dist/apps/server/src/modules/vesty/index.d.ts +473 -0
- package/dist/apps/server/src/modules/vesty/model.d.ts +35 -0
- package/dist/apps/server/src/modules/vesty/service.d.ts +6 -0
- package/dist/apps/server/src/modules/vesty/services/generate-deck.d.ts +2 -0
- package/dist/apps/server/src/modules/vesty/services/insights.d.ts +3 -0
- package/dist/apps/server/src/modules/vesty/tools.d.ts +11 -0
- package/dist/apps/server/src/modules/vesty/utils.d.ts +69 -0
- package/dist/apps/server/src/modules/vesty/vesty.test.d.ts +1 -0
- package/dist/apps/server/src/server.d.ts +1 -0
- package/dist/apps/server/src/tests/helpers/fixtures.d.ts +9 -6
- package/dist/apps/server/src/tests/preload/vesty-mock.d.ts +1 -0
- package/dist/apps/server/src/utils/api.d.ts +1 -1
- package/dist/apps/server/src/utils/select.d.ts +17 -0
- package/dist/packages/db-core/src/index.d.ts +0 -1
- package/dist/packages/db-core/src/schema/auth.d.ts +94 -0
- package/dist/packages/db-core/src/schema/deck.d.ts +17 -0
- package/dist/packages/db-core/src/schema/payment.d.ts +37 -1
- package/dist/packages/email-core/src/templates/deleteAccountRequest.d.ts +8 -0
- package/dist/packages/email-core/src/templates/footer.d.ts +1 -1
- package/dist/packages/email-core/src/templates/index.d.ts +4 -0
- package/dist/packages/email-core/src/templates/paymentExpiryReminder.d.ts +9 -0
- package/dist/packages/shared/src/date/index.d.ts +1 -0
- package/dist/packages/shared/src/date/timezone.d.ts +29 -0
- package/dist/packages/shared/src/spaced-repetition/config.d.ts +20 -0
- package/dist/packages/shared/src/spaced-repetition/fsrs.d.ts +13 -0
- package/dist/packages/shared/src/spaced-repetition/index.d.ts +5 -0
- package/dist/packages/shared/src/spaced-repetition/retention.d.ts +2 -0
- package/dist/packages/shared/src/spaced-repetition/session-manager.d.ts +25 -0
- package/dist/packages/shared/src/spaced-repetition/utils.d.ts +26 -0
- package/dist/packages/shared/src/theme/tokens/border.d.ts +1 -1
- package/dist/packages/shared/src/theme/tokens/colors.d.ts +18 -18
- package/dist/packages/shared/src/types/deck.d.ts +10 -0
- package/dist/packages/shared/src/types/index.d.ts +1 -0
- package/dist/packages/shared/src/types/permissions.d.ts +2 -0
- package/dist/packages/shared/src/types/user.d.ts +20 -0
- package/dist/packages/shared/src/types/vesty.d.ts +7 -0
- package/dist/packages/utils/src/logger/index.d.ts +2 -1
- package/dist/packages/utils/src/logger/posthog.d.ts +20 -0
- package/package.json +1 -1
- package/dist/apps/server/src/modules/study/lib/constants.d.ts +0 -5
- package/dist/apps/server/src/modules/study/lib/fsrs.d.ts +0 -12
- package/dist/packages/db-core/src/views/deck.d.ts +0 -79
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { UserRole } from '@vestcards/shared';
|
|
2
2
|
import { type BetterAuthOptions } from 'better-auth';
|
|
3
|
+
import { mapAppleProfileToUser } from './profile';
|
|
3
4
|
export declare const auth: import("better-auth").Auth<{
|
|
4
|
-
plugins:
|
|
5
|
+
plugins: ({
|
|
5
6
|
id: "open-api";
|
|
7
|
+
version: string;
|
|
6
8
|
endpoints: {
|
|
7
9
|
generateOpenAPISchema: import("better-call").StrictEndpoint<"/open-api/generate-schema", {
|
|
8
10
|
method: "GET";
|
|
@@ -52,8 +54,9 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
52
54
|
}, Response>;
|
|
53
55
|
};
|
|
54
56
|
options: NoInfer<import("better-auth/plugins").OpenAPIOptions>;
|
|
55
|
-
}
|
|
57
|
+
} | {
|
|
56
58
|
id: "expo";
|
|
59
|
+
version: string;
|
|
57
60
|
init: (ctx: import("better-auth").AuthContext) => {
|
|
58
61
|
options: {
|
|
59
62
|
trustedOrigins: string[];
|
|
@@ -71,10 +74,10 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
71
74
|
endpoints: {
|
|
72
75
|
expoAuthorizationProxy: import("better-call").StrictEndpoint<"/expo-authorization-proxy", {
|
|
73
76
|
method: "GET";
|
|
74
|
-
query: import("
|
|
75
|
-
authorizationURL: import("
|
|
76
|
-
oauthState: import("
|
|
77
|
-
}, import("
|
|
77
|
+
query: import("zod").ZodObject<{
|
|
78
|
+
authorizationURL: import("zod").ZodString;
|
|
79
|
+
oauthState: import("zod").ZodOptional<import("zod").ZodString>;
|
|
80
|
+
}, import("zod/v4/core").$strip>;
|
|
78
81
|
metadata: {
|
|
79
82
|
readonly scope: "server";
|
|
80
83
|
};
|
|
@@ -94,8 +97,9 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
94
97
|
}>;
|
|
95
98
|
};
|
|
96
99
|
options: import("@better-auth/expo").ExpoOptions | undefined;
|
|
97
|
-
}
|
|
100
|
+
} | {
|
|
98
101
|
id: "bearer";
|
|
102
|
+
version: string;
|
|
99
103
|
hooks: {
|
|
100
104
|
before: {
|
|
101
105
|
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
@@ -111,8 +115,9 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
111
115
|
}[];
|
|
112
116
|
};
|
|
113
117
|
options: import("better-auth/plugins").BearerOptions | undefined;
|
|
114
|
-
}
|
|
118
|
+
} | {
|
|
115
119
|
id: "custom-session";
|
|
120
|
+
version: string;
|
|
116
121
|
hooks: {
|
|
117
122
|
after: {
|
|
118
123
|
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
@@ -147,10 +152,10 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
147
152
|
endpoints: {
|
|
148
153
|
getSession: import("better-call").StrictEndpoint<"/get-session", {
|
|
149
154
|
method: "GET";
|
|
150
|
-
query: import("
|
|
151
|
-
disableCookieCache: import("
|
|
152
|
-
disableRefresh: import("
|
|
153
|
-
}, import("
|
|
155
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
156
|
+
disableCookieCache: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<boolean, string>>]>>;
|
|
157
|
+
disableRefresh: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
158
|
+
}, import("zod/v4/core").$strip>>;
|
|
154
159
|
metadata: {
|
|
155
160
|
CUSTOM_SESSION: boolean;
|
|
156
161
|
openapi: {
|
|
@@ -230,11 +235,11 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
230
235
|
};
|
|
231
236
|
};
|
|
232
237
|
options: import("better-auth/plugins").CustomSessionPluginOptions | undefined;
|
|
233
|
-
}];
|
|
238
|
+
})[];
|
|
234
239
|
baseURL: string;
|
|
235
240
|
basePath: string;
|
|
236
241
|
database: (options: BetterAuthOptions) => import("better-auth").DBAdapter<BetterAuthOptions>;
|
|
237
|
-
secondaryStorage: import("better-auth").SecondaryStorage;
|
|
242
|
+
secondaryStorage: import("better-auth").SecondaryStorage | undefined;
|
|
238
243
|
emailAndPassword: {
|
|
239
244
|
enabled: true;
|
|
240
245
|
autoSignIn: true;
|
|
@@ -293,6 +298,8 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
293
298
|
apple: {
|
|
294
299
|
clientId: string;
|
|
295
300
|
clientSecret: string;
|
|
301
|
+
appBundleIdentifier: string;
|
|
302
|
+
mapProfileToUser: typeof mapAppleProfileToUser;
|
|
296
303
|
};
|
|
297
304
|
};
|
|
298
305
|
user: {
|
|
@@ -327,17 +334,38 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
327
334
|
image?: string | null | undefined;
|
|
328
335
|
} & Record<string, unknown>) => Promise<{
|
|
329
336
|
data: {
|
|
337
|
+
email: string;
|
|
330
338
|
entityId: string;
|
|
331
339
|
id: string;
|
|
332
340
|
createdAt: Date;
|
|
333
341
|
updatedAt: Date;
|
|
334
|
-
email: string;
|
|
335
342
|
emailVerified: boolean;
|
|
336
343
|
name: string;
|
|
337
344
|
image?: string | null | undefined;
|
|
338
345
|
};
|
|
339
346
|
}>;
|
|
340
347
|
};
|
|
348
|
+
update: {
|
|
349
|
+
before: (userData: Partial<{
|
|
350
|
+
id: string;
|
|
351
|
+
createdAt: Date;
|
|
352
|
+
updatedAt: Date;
|
|
353
|
+
email: string;
|
|
354
|
+
emailVerified: boolean;
|
|
355
|
+
name: string;
|
|
356
|
+
image?: string | null | undefined;
|
|
357
|
+
}> & Record<string, unknown>) => Promise<{
|
|
358
|
+
data: Partial<{
|
|
359
|
+
id: string;
|
|
360
|
+
createdAt: Date;
|
|
361
|
+
updatedAt: Date;
|
|
362
|
+
email: string;
|
|
363
|
+
emailVerified: boolean;
|
|
364
|
+
name: string;
|
|
365
|
+
image?: string | null | undefined;
|
|
366
|
+
}> & Record<string, unknown>;
|
|
367
|
+
}>;
|
|
368
|
+
};
|
|
341
369
|
};
|
|
342
370
|
session: {
|
|
343
371
|
create: {
|
|
@@ -366,14 +394,14 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
366
394
|
};
|
|
367
395
|
};
|
|
368
396
|
logger: {
|
|
369
|
-
log(level: "
|
|
397
|
+
log(level: "debug" | "info" | "warn" | "error", message: string, ...args: any[]): void;
|
|
370
398
|
};
|
|
371
399
|
advanced: {
|
|
372
400
|
useSecureCookies: boolean;
|
|
373
401
|
disableOriginCheck: true;
|
|
374
402
|
cookiePrefix: string;
|
|
375
403
|
defaultCookieAttributes: {
|
|
376
|
-
sameSite: "
|
|
404
|
+
sameSite: "none" | "lax";
|
|
377
405
|
secure: boolean;
|
|
378
406
|
};
|
|
379
407
|
database: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BetterAuthOptions } from 'better-auth';
|
|
2
|
+
export declare function generateAppleClientSecret(clientId: string, teamId: string, keyId: string, privateKey: string): Promise<string>;
|
|
2
3
|
export declare function assertCredentialAccount(userId: string): Promise<void>;
|
|
3
4
|
type SendVerificationEmail = NonNullable<BetterAuthOptions['emailVerification']>['sendVerificationEmail'];
|
|
4
5
|
export declare const sendVerificationEmail: SendVerificationEmail;
|
|
@@ -445,6 +445,95 @@ export declare const cardModule: Elysia<"/v1/card", {
|
|
|
445
445
|
};
|
|
446
446
|
};
|
|
447
447
|
};
|
|
448
|
+
} & {
|
|
449
|
+
v1: {
|
|
450
|
+
card: {
|
|
451
|
+
suspend: {
|
|
452
|
+
post: {
|
|
453
|
+
body: {
|
|
454
|
+
cardId: string;
|
|
455
|
+
};
|
|
456
|
+
params: {};
|
|
457
|
+
query: {};
|
|
458
|
+
headers: {};
|
|
459
|
+
response: {
|
|
460
|
+
200: {
|
|
461
|
+
success: boolean;
|
|
462
|
+
};
|
|
463
|
+
422: {
|
|
464
|
+
type: "validation";
|
|
465
|
+
on: string;
|
|
466
|
+
summary?: string;
|
|
467
|
+
message?: string;
|
|
468
|
+
found?: unknown;
|
|
469
|
+
property?: string;
|
|
470
|
+
expected?: string;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
} & {
|
|
478
|
+
v1: {
|
|
479
|
+
card: {
|
|
480
|
+
suspend: {
|
|
481
|
+
delete: {
|
|
482
|
+
body: {};
|
|
483
|
+
params: {};
|
|
484
|
+
query: {
|
|
485
|
+
cardId: string;
|
|
486
|
+
};
|
|
487
|
+
headers: {};
|
|
488
|
+
response: {
|
|
489
|
+
200: {
|
|
490
|
+
success: boolean;
|
|
491
|
+
};
|
|
492
|
+
422: {
|
|
493
|
+
type: "validation";
|
|
494
|
+
on: string;
|
|
495
|
+
summary?: string;
|
|
496
|
+
message?: string;
|
|
497
|
+
found?: unknown;
|
|
498
|
+
property?: string;
|
|
499
|
+
expected?: string;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
} & {
|
|
507
|
+
v1: {
|
|
508
|
+
card: {
|
|
509
|
+
"user-state": {
|
|
510
|
+
get: {
|
|
511
|
+
body: {};
|
|
512
|
+
params: {};
|
|
513
|
+
query: {
|
|
514
|
+
deckId: string;
|
|
515
|
+
};
|
|
516
|
+
headers: {};
|
|
517
|
+
response: {
|
|
518
|
+
200: {
|
|
519
|
+
cardId: string;
|
|
520
|
+
suspended: boolean;
|
|
521
|
+
toReview: boolean;
|
|
522
|
+
}[];
|
|
523
|
+
422: {
|
|
524
|
+
type: "validation";
|
|
525
|
+
on: string;
|
|
526
|
+
summary?: string;
|
|
527
|
+
message?: string;
|
|
528
|
+
found?: unknown;
|
|
529
|
+
property?: string;
|
|
530
|
+
expected?: string;
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
};
|
|
448
537
|
}, {
|
|
449
538
|
derive: {};
|
|
450
539
|
resolve: {};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare namespace CardModel {
|
|
2
|
+
/**
|
|
3
|
+
* Whether a card counts as "to review" in the deck view.
|
|
4
|
+
* Uses end-of-day cutoff to match StudyService.getReviewCards behaviour.
|
|
5
|
+
*/
|
|
6
|
+
function isCardToReview(state: string, suspended: boolean, due: Date | null, now?: Date): boolean;
|
|
2
7
|
const reportBody: import("@sinclair/typebox").TObject<{
|
|
3
8
|
cardId: import("@sinclair/typebox").TString;
|
|
4
9
|
content: import("@sinclair/typebox").TString;
|
|
@@ -9,4 +14,16 @@ export declare namespace CardModel {
|
|
|
9
14
|
cardId: import("@sinclair/typebox").TString;
|
|
10
15
|
}>;
|
|
11
16
|
type ReportQuery = typeof reportQuery.static;
|
|
17
|
+
const suspendBody: import("@sinclair/typebox").TObject<{
|
|
18
|
+
cardId: import("@sinclair/typebox").TString;
|
|
19
|
+
}>;
|
|
20
|
+
type SuspendBody = typeof suspendBody.static;
|
|
21
|
+
const suspendQuery: import("@sinclair/typebox").TObject<{
|
|
22
|
+
cardId: import("@sinclair/typebox").TString;
|
|
23
|
+
}>;
|
|
24
|
+
type SuspendQuery = typeof suspendQuery.static;
|
|
25
|
+
const userStateQuery: import("@sinclair/typebox").TObject<{
|
|
26
|
+
deckId: import("@sinclair/typebox").TString;
|
|
27
|
+
}>;
|
|
28
|
+
type UserStateQuery = typeof userStateQuery.static;
|
|
12
29
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { CardDemand } from '@vestcards/db-core';
|
|
2
|
-
import
|
|
2
|
+
import { CardModel } from './model';
|
|
3
3
|
export declare abstract class CardService {
|
|
4
4
|
static getReport(userId: string, cardId: string): Promise<CardDemand | null>;
|
|
5
|
+
static suspendCard(userId: string, cardId: string): Promise<boolean>;
|
|
6
|
+
static unsuspendCard(userId: string, cardId: string): Promise<boolean>;
|
|
7
|
+
static getUserState(userId: string, deckId: string): Promise<{
|
|
8
|
+
cardId: string;
|
|
9
|
+
suspended: boolean;
|
|
10
|
+
toReview: boolean;
|
|
11
|
+
}[]>;
|
|
5
12
|
static reportCard(userId: string, body: CardModel.ReportBody): Promise<void>;
|
|
6
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import Elysia from 'elysia';
|
|
2
|
+
export declare const cronModule: Elysia<"", {
|
|
3
|
+
decorator: {};
|
|
4
|
+
store: {
|
|
5
|
+
cron: Record<"expire-memberships", import("croner").Cron> & Record<"payment-expiry-reminder", import("croner").Cron>;
|
|
6
|
+
};
|
|
7
|
+
derive: {};
|
|
8
|
+
resolve: {};
|
|
9
|
+
}, {
|
|
10
|
+
typebox: {};
|
|
11
|
+
error: {};
|
|
12
|
+
} & {
|
|
13
|
+
typebox: {};
|
|
14
|
+
error: {};
|
|
15
|
+
}, {
|
|
16
|
+
schema: {};
|
|
17
|
+
standaloneSchema: {};
|
|
18
|
+
macro: {};
|
|
19
|
+
macroFn: {};
|
|
20
|
+
parser: {};
|
|
21
|
+
response: {};
|
|
22
|
+
} & {
|
|
23
|
+
schema: {};
|
|
24
|
+
standaloneSchema: {};
|
|
25
|
+
macro: {};
|
|
26
|
+
macroFn: {};
|
|
27
|
+
parser: {};
|
|
28
|
+
response: {};
|
|
29
|
+
}, {}, {
|
|
30
|
+
derive: {};
|
|
31
|
+
resolve: {};
|
|
32
|
+
schema: {};
|
|
33
|
+
standaloneSchema: {};
|
|
34
|
+
response: {};
|
|
35
|
+
} & {
|
|
36
|
+
derive: {};
|
|
37
|
+
resolve: {};
|
|
38
|
+
schema: {};
|
|
39
|
+
standaloneSchema: {};
|
|
40
|
+
response: {};
|
|
41
|
+
}, {
|
|
42
|
+
derive: {};
|
|
43
|
+
resolve: {};
|
|
44
|
+
schema: {};
|
|
45
|
+
standaloneSchema: {};
|
|
46
|
+
response: {};
|
|
47
|
+
} & {
|
|
48
|
+
derive: {};
|
|
49
|
+
resolve: {};
|
|
50
|
+
schema: {};
|
|
51
|
+
standaloneSchema: {};
|
|
52
|
+
response: {};
|
|
53
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function expireMemberships(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sendPaymentExpiryReminders(): Promise<void>;
|
|
@@ -417,6 +417,22 @@ export declare const deckModule: Elysia<"/v1/decks", {
|
|
|
417
417
|
};
|
|
418
418
|
};
|
|
419
419
|
};
|
|
420
|
+
} & {
|
|
421
|
+
v1: {
|
|
422
|
+
decks: {
|
|
423
|
+
recommended: {
|
|
424
|
+
get: {
|
|
425
|
+
body: {};
|
|
426
|
+
params: {};
|
|
427
|
+
query: {};
|
|
428
|
+
headers: {};
|
|
429
|
+
response: {
|
|
430
|
+
200: import("@vestcards/shared").IDeck[];
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
};
|
|
420
436
|
} & {
|
|
421
437
|
v1: {
|
|
422
438
|
decks: {
|
|
@@ -426,7 +442,9 @@ export declare const deckModule: Elysia<"/v1/decks", {
|
|
|
426
442
|
params: {
|
|
427
443
|
deckId: string;
|
|
428
444
|
};
|
|
429
|
-
query: {
|
|
445
|
+
query: {
|
|
446
|
+
preview?: boolean | undefined;
|
|
447
|
+
};
|
|
430
448
|
headers: {};
|
|
431
449
|
response: {
|
|
432
450
|
200: import("@vestcards/shared").IDeckDetail;
|
|
@@ -19,6 +19,10 @@ export declare namespace DeckModel {
|
|
|
19
19
|
deckId: import("@sinclair/typebox").TString;
|
|
20
20
|
}>;
|
|
21
21
|
type DeckIdParams = typeof deckIdParams.static;
|
|
22
|
+
const deckDetailQuery: import("@sinclair/typebox").TObject<{
|
|
23
|
+
preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
24
|
+
}>;
|
|
25
|
+
type DeckDetailQuery = typeof deckDetailQuery.static;
|
|
22
26
|
const topicSubjectParams: import("@sinclair/typebox").TObject<{
|
|
23
27
|
subject: import("@sinclair/typebox").TString;
|
|
24
28
|
}>;
|
|
@@ -3,6 +3,10 @@ import { type Paginated } from '../../utils/api';
|
|
|
3
3
|
import { DeckModel } from './model';
|
|
4
4
|
export declare abstract class DeckService {
|
|
5
5
|
static getAllDecks(filters: DeckModel.DeckListFilters, loggedUserId?: string): Promise<Paginated<IDeck>>;
|
|
6
|
-
static getDeck(deckId: string
|
|
6
|
+
static getDeck(deckId: string, options?: {
|
|
7
|
+
cardLimit?: number;
|
|
8
|
+
}): Promise<IDeckDetail>;
|
|
9
|
+
static getRecommendedDecks(_userId: string, canReadPremiumDecks: boolean): Promise<IDeck[]>;
|
|
10
|
+
private static mapDeckOwnerInfo;
|
|
7
11
|
static getOwnerInfoById(ownerId: string): Promise<IOwnerInfo>;
|
|
8
12
|
}
|