forked from likecoin/3ook-com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbookstore.d.ts
More file actions
157 lines (146 loc) · 3.24 KB
/
Copy pathbookstore.d.ts
File metadata and controls
157 lines (146 loc) · 3.24 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
export interface BookstoreCMSProduct {
id: string
classId?: string
classIds?: string[]
title?: string
titles?: string[]
imageUrl?: string
imageUrls?: string[]
locales?: string[]
isDRMFree: boolean
isAdultOnly?: boolean
isMultiple?: boolean
minPrice?: number
timestamp?: number
totalStaked?: bigint
stakerCount?: number
}
export interface FetchBookstoreCMSProductsResponseData {
records: Array<BookstoreCMSProduct>
offset?: string
hasMore?: boolean
}
export interface BookstoreCMSTag {
id: string
name: {
zh: string
en: string
}
description: {
zh: string
en: string
}
isPublic: boolean
}
export interface FetchBookstoreCMSTagsResponseData {
records: Array<BookstoreCMSTag>
offset?: string
}
export interface BookListItem {
nftClassId: string
priceIndex: number
timestamp?: number
}
declare global {
interface BookstoreItem {
totalStaked?: bigint
stakerCount?: number
likeRank?: number
id?: string
classId?: string
classIds?: string[]
title?: string
titles?: string[]
imageUrl?: string
imageUrls?: string[]
locales?: string[]
isDRMFree?: boolean
isAdultOnly?: boolean
isMultiple?: boolean
minPrice?: number
timestamp?: number
}
interface BookstoreItemList {
items: BookstoreItem[]
isFetchingItems: boolean
hasFetchedItems: boolean
nextItemsKey: number | string | undefined
mayHaveMore?: boolean
}
// Per-currency price overrides from the API, in that currency's minor units
// (e.g. cents). A missing currency falls back to ladder conversion.
interface BookPriceInDecimalByCurrency {
hkd?: number
twd?: number
}
interface BookstorePrice {
index: number
price: number
priceInDecimalByCurrency?: BookPriceInDecimalByCurrency
name: {
en: string
zh: string
} | string
description: {
en: string
zh: string
} | string
stock: number
isSoldOut: boolean
isAutoDeliver: boolean
isUnlisted: boolean
autoMemo: string
isAllowCustomPrice: boolean
isTippingEnabled: boolean
order: number
}
interface BookstoreInfo {
id: string
classId: string
evmClassId?: string
redirectClassId?: string
prices: BookstorePrice[]
inLanguage: string
isSoldOut: boolean
stock: number
ownerWallet: string
mustClaimToView: boolean
isHidden: boolean
isApprovedForSale: boolean
isApprovedForIndexing: boolean
isApprovedForAds: boolean
isAdultOnly?: boolean
hideDownload: boolean
hideAudio: boolean
hideUpsell: boolean
enableCustomMessagePage: boolean
name: string
description: string
descriptionFull?: string
descriptionSummary?: string
reviewTitle?: string
reviewURL?: string
author: {
name: string
description: string
}
genre?: string
keywords: string[]
thumbnailUrl: string
usageInfo: string
tableOfContents?: string
previewContent?: string
recommendedClassIds?: string[]
promotionalImages?: string[]
promotionalVideos?: string[]
plusPromoEnabled?: boolean
timestamp: number
}
interface CartItem {
nftClassId: string
priceIndex: number
customPrice?: number
quantity?: number
}
}
export {}