/*
 * Copyright (c) 2023-2025 Datalayer, Inc.
 * Distributed under the terms of the Modified BSD License.
 */
/**
 * Main Datalayer Client with intuitive mixin-based API.
 * Provides unified, flat API for all Datalayer platform services through TypeScript mixins.
 *
 * @module client
 *
 * @example
 * ```typescript
 * const client = new DatalayerClient({
 *   token: 'your-api-token'
 * });
 *
 * const user = await client.whoami();
 * const runtime = await client.createRuntime(config);
 * ```
 */
import { DatalayerClientBase, } from './base.js';
import { IAMMixin } from './mixins/IAMMixin.js';
import { RuntimesMixin } from './mixins/RuntimesMixin.js';
import { SpacerMixin } from './mixins/SpacerMixin.js';
/**
 * Helper function to compose mixins in a more readable way.
 * Applies mixins in the order provided.
 *
 * @param mixins - Array of mixin functions to apply
 * @returns The composed class with all mixins applied
 */
function composeMixins(...mixins) {
    return mixins.reduce((base, mixin) => mixin(base), DatalayerClientBase);
}
// Apply mixins to the base class using the helper
const DatalayerClientWithMixins = composeMixins(IAMMixin, RuntimesMixin, SpacerMixin);
/**
 * Main Datalayer Client providing unified access to all platform services.
 * Uses TypeScript mixins to provide a flat, discoverable API.
 *
 * @example
 * ```typescript
 * const client = new DatalayerClient({
 *   token: 'your-token'
 * });
 *
 * const user = await client.whoami();
 * const runtime = await client.createRuntime({
 *   environment_name: 'ai-agents-env',
 *   credits_limit: 100
 * });
 * ```
 */
export class DatalayerClient extends DatalayerClientWithMixins {
    /**
     * Create a DatalayerClient instance.
     *
     * @param config - Client configuration options
     */
    constructor(config) {
        super(config);
        // Wrap all methods with handlers if configured
        this.wrapAllMethods();
    }
}
export { DatalayerClientBase };
// Export models for use by consumers
export { UserDTO as User } from './../models/UserDTO.js';
export { RuntimeDTO as Runtime } from '../models/RuntimeDTO.js';
export { EnvironmentDTO as Environment } from '../models/EnvironmentDTO.js';
export { RuntimeSnapshotDTO as Snapshot } from '../models/RuntimeSnapshotDTO.js';
export { SpaceDTO as Space } from '../models/SpaceDTO.js';
export { ProjectDTO as Project } from '../models/ProjectDTO.js';
export { NotebookDTO as Notebook } from '../models/NotebookDTO.js';
export { LexicalDTO } from '../models/LexicalDTO.js';
export { CreditsDTO as Credits } from '../models/CreditsDTO.js';
export { ItemDTO as Item } from '../models/ItemDTO.js';
export { HealthCheck } from '../models/HealthCheck.js';
export { SecretDTO as Secret } from './../models/Secret.js';
export { DatasourceDTO as Datasource } from './../models/Datasource.js';
// Export auth types
export { AuthenticationManager } from './auth/AuthenticationManager.js';
// Constants
export { ItemTypes } from './constants.js';
// Export authentication module
export * from './auth/index.js';
