UNPKG

@datalayer/core

Version:

[![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)

168 lines (167 loc) 4.22 kB
import { ISignal } from '@lumino/signaling'; export declare const FORCE_ACTIVATE_RUNTIMES_PLUGINS = false; /** * Configuration interface for Datalayer platform integration * * This interface defines the configuration needed to connect to * and interact with the Datalayer platform services. */ export type IDatalayerCoreConfig = { /** * Datalayer RUN URL. * The base URL for the Datalayer platform API. * @example "https://prod1.datalayer.run" */ runUrl: string; /** * Datalayer API authentication token. * Used for authenticating requests to the Datalayer platform. */ token: string; /** * Credits limit for kernel usage. * Determines the maximum credits that can be consumed by kernels. */ credits: number; /** * CPU environment name. * Specifies which CPU-based environment to use for kernels. * @example "python-cpu-env" */ cpuEnvironment: string; /** * GPU environment name. * Specifies which GPU-enabled environment to use for kernels. * @example "ai-env" */ gpuEnvironment: string; /** * Use mock model, useful for e.g. storybooks. */ useMock: boolean; /** * Does the webapp need a jupyter server. */ jupyterServerless: boolean; /** * IAM API URL. */ iamRunUrl: string; /** * Runtimes API URL. */ runtimesRunUrl: string; /** * Spacer API URL. */ spacerRunUrl: string; /** * Library API URL. */ libraryRunUrl: string; /** * AI Agents API URL. */ aiagentsRunUrl: string; /** * AI Inference API URL. */ aiinferenceRunUrl: string; /** * MCP Servers API URL. */ mcpserversRunUrl: string; /** * Growth API URL. */ growthRunUrl: string; /** * Inbounds API URL. */ inboundsRunUrl: string; /** * Success API URL. */ successRunUrl: string; /** * Support API URL. */ supportRunUrl: string; /** * Load configuration from server. */ loadConfigurationFromServer: boolean; /** * Launcher card customization. */ launcher: { /** * Card category. */ category: string; /** * Card name. */ name: string; /** * Card icon SVG URL. */ icon: string | null; /** * Card rank. */ rank: number; }; /** * Brand customization. */ brand: { name: string; logoUrl: string; logoSquareUrl: string; about: string; copyright: string; docsUrl: string; supportUrl: string; pricingUrl: string; termsUrl: string; privacyUrl: string; }; /** * Whether to display the white labelled user interface or not. */ whiteLabel: boolean; }; export interface IRuntimesConfiguration { /** * Maximal number of notebook remote runtimes per user. */ maxNotebookRuntimes: number; /** * Maximal number of cell remote runtimes per user. */ maxCellRuntimes: number; } export declare class DatalayerConfiguration { private _configuration; private _configurationChanged; constructor(); set configuration(configuration: IDatalayerCoreConfig); get configuration(): IDatalayerCoreConfig; get configurationChanged(): ISignal<DatalayerConfiguration, IDatalayerCoreConfig>; } /** * Default configuration values for Datalayer */ export declare const DEFAULT_DATALAYER_CONFIG: Partial<IDatalayerCoreConfig>; /** * Type guard to check if a config object is a valid IDatalayerConfig */ export declare function isDatalayerConfig(config: any): config is IDatalayerCoreConfig; /** * Helper function to merge partial config with defaults * @param config Partial configuration to merge * @returns Complete configuration with defaults applied, or undefined if required fields missing */ export declare function mergeConfigWithDefaults(config?: Partial<IDatalayerCoreConfig>): Partial<IDatalayerCoreConfig> | undefined; export default DatalayerConfiguration;