@medialane/ui 0.221.0 → 0.222.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.
@@ -1,13 +1,180 @@
1
1
  import * as swr from 'swr';
2
2
  import * as _medialane_sdk from '@medialane/sdk';
3
- import { ApiToken, ApiResponse } from '@medialane/sdk';
3
+ import { ApiResponse } from '@medialane/sdk';
4
+ import * as zod from 'zod';
4
5
 
5
6
  declare function useTokensByIpType(ipTypeSlug: string | null, page?: number, limit?: number): {
6
- tokens: ApiToken[];
7
+ tokens: {
8
+ chain: string;
9
+ tokenId: string;
10
+ owner: string | null;
11
+ tokenUri: string | null;
12
+ contractAddress: string;
13
+ id: string;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
17
+ standard: "ERC721" | "ERC1155" | null;
18
+ metadata: {
19
+ name: string | null;
20
+ description: string | null;
21
+ image: string | null;
22
+ author: string | null;
23
+ animationUrl: string | null;
24
+ attributes: zod.objectOutputType<{
25
+ trait_type: zod.ZodString;
26
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
27
+ display_type: zod.ZodOptional<zod.ZodString>;
28
+ }, zod.ZodTypeAny, "passthrough">[] | null;
29
+ ipType: string | null;
30
+ licenseType: string | null;
31
+ commercialUse: boolean | null;
32
+ };
33
+ balances: {
34
+ amount: string;
35
+ owner: string;
36
+ }[] | null;
37
+ activeOrders: {
38
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
39
+ chain: string;
40
+ offerer: string;
41
+ nftContract: string | null;
42
+ price: {
43
+ currency: string | null;
44
+ raw: string | null;
45
+ formatted: string | null;
46
+ decimals: number;
47
+ };
48
+ endTime: string;
49
+ fulfiller: string | null;
50
+ orderHash: string;
51
+ startTime: string;
52
+ txHash: {
53
+ created: string | null;
54
+ fulfilled: string | null;
55
+ cancelled: string | null;
56
+ };
57
+ token: {
58
+ name: string | null;
59
+ description: string | null;
60
+ image: string | null;
61
+ animationUrl: string | null;
62
+ } | null;
63
+ offer: {
64
+ token: string;
65
+ itemType: string;
66
+ identifier: string;
67
+ startAmount: string;
68
+ endAmount: string;
69
+ };
70
+ id: string;
71
+ consideration: {
72
+ recipient: string;
73
+ token: string;
74
+ itemType: string;
75
+ identifier: string;
76
+ startAmount: string;
77
+ endAmount: string;
78
+ };
79
+ nftTokenId: string | null;
80
+ createdBlockNumber: string;
81
+ remainingAmount: string | null;
82
+ createdAt: string;
83
+ updatedAt: string;
84
+ parentOrderHash?: string | null | undefined;
85
+ counterOfferMessage?: string | null | undefined;
86
+ hasActiveCounterOffer?: boolean | undefined;
87
+ }[];
88
+ holderCount?: number | undefined;
89
+ supply?: string | undefined;
90
+ }[];
7
91
  meta: _medialane_sdk.ApiMeta | undefined;
8
92
  isLoading: boolean;
9
93
  error: any;
10
- mutate: swr.KeyedMutator<ApiResponse<ApiToken[]>>;
94
+ mutate: swr.KeyedMutator<ApiResponse<{
95
+ chain: string;
96
+ tokenId: string;
97
+ owner: string | null;
98
+ tokenUri: string | null;
99
+ contractAddress: string;
100
+ id: string;
101
+ createdAt: string;
102
+ updatedAt: string;
103
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
104
+ standard: "ERC721" | "ERC1155" | null;
105
+ metadata: {
106
+ name: string | null;
107
+ description: string | null;
108
+ image: string | null;
109
+ author: string | null;
110
+ animationUrl: string | null;
111
+ attributes: zod.objectOutputType<{
112
+ trait_type: zod.ZodString;
113
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
114
+ display_type: zod.ZodOptional<zod.ZodString>;
115
+ }, zod.ZodTypeAny, "passthrough">[] | null;
116
+ ipType: string | null;
117
+ licenseType: string | null;
118
+ commercialUse: boolean | null;
119
+ };
120
+ balances: {
121
+ amount: string;
122
+ owner: string;
123
+ }[] | null;
124
+ activeOrders: {
125
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
126
+ chain: string;
127
+ offerer: string;
128
+ nftContract: string | null;
129
+ price: {
130
+ currency: string | null;
131
+ raw: string | null;
132
+ formatted: string | null;
133
+ decimals: number;
134
+ };
135
+ endTime: string;
136
+ fulfiller: string | null;
137
+ orderHash: string;
138
+ startTime: string;
139
+ txHash: {
140
+ created: string | null;
141
+ fulfilled: string | null;
142
+ cancelled: string | null;
143
+ };
144
+ token: {
145
+ name: string | null;
146
+ description: string | null;
147
+ image: string | null;
148
+ animationUrl: string | null;
149
+ } | null;
150
+ offer: {
151
+ token: string;
152
+ itemType: string;
153
+ identifier: string;
154
+ startAmount: string;
155
+ endAmount: string;
156
+ };
157
+ id: string;
158
+ consideration: {
159
+ recipient: string;
160
+ token: string;
161
+ itemType: string;
162
+ identifier: string;
163
+ startAmount: string;
164
+ endAmount: string;
165
+ };
166
+ nftTokenId: string | null;
167
+ createdBlockNumber: string;
168
+ remainingAmount: string | null;
169
+ createdAt: string;
170
+ updatedAt: string;
171
+ parentOrderHash?: string | null | undefined;
172
+ counterOfferMessage?: string | null | undefined;
173
+ hasActiveCounterOffer?: boolean | undefined;
174
+ }[];
175
+ holderCount?: number | undefined;
176
+ supply?: string | undefined;
177
+ }[]>>;
11
178
  };
