@behindthemusictree/app-kit 0.0.0-stage → 24.0.1

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.
Files changed (69) hide show
  1. package/LICENSE +15 -0
  2. package/dist/app-error-B8IoFBhD.d.ts +45 -0
  3. package/dist/app-error-codes-D5eYg7xR.d.ts +49 -0
  4. package/dist/auth/index.cjs +479 -0
  5. package/dist/auth/index.cjs.map +1 -0
  6. package/dist/auth/index.d.ts +83 -0
  7. package/dist/auth/index.js +36 -0
  8. package/dist/auth/index.js.map +1 -0
  9. package/dist/chunk-4MEK3CNF.js +246 -0
  10. package/dist/chunk-4MEK3CNF.js.map +1 -0
  11. package/dist/chunk-5NTNMBJP.js +25 -0
  12. package/dist/chunk-5NTNMBJP.js.map +1 -0
  13. package/dist/chunk-5YLNSX34.js +211 -0
  14. package/dist/chunk-5YLNSX34.js.map +1 -0
  15. package/dist/chunk-7EOS2K24.js +267 -0
  16. package/dist/chunk-7EOS2K24.js.map +1 -0
  17. package/dist/chunk-FYOLIMWU.js +25 -0
  18. package/dist/chunk-FYOLIMWU.js.map +1 -0
  19. package/dist/chunk-JMFEWI53.js +10 -0
  20. package/dist/chunk-JMFEWI53.js.map +1 -0
  21. package/dist/chunk-OGTDTTHJ.js +244 -0
  22. package/dist/chunk-OGTDTTHJ.js.map +1 -0
  23. package/dist/chunk-OIZPAN6I.js +356 -0
  24. package/dist/chunk-OIZPAN6I.js.map +1 -0
  25. package/dist/chunk-T5D5T52J.js +271 -0
  26. package/dist/chunk-T5D5T52J.js.map +1 -0
  27. package/dist/chunk-TCXWV62L.js +1 -0
  28. package/dist/chunk-TCXWV62L.js.map +1 -0
  29. package/dist/chunk-Y52MKNHR.js +1461 -0
  30. package/dist/chunk-Y52MKNHR.js.map +1 -0
  31. package/dist/genre-tree/index.cjs +2133 -0
  32. package/dist/genre-tree/index.cjs.map +1 -0
  33. package/dist/genre-tree/index.d.ts +3031 -0
  34. package/dist/genre-tree/index.js +179 -0
  35. package/dist/genre-tree/index.js.map +1 -0
  36. package/dist/genre-tree/testing.cjs +55 -0
  37. package/dist/genre-tree/testing.cjs.map +1 -0
  38. package/dist/genre-tree/testing.d.ts +7 -0
  39. package/dist/genre-tree/testing.js +27 -0
  40. package/dist/genre-tree/testing.js.map +1 -0
  41. package/dist/ids-D8XCErUS.d.ts +8 -0
  42. package/dist/index.cjs +3194 -0
  43. package/dist/index.cjs.map +1 -0
  44. package/dist/index.d.ts +13 -0
  45. package/dist/index.js +308 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/player/index.cjs +388 -0
  48. package/dist/player/index.cjs.map +1 -0
  49. package/dist/player/index.d.ts +108 -0
  50. package/dist/player/index.js +20 -0
  51. package/dist/player/index.js.map +1 -0
  52. package/dist/popup/index.cjs +403 -0
  53. package/dist/popup/index.cjs.map +1 -0
  54. package/dist/popup/index.d.ts +80 -0
  55. package/dist/popup/index.js +16 -0
  56. package/dist/popup/index.js.map +1 -0
  57. package/dist/scope-BoMVOHmz.d.ts +4 -0
  58. package/dist/track-noun/index.cjs +53 -0
  59. package/dist/track-noun/index.cjs.map +1 -0
  60. package/dist/track-noun/index.d.ts +15 -0
  61. package/dist/track-noun/index.js +11 -0
  62. package/dist/track-noun/index.js.map +1 -0
  63. package/dist/transport/index.cjs +773 -0
  64. package/dist/transport/index.cjs.map +1 -0
  65. package/dist/transport/index.d.ts +203 -0
  66. package/dist/transport/index.js +69 -0
  67. package/dist/transport/index.js.map +1 -0
  68. package/package.json +97 -4
  69. package/README.md +0 -3
