import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as DatabaseAPI from 'cloudflare/resources/d1/database';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
export declare class Database extends APIResource {
    /**
     * Returns the created D1 database.
     */
    create(params: DatabaseCreateParams, options?: Core.RequestOptions): Core.APIPromise<D1CreateDatabase>;
    /**
     * Returns a list of D1 databases.
     */
    list(params: DatabaseListParams, options?: Core.RequestOptions): Core.PagePromise<D1CreateDatabasesV4PagePaginationArray, D1CreateDatabase>;
    /**
     * Deletes the specified D1 database.
     */
    delete(accountIdentifier: string, databaseIdentifier: string, options?: Core.RequestOptions): Core.APIPromise<DatabaseDeleteResponse | null>;
    /**
     * Returns the specified D1 database.
     */
    get(accountIdentifier: string, databaseIdentifier: string, options?: Core.RequestOptions): Core.APIPromise<D1DatabaseDetails>;
    /**
     * Returns the query result.
     */
    query(accountIdentifier: string, databaseIdentifier: string, body: DatabaseQueryParams, options?: Core.RequestOptions): Core.APIPromise<DatabaseQueryResponse>;
}
export declare class D1CreateDatabasesV4PagePaginationArray extends V4PagePaginationArray<D1CreateDatabase> {
}
export interface D1CreateDatabase {
    /**
     * Specifies the timestamp the resource was created as an ISO8601 string.
     */
    created_at?: unknown;
    name?: string;
    uuid?: string;
    version?: string;
}
export interface D1DatabaseDetails {
    /**
     * Specifies the timestamp the resource was created as an ISO8601 string.
     */
    created_at?: unknown;
    /**
     * The D1 database's size, in bytes.
     */
    file_size?: number;
    name?: string;
    num_tables?: number;
    uuid?: string;
    version?: string;
}
export interface D1QueryResult {
    meta?: D1QueryResult.Meta;
    results?: Array<unknown>;
    success?: boolean;
}
export declare namespace D1QueryResult {
    interface Meta {
        changed_db?: boolean;
        changes?: number;
        duration?: number;
        last_row_id?: number;
        rows_read?: number;
        rows_written?: number;
        size_after?: number;
    }
}
export type DatabaseDeleteResponse = unknown | string;
export type DatabaseQueryResponse = Array<D1QueryResult>;
export interface DatabaseCreateParams {
    /**
     * Path param: Account identifier tag.
     */
    account_id: string;
    /**
     * Body param:
     */
    name: string;
}
export interface DatabaseListParams extends V4PagePaginationArrayParams {
    /**
     * Path param: Account identifier tag.
     */
    account_id: string;
    /**
     * Query param: a database name to search for.
     */
    name?: string;
}
export interface DatabaseQueryParams {
    sql: string;
    params?: Array<string>;
}
export declare namespace Database {
    export import D1CreateDatabase = DatabaseAPI.D1CreateDatabase;
    export import D1DatabaseDetails = DatabaseAPI.D1DatabaseDetails;
    export import D1QueryResult = DatabaseAPI.D1QueryResult;
    export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse;
    export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse;
    export import D1CreateDatabasesV4PagePaginationArray = DatabaseAPI.D1CreateDatabasesV4PagePaginationArray;
    export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams;
    export import DatabaseListParams = DatabaseAPI.DatabaseListParams;
    export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams;
}
//# sourceMappingURL=database.d.ts.map