12
179
 
13
180
  export { useTokensByIpType };
@@ -1,24 +1,356 @@
1
1
  import * as _medialane_sdk from '@medialane/sdk';
2
- import { ApiToken } from '@medialane/sdk';
3
2
  import * as swr from 'swr';
3
+ import * as zod from 'zod';
4
4
 
5
5
  declare function useToken(contract: string | null, tokenId: string | null): {
6
- token: ApiToken | null;
6
+ token: {
7
+ chain: string;
8
+ tokenId: string;
9
+ owner: string | null;
10
+ tokenUri: string | null;
11
+ contractAddress: string;
12
+ id: string;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
16
+ standard: "ERC721" | "ERC1155" | null;
17
+ metadata: {
18
+ name: string | null;
19
+ description: string | null;
20
+ image: string | null;
21
+ author: string | null;
22
+ animationUrl: string | null;
23
+ attributes: zod.objectOutputType<{
24
+ trait_type: zod.ZodString;
25
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
26
+ display_type: zod.ZodOptional<zod.ZodString>;
27
+ }, zod.ZodTypeAny, "passthrough">[] | null;
28
+ ipType: string | null;
29
+ licenseType: string | null;
30
+ commercialUse: boolean | null;
31
+ };
32
+ balances: {
33
+ amount: string;
34
+ owner: string;
35
+ }[] | null;
36
+ activeOrders: {
37
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
38
+ chain: string;
39
+ offerer: string;
40
+ nftContract: string | null;
41
+ price: {
42
+ currency: string | null;
43
+ raw: string | null;
44
+ formatted: string | null;
45
+ decimals: number;
46
+ };
47
+ endTime: string;
48
+ fulfiller: string | null;
49
+ orderHash: string;
50
+ startTime: string;
51
+ txHash: {
52
+ created: string | null;
53
+ fulfilled: string | null;
54
+ cancelled: string | null;
55
+ };
56
+ token: {
57
+ name: string | null;
58
+ description: string | null;
59
+ image: string | null;
60
+ animationUrl: string | null;
61
+ } | null;
62
+ offer: {
63
+ token: string;
64
+ itemType: string;
65
+ identifier: string;
66
+ startAmount: string;
67
+ endAmount: string;
68
+ };
69
+ id: string;
70
+ consideration: {
71
+ recipient: string;
72
+ token: string;
73
+ itemType: string;
74
+ identifier: string;
75
+ startAmount: string;
76
+ endAmount: string;
77
+ };
78
+ nftTokenId: string | null;
79
+ createdBlockNumber: string;
80
+ remainingAmount: string | null;
81
+ createdAt: string;
82
+ updatedAt: string;
83
+ parentOrderHash?: string | null | undefined;
84
+ counterOfferMessage?: string | null | undefined;
85
+ hasActiveCounterOffer?: boolean | undefined;
86
+ }[];
87
+ holderCount?: number | undefined;
88
+ supply?: string | undefined;
89
+ } | null;
7
90
  isLoading: boolean;
8
91
  isIndexing: boolean;
9
92
  error: any;
10
- mutate: swr.KeyedMutator<ApiToken>;
93
+ mutate: swr.KeyedMutator<{
94
+ chain: string;
95
+ tokenId: string;
96
+ owner: string | null;
97
+ tokenUri: string | null;
98
+ contractAddress: string;
99
+ id: string;
100
+ createdAt: string;
101
+ updatedAt: string;
102
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
103
+ standard: "ERC721" | "ERC1155" | null;
104
+ metadata: {
105
+ name: string | null;
106
+ description: string | null;
107
+ image: string | null;
108
+ author: string | null;
109
+ animationUrl: string | null;
110
+ attributes: zod.objectOutputType<{
111
+ trait_type: zod.ZodString;
112
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
113
+ display_type: zod.ZodOptional<zod.ZodString>;
114
+ }, zod.ZodTypeAny, "passthrough">[] | null;
115
+ ipType: string | null;
116
+ licenseType: string | null;
117
+ commercialUse: boolean | null;
118
+ };
119
+ balances: {
120
+ amount: string;
121
+ owner: string;
122
+ }[] | null;
123
+ activeOrders: {
124
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
125
+ chain: string;
126
+ offerer: string;
127
+ nftContract: string | null;
128
+ price: {
129
+ currency: string | null;
130
+ raw: string | null;
131
+ formatted: string | null;
132
+ decimals: number;
133
+ };
134
+ endTime: string;
135
+ fulfiller: string | null;
136
+ orderHash: string;
137
+ startTime: string;
138
+ txHash: {
139
+ created: string | null;
140
+ fulfilled: string | null;
141
+ cancelled: string | null;
142
+ };
143
+ token: {
144
+ name: string | null;
145
+ description: string | null;
146
+ image: string | null;
147
+ animationUrl: string | null;
148
+ } | null;
149
+ offer: {
150
+ token: string;
151
+ itemType: string;
152
+ identifier: string;
153
+ startAmount: string;
154
+ endAmount: string;
155
+ };
156
+ id: string;
157
+ consideration: {
158
+ recipient: string;
159
+ token: string;
160
+ itemType: string;
161
+ identifier: string;
162
+ startAmount: string;
163
+ endAmount: string;
164
+ };
165
+ nftTokenId: string | null;
166
+ createdBlockNumber: string;
167
+ remainingAmount: string | null;
168
+ createdAt: string;
169
+ updatedAt: string;
170
+ parentOrderHash?: string | null | undefined;
171
+ counterOfferMessage?: string | null | undefined;
172
+ hasActiveCounterOffer?: boolean | undefined;
173
+ }[];
174
+ holderCount?: number | undefined;
175
+ supply?: string | undefined;
176
+ }>;
11
177
  };
