forked from ishiko732/ts-fsrs-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
92 lines (82 loc) · 1.59 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { Prisma } from "@prisma/client";
interface NodeData{
question:string;
answer:string;
extend:string;
source:string;
}
interface ProgeigoNodeData{
'🔒Row ID':string;
'$rowIndex':number;
'column1':string;
'分類':string;
'英単語':string;
'品詞':string;
'意味':string;
'例文':string;
'例文訳':string;
'解説':string;
'発音':string;
'ビデオ':string;
}
interface NoteFormData{
question: string;
answer: string;
extend: string;
}
export type FSRSPutParams={
uid: number;
request_retention: number;
maximum_interval: number;
w: number[];
enable_fuzz: boolean;
lapses: number;
card_limit: number;
lingq_token: string| null;
}
declare global {
namespace NodeJS {
interface ProcessEnv {
DATABASE_URL: string;
GITHUB_ID: string;
GITHUB_SECRET: string;
GITHUB_ADMIN_ID: string;
LINGQ_KEY: string;
CRON_SECRET: string;
}
}
}
type Required<T, K extends keyof T> = T & {
[key in K]-?: T[key];
};
export type CardUpdateRequired = Required<
Prisma.CardUncheckedUpdateInput,
| "due"
| "stability"
| "difficulty"
| "elapsed_days"
| "scheduled_days"
| "reps"
| "lapses"
| "state"
| "last_review"
| "suspended"
>;
export type RevlogUpdateRequired = Required<
Prisma.RevlogUncheckedUpdateInput,
| "grade"
| "state"
| "due"
| "stability"
| "difficulty"
| "elapsed_days"
| "last_elapsed_days"
| "scheduled_days"
| "review"
| "duration"
>;
export type CardUpdatePayload = CardUpdateRequired &{
logs:{
create:RevlogUpdateRequired
}
}