70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
task_id: task_create_component_search_bar
|
|
entity_id: component_search_bar
|
|
generated_at: '2025-12-18T15:16:50.323230'
|
|
workflow_version: v001
|
|
target:
|
|
type: component
|
|
definition:
|
|
id: component_search_bar
|
|
name: SearchBar
|
|
description: Search input with autocomplete
|
|
props:
|
|
- name: placeholder
|
|
type: string
|
|
default: Search songs, artists, albums...
|
|
state:
|
|
- name: query
|
|
type: string
|
|
events:
|
|
- name: onSearch
|
|
payload:
|
|
query: string
|
|
uses_apis:
|
|
- api_search
|
|
uses_components: []
|
|
related:
|
|
models: []
|
|
apis:
|
|
- id: api_search
|
|
definition: &id001
|
|
id: api_search
|
|
method: GET
|
|
path: /api/search
|
|
description: Search songs, artists, and albums
|
|
query_params:
|
|
q: string
|
|
type: enum[song, artist, album, all]
|
|
limit: integer
|
|
responses:
|
|
- status: 200
|
|
description: Search results
|
|
schema:
|
|
songs: array
|
|
artists: array
|
|
albums: array
|
|
auth:
|
|
required: false
|
|
depends_on_models:
|
|
- model_song
|
|
- model_artist
|
|
- model_album
|
|
components: []
|
|
dependencies:
|
|
entity_ids:
|
|
- api_search
|
|
definitions:
|
|
- id: api_search
|
|
type: api
|
|
definition: *id001
|
|
files:
|
|
to_create:
|
|
- app/components/SearchBar.tsx
|
|
reference: []
|
|
acceptance:
|
|
- criterion: Component renders without errors
|
|
verification: Import and render in test
|
|
- criterion: Props are typed correctly
|
|
verification: TypeScript compilation
|
|
- criterion: Events fire correctly
|
|
verification: Test event handlers
|