// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import * as ObjectsAPI from 'cloudflare/resources/durable-objects/namespaces/objects';
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.get(`/accounts/${account_id}/workers/durable_objects/namespaces`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (Namespaces) {
    Namespaces.Objects = ObjectsAPI.Objects;
    Namespaces.WorkersObjectsCursorLimitPagination = ObjectsAPI.WorkersObjectsCursorLimitPagination;
})(Namespaces || (Namespaces = {}));
//# sourceMappingURL=namespaces.mjs.map