import { AutoBeOpenApi } from "../../openapi/AutoBeOpenApi"; /** * API operation provider function implementation. * * Represents a generated provider function that implements the business logic * for a specific API operation endpoint. Each operation function handles the * complete request-response lifecycle including validation, authorization, * database interactions, and response formatting. * * @author Kakasoo */ export interface AutoBeRealizeOperationFunction { /** Type discriminator for operation function. */ type: "operation"; /** * OpenAPI endpoint specification * * Contains the complete OpenAPI specification for this endpoint including * HTTP method, path, request/response schemas, and documentation. */ endpoint: AutoBeOpenApi.IEndpoint; /** * File path where the provider function is generated * * The relative path to the TypeScript file containing the provider function. * Always located under "src/providers/" directory with the function name as * filename. * * Format: "src/providers/${name}.ts" Example: * "src/providers/delete__discussionBoard_administrators_$id.ts" */ location: string; /** * Provider function name * * The TypeScript function name generated from the OpenAPI path. Follows * special naming convention: HTTP method + path segments joined by double * underscores. Path parameters are prefixed with $. * * NOTE: This does NOT follow camelCase convention due to its special format. * Instead, it uses a specific pattern for provider function naming: * * - HTTP method in lowercase * - Double underscores (__) as segment separator * - Path segments separated by single underscores (_) * - Path parameters prefixed with dollar sign ($) * * Pattern: method__segment1_segment2_$param Example: * "delete__discussionBoard_administrators_$id" */ name: string; /** * Generated TypeScript implementation code * * The complete provider function implementation generated by Realize Agent. * Contains production-ready TypeScript code following REALIZE_CODER_TOTAL.md * guidelines. */ content: string; }