import type { ChannelLocale } from './types.js'; import { type OptimizelyGraphConfig } from '../../types.js'; import { type IOptiGraphClient } from '../../client/index.js'; import ChannelDefinition from './definition.js'; export declare class ChannelRepository { protected client: IOptiGraphClient; constructor(clientOrConfig?: IOptiGraphClient | OptimizelyGraphConfig); getAll(): Promise>>; getById(id: string): Promise | null>; getByDomain(domain: string, fallback?: boolean): Promise | null>; getDefaultDomain(): string; getCmsDomain(): string; getDefault(): Promise | null>; protected transformGraphResponse(ch: any): ChannelDefinition; /** * Generate a Channel Definition object from the minimal number * of parameters required. * * @param name The name of the channel * @param domain The primary domain of the channel, without protocol or path (e.g. example.com) * @param locales The list of locales, either as a string (first a ISO 639-1 language code, then a dash, then a ISO 3166 region code, for example: en-US), or a `ChannelLocale` object * @param cmsDomainGraphClientOrConfig A means to infer the CMS domain, either directly provided or through the Optimizely Graph Client * @returns The ChannelDefinition */ static createDefinition(name: string, domain: string | URL, locales: (string | ChannelLocale)[], cmsDomainGraphClientOrConfig?: string | IOptiGraphClient | OptimizelyGraphConfig): ChannelDefinition; } export default ChannelRepository;