// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import * as NamespacesAPI from 'cloudflaredev/resources/durable-objects/namespaces/namespaces';
import * as ObjectsAPI from 'cloudflaredev/resources/durable-objects/namespaces/objects';
import { SinglePage } from 'cloudflaredev/pagination';
export class Namespaces extends APIResource {
    constructor() {
        super(...arguments);
        this.objects = new ObjectsAPI.Objects(this._client);
    }
    /**
     * Returns the Durable Object namespaces owned by an account.
     */
    list(params, options) {
        const { account_id } = params;
        return this._client.getAPIList(`/accounts/${account_id}/workers/durable_objects/namespaces`, NamespacesSinglePage, options);
    }
}
export class NamespacesSinglePage extends SinglePage {
}
(function (Namespaces) {
    Namespaces.NamespacesSinglePage = NamespacesAPI.NamespacesSinglePage;
    Namespaces.Objects = ObjectsAPI.Objects;
    Namespaces.DurableObjectsCursorLimitPagination = ObjectsAPI.DurableObjectsCursorLimitPagination;
})(Namespaces || (Namespaces = {}));
//# sourceMappingURL=namespaces.mjs.map