import * as Core from 'cloudflaredev/core';
import { APIResource } from 'cloudflaredev/resource';
import * as DatabaseAPI from 'cloudflaredev/resources/d1/database';
import * as D1API from 'cloudflaredev/resources/d1/d1';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflaredev/pagination';
export declare class Database extends APIResource {
    /**
     * Returns the created D1 database.
     */
    create(params: DatabaseCreateParams, options?: Core.RequestOptions): Core.APIPromise<DatabaseCreateResponse>;
    /**
     * Returns a list of D1 databases.
     */
    list(params: DatabaseListParams, options?: Core.RequestOptions): Core.PagePromise<DatabaseListResponsesV4PagePaginationArray, DatabaseListResponse>;
    /**
     * Deletes the specified D1 database.
     */
    delete(accountIdentifier: string, databaseIdentifier: string, options?: Core.RequestOptions): Core.APIPromise<DatabaseDeleteResponse>;
    /**
     * Returns the specified D1 database.
     */
    get(accountIdentifier: string, databaseIdentifier: string, options?: Core.RequestOptions): Core.APIPromise<D1API.D1>;
    /**
     * Returns the query result.
     */
    query(accountIdentifier: string, databaseIdentifier: string, body: DatabaseQueryParams, options?: Core.RequestOptions): Core.APIPromise<DatabaseQueryResponse>;
}
export declare class DatabaseListResponsesV4PagePaginationArray extends V4PagePaginationArray<DatabaseListResponse> {
}
export interface QueryResult {
    meta?: QueryResult.Meta;
    results?: Array<unknown>;
    success?: boolean;
}
export declare namespace QueryResult {
    interface Meta {
        changed_db?: boolean;
        changes?: number;
        duration?: number;
        last_row_id?: number;
        rows_read?: number;
        rows_written?: number;
        size_after?: number;
    }
}
export interface DatabaseCreateResponse {
    /**
     * Specifies the timestamp the resource was created as an ISO8601 string.
     */
    created_at?: string;
    name?: string;
    uuid?: string;
    version?: string;
}
export interface DatabaseListResponse {
    /**
     * Specifies the timestamp the resource was created as an ISO8601 string.
     */
    created_at?: string;
    name?: string;
    uuid?: string;
    version?: string;
}
export type DatabaseDeleteResponse = unknown | string | null;
export type DatabaseQueryResponse = Array<QueryResult>;
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 QueryResult = DatabaseAPI.QueryResult;
    export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse;
    export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse;
    export import DatabaseDeleteResponse = DatabaseAPI.DatabaseDeleteResponse;
    export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse;
    export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray;
    export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams;
    export import DatabaseListParams = DatabaseAPI.DatabaseListParams;
    export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams;
}
//# sourceMappingURL=database.d.ts.map