/**
 * Effects — calls that leave the index and change something outside the
 * process — for the Steps view. A curated table, deliberately: "any call into
 * a package" is every `Date` and `Math.max`, and a box for each would bury
 * the ones that matter. Matched on the CALL AS WRITTEN — the whole member
 * chain read from the source at request time (`prisma.article.findFirst`,
 * `this.jwtService.signAsync`, `res.status(404).json`), because the index
 * keeps only the last segment of a deep chain — and, for a few families, on
 * the declared type of the receiver when the graph has it (`OwnerRepository
 * owners` → `owners.save` is the database).
 *
 * The categories are the reader's, not a library's: what a request sets in
 * motion is a database write, a response, a job on a queue, an email, a
 * charge, a cache read, a token check, a call to another service, a file, a
 * process. `response` is the endpoint's contract as the code has it — every
 * `res.status(404).json(…)`, `throw new NotFoundException(…)`,
 * `raise HTTPException(…)`, `ResponseEntity.notFound()` — and each site
 * carries the status code when it is literal.
 *
 * Language gates keep a rule from firing where it means something else: a
 * bare `open(…)` is a file in Python and nothing in particular in TypeScript;
 * `session.get` is the ORM in Python and a request in the browser. A rule
 * without a gate applies everywhere. Order matters — the first match wins —
 * so the specific rows sit above the general ones.
 */
import type { Language } from '../../types';
export type EffectCategory = 'network' | 'storage' | 'device' | 'telemetry' | 'database' | 'response' | 'queue' | 'email' | 'payments' | 'cache' | 'auth' | 'process';
export type ProjectKind = 'app' | 'api' | 'web';
type Family = 'js' | 'py' | 'jvm' | 'cs' | 'go' | 'c' | 'rb' | 'php' | 'swift' | 'rs';
export interface EffectRule {
    category: EffectCategory;
    test: RegExp;
    /** Families the rule applies to; absent = every language. */
    only?: readonly Family[];
    /** Only for `new X(…)` / a constructor call. */
    instantiates?: boolean;
}
/** The table. Order matters: first match wins. */
export declare const EFFECT_RULES: ReadonlyArray<EffectRule>;
export interface EffectInput {
    /** The call as written (the whole member chain), or the reference name the index kept. */
    text: string;
    kind: 'calls' | 'instantiates';
    language?: Language | null;
    project?: ProjectKind;
    /** The declared type of the receiver, when the graph has it (`OwnerRepository`). */
    receiverType?: string | null;
    /** The argument list, abbreviated, when it was read — where the model of a `knex('users')` comes from. */
    args?: string | null;
    /**
     * The call's receiver is a type the project declares — IceCubesApp's
     * `Notifications` endpoint enum, not expo-notifications. A library name the
     * table keys on is shadowed then; only the model and reply rows, which are
     * written for project types, still apply.
     */
    projectType?: boolean;
}
export interface Effect {
    category: EffectCategory;
    /** The table / model / collection, when it can be read off the call: `user`, `Owner`, `TodoItems`. */
    model?: string;
    /** Read or write, from the method name. Only for `database`. */
    access?: 'read' | 'write';
}
/** Normalise the call text the rules see: `await`/`new` dropped, `?.` as `.`, `this.` kept. */
export declare function normaliseCall(text: string): string;
/**
 * What a call is, when it is one of the things the table names. `null` for
 * everything else — a plain call into a library is not an effect.
 */
export declare function classifyEffect(input: EffectInput): Effect | null;
/**
 * The status code a response site sends, when it is literal: the number in
 * `res.status(404)`, the name in `ResponseEntity.notFound()`,
 * `throw new NotFoundException()`, `c.JSON(http.StatusCreated, …)`,
 * `HTTPException(status_code=404)`, `Abort(.notFound)`. Null when the code
 * is a variable or the site sets none.
 */
export declare function responseStatus(text: string, args: string | null | undefined, _kind?: 'calls' | 'instantiates'): number | null;
/**
 * The status a reply sends when it sets none — 200 — for the calls that send a
 * body and default to it: Express / Koa / Fastify / Hono `res.json`,
 * `res.send`, `res.render`, `reply.send`, `c.json`; `NextResponse.json`;
 * Python's `JSONResponse`, `jsonify`, `render_template`, `HttpResponse`;
 * Rails' `render`; Laravel's `response()->json`. Null when the chain sets a
 * status of its own (`res.status(code).json` — a variable code is unknown,
 * not 200), when the call ends a response without a body (`end`,
 * `sendStatus`), or when the call is not one of these.
 */
export declare function implicitResponseStatus(text: string): number | null;
/** The word the legend and a box's sub line use for a category. */
export declare function categoryWord(category: string): string;
export {};
//# sourceMappingURL=effects.d.ts.map