12
178
  declare function useTokenBalance(contract: string | null, tokenId: string | null, owner: string | null | undefined): {
13
179
  amount: string | null;
14
180
  mutate: swr.KeyedMutator<_medialane_sdk.ApiTokenBalance>;
15
181
  };
16
182
  declare function useTokensByOwner(address: string | null, page?: number, limit?: number, refreshMs?: number): {
17
- tokens: ApiToken[];
183
+ tokens: {
184
+ chain: string;
185
+ tokenId: string;
186
+ owner: string | null;
187
+ tokenUri: string | null;
188
+ contractAddress: string;
189
+ id: string;
190
+ createdAt: string;
191
+ updatedAt: string;
192
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
193
+ standard: "ERC721" | "ERC1155" | null;
194
+ metadata: {
195
+ name: string | null;
196
+ description: string | null;
197
+ image: string | null;
198
+ author: string | null;
199
+ animationUrl: string | null;
200
+ attributes: zod.objectOutputType<{
201
+ trait_type: zod.ZodString;
202
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
203
+ display_type: zod.ZodOptional<zod.ZodString>;
204
+ }, zod.ZodTypeAny, "passthrough">[] | null;
205
+ ipType: string | null;
206
+ licenseType: string | null;
207
+ commercialUse: boolean | null;
208
+ };
209
+ balances: {
210
+ amount: string;
211
+ owner: string;
212
+ }[] | null;
213
+ activeOrders: {
214
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
215
+ chain: string;
216
+ offerer: string;
217
+ nftContract: string | null;
218
+ price: {
219
+ currency: string | null;
220
+ raw: string | null;
221
+ formatted: string | null;
222
+ decimals: number;
223
+ };
224
+ endTime: string;
225
+ fulfiller: string | null;
226
+ orderHash: string;
227
+ startTime: string;
228
+ txHash: {
229
+ created: string | null;
230
+ fulfilled: string | null;
231
+ cancelled: string | null;
232
+ };
233
+ token: {
234
+ name: string | null;
235
+ description: string | null;
236
+ image: string | null;
237
+ animationUrl: string | null;
238
+ } | null;
239
+ offer: {
240
+ token: string;
241
+ itemType: string;
242
+ identifier: string;
243
+ startAmount: string;
244
+ endAmount: string;
245
+ };
246
+ id: string;
247
+ consideration: {
248
+ recipient: string;
249
+ token: string;
250
+ itemType: string;
251
+ identifier: string;
252
+ startAmount: string;
253
+ endAmount: string;
254
+ };
255
+ nftTokenId: string | null;
256
+ createdBlockNumber: string;
257
+ remainingAmount: string | null;
258
+ createdAt: string;
259
+ updatedAt: string;
260
+ parentOrderHash?: string | null | undefined;
261
+ counterOfferMessage?: string | null | undefined;
262
+ hasActiveCounterOffer?: boolean | undefined;
263
+ }[];
264
+ holderCount?: number | undefined;
265
+ supply?: string | undefined;
266
+ }[];
18
267
  meta: _medialane_sdk.ApiMeta | undefined;
19
268
  isLoading: boolean;
20
269
  error: any;
21
- mutate: swr.KeyedMutator<_medialane_sdk.ApiResponse<ApiToken[]>>;
270
+ mutate: swr.KeyedMutator<_medialane_sdk.ApiResponse<{
271
+ chain: string;
272
+ tokenId: string;
273
+ owner: string | null;
274
+ tokenUri: string | null;
275
+ contractAddress: string;
276
+ id: string;
277
+ createdAt: string;
278
+ updatedAt: string;
279
+ metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
280
+ standard: "ERC721" | "ERC1155" | null;
281
+ metadata: {
282
+ name: string | null;
283
+ description: string | null;
284
+ image: string | null;
285
+ author: string | null;
286
+ animationUrl: string | null;
287
+ attributes: zod.objectOutputType<{
288
+ trait_type: zod.ZodString;
289
+ value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
290
+ display_type: zod.ZodOptional<zod.ZodString>;
291
+ }, zod.ZodTypeAny, "passthrough">[] | null;
292
+ ipType: string | null;
293
+ licenseType: string | null;
294
+ commercialUse: boolean | null;
295
+ };
296
+ balances: {
297
+ amount: string;
298
+ owner: string;
299
+ }[] | null;
300
+ activeOrders: {
301
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
302
+ chain: string;
303
+ offerer: string;
304
+ nftContract: string | null;
305
+ price: {
306
+ currency: string | null;
307
+ raw: string | null;
308
+ formatted: string | null;
309
+ decimals: number;
310
+ };
311
+ endTime: string;
312
+ fulfiller: string | null;
313
+ orderHash: string;
314
+ startTime: string;
315
+ txHash: {
316
+ created: string | null;
317
+ fulfilled: string | null;
318
+ cancelled: string | null;
319
+ };
320
+ token: {
321
+ name: string | null;
322
+ description: string | null;
323
+ image: string | null;
324
+ animationUrl: string | null;
325
+ } | null;
326
+ offer: {
327
+ token: string;
328
+ itemType: string;
329
+ identifier: string;
330
+ startAmount: string;
331
+ endAmount: string;
332
+ };
333
+ id: string;
334
+ consideration: {
335
+ recipient: string;
336
+ token: string;
337
+ itemType: string;
338
+ identifier: string;
339
+ startAmount: string;
340
+ endAmount: string;
341
+ };
342
+ nftTokenId: string | null;
343
+ createdBlockNumber: string;
344
+ remainingAmount: string | null;
345
+ createdAt: string;
346
+ updatedAt: string;
347
+ parentOrderHash?: string | null | undefined;
348
+ counterOfferMessage?: string | null | undefined;
349
+ hasActiveCounterOffer?: boolean | undefined;
350
+ }[];
351
+ holderCount?: number | undefined;
352
+ supply?: string | undefined;
353
+ }[]>>;
22
354
  };
23
355
  declare function useTokenHistory(contract: string | null, tokenId: string | null): {
24
356
  history: _medialane_sdk.ApiActivity[];