32 lines
2.2 KiB
TypeScript
32 lines
2.2 KiB
TypeScript
import type { components } from '@pipu/api-client';
|
|
|
|
const source: components['schemas']['Source'] = {
|
|
id: '00000000-0000-4000-8000-000000000099', name: 'Музыкальное хранилище', type: 'local',
|
|
nfs_server: null, nfs_export: null, nfs_options: '', local_path: 'music/very-long-library-folder/collection',
|
|
tag_priority: 'tags_first', scan_interval_minutes: null, accepts_uploads: true,
|
|
write_template: null, status: 'mounted', status_message: null, last_scan_at: null,
|
|
created_at: '2026-01-01T00:00:00Z', scan: null,
|
|
};
|
|
const file: components['schemas']['UploadFile'] = {
|
|
id: '00000000-0000-4000-8000-000000000098', batch_id: '00000000-0000-4000-8000-000000000097',
|
|
batch_comment: 'Альбом для проверки', author: { id: '00000000-0000-4000-8000-000000000096', username: 'moderator' },
|
|
status: 'pending_review', original_name: 'Длинное_название_трека_для_проверки_переноса.flac',
|
|
client_rel_path: 'music/album/Длинное_название_трека_для_проверки_переноса.flac', size_bytes: 42000000,
|
|
received_bytes: 42000000, format: 'FLAC', codec: 'flac', bitrate: 1000000, sample_rate: 44100, bit_depth: 16,
|
|
duration_ms: 200000, tags: {}, metadata: null, metadata_edited: false, matched_artist_id: null,
|
|
matched_album_id: null, duplicate_of_track_id: null, duplicate_level: null, possible_duplicate: true,
|
|
quality_upgrade: false, target_source_id: source.id, target_rel_path: null, status_reason: null,
|
|
reviewed_at: null, created_at: '2026-01-01T00:00:00Z', updated_at: '2026-01-01T00:00:00Z', tus_url: null,
|
|
stream_url: '/api/v1/stream/mobile-preview',
|
|
};
|
|
|
|
/** Populated staff screens for browser layout checks; loaded only by the E2E bridge. */
|
|
export const mobileFixtures: Record<string, unknown> = {
|
|
'/api/v1/admin/sources': { items: [source] },
|
|
[`/api/v1/admin/sources/${source.id}`]: source,
|
|
[`/api/v1/admin/sources/${source.id}/patterns`]: { patterns: [] },
|
|
'/api/v1/admin/uploads': { items: [file], next_cursor: null },
|
|
'/api/v1/uploads/quota': { limit_bytes: 10000000000, used_bytes: 42000000, per_user_limit_bytes: null,
|
|
user_used_bytes: 42000000, max_file_bytes: 1000000000 },
|
|
};
|