/**
 * Compiler Stubs for CLI Runtime
 *
 * These stub functions allow config/resource/action definition files to be loaded
 * by the CLI without needing the full @quickback/compiler package.
 *
 * The actual validation happens server-side in the compiler worker.
 */
/**
 * Stub for defineConfig - just returns the config as-is
 */
export function defineConfig(config) {
    return config;
}
/**
 * Stub for defineRuntime - returns provider config
 */
export function defineRuntime(name, config) {
    return { name, config: config || {} };
}
/**
 * Stub for defineDatabase - returns provider config
 */
export function defineDatabase(name, config) {
    return { name, config: config || {} };
}
/**
 * Stub for defineAuth - returns provider config
 */
export function defineAuth(name, config) {
    return { name, config: config || {} };
}
/**
 * Stub for defineStorage - returns provider config
 */
export function defineStorage(name, config) {
    return { name, config: config || {} };
}
/**
 * Stub for defineFileStorage - returns provider config for R2 file storage
 */
export function defineFileStorage(name, config) {
    return { name, config: config || {} };
}
/**
 * Stub for defineResource - just returns the config with schema reference
 */
export function defineResource(schema, config) {
    return {
        ...config,
        __schema: schema,
    };
}
/**
 * Stub for defineTable - combines schema with all configuration
 *
 * This is the new unified API that combines schema definition with
 * all configuration (firewall, guards, crud, embeddings, realtime) in one place.
 */
export function defineTable(schema, config) {
    return {
        ...config,
        __schema: schema,
    };
}
/**
 * Stub for the `q` schema DSL. Returns chainable column builders and a `table`
 * function that collects columns into a placeholder object. The CLI never
 * evaluates feature source files during `compile` — it only reads them — so
 * this stub exists solely for quickback.config.ts evaluation, where users
 * may import `q` from `@quickback/compiler` alongside `defineTable`.
 */
function makeQColumn() {
    const col = {
        required: () => col,
        optional: () => col,
        default: (_v) => col,
        unique: () => col,
        index: () => col,
        references: (_ref, _opts) => col,
    };
    return col;
}
export const q = {
    table: (name, columns, _opts) => ({
        __quickbackTable: true,
        name,
        columns,
    }),
    text: (_name) => makeQColumn(),
    int: (_name) => makeQColumn(),
    bool: (_name) => makeQColumn(),
    uuid: (_name) => makeQColumn(),
    timestamp: (_name) => makeQColumn(),
    json: (_zod, _name) => makeQColumn(),
    enum: (_values, _name) => makeQColumn(),
    id: () => makeQColumn(),
};
/**
 * Stub for defineActions - just returns the actions with schema reference
 */
export function defineActions(schema, actions) {
    return {
        ...actions,
        __schema: schema,
    };
}
/**
 * Stub for defineAction - returns a curried function that returns the config
 */
export function defineAction() {
    return (config) => config;
}
/**
 * Stub for defineQueue - returns the queue handler definition
 * Used in definitions/services/queues/*.ts
 */
export function defineQueue(config) {
    return config;
}
/**
 * Stub for defineRealtime - returns the realtime definition
 * Used in definitions/services/realtime/*.ts
 */
export function defineRealtime(config) {
    return config;
}
/**
 * Stub for defineEmbedding - returns the embedding definition
 * Used in definitions/services/embeddings/*.ts
 */
export function defineEmbedding(config) {
    return config;
}
/**
 * Stub for definePage - returns the page definition
 * Used in features/{feature}/pages/*.ts
 */
export function definePage(config) {
    return config;
}
//# sourceMappingURL=compiler-stubs.js.map