159 lines
3.8 KiB
YAML
159 lines
3.8 KiB
YAML
task_id: task_create_api_delete_app
|
|
entity_id: api_delete_app
|
|
generated_at: '2025-12-19T06:08:12.168925'
|
|
workflow_version: v001
|
|
target:
|
|
type: api
|
|
definition:
|
|
id: api_delete_app
|
|
method: DELETE
|
|
path: /api/apps/[id]
|
|
summary: Delete generated app
|
|
description: Delete generated app (recording remains)
|
|
tags:
|
|
- apps
|
|
path_params:
|
|
- name: id
|
|
type: uuid
|
|
description: App ID
|
|
query_params: []
|
|
request_body:
|
|
content_type: application/json
|
|
schema:
|
|
type: object
|
|
properties: []
|
|
responses:
|
|
- status: 200
|
|
description: App deleted
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: success
|
|
type: boolean
|
|
example:
|
|
success: true
|
|
- status: 404
|
|
description: App not found
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: error
|
|
type: string
|
|
example:
|
|
error: App not found
|
|
depends_on_models:
|
|
- model_generated_app
|
|
depends_on_apis: []
|
|
auth:
|
|
required: true
|
|
roles: []
|
|
related:
|
|
models:
|
|
- id: model_generated_app
|
|
definition: &id001
|
|
id: model_generated_app
|
|
name: GeneratedApp
|
|
description: AI-generated application from recording content
|
|
table_name: generated_apps
|
|
fields:
|
|
- name: id
|
|
type: uuid
|
|
constraints:
|
|
- primary_key
|
|
description: Unique app identifier
|
|
- name: user_id
|
|
type: uuid
|
|
constraints:
|
|
- foreign_key
|
|
- not_null
|
|
- indexed
|
|
description: Owner of this app
|
|
- name: recording_id
|
|
type: uuid
|
|
constraints:
|
|
- foreign_key
|
|
- not_null
|
|
- indexed
|
|
description: Source recording that triggered generation
|
|
- name: title
|
|
type: string
|
|
constraints:
|
|
- not_null
|
|
description: App title from AI analysis
|
|
- name: description
|
|
type: text
|
|
constraints: []
|
|
description: App description
|
|
- name: html_content
|
|
type: text
|
|
constraints:
|
|
- not_null
|
|
description: Complete HTML/CSS/JS for iframe rendering
|
|
- name: prd_content
|
|
type: text
|
|
constraints: []
|
|
description: Product Requirements Document (PRD) generated by AI
|
|
- name: ui_ux_design
|
|
type: text
|
|
constraints: []
|
|
description: UI/UX design notes from AI
|
|
- name: app_type
|
|
type: string
|
|
constraints: []
|
|
description: Type of app determined by AI (e.g., todo, calculator, form)
|
|
- name: status
|
|
type: enum
|
|
enum_values:
|
|
- generating
|
|
- completed
|
|
- failed
|
|
constraints:
|
|
- not_null
|
|
- default
|
|
default: generating
|
|
description: Generation status
|
|
relations:
|
|
- type: belongs_to
|
|
target: model_user
|
|
foreign_key: user_id
|
|
on_delete: cascade
|
|
- type: belongs_to
|
|
target: model_recording
|
|
foreign_key: recording_id
|
|
on_delete: cascade
|
|
indexes:
|
|
- fields:
|
|
- user_id
|
|
- created_at
|
|
unique: false
|
|
name: idx_apps_user_created
|
|
- fields:
|
|
- recording_id
|
|
unique: false
|
|
name: idx_apps_recording
|
|
timestamps: true
|
|
soft_delete: false
|
|
validations: []
|
|
external: false
|
|
apis: []
|
|
components: []
|
|
dependencies:
|
|
entity_ids:
|
|
- model_generated_app
|
|
definitions:
|
|
- id: model_generated_app
|
|
type: model
|
|
definition: *id001
|
|
external: false
|
|
files:
|
|
to_create:
|
|
- app/api/apps/[id]/route.ts
|
|
reference: []
|
|
acceptance:
|
|
- criterion: DELETE /api/apps/[id] returns success response
|
|
verification: curl -X DELETE /api/apps/[id]
|
|
- criterion: Request validation implemented
|
|
verification: Test with invalid data
|
|
- criterion: Error responses match contract
|
|
verification: Test error scenarios
|