114 lines
2.9 KiB
YAML
114 lines
2.9 KiB
YAML
task_id: task_create_component_invite_artist_modal
|
|
entity_id: component_invite_artist_modal
|
|
generated_at: '2025-12-18T17:43:33.734468'
|
|
workflow_version: v003
|
|
target:
|
|
type: component
|
|
definition:
|
|
id: component_invite_artist_modal
|
|
name: InviteArtistModal
|
|
props:
|
|
- name: isOpen
|
|
type: boolean
|
|
required: true
|
|
description: Whether modal is open
|
|
- name: labelId
|
|
type: string
|
|
required: true
|
|
description: Label ID sending invitation
|
|
events:
|
|
- name: onClose
|
|
payload: void
|
|
description: Fires when modal should close
|
|
- name: onInviteSent
|
|
payload: LabelInvitation
|
|
description: Fires when invitation successfully sent
|
|
uses_apis:
|
|
- api_create_label_invitation
|
|
uses_components: []
|
|
internal_state:
|
|
- searchQuery
|
|
- selectedArtist
|
|
- message
|
|
- isSubmitting
|
|
variants:
|
|
- default
|
|
related:
|
|
models: []
|
|
apis:
|
|
- id: api_create_label_invitation
|
|
definition: &id001
|
|
id: api_create_label_invitation
|
|
method: POST
|
|
path: /api/labels/[id]/invitations
|
|
summary: Create artist invitation
|
|
description: Send invitation to an artist to join the label
|
|
tags:
|
|
- labels
|
|
- invitations
|
|
path_params:
|
|
- name: id
|
|
type: string
|
|
description: Label ID
|
|
request_body:
|
|
content_type: application/json
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: artistId
|
|
type: string
|
|
required: true
|
|
description: ID of artist to invite
|
|
- name: message
|
|
type: string
|
|
required: false
|
|
description: Optional invitation message
|
|
responses:
|
|
- status: 201
|
|
description: Invitation created
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: id
|
|
type: uuid
|
|
- name: artistId
|
|
type: uuid
|
|
- name: status
|
|
type: string
|
|
- name: expiresAt
|
|
type: datetime
|
|
- status: 400
|
|
description: Artist already has label or pending invitation
|
|
- status: 401
|
|
description: Unauthorized
|
|
- status: 403
|
|
description: Not label owner
|
|
- status: 404
|
|
description: Artist not found
|
|
depends_on_models:
|
|
- model_label_invitation
|
|
depends_on_apis: []
|
|
auth:
|
|
required: true
|
|
roles:
|
|
- label
|
|
components: []
|
|
dependencies:
|
|
entity_ids:
|
|
- api_create_label_invitation
|
|
definitions:
|
|
- id: api_create_label_invitation
|
|
type: api
|
|
definition: *id001
|
|
files:
|
|
to_create:
|
|
- app/components/InviteArtistModal.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
|