export type RequestStatus = 'pending' | 'in_review' | 'approved' | 'rejected' | 'cancelled' | 'closed';
export declare const REQUEST_STATUSES: RequestStatus[];
export interface RequestActor {
    userId?: string;
    name: string;
    email: string;
    phone?: string;
}
export interface AppRequest {
    id: string;
    appId: string;
    orgId: string;
    type: string;
    status: RequestStatus;
    title: string;
    fields: Record<string, unknown>;
    metadata?: Record<string, unknown>;
    tags?: string[];
    priority?: string;
    submitter: RequestActor;
    assignee?: RequestActor;
    dueAt?: string;
    createdAt: string;
    updatedAt: string;
    closedAt?: string;
}
export interface RequestComment {
    commentId: string;
    requestId: string;
    author: RequestActor;
    body: string;
    createdAt: string;
}
export interface FieldOption {
    id: string;
    name: string;
    order: number;
}
export interface FieldSchemaDef {
    /** InputType enum name as string: 'TEXT', 'TEXTAREA', 'SELECT', etc. */
    type: string;
    name: string;
    labelKey: string;
    placeholder?: string;
    required: boolean;
    /** e.g. 'required', 'email', 'maxLength:500', 'minLength:3' */
    validators?: string[];
    options?: FieldOption[];
    order: number;
}
/** Quién puede leer un tipo de solicitud (y sus solicitudes públicas). */
export type RequestVisibility = 'PUBLIC' | 'ORG' | 'INTERNAL';
export interface RequestTypeConfig {
    typeId: string;
    appId: string;
    orgId: string;
    labelEs: string;
    labelEn: string;
    fieldSchema: FieldSchemaDef[];
    allowAnonymous: boolean;
    /** PUBLIC: cualquiera · ORG/INTERNAL: solo miembros de la org. Default ORG. */
    visibility?: RequestVisibility;
    createdAt: string;
    updatedAt: string;
}
export interface CreateRequestPayload {
    type: string;
    title: string;
    fields?: Record<string, unknown>;
    tags?: string[];
    priority?: string;
    /** Para solicitudes anónimas */
    submitter?: RequestActor;
    dueAt?: string;
}
export interface UpdateRequestPayload {
    title?: string;
    fields?: Record<string, unknown>;
    tags?: string[];
    priority?: string;
    assignee?: RequestActor;
    dueAt?: string;
}
export interface TransitionPayload {
    status: RequestStatus;
}
export interface AddCommentPayload {
    body: string;
}
export interface ListRequestsParams {
    type?: string;
    status?: string;
    limit?: number;
    nextToken?: string;
}
export interface ListRequestsResponse {
    requests: AppRequest[];
    nextToken?: string;
    count: number;
}
export interface ListCommentsResponse {
    comments: RequestComment[];
    count: number;
}
export interface ListRequestTypesResponse {
    types: RequestTypeConfig[];
}
export interface CreateRequestTypePayload {
    typeId?: string;
    labelEs: string;
    labelEn: string;
    fieldSchema: FieldSchemaDef[];
    allowAnonymous: boolean;
    visibility?: RequestVisibility;
}
export interface UpdateRequestTypePayload {
    labelEs: string;
    labelEn: string;
    fieldSchema: FieldSchemaDef[];
    allowAnonymous: boolean;
    visibility?: RequestVisibility;
}