@@ -0,0 +1,3031 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { InfiniteData } from '@tanstack/react-query';
3
+ import * as zod from 'zod';
4
+ import { z } from 'zod';
5
+ import { S as Scope } from '../scope-BoMVOHmz.js';
6
+ import { b as GenreUuid, G as GenrePlaylistUuid } from '../ids-D8XCErUS.js';
7
+ export { a as GenrePlaylistUuidSchema, c as GenreUuidSchema } from '../ids-D8XCErUS.js';
8
+ import * as react from 'react';
9
+ import { ReactNode } from 'react';
10
+
11
+ declare const CriteriaDetailedSchema: z.ZodObject<{
12
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
13
+ name: z.ZodString;
14
+ summary: z.ZodNullable<z.ZodString>;
15
+ parent: z.ZodNullable<z.ZodObject<{
16
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
17
+ name: z.ZodString;
18
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
19
+ pop: "pop";
20
+ core: "core";
21
+ }>>>;
22
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ }, z.core.$strip>>;
24
+ ascendants: z.ZodArray<z.ZodObject<{
25
+ ascendant: z.ZodObject<{
26
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
27
+ name: z.ZodString;
28
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
29
+ pop: "pop";
30
+ core: "core";
31
+ }>>>;
32
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ }, z.core.$strip>;
34
+ degree: z.ZodNumber;
35
+ }, z.core.$strip>>;
36
+ descendants: z.ZodArray<z.ZodObject<{
37
+ descendant: z.ZodObject<{
38
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
39
+ name: z.ZodString;
40
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
41
+ pop: "pop";
42
+ core: "core";
43
+ }>>>;
44
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ }, z.core.$strip>;
46
+ degree: z.ZodNumber;
47
+ }, z.core.$strip>>;
48
+ root: z.ZodObject<{
49
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
50
+ name: z.ZodString;
51
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
52
+ pop: "pop";
53
+ core: "core";
54
+ }>>>;
55
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ }, z.core.$strip>;
57
+ children: z.ZodArray<z.ZodObject<{
58
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
59
+ name: z.ZodString;
60
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
61
+ pop: "pop";
62
+ core: "core";
63
+ }>>>;
64
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ }, z.core.$strip>>;
66
+ criteriaPlaylist: z.ZodObject<{
67
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
68
+ name: z.ZodString;
69
+ }, z.core.$strip>;
70
+ tracks: z.ZodArray<z.ZodObject<{
71
+ title: z.ZodString;
72
+ uuid: z.ZodString;
73
+ artists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
74
+ uuid: z.ZodString;
75
+ name: z.ZodString;
76
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
77
+ }, z.core.$strip>>>>;
78
+ }, z.core.$strip>>;
79
+ essentialSongs: z.ZodArray<z.ZodObject<{
80
+ title: z.ZodString;
81
+ uuid: z.ZodString;
82
+ artists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
83
+ uuid: z.ZodString;
84
+ name: z.ZodString;
85
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
86
+ }, z.core.$strip>>>>;
87
+ }, z.core.$strip>>;
88
+ tracksCount: z.ZodNumber;
89
+ updatedOn: z.ZodNullable<z.ZodString>;
90
+ }, z.core.$strip>;
91
+ type CriteriaDetailed = z.infer<typeof CriteriaDetailedSchema>;
92
+
93
+ declare const CriteriaOverviewSchema: z.ZodObject<{
94
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
95
+ name: z.ZodString;
96
+ summary: z.ZodNullable<z.ZodString>;
97
+ description: z.ZodNullable<z.ZodString>;
98
+ summarySourceUrl: z.ZodNullable<z.ZodURL>;
99
+ essentialSongs: z.ZodOptional<z.ZodArray<z.ZodObject<{
100
+ title: z.ZodString;
101
+ uuid: z.ZodString;
102
+ artists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
103
+ uuid: z.ZodString;
104
+ name: z.ZodString;
105
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
106
+ }, z.core.$strip>>>>;
107
+ }, z.core.$strip>>>;
108
+ }, z.core.$strip>;
109
+ type CriteriaOverview = z.infer<typeof CriteriaOverviewSchema>;
110
+
111
+ declare function useListGenres(page: number | undefined, pageSize: number | string | undefined, scope: Scope, getBackendBaseUrl: () => string): _tanstack_react_query.UseQueryResult<NoInfer<{
112
+ overallTotal: number;
113
+ next: string | null;
114
+ previous: string | null;
115
+ results: {
116
+ uuid: string & z.core.$brand<"GenreUuid">;
117
+ name: string;
118
+ parent: {
119
+ uuid: string & z.core.$brand<"GenreUuid">;
120
+ name: string;
121
+ side?: "pop" | "core" | null | undefined;
122
+ wikidataId?: string | null | undefined;
123
+ } | null;
124
+ createdOn: string;
125
+ summary: string | null;
126
+ }[];
127
+ page: number;
128
+ pageSize: number;
129
+ totalPages: number;
130
+ }>, Error>;
131
+ declare function useFetchGenre(scope: Scope, getBackendBaseUrl: () => string): (id: GenreUuid) => Promise<CriteriaDetailed>;
132
+ declare function useFetchGenreDetail<D extends CriteriaDetailed = CriteriaDetailed>(id: GenreUuid | null, scope: Scope, getBackendBaseUrl: () => string, schema?: z.ZodType<D, unknown>): _tanstack_react_query.UseQueryResult<NoInfer<D>, Error>;
133
+ declare function useFetchGenreOverview<O extends CriteriaOverview = CriteriaOverview>(id: GenreUuid | null, scope: Scope, getBackendBaseUrl: () => string, schema?: z.ZodType<O, unknown>): _tanstack_react_query.UseQueryResult<NoInfer<O>, Error>;
134
+ declare function usePrefetchGenreOverview<O extends CriteriaOverview = CriteriaOverview>(scope: Scope, getBackendBaseUrl: () => string, schema?: z.ZodType<O, unknown>): (id: GenreUuid) => Promise<void>;
135
+ declare function useCreateGenre(scope: Scope, getBackendBaseUrl: () => string): {
136
+ formErrors: {
137
+ field: string;
138
+ message: string;
139
+ }[];
140
+ data: undefined;
141
+ variables: undefined;
142
+ error: null;
143
+ isError: false;
144
+ isIdle: true;
145
+ isPending: false;
146
+ isSuccess: false;
147
+ status: "idle";
148
+ mutate: _tanstack_react_query.UseMutateFunction<{
149
+ uuid: string & z.core.$brand<"GenreUuid">;
150
+ name: string;
151
+ summary: string | null;
152
+ parent: {
153
+ uuid: string & z.core.$brand<"GenreUuid">;
154
+ name: string;
155
+ side?: "pop" | "core" | null | undefined;
156
+ wikidataId?: string | null | undefined;
157
+ } | null;
158
+ ascendants: {
159
+ ascendant: {
160
+ uuid: string & z.core.$brand<"GenreUuid">;
161
+ name: string;
162
+ side?: "pop" | "core" | null | undefined;
163
+ wikidataId?: string | null | undefined;
164
+ };
165
+ degree: number;
166
+ }[];
167
+ descendants: {
168
+ descendant: {
169
+ uuid: string & z.core.$brand<"GenreUuid">;
170
+ name: string;
171
+ side?: "pop" | "core" | null | undefined;
172
+ wikidataId?: string | null | undefined;
173
+ };
174
+ degree: number;
175
+ }[];
176
+ root: {
177
+ uuid: string & z.core.$brand<"GenreUuid">;
178
+ name: string;
179
+ side?: "pop" | "core" | null | undefined;
180
+ wikidataId?: string | null | undefined;
181
+ };
182
+ children: {
183
+ uuid: string & z.core.$brand<"GenreUuid">;
184
+ name: string;
185
+ side?: "pop" | "core" | null | undefined;
186
+ wikidataId?: string | null | undefined;
187
+ }[];
188
+ criteriaPlaylist: {
189
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
190
+ name: string;
191
+ };
192
+ tracks: {
193
+ title: string;
194
+ uuid: string;
195
+ artists?: {
196
+ uuid: string;
197
+ name: string;
198
+ isSpecialPurpose?: boolean | undefined;
199
+ }[] | null | undefined;
200
+ }[];
201
+ essentialSongs: {
202
+ title: string;
203
+ uuid: string;
204
+ artists?: {
205
+ uuid: string;
206
+ name: string;
207
+ isSpecialPurpose?: boolean | undefined;
208
+ }[] | null | undefined;
209
+ }[];
210
+ tracksCount: number;
211
+ updatedOn: string | null;
212
+ }, Error, {
213
+ name: string;
214
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
215
+ essentialSongs?: string[] | undefined;
216
+ }, unknown>;
217
+ reset: () => void;
218
+ context: unknown;
219
+ failureCount: number;
220
+ failureReason: Error | null;
221
+ isPaused: boolean;
222
+ submittedAt: number;
223
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
224
+ uuid: string & z.core.$brand<"GenreUuid">;
225
+ name: string;
226
+ summary: string | null;
227
+ parent: {
228
+ uuid: string & z.core.$brand<"GenreUuid">;
229
+ name: string;
230
+ side?: "pop" | "core" | null | undefined;
231
+ wikidataId?: string | null | undefined;
232
+ } | null;
233
+ ascendants: {
234
+ ascendant: {
235
+ uuid: string & z.core.$brand<"GenreUuid">;
236
+ name: string;
237
+ side?: "pop" | "core" | null | undefined;
238
+ wikidataId?: string | null | undefined;
239
+ };
240
+ degree: number;
241
+ }[];
242
+ descendants: {
243
+ descendant: {
244
+ uuid: string & z.core.$brand<"GenreUuid">;
245
+ name: string;
246
+ side?: "pop" | "core" | null | undefined;
247
+ wikidataId?: string | null | undefined;
248
+ };
249
+ degree: number;
250
+ }[];
251
+ root: {
252
+ uuid: string & z.core.$brand<"GenreUuid">;
253
+ name: string;
254
+ side?: "pop" | "core" | null | undefined;
255
+ wikidataId?: string | null | undefined;
256
+ };
257
+ children: {
258
+ uuid: string & z.core.$brand<"GenreUuid">;
259
+ name: string;
260
+ side?: "pop" | "core" | null | undefined;
261
+ wikidataId?: string | null | undefined;
262
+ }[];
263
+ criteriaPlaylist: {
264
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
265
+ name: string;
266
+ };
267
+ tracks: {
268
+ title: string;
269
+ uuid: string;
270
+ artists?: {
271
+ uuid: string;
272
+ name: string;
273
+ isSpecialPurpose?: boolean | undefined;
274
+ }[] | null | undefined;
275
+ }[];
276
+ essentialSongs: {
277
+ title: string;
278
+ uuid: string;
279
+ artists?: {
280
+ uuid: string;
281
+ name: string;
282
+ isSpecialPurpose?: boolean | undefined;
283
+ }[] | null | undefined;
284
+ }[];
285
+ tracksCount: number;
286
+ updatedOn: string | null;
287
+ }, Error, {
288
+ name: string;
289
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
290
+ essentialSongs?: string[] | undefined;
291
+ }, unknown>;
292
+ } | {
293
+ formErrors: {
294
+ field: string;
295
+ message: string;
296
+ }[];
297
+ data: undefined;
298
+ variables: {
299
+ name: string;
300
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
301
+ essentialSongs?: string[] | undefined;
302
+ };
303
+ error: null;
304
+ isError: false;
305
+ isIdle: false;
306
+ isPending: true;
307
+ isSuccess: false;
308
+ status: "pending";
309
+ mutate: _tanstack_react_query.UseMutateFunction<{
310
+ uuid: string & z.core.$brand<"GenreUuid">;
311
+ name: string;
312
+ summary: string | null;
313
+ parent: {
314
+ uuid: string & z.core.$brand<"GenreUuid">;
315
+ name: string;
316
+ side?: "pop" | "core" | null | undefined;
317
+ wikidataId?: string | null | undefined;
318
+ } | null;
319
+ ascendants: {
320
+ ascendant: {
321
+ uuid: string & z.core.$brand<"GenreUuid">;
322
+ name: string;
323
+ side?: "pop" | "core" | null | undefined;
324
+ wikidataId?: string | null | undefined;
325
+ };
326
+ degree: number;
327
+ }[];
328
+ descendants: {
329
+ descendant: {
330
+ uuid: string & z.core.$brand<"GenreUuid">;
331
+ name: string;
332
+ side?: "pop" | "core" | null | undefined;
333
+ wikidataId?: string | null | undefined;
334
+ };
335
+ degree: number;
336
+ }[];
337
+ root: {
338
+ uuid: string & z.core.$brand<"GenreUuid">;
339
+ name: string;
340
+ side?: "pop" | "core" | null | undefined;
341
+ wikidataId?: string | null | undefined;
342
+ };
343
+ children: {
344
+ uuid: string & z.core.$brand<"GenreUuid">;
345
+ name: string;
346
+ side?: "pop" | "core" | null | undefined;
347
+ wikidataId?: string | null | undefined;
348
+ }[];
349
+ criteriaPlaylist: {
350
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
351
+ name: string;
352
+ };
353
+ tracks: {
354
+ title: string;
355
+ uuid: string;
356
+ artists?: {
357
+ uuid: string;
358
+ name: string;
359
+ isSpecialPurpose?: boolean | undefined;
360
+ }[] | null | undefined;
361
+ }[];
362
+ essentialSongs: {
363
+ title: string;
364
+ uuid: string;
365
+ artists?: {
366
+ uuid: string;
367
+ name: string;
368
+ isSpecialPurpose?: boolean | undefined;
369
+ }[] | null | undefined;
370
+ }[];
371
+ tracksCount: number;
372
+ updatedOn: string | null;
373
+ }, Error, {
374
+ name: string;
375
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
376
+ essentialSongs?: string[] | undefined;
377
+ }, unknown>;
378
+ reset: () => void;
379
+ context: unknown;
380
+ failureCount: number;
381
+ failureReason: Error | null;
382
+ isPaused: boolean;
383
+ submittedAt: number;
384
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
385
+ uuid: string & z.core.$brand<"GenreUuid">;
386
+ name: string;
387
+ summary: string | null;
388
+ parent: {
389
+ uuid: string & z.core.$brand<"GenreUuid">;
390
+ name: string;
391
+ side?: "pop" | "core" | null | undefined;
392
+ wikidataId?: string | null | undefined;
393
+ } | null;
394
+ ascendants: {
395
+ ascendant: {
396
+ uuid: string & z.core.$brand<"GenreUuid">;
397
+ name: string;
398
+ side?: "pop" | "core" | null | undefined;
399
+ wikidataId?: string | null | undefined;
400
+ };
401
+ degree: number;
402
+ }[];
403
+ descendants: {
404
+ descendant: {
405
+ uuid: string & z.core.$brand<"GenreUuid">;
406
+ name: string;
407
+ side?: "pop" | "core" | null | undefined;
408
+ wikidataId?: string | null | undefined;
409
+ };
410
+ degree: number;
411
+ }[];
412
+ root: {
413
+ uuid: string & z.core.$brand<"GenreUuid">;
414
+ name: string;
415
+ side?: "pop" | "core" | null | undefined;
416
+ wikidataId?: string | null | undefined;
417
+ };
418
+ children: {
419
+ uuid: string & z.core.$brand<"GenreUuid">;
420
+ name: string;
421
+ side?: "pop" | "core" | null | undefined;
422
+ wikidataId?: string | null | undefined;
423
+ }[];
424
+ criteriaPlaylist: {
425
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
426
+ name: string;
427
+ };
428
+ tracks: {
429
+ title: string;
430
+ uuid: string;
431
+ artists?: {
432
+ uuid: string;
433
+ name: string;
434
+ isSpecialPurpose?: boolean | undefined;
435
+ }[] | null | undefined;
436
+ }[];
437
+ essentialSongs: {
438
+ title: string;
439
+ uuid: string;
440
+ artists?: {
441
+ uuid: string;
442
+ name: string;
443
+ isSpecialPurpose?: boolean | undefined;
444
+ }[] | null | undefined;
445
+ }[];
446
+ tracksCount: number;
447
+ updatedOn: string | null;
448
+ }, Error, {
449
+ name: string;
450
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
451
+ essentialSongs?: string[] | undefined;
452
+ }, unknown>;
453
+ } | {
454
+ formErrors: {
455
+ field: string;
456
+ message: string;
457
+ }[];
458
+ data: undefined;
459
+ error: Error;
460
+ variables: {
461
+ name: string;
462
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
463
+ essentialSongs?: string[] | undefined;
464
+ };
465
+ isError: true;
466
+ isIdle: false;
467
+ isPending: false;
468
+ isSuccess: false;
469
+ status: "error";
470
+ mutate: _tanstack_react_query.UseMutateFunction<{
471
+ uuid: string & z.core.$brand<"GenreUuid">;
472
+ name: string;
473
+ summary: string | null;
474
+ parent: {
475
+ uuid: string & z.core.$brand<"GenreUuid">;
476
+ name: string;
477
+ side?: "pop" | "core" | null | undefined;
478
+ wikidataId?: string | null | undefined;
479
+ } | null;
480
+ ascendants: {
481
+ ascendant: {
482
+ uuid: string & z.core.$brand<"GenreUuid">;
483
+ name: string;
484
+ side?: "pop" | "core" | null | undefined;
485
+ wikidataId?: string | null | undefined;
486
+ };
487
+ degree: number;
488
+ }[];
489
+ descendants: {
490
+ descendant: {
491
+ uuid: string & z.core.$brand<"GenreUuid">;
492
+ name: string;
493
+ side?: "pop" | "core" | null | undefined;
494
+ wikidataId?: string | null | undefined;
495
+ };
496
+ degree: number;
497
+ }[];
498
+ root: {
499
+ uuid: string & z.core.$brand<"GenreUuid">;
500
+ name: string;
501
+ side?: "pop" | "core" | null | undefined;
502
+ wikidataId?: string | null | undefined;
503
+ };
504
+ children: {
505
+ uuid: string & z.core.$brand<"GenreUuid">;
506
+ name: string;
507
+ side?: "pop" | "core" | null | undefined;
508
+ wikidataId?: string | null | undefined;
509
+ }[];
510
+ criteriaPlaylist: {
511
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
512
+ name: string;
513
+ };
514
+ tracks: {
515
+ title: string;
516
+ uuid: string;
517
+ artists?: {
518
+ uuid: string;
519
+ name: string;
520
+ isSpecialPurpose?: boolean | undefined;
521
+ }[] | null | undefined;
522
+ }[];
523
+ essentialSongs: {
524
+ title: string;
525
+ uuid: string;
526
+ artists?: {
527
+ uuid: string;
528
+ name: string;
529
+ isSpecialPurpose?: boolean | undefined;
530
+ }[] | null | undefined;
531
+ }[];
532
+ tracksCount: number;
533
+ updatedOn: string | null;
534
+ }, Error, {
535
+ name: string;
536
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
537
+ essentialSongs?: string[] | undefined;
538
+ }, unknown>;
539
+ reset: () => void;
540
+ context: unknown;
541
+ failureCount: number;
542
+ failureReason: Error | null;
543
+ isPaused: boolean;
544
+ submittedAt: number;
545
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
546
+ uuid: string & z.core.$brand<"GenreUuid">;
547
+ name: string;
548
+ summary: string | null;
549
+ parent: {
550
+ uuid: string & z.core.$brand<"GenreUuid">;
551
+ name: string;
552
+ side?: "pop" | "core" | null | undefined;
553
+ wikidataId?: string | null | undefined;
554
+ } | null;
555
+ ascendants: {
556
+ ascendant: {
557
+ uuid: string & z.core.$brand<"GenreUuid">;
558
+ name: string;
559
+ side?: "pop" | "core" | null | undefined;
560
+ wikidataId?: string | null | undefined;
561
+ };
562
+ degree: number;
563
+ }[];
564
+ descendants: {
565
+ descendant: {
566
+ uuid: string & z.core.$brand<"GenreUuid">;
567
+ name: string;
568
+ side?: "pop" | "core" | null | undefined;
569
+ wikidataId?: string | null | undefined;
570
+ };
571
+ degree: number;
572
+ }[];
573
+ root: {
574
+ uuid: string & z.core.$brand<"GenreUuid">;
575
+ name: string;
576
+ side?: "pop" | "core" | null | undefined;
577
+ wikidataId?: string | null | undefined;
578
+ };
579
+ children: {
580
+ uuid: string & z.core.$brand<"GenreUuid">;
581
+ name: string;
582
+ side?: "pop" | "core" | null | undefined;
583
+ wikidataId?: string | null | undefined;
584
+ }[];
585
+ criteriaPlaylist: {
586
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
587
+ name: string;
588
+ };
589
+ tracks: {
590
+ title: string;
591
+ uuid: string;
592
+ artists?: {
593
+ uuid: string;
594
+ name: string;
595
+ isSpecialPurpose?: boolean | undefined;
596
+ }[] | null | undefined;
597
+ }[];
598
+ essentialSongs: {
599
+ title: string;
600
+ uuid: string;
601
+ artists?: {
602
+ uuid: string;
603
+ name: string;
604
+ isSpecialPurpose?: boolean | undefined;
605
+ }[] | null | undefined;
606
+ }[];
607
+ tracksCount: number;
608
+ updatedOn: string | null;
609
+ }, Error, {
610
+ name: string;
611
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
612
+ essentialSongs?: string[] | undefined;
613
+ }, unknown>;
614
+ } | {
615
+ formErrors: {
616
+ field: string;
617
+ message: string;
618
+ }[];
619
+ data: {
620
+ uuid: string & z.core.$brand<"GenreUuid">;
621
+ name: string;
622
+ summary: string | null;
623
+ parent: {
624
+ uuid: string & z.core.$brand<"GenreUuid">;
625
+ name: string;
626
+ side?: "pop" | "core" | null | undefined;
627
+ wikidataId?: string | null | undefined;
628
+ } | null;
629
+ ascendants: {
630
+ ascendant: {
631
+ uuid: string & z.core.$brand<"GenreUuid">;
632
+ name: string;
633
+ side?: "pop" | "core" | null | undefined;
634
+ wikidataId?: string | null | undefined;
635
+ };
636
+ degree: number;
637
+ }[];
638
+ descendants: {
639
+ descendant: {
640
+ uuid: string & z.core.$brand<"GenreUuid">;
641
+ name: string;
642
+ side?: "pop" | "core" | null | undefined;
643
+ wikidataId?: string | null | undefined;
644
+ };
645
+ degree: number;
646
+ }[];
647
+ root: {
648
+ uuid: string & z.core.$brand<"GenreUuid">;
649
+ name: string;
650
+ side?: "pop" | "core" | null | undefined;
651
+ wikidataId?: string | null | undefined;
652
+ };
653
+ children: {
654
+ uuid: string & z.core.$brand<"GenreUuid">;
655
+ name: string;
656
+ side?: "pop" | "core" | null | undefined;
657
+ wikidataId?: string | null | undefined;
658
+ }[];
659
+ criteriaPlaylist: {
660
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
661
+ name: string;
662
+ };
663
+ tracks: {
664
+ title: string;
665
+ uuid: string;
666
+ artists?: {
667
+ uuid: string;
668
+ name: string;
669
+ isSpecialPurpose?: boolean | undefined;
670
+ }[] | null | undefined;
671
+ }[];
672
+ essentialSongs: {
673
+ title: string;
674
+ uuid: string;
675
+ artists?: {
676
+ uuid: string;
677
+ name: string;
678
+ isSpecialPurpose?: boolean | undefined;
679
+ }[] | null | undefined;
680
+ }[];
681
+ tracksCount: number;
682
+ updatedOn: string | null;
683
+ };
684
+ error: null;
685
+ variables: {
686
+ name: string;
687
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
688
+ essentialSongs?: string[] | undefined;
689
+ };
690
+ isError: false;
691
+ isIdle: false;
692
+ isPending: false;
693
+ isSuccess: true;
694
+ status: "success";
695
+ mutate: _tanstack_react_query.UseMutateFunction<{
696
+ uuid: string & z.core.$brand<"GenreUuid">;
697
+ name: string;
698
+ summary: string | null;
699
+ parent: {
700
+ uuid: string & z.core.$brand<"GenreUuid">;
701
+ name: string;
702
+ side?: "pop" | "core" | null | undefined;
703
+ wikidataId?: string | null | undefined;
704
+ } | null;
705
+ ascendants: {
706
+ ascendant: {
707
+ uuid: string & z.core.$brand<"GenreUuid">;
708
+ name: string;
709
+ side?: "pop" | "core" | null | undefined;
710
+ wikidataId?: string | null | undefined;
711
+ };
712
+ degree: number;
713
+ }[];
714
+ descendants: {
715
+ descendant: {
716
+ uuid: string & z.core.$brand<"GenreUuid">;
717
+ name: string;
718
+ side?: "pop" | "core" | null | undefined;
719
+ wikidataId?: string | null | undefined;
720
+ };
721
+ degree: number;
722
+ }[];
723
+ root: {
724
+ uuid: string & z.core.$brand<"GenreUuid">;
725
+ name: string;
726
+ side?: "pop" | "core" | null | undefined;
727
+ wikidataId?: string | null | undefined;
728
+ };
729
+ children: {
730
+ uuid: string & z.core.$brand<"GenreUuid">;
731
+ name: string;
732
+ side?: "pop" | "core" | null | undefined;
733
+ wikidataId?: string | null | undefined;
734
+ }[];
735
+ criteriaPlaylist: {
736
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
737
+ name: string;
738
+ };
739
+ tracks: {
740
+ title: string;
741
+ uuid: string;
742
+ artists?: {
743
+ uuid: string;
744
+ name: string;
745
+ isSpecialPurpose?: boolean | undefined;
746
+ }[] | null | undefined;
747
+ }[];
748
+ essentialSongs: {
749
+ title: string;
750
+ uuid: string;
751
+ artists?: {
752
+ uuid: string;
753
+ name: string;
754
+ isSpecialPurpose?: boolean | undefined;
755
+ }[] | null | undefined;
756
+ }[];
757
+ tracksCount: number;
758
+ updatedOn: string | null;
759
+ }, Error, {
760
+ name: string;
761
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
762
+ essentialSongs?: string[] | undefined;
763
+ }, unknown>;
764
+ reset: () => void;
765
+ context: unknown;
766
+ failureCount: number;
767
+ failureReason: Error | null;
768
+ isPaused: boolean;
769
+ submittedAt: number;
770
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
771
+ uuid: string & z.core.$brand<"GenreUuid">;
772
+ name: string;
773
+ summary: string | null;
774
+ parent: {
775
+ uuid: string & z.core.$brand<"GenreUuid">;
776
+ name: string;
777
+ side?: "pop" | "core" | null | undefined;
778
+ wikidataId?: string | null | undefined;
779
+ } | null;
780
+ ascendants: {
781
+ ascendant: {
782
+ uuid: string & z.core.$brand<"GenreUuid">;
783
+ name: string;
784
+ side?: "pop" | "core" | null | undefined;
785
+ wikidataId?: string | null | undefined;
786
+ };
787
+ degree: number;
788
+ }[];
789
+ descendants: {
790
+ descendant: {
791
+ uuid: string & z.core.$brand<"GenreUuid">;
792
+ name: string;
793
+ side?: "pop" | "core" | null | undefined;
794
+ wikidataId?: string | null | undefined;
795
+ };
796
+ degree: number;
797
+ }[];
798
+ root: {
799
+ uuid: string & z.core.$brand<"GenreUuid">;
800
+ name: string;
801
+ side?: "pop" | "core" | null | undefined;
802
+ wikidataId?: string | null | undefined;
803
+ };
804
+ children: {
805
+ uuid: string & z.core.$brand<"GenreUuid">;
806
+ name: string;
807
+ side?: "pop" | "core" | null | undefined;
808
+ wikidataId?: string | null | undefined;
809
+ }[];
810
+ criteriaPlaylist: {
811
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
812
+ name: string;
813
+ };
814
+ tracks: {
815
+ title: string;
816
+ uuid: string;
817
+ artists?: {
818
+ uuid: string;
819
+ name: string;
820
+ isSpecialPurpose?: boolean | undefined;
821
+ }[] | null | undefined;
822
+ }[];
823
+ essentialSongs: {
824
+ title: string;
825
+ uuid: string;
826
+ artists?: {
827
+ uuid: string;
828
+ name: string;
829
+ isSpecialPurpose?: boolean | undefined;
830
+ }[] | null | undefined;
831
+ }[];
832
+ tracksCount: number;
833
+ updatedOn: string | null;
834
+ }, Error, {
835
+ name: string;
836
+ parent?: (string & z.core.$brand<"GenreUuid">) | undefined;
837
+ essentialSongs?: string[] | undefined;
838
+ }, unknown>;
839
+ };
840
+ declare function useUpdateGenre(scope: Scope, getBackendBaseUrl: () => string): {
841
+ mutate: _tanstack_react_query.UseMutateFunction<{
842
+ uuid: string & z.core.$brand<"GenreUuid">;
843
+ name: string;
844
+ summary: string | null;
845
+ parent: {
846
+ uuid: string & z.core.$brand<"GenreUuid">;
847
+ name: string;
848
+ side?: "pop" | "core" | null | undefined;
849
+ wikidataId?: string | null | undefined;
850
+ } | null;
851
+ ascendants: {
852
+ ascendant: {
853
+ uuid: string & z.core.$brand<"GenreUuid">;
854
+ name: string;
855
+ side?: "pop" | "core" | null | undefined;
856
+ wikidataId?: string | null | undefined;
857
+ };
858
+ degree: number;
859
+ }[];
860
+ descendants: {
861
+ descendant: {
862
+ uuid: string & z.core.$brand<"GenreUuid">;
863
+ name: string;
864
+ side?: "pop" | "core" | null | undefined;
865
+ wikidataId?: string | null | undefined;
866
+ };
867
+ degree: number;
868
+ }[];
869
+ root: {
870
+ uuid: string & z.core.$brand<"GenreUuid">;
871
+ name: string;
872
+ side?: "pop" | "core" | null | undefined;
873
+ wikidataId?: string | null | undefined;
874
+ };
875
+ children: {
876
+ uuid: string & z.core.$brand<"GenreUuid">;
877
+ name: string;
878
+ side?: "pop" | "core" | null | undefined;
879
+ wikidataId?: string | null | undefined;
880
+ }[];
881
+ criteriaPlaylist: {
882
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
883
+ name: string;
884
+ };
885
+ tracks: {
886
+ title: string;
887
+ uuid: string;
888
+ artists?: {
889
+ uuid: string;
890
+ name: string;
891
+ isSpecialPurpose?: boolean | undefined;
892
+ }[] | null | undefined;
893
+ }[];
894
+ essentialSongs: {
895
+ title: string;
896
+ uuid: string;
897
+ artists?: {
898
+ uuid: string;
899
+ name: string;
900
+ isSpecialPurpose?: boolean | undefined;
901
+ }[] | null | undefined;
902
+ }[];
903
+ tracksCount: number;
904
+ updatedOn: string | null;
905
+ }, Error, {
906
+ uuid: string & z.core.$brand<"GenreUuid">;
907
+ data: {
908
+ name?: string | undefined;
909
+ parent?: (string & z.core.$brand<"GenreUuid">) | null | undefined;
910
+ essentialSongs?: string[] | undefined;
911
+ };
912
+ }, unknown>;
913
+ renameGenre: (uuid: GenreUuid, name: string) => void;
914
+ updateGenreParent: (uuid: GenreUuid, parentUuid: GenreUuid | null) => Promise<void>;
915
+ isPending: boolean;
916
+ formErrors: {
917
+ field: string;
918
+ message: string;
919
+ }[];
920
+ };
921
+ declare function useDeleteGenre(scope: Scope, getBackendBaseUrl: () => string): {
922
+ formErrors: {
923
+ field: string;
924
+ message: string;
925
+ }[];
926
+ data: undefined;
927
+ variables: undefined;
928
+ error: null;
929
+ isError: false;
930
+ isIdle: true;
931
+ isPending: false;
932
+ isSuccess: false;
933
+ status: "idle";
934
+ mutate: _tanstack_react_query.UseMutateFunction<null, Error, {
935
+ uuid: string & z.core.$brand<"GenreUuid">;
936
+ }, unknown>;
937
+ reset: () => void;
938
+ context: unknown;
939
+ failureCount: number;
940
+ failureReason: Error | null;
941
+ isPaused: boolean;
942
+ submittedAt: number;
943
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<null, Error, {
944
+ uuid: string & z.core.$brand<"GenreUuid">;
945
+ }, unknown>;
946
+ } | {
947
+ formErrors: {
948
+ field: string;
949
+ message: string;
950
+ }[];
951
+ data: undefined;
952
+ variables: {
953
+ uuid: string & z.core.$brand<"GenreUuid">;
954
+ };
955
+ error: null;
956
+ isError: false;
957
+ isIdle: false;
958
+ isPending: true;
959
+ isSuccess: false;
960
+ status: "pending";
961
+ mutate: _tanstack_react_query.UseMutateFunction<null, Error, {
962
+ uuid: string & z.core.$brand<"GenreUuid">;
963
+ }, unknown>;
964
+ reset: () => void;
965
+ context: unknown;
966
+ failureCount: number;
967
+ failureReason: Error | null;
968
+ isPaused: boolean;
969
+ submittedAt: number;
970
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<null, Error, {
971
+ uuid: string & z.core.$brand<"GenreUuid">;
972
+ }, unknown>;
973
+ } | {
974
+ formErrors: {
975
+ field: string;
976
+ message: string;
977
+ }[];
978
+ data: undefined;
979
+ error: Error;
980
+ variables: {
981
+ uuid: string & z.core.$brand<"GenreUuid">;
982
+ };
983
+ isError: true;
984
+ isIdle: false;
985
+ isPending: false;
986
+ isSuccess: false;
987
+ status: "error";
988
+ mutate: _tanstack_react_query.UseMutateFunction<null, Error, {
989
+ uuid: string & z.core.$brand<"GenreUuid">;
990
+ }, unknown>;
991
+ reset: () => void;
992
+ context: unknown;
993
+ failureCount: number;
994
+ failureReason: Error | null;
995
+ isPaused: boolean;
996
+ submittedAt: number;
997
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<null, Error, {
998
+ uuid: string & z.core.$brand<"GenreUuid">;
999
+ }, unknown>;
1000
+ } | {
1001
+ formErrors: {
1002
+ field: string;
1003
+ message: string;
1004
+ }[];
1005
+ data: null;
1006
+ error: null;
1007
+ variables: {
1008
+ uuid: string & z.core.$brand<"GenreUuid">;
1009
+ };
1010
+ isError: false;
1011
+ isIdle: false;
1012
+ isPending: false;
1013
+ isSuccess: true;
1014
+ status: "success";
1015
+ mutate: _tanstack_react_query.UseMutateFunction<null, Error, {
1016
+ uuid: string & z.core.$brand<"GenreUuid">;
1017
+ }, unknown>;
1018
+ reset: () => void;
1019
+ context: unknown;
1020
+ failureCount: number;
1021
+ failureReason: Error | null;
1022
+ isPaused: boolean;
1023
+ submittedAt: number;
1024
+ mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<null, Error, {
1025
+ uuid: string & z.core.$brand<"GenreUuid">;
1026
+ }, unknown>;
1027
+ };
1028
+
1029
+ declare const useListGenrePlaylists: (page: number | undefined, pageSize: number | string | undefined, getBackendBaseUrl: () => string) => {
1030
+ invalidateGenrePlaylists: () => void;
1031
+ data: NoInfer<{
1032
+ overallTotal: number;
1033
+ next: string | null;
1034
+ previous: string | null;
1035
+ results: {
1036
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1037
+ name: string;
1038
+ root: {
1039
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1040
+ name: string;
1041
+ };
1042
+ tracksCount: number;
1043
+ criteria: {
1044
+ uuid: string & z.core.$brand<"GenreUuid">;
1045
+ name: string;
1046
+ side?: "pop" | "core" | null | undefined;
1047
+ wikidataId?: string | null | undefined;
1048
+ } | null;
1049
+ parent: {
1050
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1051
+ name: string;
1052
+ } | null;
1053
+ createdOn: string;
1054
+ updatedOn: string | null;
1055
+ isUnacceptedRoot: boolean;
1056
+ isUmbrella?: boolean | undefined;
1057
+ }[];
1058
+ page: number;
1059
+ pageSize: number;
1060
+ totalPages: number;
1061
+ }>;
1062
+ error: Error;
1063
+ isError: true;
1064
+ isPending: false;
1065
+ isLoading: false;
1066
+ isLoadingError: false;
1067
+ isRefetchError: true;
1068
+ isSuccess: false;
1069
+ isPlaceholderData: false;
1070
+ status: "error";
1071
+ dataUpdatedAt: number;
1072
+ errorUpdatedAt: number;
1073
+ failureCount: number;
1074
+ failureReason: Error | null;
1075
+ errorUpdateCount: number;
1076
+ isFetched: boolean;
1077
+ isFetchedAfterMount: boolean;
1078
+ isFetching: boolean;
1079
+ isInitialLoading: boolean;
1080
+ isPaused: boolean;
1081
+ isRefetching: boolean;
1082
+ isStale: boolean;
1083
+ isEnabled: boolean;
1084
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1085
+ overallTotal: number;
1086
+ next: string | null;
1087
+ previous: string | null;
1088
+ results: {
1089
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1090
+ name: string;
1091
+ root: {
1092
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1093
+ name: string;
1094
+ };
1095
+ tracksCount: number;
1096
+ criteria: {
1097
+ uuid: string & z.core.$brand<"GenreUuid">;
1098
+ name: string;
1099
+ side?: "pop" | "core" | null | undefined;
1100
+ wikidataId?: string | null | undefined;
1101
+ } | null;
1102
+ parent: {
1103
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1104
+ name: string;
1105
+ } | null;
1106
+ createdOn: string;
1107
+ updatedOn: string | null;
1108
+ isUnacceptedRoot: boolean;
1109
+ isUmbrella?: boolean | undefined;
1110
+ }[];
1111
+ page: number;
1112
+ pageSize: number;
1113
+ totalPages: number;
1114
+ }>, Error>>;
1115
+ fetchStatus: _tanstack_react_query.FetchStatus;
1116
+ promise: Promise<NoInfer<{
1117
+ overallTotal: number;
1118
+ next: string | null;
1119
+ previous: string | null;
1120
+ results: {
1121
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1122
+ name: string;
1123
+ root: {
1124
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1125
+ name: string;
1126
+ };
1127
+ tracksCount: number;
1128
+ criteria: {
1129
+ uuid: string & z.core.$brand<"GenreUuid">;
1130
+ name: string;
1131
+ side?: "pop" | "core" | null | undefined;
1132
+ wikidataId?: string | null | undefined;
1133
+ } | null;
1134
+ parent: {
1135
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1136
+ name: string;
1137
+ } | null;
1138
+ createdOn: string;
1139
+ updatedOn: string | null;
1140
+ isUnacceptedRoot: boolean;
1141
+ isUmbrella?: boolean | undefined;
1142
+ }[];
1143
+ page: number;
1144
+ pageSize: number;
1145
+ totalPages: number;
1146
+ }>>;
1147
+ } | {
1148
+ invalidateGenrePlaylists: () => void;
1149
+ data: NoInfer<{
1150
+ overallTotal: number;
1151
+ next: string | null;
1152
+ previous: string | null;
1153
+ results: {
1154
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1155
+ name: string;
1156
+ root: {
1157
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1158
+ name: string;
1159
+ };
1160
+ tracksCount: number;
1161
+ criteria: {
1162
+ uuid: string & z.core.$brand<"GenreUuid">;
1163
+ name: string;
1164
+ side?: "pop" | "core" | null | undefined;
1165
+ wikidataId?: string | null | undefined;
1166
+ } | null;
1167
+ parent: {
1168
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1169
+ name: string;
1170
+ } | null;
1171
+ createdOn: string;
1172
+ updatedOn: string | null;
1173
+ isUnacceptedRoot: boolean;
1174
+ isUmbrella?: boolean | undefined;
1175
+ }[];
1176
+ page: number;
1177
+ pageSize: number;
1178
+ totalPages: number;
1179
+ }>;
1180
+ error: null;
1181
+ isError: false;
1182
+ isPending: false;
1183
+ isLoading: false;
1184
+ isLoadingError: false;
1185
+ isRefetchError: false;
1186
+ isSuccess: true;
1187
+ isPlaceholderData: false;
1188
+ status: "success";
1189
+ dataUpdatedAt: number;
1190
+ errorUpdatedAt: number;
1191
+ failureCount: number;
1192
+ failureReason: Error | null;
1193
+ errorUpdateCount: number;
1194
+ isFetched: boolean;
1195
+ isFetchedAfterMount: boolean;
1196
+ isFetching: boolean;
1197
+ isInitialLoading: boolean;
1198
+ isPaused: boolean;
1199
+ isRefetching: boolean;
1200
+ isStale: boolean;
1201
+ isEnabled: boolean;
1202
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1203
+ overallTotal: number;
1204
+ next: string | null;
1205
+ previous: string | null;
1206
+ results: {
1207
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1208
+ name: string;
1209
+ root: {
1210
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1211
+ name: string;
1212
+ };
1213
+ tracksCount: number;
1214
+ criteria: {
1215
+ uuid: string & z.core.$brand<"GenreUuid">;
1216
+ name: string;
1217
+ side?: "pop" | "core" | null | undefined;
1218
+ wikidataId?: string | null | undefined;
1219
+ } | null;
1220
+ parent: {
1221
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1222
+ name: string;
1223
+ } | null;
1224
+ createdOn: string;
1225
+ updatedOn: string | null;
1226
+ isUnacceptedRoot: boolean;
1227
+ isUmbrella?: boolean | undefined;
1228
+ }[];
1229
+ page: number;
1230
+ pageSize: number;
1231
+ totalPages: number;
1232
+ }>, Error>>;
1233
+ fetchStatus: _tanstack_react_query.FetchStatus;
1234
+ promise: Promise<NoInfer<{
1235
+ overallTotal: number;
1236
+ next: string | null;
1237
+ previous: string | null;
1238
+ results: {
1239
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1240
+ name: string;
1241
+ root: {
1242
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1243
+ name: string;
1244
+ };
1245
+ tracksCount: number;
1246
+ criteria: {
1247
+ uuid: string & z.core.$brand<"GenreUuid">;
1248
+ name: string;
1249
+ side?: "pop" | "core" | null | undefined;
1250
+ wikidataId?: string | null | undefined;
1251
+ } | null;
1252
+ parent: {
1253
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1254
+ name: string;
1255
+ } | null;
1256
+ createdOn: string;
1257
+ updatedOn: string | null;
1258
+ isUnacceptedRoot: boolean;
1259
+ isUmbrella?: boolean | undefined;
1260
+ }[];
1261
+ page: number;
1262
+ pageSize: number;
1263
+ totalPages: number;
1264
+ }>>;
1265
+ } | {
1266
+ invalidateGenrePlaylists: () => void;
1267
+ data: undefined;
1268
+ error: Error;
1269
+ isError: true;
1270
+ isPending: false;
1271
+ isLoading: false;
1272
+ isLoadingError: true;
1273
+ isRefetchError: false;
1274
+ isSuccess: false;
1275
+ isPlaceholderData: false;
1276
+ status: "error";
1277
+ dataUpdatedAt: number;
1278
+ errorUpdatedAt: number;
1279
+ failureCount: number;
1280
+ failureReason: Error | null;
1281
+ errorUpdateCount: number;
1282
+ isFetched: boolean;
1283
+ isFetchedAfterMount: boolean;
1284
+ isFetching: boolean;
1285
+ isInitialLoading: boolean;
1286
+ isPaused: boolean;
1287
+ isRefetching: boolean;
1288
+ isStale: boolean;
1289
+ isEnabled: boolean;
1290
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1291
+ overallTotal: number;
1292
+ next: string | null;
1293
+ previous: string | null;
1294
+ results: {
1295
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1296
+ name: string;
1297
+ root: {
1298
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1299
+ name: string;
1300
+ };
1301
+ tracksCount: number;
1302
+ criteria: {
1303
+ uuid: string & z.core.$brand<"GenreUuid">;
1304
+ name: string;
1305
+ side?: "pop" | "core" | null | undefined;
1306
+ wikidataId?: string | null | undefined;
1307
+ } | null;
1308
+ parent: {
1309
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1310
+ name: string;
1311
+ } | null;
1312
+ createdOn: string;
1313
+ updatedOn: string | null;
1314
+ isUnacceptedRoot: boolean;
1315
+ isUmbrella?: boolean | undefined;
1316
+ }[];
1317
+ page: number;
1318
+ pageSize: number;
1319
+ totalPages: number;
1320
+ }>, Error>>;
1321
+ fetchStatus: _tanstack_react_query.FetchStatus;
1322
+ promise: Promise<NoInfer<{
1323
+ overallTotal: number;
1324
+ next: string | null;
1325
+ previous: string | null;
1326
+ results: {
1327
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1328
+ name: string;
1329
+ root: {
1330
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1331
+ name: string;
1332
+ };
1333
+ tracksCount: number;
1334
+ criteria: {
1335
+ uuid: string & z.core.$brand<"GenreUuid">;
1336
+ name: string;
1337
+ side?: "pop" | "core" | null | undefined;
1338
+ wikidataId?: string | null | undefined;
1339
+ } | null;
1340
+ parent: {
1341
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1342
+ name: string;
1343
+ } | null;
1344
+ createdOn: string;
1345
+ updatedOn: string | null;
1346
+ isUnacceptedRoot: boolean;
1347
+ isUmbrella?: boolean | undefined;
1348
+ }[];
1349
+ page: number;
1350
+ pageSize: number;
1351
+ totalPages: number;
1352
+ }>>;
1353
+ } | {
1354
+ invalidateGenrePlaylists: () => void;
1355
+ data: undefined;
1356
+ error: null;
1357
+ isError: false;
1358
+ isPending: true;
1359
+ isLoading: true;
1360
+ isLoadingError: false;
1361
+ isRefetchError: false;
1362
+ isSuccess: false;
1363
+ isPlaceholderData: false;
1364
+ status: "pending";
1365
+ dataUpdatedAt: number;
1366
+ errorUpdatedAt: number;
1367
+ failureCount: number;
1368
+ failureReason: Error | null;
1369
+ errorUpdateCount: number;
1370
+ isFetched: boolean;
1371
+ isFetchedAfterMount: boolean;
1372
+ isFetching: boolean;
1373
+ isInitialLoading: boolean;
1374
+ isPaused: boolean;
1375
+ isRefetching: boolean;
1376
+ isStale: boolean;
1377
+ isEnabled: boolean;
1378
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1379
+ overallTotal: number;
1380
+ next: string | null;
1381
+ previous: string | null;
1382
+ results: {
1383
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1384
+ name: string;
1385
+ root: {
1386
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1387
+ name: string;
1388
+ };
1389
+ tracksCount: number;
1390
+ criteria: {
1391
+ uuid: string & z.core.$brand<"GenreUuid">;
1392
+ name: string;
1393
+ side?: "pop" | "core" | null | undefined;
1394
+ wikidataId?: string | null | undefined;
1395
+ } | null;
1396
+ parent: {
1397
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1398
+ name: string;
1399
+ } | null;
1400
+ createdOn: string;
1401
+ updatedOn: string | null;
1402
+ isUnacceptedRoot: boolean;
1403
+ isUmbrella?: boolean | undefined;
1404
+ }[];
1405
+ page: number;
1406
+ pageSize: number;
1407
+ totalPages: number;
1408
+ }>, Error>>;
1409
+ fetchStatus: _tanstack_react_query.FetchStatus;
1410
+ promise: Promise<NoInfer<{
1411
+ overallTotal: number;
1412
+ next: string | null;
1413
+ previous: string | null;
1414
+ results: {
1415
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1416
+ name: string;
1417
+ root: {
1418
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1419
+ name: string;
1420
+ };
1421
+ tracksCount: number;
1422
+ criteria: {
1423
+ uuid: string & z.core.$brand<"GenreUuid">;
1424
+ name: string;
1425
+ side?: "pop" | "core" | null | undefined;
1426
+ wikidataId?: string | null | undefined;
1427
+ } | null;
1428
+ parent: {
1429
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1430
+ name: string;
1431
+ } | null;
1432
+ createdOn: string;
1433
+ updatedOn: string | null;
1434
+ isUnacceptedRoot: boolean;
1435
+ isUmbrella?: boolean | undefined;
1436
+ }[];
1437
+ page: number;
1438
+ pageSize: number;
1439
+ totalPages: number;
1440
+ }>>;
1441
+ } | {
1442
+ invalidateGenrePlaylists: () => void;
1443
+ data: undefined;
1444
+ error: null;
1445
+ isError: false;
1446
+ isPending: true;
1447
+ isLoadingError: false;
1448
+ isRefetchError: false;
1449
+ isSuccess: false;
1450
+ isPlaceholderData: false;
1451
+ status: "pending";
1452
+ dataUpdatedAt: number;
1453
+ errorUpdatedAt: number;
1454
+ failureCount: number;
1455
+ failureReason: Error | null;
1456
+ errorUpdateCount: number;
1457
+ isFetched: boolean;
1458
+ isFetchedAfterMount: boolean;
1459
+ isFetching: boolean;
1460
+ isLoading: boolean;
1461
+ isInitialLoading: boolean;
1462
+ isPaused: boolean;
1463
+ isRefetching: boolean;
1464
+ isStale: boolean;
1465
+ isEnabled: boolean;
1466
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1467
+ overallTotal: number;
1468
+ next: string | null;
1469
+ previous: string | null;
1470
+ results: {
1471
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1472
+ name: string;
1473
+ root: {
1474
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1475
+ name: string;
1476
+ };
1477
+ tracksCount: number;
1478
+ criteria: {
1479
+ uuid: string & z.core.$brand<"GenreUuid">;
1480
+ name: string;
1481
+ side?: "pop" | "core" | null | undefined;
1482
+ wikidataId?: string | null | undefined;
1483
+ } | null;
1484
+ parent: {
1485
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1486
+ name: string;
1487
+ } | null;
1488
+ createdOn: string;
1489
+ updatedOn: string | null;
1490
+ isUnacceptedRoot: boolean;
1491
+ isUmbrella?: boolean | undefined;
1492
+ }[];
1493
+ page: number;
1494
+ pageSize: number;
1495
+ totalPages: number;
1496
+ }>, Error>>;
1497
+ fetchStatus: _tanstack_react_query.FetchStatus;
1498
+ promise: Promise<NoInfer<{
1499
+ overallTotal: number;
1500
+ next: string | null;
1501
+ previous: string | null;
1502
+ results: {
1503
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1504
+ name: string;
1505
+ root: {
1506
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1507
+ name: string;
1508
+ };
1509
+ tracksCount: number;
1510
+ criteria: {
1511
+ uuid: string & z.core.$brand<"GenreUuid">;
1512
+ name: string;
1513
+ side?: "pop" | "core" | null | undefined;
1514
+ wikidataId?: string | null | undefined;
1515
+ } | null;
1516
+ parent: {
1517
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1518
+ name: string;
1519
+ } | null;
1520
+ createdOn: string;
1521
+ updatedOn: string | null;
1522
+ isUnacceptedRoot: boolean;
1523
+ isUmbrella?: boolean | undefined;
1524
+ }[];
1525
+ page: number;
1526
+ pageSize: number;
1527
+ totalPages: number;
1528
+ }>>;
1529
+ } | {
1530
+ invalidateGenrePlaylists: () => void;
1531
+ data: NoInfer<{
1532
+ overallTotal: number;
1533
+ next: string | null;
1534
+ previous: string | null;
1535
+ results: {
1536
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1537
+ name: string;
1538
+ root: {
1539
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1540
+ name: string;
1541
+ };
1542
+ tracksCount: number;
1543
+ criteria: {
1544
+ uuid: string & z.core.$brand<"GenreUuid">;
1545
+ name: string;
1546
+ side?: "pop" | "core" | null | undefined;
1547
+ wikidataId?: string | null | undefined;
1548
+ } | null;
1549
+ parent: {
1550
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1551
+ name: string;
1552
+ } | null;
1553
+ createdOn: string;
1554
+ updatedOn: string | null;
1555
+ isUnacceptedRoot: boolean;
1556
+ isUmbrella?: boolean | undefined;
1557
+ }[];
1558
+ page: number;
1559
+ pageSize: number;
1560
+ totalPages: number;
1561
+ }>;
1562
+ isError: false;
1563
+ error: null;
1564
+ isPending: false;
1565
+ isLoading: false;
1566
+ isLoadingError: false;
1567
+ isRefetchError: false;
1568
+ isSuccess: true;
1569
+ isPlaceholderData: true;
1570
+ status: "success";
1571
+ dataUpdatedAt: number;
1572
+ errorUpdatedAt: number;
1573
+ failureCount: number;
1574
+ failureReason: Error | null;
1575
+ errorUpdateCount: number;
1576
+ isFetched: boolean;
1577
+ isFetchedAfterMount: boolean;
1578
+ isFetching: boolean;
1579
+ isInitialLoading: boolean;
1580
+ isPaused: boolean;
1581
+ isRefetching: boolean;
1582
+ isStale: boolean;
1583
+ isEnabled: boolean;
1584
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1585
+ overallTotal: number;
1586
+ next: string | null;
1587
+ previous: string | null;
1588
+ results: {
1589
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1590
+ name: string;
1591
+ root: {
1592
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1593
+ name: string;
1594
+ };
1595
+ tracksCount: number;
1596
+ criteria: {
1597
+ uuid: string & z.core.$brand<"GenreUuid">;
1598
+ name: string;
1599
+ side?: "pop" | "core" | null | undefined;
1600
+ wikidataId?: string | null | undefined;
1601
+ } | null;
1602
+ parent: {
1603
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1604
+ name: string;
1605
+ } | null;
1606
+ createdOn: string;
1607
+ updatedOn: string | null;
1608
+ isUnacceptedRoot: boolean;
1609
+ isUmbrella?: boolean | undefined;
1610
+ }[];
1611
+ page: number;
1612
+ pageSize: number;
1613
+ totalPages: number;
1614
+ }>, Error>>;
1615
+ fetchStatus: _tanstack_react_query.FetchStatus;
1616
+ promise: Promise<NoInfer<{
1617
+ overallTotal: number;
1618
+ next: string | null;
1619
+ previous: string | null;
1620
+ results: {
1621
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1622
+ name: string;
1623
+ root: {
1624
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1625
+ name: string;
1626
+ };
1627
+ tracksCount: number;
1628
+ criteria: {
1629
+ uuid: string & z.core.$brand<"GenreUuid">;
1630
+ name: string;
1631
+ side?: "pop" | "core" | null | undefined;
1632
+ wikidataId?: string | null | undefined;
1633
+ } | null;
1634
+ parent: {
1635
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1636
+ name: string;
1637
+ } | null;
1638
+ createdOn: string;
1639
+ updatedOn: string | null;
1640
+ isUnacceptedRoot: boolean;
1641
+ isUmbrella?: boolean | undefined;
1642
+ }[];
1643
+ page: number;
1644
+ pageSize: number;
1645
+ totalPages: number;
1646
+ }>>;
1647
+ };
1648
+ declare const useListFullGenrePlaylists: (scope: Scope, getBackendBaseUrl: () => string) => {
1649
+ invalidateFullGenrePlaylists: () => void;
1650
+ data: NoInfer<{
1651
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1652
+ name: string;
1653
+ root: {
1654
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1655
+ name: string;
1656
+ };
1657
+ tracksCount: number;
1658
+ criteria: {
1659
+ uuid: string & z.core.$brand<"GenreUuid">;
1660
+ name: string;
1661
+ side?: "pop" | "core" | null | undefined;
1662
+ wikidataId?: string | null | undefined;
1663
+ } | null;
1664
+ parent: {
1665
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1666
+ name: string;
1667
+ } | null;
1668
+ createdOn: string;
1669
+ updatedOn: string | null;
1670
+ isUnacceptedRoot: boolean;
1671
+ isUmbrella?: boolean | undefined;
1672
+ }[]>;
1673
+ error: Error;
1674
+ isError: true;
1675
+ isPending: false;
1676
+ isLoading: false;
1677
+ isLoadingError: false;
1678
+ isRefetchError: true;
1679
+ isSuccess: false;
1680
+ isPlaceholderData: false;
1681
+ status: "error";
1682
+ dataUpdatedAt: number;
1683
+ errorUpdatedAt: number;
1684
+ failureCount: number;
1685
+ failureReason: Error | null;
1686
+ errorUpdateCount: number;
1687
+ isFetched: boolean;
1688
+ isFetchedAfterMount: boolean;
1689
+ isFetching: boolean;
1690
+ isInitialLoading: boolean;
1691
+ isPaused: boolean;
1692
+ isRefetching: boolean;
1693
+ isStale: boolean;
1694
+ isEnabled: boolean;
1695
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1696
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1697
+ name: string;
1698
+ root: {
1699
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1700
+ name: string;
1701
+ };
1702
+ tracksCount: number;
1703
+ criteria: {
1704
+ uuid: string & z.core.$brand<"GenreUuid">;
1705
+ name: string;
1706
+ side?: "pop" | "core" | null | undefined;
1707
+ wikidataId?: string | null | undefined;
1708
+ } | null;
1709
+ parent: {
1710
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1711
+ name: string;
1712
+ } | null;
1713
+ createdOn: string;
1714
+ updatedOn: string | null;
1715
+ isUnacceptedRoot: boolean;
1716
+ isUmbrella?: boolean | undefined;
1717
+ }[]>, Error>>;
1718
+ fetchStatus: _tanstack_react_query.FetchStatus;
1719
+ promise: Promise<NoInfer<{
1720
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1721
+ name: string;
1722
+ root: {
1723
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1724
+ name: string;
1725
+ };
1726
+ tracksCount: number;
1727
+ criteria: {
1728
+ uuid: string & z.core.$brand<"GenreUuid">;
1729
+ name: string;
1730
+ side?: "pop" | "core" | null | undefined;
1731
+ wikidataId?: string | null | undefined;
1732
+ } | null;
1733
+ parent: {
1734
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1735
+ name: string;
1736
+ } | null;
1737
+ createdOn: string;
1738
+ updatedOn: string | null;
1739
+ isUnacceptedRoot: boolean;
1740
+ isUmbrella?: boolean | undefined;
1741
+ }[]>>;
1742
+ } | {
1743
+ invalidateFullGenrePlaylists: () => void;
1744
+ data: NoInfer<{
1745
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1746
+ name: string;
1747
+ root: {
1748
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1749
+ name: string;
1750
+ };
1751
+ tracksCount: number;
1752
+ criteria: {
1753
+ uuid: string & z.core.$brand<"GenreUuid">;
1754
+ name: string;
1755
+ side?: "pop" | "core" | null | undefined;
1756
+ wikidataId?: string | null | undefined;
1757
+ } | null;
1758
+ parent: {
1759
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1760
+ name: string;
1761
+ } | null;
1762
+ createdOn: string;
1763
+ updatedOn: string | null;
1764
+ isUnacceptedRoot: boolean;
1765
+ isUmbrella?: boolean | undefined;
1766
+ }[]>;
1767
+ error: null;
1768
+ isError: false;
1769
+ isPending: false;
1770
+ isLoading: false;
1771
+ isLoadingError: false;
1772
+ isRefetchError: false;
1773
+ isSuccess: true;
1774
+ isPlaceholderData: false;
1775
+ status: "success";
1776
+ dataUpdatedAt: number;
1777
+ errorUpdatedAt: number;
1778
+ failureCount: number;
1779
+ failureReason: Error | null;
1780
+ errorUpdateCount: number;
1781
+ isFetched: boolean;
1782
+ isFetchedAfterMount: boolean;
1783
+ isFetching: boolean;
1784
+ isInitialLoading: boolean;
1785
+ isPaused: boolean;
1786
+ isRefetching: boolean;
1787
+ isStale: boolean;
1788
+ isEnabled: boolean;
1789
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1790
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1791
+ name: string;
1792
+ root: {
1793
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1794
+ name: string;
1795
+ };
1796
+ tracksCount: number;
1797
+ criteria: {
1798
+ uuid: string & z.core.$brand<"GenreUuid">;
1799
+ name: string;
1800
+ side?: "pop" | "core" | null | undefined;
1801
+ wikidataId?: string | null | undefined;
1802
+ } | null;
1803
+ parent: {
1804
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1805
+ name: string;
1806
+ } | null;
1807
+ createdOn: string;
1808
+ updatedOn: string | null;
1809
+ isUnacceptedRoot: boolean;
1810
+ isUmbrella?: boolean | undefined;
1811
+ }[]>, Error>>;
1812
+ fetchStatus: _tanstack_react_query.FetchStatus;
1813
+ promise: Promise<NoInfer<{
1814
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1815
+ name: string;
1816
+ root: {
1817
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1818
+ name: string;
1819
+ };
1820
+ tracksCount: number;
1821
+ criteria: {
1822
+ uuid: string & z.core.$brand<"GenreUuid">;
1823
+ name: string;
1824
+ side?: "pop" | "core" | null | undefined;
1825
+ wikidataId?: string | null | undefined;
1826
+ } | null;
1827
+ parent: {
1828
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1829
+ name: string;
1830
+ } | null;
1831
+ createdOn: string;
1832
+ updatedOn: string | null;
1833
+ isUnacceptedRoot: boolean;
1834
+ isUmbrella?: boolean | undefined;
1835
+ }[]>>;
1836
+ } | {
1837
+ invalidateFullGenrePlaylists: () => void;
1838
+ data: undefined;
1839
+ error: Error;
1840
+ isError: true;
1841
+ isPending: false;
1842
+ isLoading: false;
1843
+ isLoadingError: true;
1844
+ isRefetchError: false;
1845
+ isSuccess: false;
1846
+ isPlaceholderData: false;
1847
+ status: "error";
1848
+ dataUpdatedAt: number;
1849
+ errorUpdatedAt: number;
1850
+ failureCount: number;
1851
+ failureReason: Error | null;
1852
+ errorUpdateCount: number;
1853
+ isFetched: boolean;
1854
+ isFetchedAfterMount: boolean;
1855
+ isFetching: boolean;
1856
+ isInitialLoading: boolean;
1857
+ isPaused: boolean;
1858
+ isRefetching: boolean;
1859
+ isStale: boolean;
1860
+ isEnabled: boolean;
1861
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1862
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1863
+ name: string;
1864
+ root: {
1865
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1866
+ name: string;
1867
+ };
1868
+ tracksCount: number;
1869
+ criteria: {
1870
+ uuid: string & z.core.$brand<"GenreUuid">;
1871
+ name: string;
1872
+ side?: "pop" | "core" | null | undefined;
1873
+ wikidataId?: string | null | undefined;
1874
+ } | null;
1875
+ parent: {
1876
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1877
+ name: string;
1878
+ } | null;
1879
+ createdOn: string;
1880
+ updatedOn: string | null;
1881
+ isUnacceptedRoot: boolean;
1882
+ isUmbrella?: boolean | undefined;
1883
+ }[]>, Error>>;
1884
+ fetchStatus: _tanstack_react_query.FetchStatus;
1885
+ promise: Promise<NoInfer<{
1886
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1887
+ name: string;
1888
+ root: {
1889
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1890
+ name: string;
1891
+ };
1892
+ tracksCount: number;
1893
+ criteria: {
1894
+ uuid: string & z.core.$brand<"GenreUuid">;
1895
+ name: string;
1896
+ side?: "pop" | "core" | null | undefined;
1897
+ wikidataId?: string | null | undefined;
1898
+ } | null;
1899
+ parent: {
1900
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1901
+ name: string;
1902
+ } | null;
1903
+ createdOn: string;
1904
+ updatedOn: string | null;
1905
+ isUnacceptedRoot: boolean;
1906
+ isUmbrella?: boolean | undefined;
1907
+ }[]>>;
1908
+ } | {
1909
+ invalidateFullGenrePlaylists: () => void;
1910
+ data: undefined;
1911
+ error: null;
1912
+ isError: false;
1913
+ isPending: true;
1914
+ isLoading: true;
1915
+ isLoadingError: false;
1916
+ isRefetchError: false;
1917
+ isSuccess: false;
1918
+ isPlaceholderData: false;
1919
+ status: "pending";
1920
+ dataUpdatedAt: number;
1921
+ errorUpdatedAt: number;
1922
+ failureCount: number;
1923
+ failureReason: Error | null;
1924
+ errorUpdateCount: number;
1925
+ isFetched: boolean;
1926
+ isFetchedAfterMount: boolean;
1927
+ isFetching: boolean;
1928
+ isInitialLoading: boolean;
1929
+ isPaused: boolean;
1930
+ isRefetching: boolean;
1931
+ isStale: boolean;
1932
+ isEnabled: boolean;
1933
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
1934
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1935
+ name: string;
1936
+ root: {
1937
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1938
+ name: string;
1939
+ };
1940
+ tracksCount: number;
1941
+ criteria: {
1942
+ uuid: string & z.core.$brand<"GenreUuid">;
1943
+ name: string;
1944
+ side?: "pop" | "core" | null | undefined;
1945
+ wikidataId?: string | null | undefined;
1946
+ } | null;
1947
+ parent: {
1948
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1949
+ name: string;
1950
+ } | null;
1951
+ createdOn: string;
1952
+ updatedOn: string | null;
1953
+ isUnacceptedRoot: boolean;
1954
+ isUmbrella?: boolean | undefined;
1955
+ }[]>, Error>>;
1956
+ fetchStatus: _tanstack_react_query.FetchStatus;
1957
+ promise: Promise<NoInfer<{
1958
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1959
+ name: string;
1960
+ root: {
1961
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1962
+ name: string;
1963
+ };
1964
+ tracksCount: number;
1965
+ criteria: {
1966
+ uuid: string & z.core.$brand<"GenreUuid">;
1967
+ name: string;
1968
+ side?: "pop" | "core" | null | undefined;
1969
+ wikidataId?: string | null | undefined;
1970
+ } | null;
1971
+ parent: {
1972
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
1973
+ name: string;
1974
+ } | null;
1975
+ createdOn: string;
1976
+ updatedOn: string | null;
1977
+ isUnacceptedRoot: boolean;
1978
+ isUmbrella?: boolean | undefined;
1979
+ }[]>>;
1980
+ } | {
1981
+ invalidateFullGenrePlaylists: () => void;
1982
+ data: undefined;
1983
+ error: null;
1984
+ isError: false;
1985
+ isPending: true;
1986
+ isLoadingError: false;
1987
+ isRefetchError: false;
1988
+ isSuccess: false;
1989
+ isPlaceholderData: false;
1990
+ status: "pending";
1991
+ dataUpdatedAt: number;
1992
+ errorUpdatedAt: number;
1993
+ failureCount: number;
1994
+ failureReason: Error | null;
1995
+ errorUpdateCount: number;
1996
+ isFetched: boolean;
1997
+ isFetchedAfterMount: boolean;
1998
+ isFetching: boolean;
1999
+ isLoading: boolean;
2000
+ isInitialLoading: boolean;
2001
+ isPaused: boolean;
2002
+ isRefetching: boolean;
2003
+ isStale: boolean;
2004
+ isEnabled: boolean;
2005
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
2006
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2007
+ name: string;
2008
+ root: {
2009
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2010
+ name: string;
2011
+ };
2012
+ tracksCount: number;
2013
+ criteria: {
2014
+ uuid: string & z.core.$brand<"GenreUuid">;
2015
+ name: string;
2016
+ side?: "pop" | "core" | null | undefined;
2017
+ wikidataId?: string | null | undefined;
2018
+ } | null;
2019
+ parent: {
2020
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2021
+ name: string;
2022
+ } | null;
2023
+ createdOn: string;
2024
+ updatedOn: string | null;
2025
+ isUnacceptedRoot: boolean;
2026
+ isUmbrella?: boolean | undefined;
2027
+ }[]>, Error>>;
2028
+ fetchStatus: _tanstack_react_query.FetchStatus;
2029
+ promise: Promise<NoInfer<{
2030
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2031
+ name: string;
2032
+ root: {
2033
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2034
+ name: string;
2035
+ };
2036
+ tracksCount: number;
2037
+ criteria: {
2038
+ uuid: string & z.core.$brand<"GenreUuid">;
2039
+ name: string;
2040
+ side?: "pop" | "core" | null | undefined;
2041
+ wikidataId?: string | null | undefined;
2042
+ } | null;
2043
+ parent: {
2044
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2045
+ name: string;
2046
+ } | null;
2047
+ createdOn: string;
2048
+ updatedOn: string | null;
2049
+ isUnacceptedRoot: boolean;
2050
+ isUmbrella?: boolean | undefined;
2051
+ }[]>>;
2052
+ } | {
2053
+ invalidateFullGenrePlaylists: () => void;
2054
+ data: NoInfer<{
2055
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2056
+ name: string;
2057
+ root: {
2058
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2059
+ name: string;
2060
+ };
2061
+ tracksCount: number;
2062
+ criteria: {
2063
+ uuid: string & z.core.$brand<"GenreUuid">;
2064
+ name: string;
2065
+ side?: "pop" | "core" | null | undefined;
2066
+ wikidataId?: string | null | undefined;
2067
+ } | null;
2068
+ parent: {
2069
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2070
+ name: string;
2071
+ } | null;
2072
+ createdOn: string;
2073
+ updatedOn: string | null;
2074
+ isUnacceptedRoot: boolean;
2075
+ isUmbrella?: boolean | undefined;
2076
+ }[]>;
2077
+ isError: false;
2078
+ error: null;
2079
+ isPending: false;
2080
+ isLoading: false;
2081
+ isLoadingError: false;
2082
+ isRefetchError: false;
2083
+ isSuccess: true;
2084
+ isPlaceholderData: true;
2085
+ status: "success";
2086
+ dataUpdatedAt: number;
2087
+ errorUpdatedAt: number;
2088
+ failureCount: number;
2089
+ failureReason: Error | null;
2090
+ errorUpdateCount: number;
2091
+ isFetched: boolean;
2092
+ isFetchedAfterMount: boolean;
2093
+ isFetching: boolean;
2094
+ isInitialLoading: boolean;
2095
+ isPaused: boolean;
2096
+ isRefetching: boolean;
2097
+ isStale: boolean;
2098
+ isEnabled: boolean;
2099
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<{
2100
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2101
+ name: string;
2102
+ root: {
2103
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2104
+ name: string;
2105
+ };
2106
+ tracksCount: number;
2107
+ criteria: {
2108
+ uuid: string & z.core.$brand<"GenreUuid">;
2109
+ name: string;
2110
+ side?: "pop" | "core" | null | undefined;
2111
+ wikidataId?: string | null | undefined;
2112
+ } | null;
2113
+ parent: {
2114
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2115
+ name: string;
2116
+ } | null;
2117
+ createdOn: string;
2118
+ updatedOn: string | null;
2119
+ isUnacceptedRoot: boolean;
2120
+ isUmbrella?: boolean | undefined;
2121
+ }[]>, Error>>;
2122
+ fetchStatus: _tanstack_react_query.FetchStatus;
2123
+ promise: Promise<NoInfer<{
2124
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2125
+ name: string;
2126
+ root: {
2127
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2128
+ name: string;
2129
+ };
2130
+ tracksCount: number;
2131
+ criteria: {
2132
+ uuid: string & z.core.$brand<"GenreUuid">;
2133
+ name: string;
2134
+ side?: "pop" | "core" | null | undefined;
2135
+ wikidataId?: string | null | undefined;
2136
+ } | null;
2137
+ parent: {
2138
+ uuid: string & z.core.$brand<"GenrePlaylistUuid">;
2139
+ name: string;
2140
+ } | null;
2141
+ createdOn: string;
2142
+ updatedOn: string | null;
2143
+ isUnacceptedRoot: boolean;
2144
+ isUmbrella?: boolean | undefined;
2145
+ }[]>>;
2146
+ };
2147
+ declare const useFetchGenrePlaylist: <T>(uuid: GenrePlaylistUuid, getBackendBaseUrl: () => string, criteriaPlaylistDetailedSchema: z.ZodType<T, unknown>) => _tanstack_react_query.UseQueryResult<NoInfer<T>, Error>;
2148
+ declare const useInvalidateAllGenrePlaylistQueries: () => () => Promise<[void, void, void, void]>;
2149
+
2150
+ declare const ARTIST_LINK_KINDS: readonly ["official", "wikipedia", "wikidata", "spotify", "youtube", "bandcamp", "soundcloud", "discogs", "social"];
2151
+ declare const ArtistImageSchema: z.ZodObject<{
2152
+ url: z.ZodURL;
2153
+ pageUrl: z.ZodURL;
2154
+ author: z.ZodNullable<z.ZodString>;
2155
+ license: z.ZodString;
2156
+ licenseUrl: z.ZodNullable<z.ZodURL>;
2157
+ }, z.core.$strip>;
2158
+ declare const ArtistDetailedSchema: z.ZodObject<{
2159
+ uuid: z.ZodString;
2160
+ name: z.ZodString;
2161
+ musicbrainzArtistId: z.ZodNullable<z.ZodString>;
2162
+ type: z.ZodNullable<z.ZodEnum<{
2163
+ person: "person";
2164
+ group: "group";
2165
+ orchestra: "orchestra";
2166
+ choir: "choir";
2167
+ character: "character";
2168
+ other: "other";
2169
+ }>>;
2170
+ country: z.ZodNullable<z.ZodString>;
2171
+ beginYear: z.ZodNullable<z.ZodNumber>;
2172
+ endYear: z.ZodNullable<z.ZodNumber>;
2173
+ ended: z.ZodBoolean;
2174
+ links: z.ZodArray<z.ZodObject<{
2175
+ kind: z.ZodEnum<{
2176
+ youtube: "youtube";
2177
+ official: "official";
2178
+ wikipedia: "wikipedia";
2179
+ wikidata: "wikidata";
2180
+ spotify: "spotify";
2181
+ bandcamp: "bandcamp";
2182
+ soundcloud: "soundcloud";
2183
+ discogs: "discogs";
2184
+ social: "social";
2185
+ }>;
2186
+ url: z.ZodURL;
2187
+ }, z.core.$strip>>;
2188
+ members: z.ZodArray<z.ZodObject<{
2189
+ artist: z.ZodObject<{
2190
+ uuid: z.ZodString;
2191
+ name: z.ZodString;
2192
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2193
+ }, z.core.$strip>;
2194
+ beginYear: z.ZodNullable<z.ZodNumber>;
2195
+ endYear: z.ZodNullable<z.ZodNumber>;
2196
+ ended: z.ZodBoolean;
2197
+ roles: z.ZodArray<z.ZodString>;
2198
+ }, z.core.$strip>>;
2199
+ memberOf: z.ZodArray<z.ZodObject<{
2200
+ artist: z.ZodObject<{
2201
+ uuid: z.ZodString;
2202
+ name: z.ZodString;
2203
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2204
+ }, z.core.$strip>;
2205
+ beginYear: z.ZodNullable<z.ZodNumber>;
2206
+ endYear: z.ZodNullable<z.ZodNumber>;
2207
+ ended: z.ZodBoolean;
2208
+ roles: z.ZodArray<z.ZodString>;
2209
+ }, z.core.$strip>>;
2210
+ albums: z.ZodArray<z.ZodObject<{
2211
+ uuid: z.ZodString;
2212
+ name: z.ZodString;
2213
+ year: z.ZodNullable<z.ZodString>;
2214
+ primaryType: z.ZodNullable<z.ZodString>;
2215
+ secondaryTypes: z.ZodArray<z.ZodString>;
2216
+ }, z.core.$strip>>;
2217
+ tracksCount: z.ZodNumber;
2218
+ image: z.ZodNullable<z.ZodObject<{
2219
+ url: z.ZodURL;
2220
+ pageUrl: z.ZodURL;
2221
+ author: z.ZodNullable<z.ZodString>;
2222
+ license: z.ZodString;
2223
+ licenseUrl: z.ZodNullable<z.ZodURL>;
2224
+ }, z.core.$strip>>;
2225
+ }, z.core.$strip>;
2226
+ type ArtistImage = z.infer<typeof ArtistImageSchema>;
2227
+ type ArtistDetailed = z.infer<typeof ArtistDetailedSchema>;
2228
+ type ArtistMembership = ArtistDetailed["members"][number];
2229
+ type ArtistLink = ArtistDetailed["links"][number];
2230
+ type ArtistAlbum = ArtistDetailed["albums"][number];
2231
+
2232
+ type UseArtistResult = {
2233
+ status: "idle";
2234
+ } | {
2235
+ status: "not-found";
2236
+ } | {
2237
+ status: "error";
2238
+ } | {
2239
+ status: "loading";
2240
+ } | {
2241
+ status: "success";
2242
+ artist: ArtistDetailed;
2243
+ };
2244
+ declare function useArtist(uuid: string | null, getBackendBaseUrl: () => string): UseArtistResult;
2245
+
2246
+ declare const ArtistSearchResultSchema: z.ZodObject<{
2247
+ uuid: z.ZodString;
2248
+ name: z.ZodString;
2249
+ disambiguation: z.ZodNullable<z.ZodString>;
2250
+ type: z.ZodNullable<z.ZodEnum<{
2251
+ person: "person";
2252
+ group: "group";
2253
+ orchestra: "orchestra";
2254
+ choir: "choir";
2255
+ character: "character";
2256
+ other: "other";
2257
+ }>>;
2258
+ country: z.ZodNullable<z.ZodString>;
2259
+ beginYear: z.ZodNullable<z.ZodNumber>;
2260
+ endYear: z.ZodNullable<z.ZodNumber>;
2261
+ matchedAlias: z.ZodNullable<z.ZodString>;
2262
+ recordingCount: z.ZodNumber;
2263
+ }, z.core.$strip>;
2264
+ declare const ArtistSearchResultsSchema: z.ZodArray<z.ZodObject<{
2265
+ uuid: z.ZodString;
2266
+ name: z.ZodString;
2267
+ disambiguation: z.ZodNullable<z.ZodString>;
2268
+ type: z.ZodNullable<z.ZodEnum<{
2269
+ person: "person";
2270
+ group: "group";
2271
+ orchestra: "orchestra";
2272
+ choir: "choir";
2273
+ character: "character";
2274
+ other: "other";
2275
+ }>>;
2276
+ country: z.ZodNullable<z.ZodString>;
2277
+ beginYear: z.ZodNullable<z.ZodNumber>;
2278
+ endYear: z.ZodNullable<z.ZodNumber>;
2279
+ matchedAlias: z.ZodNullable<z.ZodString>;
2280
+ recordingCount: z.ZodNumber;
2281
+ }, z.core.$strip>>;
2282
+ type ArtistSearchResult = z.infer<typeof ArtistSearchResultSchema>;
2283
+
2284
+ interface UseArtistSearchResult {
2285
+ artists: ArtistSearchResult[];
2286
+ isError: boolean;
2287
+ /** True once the debounced query has caught up with the typed one and its fetch has finished. */
2288
+ settled: boolean;
2289
+ }
2290
+ declare function useArtistSearch(getBackendBaseUrl: () => string, text: string): UseArtistSearchResult;
2291
+
2292
+ /** The artist's footprint on the canonical tree (sparse: non-zero genre playlists only). Idle while `artistUuid` is null. */
2293
+ declare function useArtistGenreCounts(artistUuid: string | null, getBackendBaseUrl: () => string): _tanstack_react_query.UseQueryResult<NoInfer<{
2294
+ genrePlaylist: string & z.core.$brand<"GenrePlaylistUuid">;
2295
+ songsCount: number;
2296
+ tracksCount: number;
2297
+ }[]>, Error>;
2298
+
2299
+ declare const CriteriaPlaylistSimpleSchema: z.ZodObject<{
2300
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2301
+ name: z.ZodString;
2302
+ root: z.ZodObject<{
2303
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2304
+ name: z.ZodString;
2305
+ }, z.core.$strip>;
2306
+ tracksCount: z.ZodNumber;
2307
+ criteria: z.ZodNullable<z.ZodObject<{
2308
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2309
+ name: z.ZodString;
2310
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2311
+ pop: "pop";
2312
+ core: "core";
2313
+ }>>>;
2314
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2315
+ }, z.core.$strip>>;
2316
+ parent: z.ZodNullable<z.ZodObject<{
2317
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2318
+ name: z.ZodString;
2319
+ }, z.core.$strip>>;
2320
+ createdOn: z.ZodString;
2321
+ updatedOn: z.ZodNullable<z.ZodString>;
2322
+ isUnacceptedRoot: z.ZodBoolean;
2323
+ isUmbrella: z.ZodOptional<z.ZodBoolean>;
2324
+ }, z.core.$strip>;
2325
+ type CriteriaPlaylistSimple = z.infer<typeof CriteriaPlaylistSimpleSchema>;
2326
+
2327
+ interface UseGenreSearchOptions<T extends CriteriaPlaylistSimple = CriteriaPlaylistSimple> {
2328
+ genrePlaylists: T[];
2329
+ onSelect: (genrePlaylist: T) => void;
2330
+ /** Name of the currently selected genre; fills the query whenever it changes. */
2331
+ selectedName?: string | null;
2332
+ /** Called by `clear`, after it empties the query. */
2333
+ onClear?: () => void;
2334
+ }
2335
+ interface UseGenreSearchResult<T extends CriteriaPlaylistSimple = CriteriaPlaylistSimple> {
2336
+ query: string;
2337
+ setQuery: (query: string) => void;
2338
+ results: T[];
2339
+ /** Whether there is anything to clear (a typed query or a selected genre). */
2340
+ canClear: boolean;
2341
+ clear: () => void;
2342
+ select: (genrePlaylist: T) => void;
2343
+ }
2344
+ declare function useGenreSearch<T extends CriteriaPlaylistSimple = CriteriaPlaylistSimple>({ genrePlaylists, onSelect, selectedName, onClear, }: UseGenreSearchOptions<T>): UseGenreSearchResult<T>;
2345
+
2346
+ type GenreViewMode = "stacked" | "wheel" | "pop-core" | "outline";
2347
+ interface UseGenreTreeViewStateOptions<O extends CriteriaOverview = CriteriaOverview> {
2348
+ scope: Scope;
2349
+ getBackendBaseUrl: () => string;
2350
+ /** Controlled view mode; when provided the hook never changes it. */
2351
+ viewMode?: GenreViewMode;
2352
+ /** Narrows the tree to this artist's footprint (see `useVisibleGenrePlaylists`). */
2353
+ artistUuid?: string | null;
2354
+ /** Controlled selection (a genre playlist uuid, i.e. the tree node id). */
2355
+ selectedNodeId?: string | null;
2356
+ /** Called on every user-driven selection change (node click, search pick, search clear). */
2357
+ onSelectedNodeIdChange?: (nodeId: string | null) => void;
2358
+ criteriaOverviewSchema?: z.ZodType<O, unknown>;
2359
+ }
2360
+ interface UseGenreTreeViewStateResult {
2361
+ isLoading: boolean;
2362
+ genrePlaylists: CriteriaPlaylistSimple[];
2363
+ genrePlaylistByNodeId: Map<string, CriteriaPlaylistSimple>;
2364
+ /** Playlists the current view mode may show: unaccepted roots and, outside stacked/outline, criteria-less playlists are hidden. */
2365
+ visibleGenrePlaylists: CriteriaPlaylistSimple[];
2366
+ groupedGenrePlaylistsByRoot: Record<string, CriteriaPlaylistSimple[]>;
2367
+ selectedNodeId: string | null;
2368
+ selectedGenrePlaylist: CriteriaPlaylistSimple | undefined;
2369
+ selectNode: (node: {
2370
+ id: string;
2371
+ } | null) => void;
2372
+ selectGenrePlaylist: (genrePlaylist: CriteriaPlaylistSimple) => void;
2373
+ clearSelection: () => void;
2374
+ /** The effective view mode: falls back to "wheel" when a pop-core-based mode has no "Mainstream Pop" root. */
2375
+ viewMode: GenreViewMode;
2376
+ isViewModeControlled: boolean;
2377
+ setViewMode: (mode: GenreViewMode) => void;
2378
+ canShowPopCore: boolean;
2379
+ allowWheelRotation: boolean;
2380
+ toggleWheelRotation: () => void;
2381
+ /** Moves the genre under a new parent. */
2382
+ /** Prefetches the hovered genre's overview once the pointer has rested briefly. */
2383
+ onNodeHover: (node: {
2384
+ id: string;
2385
+ }) => void;
2386
+ }
2387
+ declare function useGenreTreeViewState<O extends CriteriaOverview = CriteriaOverview>({ scope, getBackendBaseUrl, viewMode: controlledViewMode, artistUuid, selectedNodeId: controlledSelectedNodeId, onSelectedNodeIdChange, criteriaOverviewSchema, }: UseGenreTreeViewStateOptions<O>): UseGenreTreeViewStateResult;
2388
+
2389
+ interface UseVisibleGenrePlaylistsOptions {
2390
+ scope: Scope;
2391
+ getBackendBaseUrl: () => string;
2392
+ /** When set, the tree is pruned to this artist's footprint and carries the artist's counts. */
2393
+ artistUuid?: string | null;
2394
+ }
2395
+ /**
2396
+ * The tree the user can navigate: the whole canonical tree, or the artist's footprint when
2397
+ * `artistUuid` is set. Hosts validate URL state (selected genre, focus) against this list. While the
2398
+ * artist's counts load it is empty and `isLoading` is true; if they fail (unknown artist, backend
2399
+ * error) the whole tree is served, the artist panel being where that failure is shown.
2400
+ */
2401
+ declare function useVisibleGenrePlaylists({ scope, getBackendBaseUrl, artistUuid }: UseVisibleGenrePlaylistsOptions): {
2402
+ isLoading: boolean;
2403
+ genrePlaylists: {
2404
+ uuid: string & zod.$brand<"GenrePlaylistUuid">;
2405
+ name: string;
2406
+ root: {
2407
+ uuid: string & zod.$brand<"GenrePlaylistUuid">;
2408
+ name: string;
2409
+ };
2410
+ tracksCount: number;
2411
+ criteria: {
2412
+ uuid: string & zod.$brand<"GenreUuid">;
2413
+ name: string;
2414
+ side?: "pop" | "core" | null | undefined;
2415
+ wikidataId?: string | null | undefined;
2416
+ } | null;
2417
+ parent: {
2418
+ uuid: string & zod.$brand<"GenrePlaylistUuid">;
2419
+ name: string;
2420
+ } | null;
2421
+ createdOn: string;
2422
+ updatedOn: string | null;
2423
+ isUnacceptedRoot: boolean;
2424
+ isUmbrella?: boolean | undefined;
2425
+ }[];
2426
+ };
2427
+
2428
+ declare const TrackBaseSchema: z.ZodObject<{
2429
+ uuid: z.ZodString;
2430
+ title: z.ZodString;
2431
+ artists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2432
+ uuid: z.ZodString;
2433
+ name: z.ZodString;
2434
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2435
+ }, z.core.$strip>>>>;
2436
+ album: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2437
+ uuid: z.ZodString;
2438
+ name: z.ZodString;
2439
+ albumArtists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2440
+ uuid: z.ZodString;
2441
+ name: z.ZodString;
2442
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2443
+ }, z.core.$strip>>>>;
2444
+ }, z.core.$strip>>>;
2445
+ trackNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2446
+ genre: z.ZodObject<{
2447
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2448
+ name: z.ZodString;
2449
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2450
+ pop: "pop";
2451
+ core: "core";
2452
+ }>>>;
2453
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2454
+ }, z.core.$strip>;
2455
+ rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2456
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2457
+ playCount: z.ZodNumber;
2458
+ createdOn: z.ZodString;
2459
+ updatedOn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2460
+ }, z.core.$strip>;
2461
+ type TrackBase = z.infer<typeof TrackBaseSchema>;
2462
+
2463
+ declare const CriteriaPlaylistMinimumSchema: z.ZodObject<{
2464
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2465
+ name: z.ZodString;
2466
+ }, z.core.$strip>;
2467
+ type CriteriaPlaylistMinimum = z.infer<typeof CriteriaPlaylistMinimumSchema>;
2468
+
2469
+ declare enum TrackListOriginType {
2470
+ TRACK = "TRACK",
2471
+ GENRE_PLAYLIST = "GENRE_PLAYLIST",
2472
+ ARTIST = "ARTIST"
2473
+ }
2474
+
2475
+ /**
2476
+ * Trimmed from grow-the-music-tree-frontend's original `TrackListOrigin.ts`: dropped
2477
+ * `TrackListOriginFromPlaylist` (Spotify-library playlist origin, backed by a `PlaylistDetailed`
2478
+ * schema that's part of grow's separate Spotify-library feature, out of scope for this package).
2479
+ * Kept origins: a single track, a genre playlist, and an artist (their playable songs,
2480
+ * paged through `playNewTrackListFromArtist`).
2481
+ */
2482
+
2483
+ declare class TrackListOrigin {
2484
+ type: TrackListOriginType;
2485
+ label: string;
2486
+ uuid: string;
2487
+ scope: Scope;
2488
+ constructor(type: TrackListOriginType, label: string, uuid: string, scope: Scope);
2489
+ }
2490
+ declare class TrackListOriginFromTrack<T extends TrackBase = TrackBase> extends TrackListOrigin {
2491
+ track: T;
2492
+ constructor(track: T, scope: Scope);
2493
+ }
2494
+ declare class TrackListOriginFromCriteriaPlaylist extends TrackListOrigin {
2495
+ criteriaPlaylist: CriteriaPlaylistMinimum;
2496
+ from?: string | undefined;
2497
+ /** `from`: the track the list starts at (server-side `?from=`), kept so later pages use it too. */
2498
+ constructor(criteriaPlaylist: CriteriaPlaylistMinimum, scope: Scope, from?: string | undefined);
2499
+ }
2500
+ type ArtistSongsOrdering = "title" | "-title" | "albumYear" | "-albumYear";
2501
+ type ArtistTrackListOriginInput = {
2502
+ uuid: string;
2503
+ name: string;
2504
+ };
2505
+ declare class TrackListOriginFromArtist extends TrackListOrigin {
2506
+ artist: ArtistTrackListOriginInput;
2507
+ ordering: ArtistSongsOrdering;
2508
+ from?: string | undefined;
2509
+ /** Narrows the artist's songs to this genre's subtree. */
2510
+ genreUuid?: GenreUuid | undefined;
2511
+ /** `ordering`/`from`: kept so later pages use the same order and start track. */
2512
+ constructor(artist: ArtistTrackListOriginInput, scope: Scope, ordering: ArtistSongsOrdering, from?: string | undefined,
2513
+ /** Narrows the artist's songs to this genre's subtree. */
2514
+ genreUuid?: GenreUuid | undefined);
2515
+ }
2516
+
2517
+ declare class TrackList<T extends TrackBase = TrackBase> {
2518
+ tracks: T[];
2519
+ origin: TrackListOrigin;
2520
+ /** Tracks in the whole origin, loaded or not. */
2521
+ total: number;
2522
+ /** Next page to fetch, or null once every track is loaded. */
2523
+ nextPage: number | null;
2524
+ constructor(tracks: T[], origin: TrackListOrigin,
2525
+ /** Tracks in the whole origin, loaded or not. */
2526
+ total?: number,
2527
+ /** Next page to fetch, or null once every track is loaded. */
2528
+ nextPage?: number | null);
2529
+ }
2530
+ declare class TrackListFromTrack<T extends TrackBase = TrackBase> extends TrackList<T> {
2531
+ tracks: T[];
2532
+ origin: TrackListOriginFromTrack<T>;
2533
+ constructor(tracks: T[], origin: TrackListOriginFromTrack<T>);
2534
+ }
2535
+ declare class TrackListFromCriteriaPlaylist<T extends TrackBase = TrackBase> extends TrackList<T> {
2536
+ tracks: T[];
2537
+ origin: TrackListOriginFromCriteriaPlaylist;
2538
+ constructor(tracks: T[], origin: TrackListOriginFromCriteriaPlaylist, total: number, nextPage: number | null);
2539
+ }
2540
+ declare class TrackListFromArtist<T extends TrackBase = TrackBase> extends TrackList<T> {
2541
+ tracks: T[];
2542
+ origin: TrackListOriginFromArtist;
2543
+ constructor(tracks: T[], origin: TrackListOriginFromArtist, total: number, nextPage: number | null);
2544
+ }
2545
+
2546
+ declare function useListTracks<T>(scope: Scope | null, getBackendBaseUrl: () => string, schema: z.ZodType<T, unknown>, listEndpoint: (page: number) => string, listQueryKey: (page: number) => readonly unknown[], page?: number, pageSize?: number | string): _tanstack_react_query.UseQueryResult<NoInfer<{
2547
+ overallTotal: number;
2548
+ next: string | null;
2549
+ previous: string | null;
2550
+ results: T[];
2551
+ page: number;
2552
+ pageSize: number;
2553
+ totalPages: number;
2554
+ }>, Error>;
2555
+ type GenrePlaylistTracksPage<T> = {
2556
+ tracks: T[];
2557
+ total: number;
2558
+ nextPage: number | null;
2559
+ };
2560
+ type PlayGenrePlaylistOptions = {
2561
+ startSongUuid?: string;
2562
+ };
2563
+ type PlayArtistOptions = {
2564
+ ordering: ArtistSongsOrdering;
2565
+ startSongUuid?: string;
2566
+ genreUuid?: GenreUuid;
2567
+ };
2568
+ interface TrackListContextType<T extends TrackBase> {
2569
+ trackList: TrackList<T> | null;
2570
+ selectedTrack: T | null;
2571
+ setSelectedTrack: (track: T | null) => void;
2572
+ toTrackAtPosition: (position: number) => void;
2573
+ playNewTrackListFromTrackUuid: (track: T, scope: Scope) => void;
2574
+ /**
2575
+ * Fetches the playlist's first tracks page and plays its first track. Rejects on fetch/parse failure.
2576
+ * With `startSongUuid`, the list starts at that track (`?from=`), so earlier tracks aren't
2577
+ * queued; rejects when the playlist doesn't contain it.
2578
+ */
2579
+ playNewTrackListFromGenrePlaylist: (genrePlaylist: CriteriaPlaylistMinimum, scope: Scope, options?: PlayGenrePlaylistOptions) => Promise<void>;
2580
+ /**
2581
+ * Fetches the artist's first page of playable songs in `ordering` and plays the first one;
2582
+ * later pages load lazily. With `startSongUuid`, the list starts at that song (`?from=`); with
2583
+ * `genreUuid`, only the songs in that genre's subtree are queued (`?genre=`).
2584
+ * Rejects on fetch/parse failure, or when the artist's playable songs don't contain it.
2585
+ */
2586
+ playNewTrackListFromArtist: (artist: ArtistTrackListOriginInput, scope: Scope, options: PlayArtistOptions) => Promise<void>;
2587
+ /** One page of a genre playlist's tracks, parsed with the provider's track schema; `from` starts the list at that track. */
2588
+ fetchGenrePlaylistTracksPage: (uuid: GenrePlaylistUuid, scope: Scope, page: number, from?: string) => Promise<GenrePlaylistTracksPage<T>>;
2589
+ /** Appends the next tracks page of the current genre-playlist or artist list; no-op when fully loaded or already loading. */
2590
+ loadMore: () => Promise<void>;
2591
+ }
2592
+ interface TrackListProviderProps<T extends TrackBase> {
2593
+ children: ReactNode;
2594
+ getBackendBaseUrl: () => string;
2595
+ schema: z.ZodType<T, unknown>;
2596
+ listEndpoint: (page: number) => string;
2597
+ listQueryKey: (page: number) => readonly unknown[];
2598
+ }
2599
+ declare function TrackListProvider<T extends TrackBase>({ children, getBackendBaseUrl, schema, listEndpoint, listQueryKey, }: TrackListProviderProps<T>): react.JSX.Element;
2600
+ declare function useTrackList<T extends TrackBase = TrackBase>(): TrackListContextType<T>;
2601
+
2602
+ interface TrackListSidebarVisibilityContextType {
2603
+ isTrackListSidebarVisible: boolean;
2604
+ toggleTrackListSidebar: () => void;
2605
+ showTrackListSidebar: () => void;
2606
+ hideTrackListSidebar: () => void;
2607
+ }
2608
+ interface TrackListSidebarVisibilityProviderProps {
2609
+ children: ReactNode;
2610
+ }
2611
+ declare function TrackListSidebarVisibilityProvider({ children }: TrackListSidebarVisibilityProviderProps): react.JSX.Element;
2612
+ declare function useTrackListSidebarVisibility(): TrackListSidebarVisibilityContextType;
2613
+
2614
+ declare const ArtistMinimumSchema: z.ZodObject<{
2615
+ uuid: z.ZodString;
2616
+ name: z.ZodString;
2617
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2618
+ }, z.core.$strip>;
2619
+ type ArtistMinimum = z.infer<typeof ArtistMinimumSchema>;
2620
+
2621
+ /** Renders one artist name as a link — typically the consumer's router `Link`, so navigating keeps playback alive. */
2622
+ type RenderArtistLink = (artist: ArtistMinimum) => ReactNode;
2623
+ declare function ArtistNames({ artists, renderArtistLink, }: {
2624
+ artists: ArtistMinimum[];
2625
+ renderArtistLink?: RenderArtistLink;
2626
+ }): react.JSX.Element;
2627
+
2628
+ declare const UuidResourceSchema: z.ZodObject<{
2629
+ uuid: z.ZodString;
2630
+ }, z.core.$strip>;
2631
+ type UuidResource = z.infer<typeof UuidResourceSchema>;
2632
+
2633
+ /** One non-zero node of an artist's footprint on the canonical genre tree. */
2634
+ declare const ArtistGenreCountSchema: z.ZodObject<{
2635
+ genrePlaylist: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2636
+ songsCount: z.ZodNumber;
2637
+ tracksCount: z.ZodNumber;
2638
+ }, z.core.$strip>;
2639
+ type ArtistGenreCount = z.infer<typeof ArtistGenreCountSchema>;
2640
+
2641
+ declare const AlbumMinimumSchema: z.ZodObject<{
2642
+ uuid: z.ZodString;
2643
+ name: z.ZodString;
2644
+ albumArtists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2645
+ uuid: z.ZodString;
2646
+ name: z.ZodString;
2647
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2648
+ }, z.core.$strip>>>>;
2649
+ }, z.core.$strip>;
2650
+ type AlbumMinimum = z.infer<typeof AlbumMinimumSchema>;
2651
+
2652
+ declare const MbArtistDetailedSchema: z.ZodObject<{
2653
+ musicbrainzId: z.ZodString;
2654
+ name: z.ZodString;
2655
+ musicbrainzLink: z.ZodURL;
2656
+ }, z.core.$strip>;
2657
+ type MusicbrainzArtistDetailed = z.infer<typeof MbArtistDetailedSchema>;
2658
+
2659
+ declare const MbRecordingDetailedSchema: z.ZodObject<{
2660
+ musicbrainzId: z.ZodString;
2661
+ title: z.ZodString;
2662
+ score: z.ZodNumber;
2663
+ musicbrainzArtists: z.ZodArray<z.ZodObject<{
2664
+ musicbrainzId: z.ZodString;
2665
+ name: z.ZodString;
2666
+ musicbrainzLink: z.ZodURL;
2667
+ }, z.core.$strip>>;
2668
+ musicbrainzLink: z.ZodURL;
2669
+ durationInSec: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2670
+ durationStrInHourMinSec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2671
+ releaseDate: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodTransform<string, string>>;
2672
+ }, z.core.$strip>;
2673
+ type MusicbrainzRecordingDetailed = z.infer<typeof MbRecordingDetailedSchema>;
2674
+
2675
+ declare const CriteriaMinimumSchema: z.ZodObject<{
2676
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2677
+ name: z.ZodString;
2678
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2679
+ pop: "pop";
2680
+ core: "core";
2681
+ }>>>;
2682
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2683
+ }, z.core.$strip>;
2684
+ type CriteriaMinimum = z.infer<typeof CriteriaMinimumSchema>;
2685
+
2686
+ declare const CriteriaSimpleSchema: z.ZodObject<{
2687
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2688
+ name: z.ZodString;
2689
+ parent: z.ZodNullable<z.ZodObject<{
2690
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2691
+ name: z.ZodString;
2692
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2693
+ pop: "pop";
2694
+ core: "core";
2695
+ }>>>;
2696
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2697
+ }, z.core.$strip>>;
2698
+ createdOn: z.ZodString;
2699
+ summary: z.ZodNullable<z.ZodString>;
2700
+ }, z.core.$strip>;
2701
+ type CriteriaSimple = z.infer<typeof CriteriaSimpleSchema>;
2702
+
2703
+ declare const CriteriaCreationSchema: z.ZodObject<{
2704
+ name: z.ZodString;
2705
+ parent: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">>;
2706
+ essentialSongs: z.ZodOptional<z.ZodArray<z.ZodString>>;
2707
+ }, z.core.$strip>;
2708
+ type CriteriaCreationValues = z.infer<typeof CriteriaCreationSchema>;
2709
+
2710
+ declare const CriteriaUpdateSchema: z.ZodObject<{
2711
+ name: z.ZodOptional<z.ZodString>;
2712
+ parent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">>>;
2713
+ essentialSongs: z.ZodOptional<z.ZodArray<z.ZodString>>;
2714
+ }, z.core.$strip>;
2715
+ type CriteriaUpdateValues = z.infer<typeof CriteriaUpdateSchema>;
2716
+
2717
+ declare const CriteriaLineageRelWithoutAscendantSchema: z.ZodObject<{
2718
+ descendant: z.ZodObject<{
2719
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2720
+ name: z.ZodString;
2721
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2722
+ pop: "pop";
2723
+ core: "core";
2724
+ }>>>;
2725
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2726
+ }, z.core.$strip>;
2727
+ degree: z.ZodNumber;
2728
+ }, z.core.$strip>;
2729
+ type CriteriaLineageRelWithoutAscendant = z.infer<typeof CriteriaLineageRelWithoutAscendantSchema>;
2730
+
2731
+ declare const CriteriaLineageRelWithoutDescendantSchema: z.ZodObject<{
2732
+ ascendant: z.ZodObject<{
2733
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2734
+ name: z.ZodString;
2735
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2736
+ pop: "pop";
2737
+ core: "core";
2738
+ }>>>;
2739
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2740
+ }, z.core.$strip>;
2741
+ degree: z.ZodNumber;
2742
+ }, z.core.$strip>;
2743
+ type CriteriaLineageRelWithoutDescendant = z.infer<typeof CriteriaLineageRelWithoutDescendantSchema>;
2744
+
2745
+ declare const CriteriaPlaylistDetailedSchema: z.ZodObject<{
2746
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2747
+ name: z.ZodString;
2748
+ tracksCount: z.ZodNumber;
2749
+ durationInSec: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2750
+ durationStrInHourMinSec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2751
+ criteria: z.ZodNullable<z.ZodObject<{
2752
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2753
+ name: z.ZodString;
2754
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2755
+ pop: "pop";
2756
+ core: "core";
2757
+ }>>>;
2758
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2759
+ }, z.core.$strip>>;
2760
+ parent: z.ZodNullable<z.ZodObject<{
2761
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2762
+ name: z.ZodString;
2763
+ }, z.core.$strip>>;
2764
+ root: z.ZodObject<{
2765
+ uuid: z.core.$ZodBranded<z.ZodString, "GenrePlaylistUuid", "out">;
2766
+ name: z.ZodString;
2767
+ }, z.core.$strip>;
2768
+ createdOn: z.ZodString;
2769
+ updatedOn: z.ZodNullable<z.ZodString>;
2770
+ }, z.core.$strip>;
2771
+ type CriteriaPlaylistDetailed = z.infer<typeof CriteriaPlaylistDetailedSchema>;
2772
+
2773
+ declare const YOUTUBE_UNPLAYABLE_REASON_LABELS: {
2774
+ readonly not_found: "Video unavailable";
2775
+ readonly not_embeddable: "Embedding disabled";
2776
+ readonly private: "Private video";
2777
+ readonly not_processed: "Video still processing";
2778
+ readonly region_whitelisted: "Region restricted";
2779
+ };
2780
+ type YoutubeUnplayableReason = keyof typeof YOUTUBE_UNPLAYABLE_REASON_LABELS;
2781
+ declare const SongDetailedSchema: z.ZodObject<{
2782
+ uuid: z.ZodString;
2783
+ title: z.ZodString;
2784
+ artists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2785
+ uuid: z.ZodString;
2786
+ name: z.ZodString;
2787
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2788
+ }, z.core.$strip>>>>;
2789
+ album: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2790
+ uuid: z.ZodString;
2791
+ name: z.ZodString;
2792
+ albumArtists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2793
+ uuid: z.ZodString;
2794
+ name: z.ZodString;
2795
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2796
+ }, z.core.$strip>>>>;
2797
+ }, z.core.$strip>>>;
2798
+ trackNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2799
+ genre: z.ZodObject<{
2800
+ uuid: z.core.$ZodBranded<z.ZodString, "GenreUuid", "out">;
2801
+ name: z.ZodString;
2802
+ side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2803
+ pop: "pop";
2804
+ core: "core";
2805
+ }>>>;
2806
+ wikidataId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2807
+ }, z.core.$strip>;
2808
+ rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2809
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2810
+ playCount: z.ZodNumber;
2811
+ createdOn: z.ZodString;
2812
+ updatedOn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2813
+ youtubeVideo: z.ZodNullable<z.ZodObject<{
2814
+ id: z.ZodString;
2815
+ unplayableReason: z.ZodNullable<z.ZodEnum<{
2816
+ not_found: "not_found";
2817
+ not_embeddable: "not_embeddable";
2818
+ private: "private";
2819
+ not_processed: "not_processed";
2820
+ region_whitelisted: "region_whitelisted";
2821
+ }>>;
2822
+ }, z.core.$strip>>;
2823
+ musicbrainzRecordingId: z.ZodNullable<z.ZodString>;
2824
+ }, z.core.$strip>;
2825
+ type SongDetailed = z.infer<typeof SongDetailedSchema>;
2826
+ declare const NO_VIDEO_LABEL = "No video available";
2827
+ declare function isSong(track: TrackBase): track is SongDetailed;
2828
+ /** Human-readable reason a song can't be played, or null when it's playable. */
2829
+ declare function songUnplayableReason(song: SongDetailed): string | null;
2830
+ /** MusicBrainz recording page URL, or null when the song has no MBID. */
2831
+ declare function musicBrainzRecordingUrl(song: SongDetailed): string | null;
2832
+
2833
+ declare const TrackMinimumSchema: z.ZodObject<{
2834
+ title: z.ZodString;
2835
+ uuid: z.ZodString;
2836
+ artists: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2837
+ uuid: z.ZodString;
2838
+ name: z.ZodString;
2839
+ isSpecialPurpose: z.ZodOptional<z.ZodBoolean>;
2840
+ }, z.core.$strip>>>>;
2841
+ }, z.core.$strip>;
2842
+ type TrackMinimum = z.infer<typeof TrackMinimumSchema>;
2843
+
2844
+ declare const makeTrackPlaylistRelSchema: <T extends z.ZodTypeAny>(trackSchema: T) => z.ZodObject<{
2845
+ track: T;
2846
+ position: z.ZodNumber;
2847
+ }, z.core.$strip>;
2848
+ type TrackPlaylistRel<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof makeTrackPlaylistRelSchema<T>>>;
2849
+ declare const makeTrackPlaylistRelPageSchema: <T extends z.ZodTypeAny>(trackSchema: T) => z.ZodObject<{
2850
+ overallTotal: z.ZodNumber;
2851
+ next: z.ZodNullable<z.ZodString>;
2852
+ previous: z.ZodNullable<z.ZodString>;
2853
+ results: z.ZodArray<z.ZodObject<{
2854
+ track: T;
2855
+ position: z.ZodNumber;
2856
+ }, z.core.$strip>>;
2857
+ page: z.ZodNumber;
2858
+ pageSize: z.ZodNumber;
2859
+ totalPages: z.ZodNumber;
2860
+ }, z.core.$strip>;
2861
+
2862
+ declare const genreQueryKeys: {
2863
+ me: {
2864
+ all: readonly ["genres"];
2865
+ list: (page: number) => readonly ["genres", "list", number];
2866
+ detail: (id: GenreUuid) => readonly ["genres", "detail", string & zod.$brand<"GenreUuid">];
2867
+ overview: (id: GenreUuid) => readonly ["genres", "overview", string & zod.$brand<"GenreUuid">];
2868
+ };
2869
+ reference: {
2870
+ all: readonly ["referenceGenres"];
2871
+ list: (page: number) => readonly ["referenceGenres", "list", number];
2872
+ detail: (id: GenreUuid) => readonly ["referenceGenres", "detail", string & zod.$brand<"GenreUuid">];
2873
+ overview: (id: GenreUuid) => readonly ["referenceGenres", "overview", string & zod.$brand<"GenreUuid">];
2874
+ };
2875
+ };
2876
+
2877
+ declare const genreEndpoints: {
2878
+ me: {
2879
+ list: () => string;
2880
+ detail: (id: GenreUuid) => string;
2881
+ overview: (id: GenreUuid) => string;
2882
+ create: () => string;
2883
+ update: (id: GenreUuid) => string;
2884
+ delete: (id: GenreUuid) => string;
2885
+ };
2886
+ reference: {
2887
+ list: () => string;
2888
+ detail: (id: GenreUuid) => string;
2889
+ overview: (id: GenreUuid) => string;
2890
+ create: () => string;
2891
+ update: (id: GenreUuid) => string;
2892
+ delete: (id: GenreUuid) => string;
2893
+ };
2894
+ };
2895
+
2896
+ declare const artistQueryKeys: {
2897
+ search: (query: string) => readonly ["artistSearch", string];
2898
+ detail: (uuid: string | null) => readonly ["artist", string | null];
2899
+ genreCounts: (baseUrl: string, uuid: string | null) => readonly ["artistGenreCounts", string, string | null];
2900
+ };
2901
+
2902
+ declare const artistEndpoints: {
2903
+ search: () => string;
2904
+ detail: (uuid: string) => string;
2905
+ genreCounts: (uuid: string) => string;
2906
+ };
2907
+
2908
+ declare const genrePlaylistQueryKeys: {
2909
+ me: {
2910
+ all: readonly ["meGenrePlaylists"];
2911
+ list: (page: number) => readonly ["meGenrePlaylists", "list", number];
2912
+ full: readonly ["meGenrePlaylists", "full"];
2913
+ detail: (uuid: GenrePlaylistUuid) => readonly ["meGenrePlaylists", string & zod.$brand<"GenrePlaylistUuid">];
2914
+ tracks: (uuid: GenrePlaylistUuid) => readonly ["meGenrePlaylists", string & zod.$brand<"GenrePlaylistUuid">, "tracks"];
2915
+ };
2916
+ reference: {
2917
+ all: readonly ["referenceGenrePlaylists"];
2918
+ list: (baseUrl: string, page: number) => readonly ["referenceGenrePlaylists", string, "list", number];
2919
+ full: (baseUrl: string) => readonly ["referenceGenrePlaylists", string, "full"];
2920
+ detail: (baseUrl: string, uuid: GenrePlaylistUuid) => readonly ["referenceGenrePlaylists", string, string & zod.$brand<"GenrePlaylistUuid">];
2921
+ };
2922
+ };
2923
+
2924
+ declare const genrePlaylistEndpoints: {
2925
+ me: {
2926
+ list: () => string;
2927
+ detail: (uuid: GenrePlaylistUuid) => string;
2928
+ tracks: (uuid: GenrePlaylistUuid) => string;
2929
+ create: () => string;
2930
+ update: (uuid: GenrePlaylistUuid) => string;
2931
+ delete: (uuid: GenrePlaylistUuid) => string;
2932
+ };
2933
+ reference: {
2934
+ tree: () => string;
2935
+ list: () => string;
2936
+ detail: (uuid: GenrePlaylistUuid) => string;
2937
+ tracks: (uuid: GenrePlaylistUuid) => string;
2938
+ create: () => string;
2939
+ update: (uuid: GenrePlaylistUuid) => string;
2940
+ delete: (uuid: GenrePlaylistUuid) => string;
2941
+ };
2942
+ };
2943
+
2944
+ declare const libraryQueryKeys: {
2945
+ reference: {
2946
+ songs: {
2947
+ all: readonly [`${string}Songs`];
2948
+ list: (page: number) => readonly [`${string}Songs`, "list", number];
2949
+ detail: (uuid: string) => readonly [`${string}Songs`, "detail", string];
2950
+ byGenre: (baseUrl: string, genreUuid: GenreUuid) => readonly [`${string}Songs`, string, "genre", string & zod.$brand<"GenreUuid">];
2951
+ };
2952
+ };
2953
+ };
2954
+ declare const libraryEndpoints: {
2955
+ reference: {
2956
+ songs: {
2957
+ list: () => string;
2958
+ detail: (uuid: string) => string;
2959
+ delete: (uuid: string) => string;
2960
+ };
2961
+ };
2962
+ };
2963
+
2964
+ declare const FORM_RATING_NULL_VALUE = -1;
2965
+
2966
+ declare const formatTime: (seconds: number) => string;
2967
+ declare const capitalizeFirstLetter: (string: string) => string;
2968
+
2969
+ declare const getGenrePlaylistsGroupedByRoot: (genrePlaylists: CriteriaPlaylistSimple[]) => Record<string, {
2970
+ uuid: string & zod.$brand<"GenrePlaylistUuid">;
2971
+ name: string;
2972
+ root: {
2973
+ uuid: string & zod.$brand<"GenrePlaylistUuid">;
2974
+ name: string;
2975
+ };
2976
+ tracksCount: number;
2977
+ criteria: {
2978
+ uuid: string & zod.$brand<"GenreUuid">;
2979
+ name: string;
2980
+ side?: "pop" | "core" | null | undefined;
2981
+ wikidataId?: string | null | undefined;
2982
+ } | null;
2983
+ parent: {
2984
+ uuid: string & zod.$brand<"GenrePlaylistUuid">;
2985
+ name: string;
2986
+ } | null;
2987
+ createdOn: string;
2988
+ updatedOn: string | null;
2989
+ isUnacceptedRoot: boolean;
2990
+ isUmbrella?: boolean | undefined;
2991
+ }[]>;
2992
+ /** Whether `nodes` contains a root node (`parentId === null`) named exactly "Mainstream Pop" —
2993
+ * the precondition `GenreTreeWheelRadialPopCore` requires before rendering. */
2994
+ declare const hasMainstreamPopRoot: (nodes: {
2995
+ parentId: string | null;
2996
+ name: string;
2997
+ }[]) => boolean;
2998
+
2999
+ /**
3000
+ * Narrows the canonical tree to an artist's footprint: nodes with songs in their subtree (which
3001
+ * includes every ancestor of such a node) carry the artist's counts. Two structural exceptions are
3002
+ * kept with zero counts: the "Mainstream Pop" root (pop-core needs it) and the scene children of a
3003
+ * kept "Core electronic" (the scene stack needs one commercial and one underground child).
3004
+ */
3005
+ declare const pruneGenrePlaylistsForArtist: (playlists: CriteriaPlaylistSimple[], counts: ArtistGenreCount[]) => CriteriaPlaylistSimple[];
3006
+
3007
+ /** Case-insensitive substring match on genre name. An empty/whitespace query matches nothing. */
3008
+ declare const searchGenrePlaylistsByName: <T extends CriteriaPlaylistSimple>(genrePlaylists: T[], query: string) => T[];
3009
+
3010
+ type ReparentCandidate = CriteriaPlaylistSimple & {
3011
+ criteria: CriteriaMinimum;
3012
+ };
3013
+ /**
3014
+ * Genres a genre can move under: not itself, not its current parent, not a descendant (which would form a cycle),
3015
+ * and not a criteria-less playlist (the "Genreless" root), which has no genre to reparent under.
3016
+ */
3017
+ declare const getReparentCandidates: (genrePlaylists: CriteriaPlaylistSimple[], genrePlaylistUuid: GenrePlaylistUuid) => ReparentCandidate[];
3018
+
3019
+ type SongsPage = {
3020
+ tracks: unknown[];
3021
+ total: number | null;
3022
+ };
3023
+ /**
3024
+ * Applies an optimistic edit to the cached infinite query
3025
+ * `libraryQueryKeys.reference.songs.byGenre(baseUrl, genreUuid)`: pages are `{ tracks, total, nextPage }`.
3026
+ * `edit` maps a page's tracks (return fewer to remove, changed copies to update); every page's `total` (a list-wide count) follows the
3027
+ * overall removed/added count. Use as `queryClient.setQueryData(key, (data) => editGenreSongPages(data, edit))`.
3028
+ */
3029
+ declare function editGenreSongPages<P extends SongsPage>(data: InfiniteData<P> | undefined, edit: (tracks: P["tracks"]) => P["tracks"]): InfiniteData<P> | undefined;
3030
+
3031
+ export { ARTIST_LINK_KINDS, type AlbumMinimum, AlbumMinimumSchema, type ArtistAlbum, type ArtistDetailed, ArtistDetailedSchema, type ArtistGenreCount, ArtistGenreCountSchema, type ArtistImage, ArtistImageSchema, type ArtistLink, type ArtistMembership, type ArtistMinimum, ArtistMinimumSchema, ArtistNames, type ArtistSearchResult, ArtistSearchResultSchema, ArtistSearchResultsSchema, type ArtistSongsOrdering, type ArtistTrackListOriginInput, CriteriaCreationSchema, type CriteriaCreationValues, type CriteriaDetailed, CriteriaDetailedSchema, type CriteriaLineageRelWithoutAscendant, CriteriaLineageRelWithoutAscendantSchema, type CriteriaLineageRelWithoutDescendant, CriteriaLineageRelWithoutDescendantSchema, type CriteriaMinimum, CriteriaMinimumSchema, type CriteriaOverview, CriteriaOverviewSchema, type CriteriaPlaylistDetailed, CriteriaPlaylistDetailedSchema, type CriteriaPlaylistMinimum, CriteriaPlaylistMinimumSchema, type CriteriaPlaylistSimple, CriteriaPlaylistSimpleSchema, type CriteriaSimple, CriteriaSimpleSchema, CriteriaUpdateSchema, type CriteriaUpdateValues, FORM_RATING_NULL_VALUE, type GenrePlaylistTracksPage, GenrePlaylistUuid, GenreUuid, type GenreViewMode, MbArtistDetailedSchema, MbRecordingDetailedSchema, type MusicbrainzArtistDetailed, type MusicbrainzRecordingDetailed, NO_VIDEO_LABEL, type PlayArtistOptions, type PlayGenrePlaylistOptions, type RenderArtistLink, type ReparentCandidate, type SongDetailed, SongDetailedSchema, type TrackBase, TrackBaseSchema, TrackList, TrackListFromArtist, TrackListFromCriteriaPlaylist, TrackListFromTrack, TrackListOrigin, TrackListOriginFromArtist, TrackListOriginFromCriteriaPlaylist, TrackListOriginFromTrack, TrackListOriginType, TrackListProvider, TrackListSidebarVisibilityProvider, type TrackMinimum, TrackMinimumSchema, type TrackPlaylistRel, type UseArtistResult, type UseArtistSearchResult, type UseGenreSearchOptions, type UseGenreSearchResult, type UseGenreTreeViewStateOptions, type UseGenreTreeViewStateResult, type UseVisibleGenrePlaylistsOptions, type UuidResource, UuidResourceSchema, YOUTUBE_UNPLAYABLE_REASON_LABELS, type YoutubeUnplayableReason, artistEndpoints, artistQueryKeys, capitalizeFirstLetter, editGenreSongPages, formatTime, genreEndpoints, genrePlaylistEndpoints, genrePlaylistQueryKeys, genreQueryKeys, getGenrePlaylistsGroupedByRoot, getReparentCandidates, hasMainstreamPopRoot, isSong, libraryEndpoints, libraryQueryKeys, makeTrackPlaylistRelPageSchema, makeTrackPlaylistRelSchema, musicBrainzRecordingUrl, pruneGenrePlaylistsForArtist, searchGenrePlaylistsByName, songUnplayableReason, useArtist, useArtistGenreCounts, useArtistSearch, useCreateGenre, useDeleteGenre, useFetchGenre, useFetchGenreDetail, useFetchGenreOverview, useFetchGenrePlaylist, useGenreSearch, useGenreTreeViewState, useInvalidateAllGenrePlaylistQueries, useListFullGenrePlaylists, useListGenrePlaylists, useListGenres, useListTracks, usePrefetchGenreOverview, useTrackList, useTrackListSidebarVisibility, useUpdateGenre, useVisibleGenrePlaylists };