-
Notifications
You must be signed in to change notification settings - Fork 0
/
generated-types.ts
125 lines (116 loc) · 2.3 KB
/
generated-types.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
export interface Author {
id?: number;
documentId?: string;
createdAt?: Date | string;
updatedAt?: Date | string;
publishedAt?: Date | string;
locale?: string | null;
firstName: string;
middleName?: string;
lastName: string;
bio?: string;
image?: Media | null;
books?: Book[] | null;
};
export interface Book {
id?: number;
documentId?: string;
createdAt?: Date | string;
updatedAt?: Date | string;
publishedAt?: Date | string;
locale?: string | null;
title: string;
published: Date | string;
isbn?: string;
genre?: string;
price?: number;
quantity?: number;
description?: string;
cover?: Media | null;
authors?: Author[] | null;
reviews?: Review[] | null;
};
export interface Review {
id?: number;
documentId?: string;
createdAt?: Date | string;
updatedAt?: Date | string;
publishedAt?: Date | string;
locale?: string | null;
book?: Book | null;
rating?: number;
comment: string;
images?: Media[] | null;
user?: User | null;
};
export interface Media {
id: number;
name: string;
alternativeText: string;
caption: string;
width: number;
height: number;
formats: { thumbnail: MediaFormat; small: MediaFormat; medium: MediaFormat; large: MediaFormat; };
hash: string;
ext: string;
mime: string;
size: number;
url: string;
previewUrl: string;
provider: string;
createdAt: Date;
updatedAt: Date;
}
export interface MediaFormat {
name: string;
hash: string;
ext: string;
mime: string;
width: number;
height: number;
size: number;
path: string;
url: string;
}
export interface User {
id?: number;
username: string;
email: string;
provider?: string;
confirmed?: boolean;
blocked?: boolean;
createdAt?: Date | string;
updatedAt?: Date | string;
role: Role | null | number;
};
export interface Role {
id?: number;
documentId?: string;
createdAt?: Date | string;
updatedAt?: Date | string;
name: string;
description: string;
type: string;
};
export interface FindOne<T> {
data: T;
meta: {
pagination?: {
page: number;
pageSize: number;
pageCount: number;
total: number;
}
};
};
export interface FindMany<T> {
data: T[];
meta: {
pagination?: {
page: number;
pageSize: number;
pageCount: number;
total: number;
}
};
};