AutoBE
    Preparing search index...

    Single API endpoint with method, path, parameters, and request/response.

    All request/response bodies must be object types referencing named components. Content-type is always application/json. For file upload/download, use string & tags.Format<"uri"> instead of binary.

    interface IOperation {
        authorization: IAuthorization;
        databaseSchema: string | null;
        description: string;
        method: "get" | "post" | "put" | "delete" | "patch";
        name: string & CamelCasePattern;
        parameters: AutoBeOpenApi.IParameter[];
        path: string & Pattern<"^\\/[a-zA-Z0-9\\/_{}.-]*$">;
        prerequisites: IPrerequisite[];
        requestBody: IRequestBody | null;
        responseBody: IResponseBody | null;
        specification: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    authorization: IAuthorization

    Complete authorization contract of the API operation.

    Always present; each of its three facets is independently nullable:

    • IAuthorization.lifecycle: the auth-lifecycle state this operation creates or renews (join/login/refresh), or null.
    • IAuthorization.access: the caller guard — which actor and grades may invoke the operation, or null for a public endpoint.
    • IAuthorization.effect: whether the operation mutates reusable authorization state (approval/roleGrant) for some target actor, or null when it changes no such state.
    databaseSchema: string | null

    Exact database model name primarily represented by this operation.

    Seeded by the endpoint design but finalized by the operation writer after the specification/description reasoning. When present it must match an AutoBeDatabase model name exactly, such as shopping_sale_snapshots. Use null for workflow, report, aggregate, cross-model, or purely computed operations without one primary model.

    description: string

    API documentation for consumers. Describe the operation's purpose, business logic, relationships, and error handling.

    Format: summary sentence first, \n\n, then paragraphs grouped by topic. Reference DB schema table/column descriptions for consistency.

    Do NOT use "soft delete" / "soft-delete" unless the operation actually implements soft deletion (triggers validation expecting soft_delete_column).

    MUST be written in English. Never use other languages.

    method: "get" | "post" | "put" | "delete" | "patch"

    HTTP method (lowercase only).

    Use patch (not get) when a read operation needs a complex requestBody. get cannot have a request body.

    name: string & CamelCasePattern

    Functional name of the API endpoint. MUST use camelCase.

    MUST NOT be a JS/TS reserved word (delete, for, if, class, return, new, this, void, const, let, var, async, await, export, import, switch, case, throw, try). Use erase instead of delete, iterate instead of for.

    Standard names:

    • index: list/search (PATCH), at: get by ID (GET)
    • create: POST, update: PUT, erase: DELETE

    Accessor uniqueness: the accessor is formed by joining non-parameter path segments with dots, then appending the name. E.g., path /shopping/sale/{saleId}/review/{id} + name at = accessor shopping.sale.review.at. Must be globally unique.

    List of path parameters.

    Each parameter name must correspond to a {paramName} in the path.

    path: string & Pattern<"^\\/[a-zA-Z0-9\\/_{}.-]*$">

    HTTP path of the API operation.

    Must start with /. Parameters use curly braces: {paramName}. Resource names in camelCase. No quotes, spaces, role prefixes (/admin/), or API version prefixes (/api/v1/).

    Allowed characters: letters, digits, /, {, }, -, _, .

    prerequisites: IPrerequisite[]

    Prerequisites: API operations that must succeed before this one.

    ONLY for business logic dependencies (resource existence, state checks, data availability). NEVER for authentication -- use authorization instead.

    Prerequisites are executed in array order; all must return 2xx before the main operation proceeds.

    requestBody: IRequestBody | null

    Request body of the API operation, or null if none.

    responseBody: IResponseBody | null

    Response body of the API operation, or null if none.

    specification: string

    Internal implementation guidance for downstream agents (Realize, Test).

    Describe HOW this operation should be implemented: service logic, DB queries, business rules, edge cases, and error handling.

    MUST be written in English. Never use other languages.