import { LucideIcon } from 'lucide-react'; import { ReactNode } from 'react'; import { A as ApiDataInterface, J as JsonApiHydratedDataInterface } from './ApiDataInterface-BcZeXy5X.mjs'; import { M as ModuleWithPermissions, a as ModuleFactory } from './types-Bq_UA8Lg.mjs'; import { A as AbstractApiData } from './AbstractApiData-XLhBP5Tl.mjs'; import { A as AbstractService } from './AbstractService-B0T7h8fX.mjs'; declare function getInitials(name: string): string; declare function getInitials(firstName: string, lastName: string): string; declare const getIconByModule: (params: { module: ModuleWithPermissions; className?: string; }) => ReactNode; declare const getIcon: (params: { element: ApiDataInterface; className?: string; }) => ReactNode; declare const getIconByModuleName: (params: { name: string; className?: string; }) => ReactNode; declare const getLucideIcon: (params: { element: ApiDataInterface; }) => LucideIcon | null; declare const getLucideIconByModule: (params: { module: ModuleWithPermissions; }) => LucideIcon | null; declare const getLucideIconByModuleName: (params: { name: string; }) => LucideIcon | null; interface TotpAuthenticatorInterface extends ApiDataInterface { get name(): string; get verified(): boolean; get lastUsedAt(): Date | undefined; } interface PasskeyInterface extends ApiDataInterface { get name(): string; get credentialId(): string; get deviceType(): string; get backedUp(): boolean; get lastUsedAt(): Date | undefined; } declare enum AuthComponent { Login = 0, ForgotPassword = 1, ResetPassword = 2, ActivateAccount = 3, AcceptInvitation = 4, Register = 5, Landing = 6, TwoFactorChallenge = "2fa_challenge" } /** * One editable field of a provider, as described by the backend provider * registry (`AI_PROVIDER_REGISTRY`, served as top-level JSON:API `meta` on the * list endpoint). The registry carries structure only — never display text: * the editor derives its i18n keys from `field`. */ interface AiProviderFieldDescriptor { field: string; kind: "text" | "secret" | "number" | "boolean" | "select"; required?: boolean; options?: string[]; default?: string | number | boolean; } /** `meta.providerRegistry`: connection type → the providers allowed for it. */ type AiProviderRegistry = Record; /** * `meta.envDefaults`: connection type → the `.env` block that always closes the * chain. Secrets are never included. */ type AiConnectionEnvDefaults = Record; interface AiConnectionInterface extends ApiDataInterface { get name(): string; get connectionType(): string; get provider(): string; get position(): number; get enabled(): boolean; get model(): string | undefined; get url(): string | undefined; get region(): string | undefined; get instance(): string | undefined; get apiVersion(): string | undefined; get allowFallbacks(): boolean | undefined; get reasoningEffort(): string | undefined; get maxOutputTokens(): number | undefined; get dimensions(): number | undefined; get inputCostPer1MTokens(): number | undefined; get outputCostPer1MTokens(): number | undefined; get cachedInputCostPer1MTokens(): number | undefined; get costPerMinute(): number | undefined; get costPerPage(): number | undefined; get directUrl(): string | undefined; get language(): string | undefined; get directFormat(): string | undefined; get directProvider(): string | undefined; /** Secrets are never serialised — the API returns presence flags instead. */ get hasApiKey(): boolean; get hasGoogleCredentials(): boolean; /** Absent = a global connection; set = scoped to that company. */ get companyId(): string | undefined; } type AiConnectionInput = { id: string; name: string; connectionType: string; provider: string; position: number; enabled: boolean; model?: string; url?: string; /** Secrets: omit or send "" to keep the stored value on update. */ apiKey?: string; googleCredentialsBase64?: string; region?: string; instance?: string; apiVersion?: string; allowFallbacks?: boolean; reasoningEffort?: string; maxOutputTokens?: number; dimensions?: number; inputCostPer1MTokens?: number; outputCostPer1MTokens?: number; cachedInputCostPer1MTokens?: number; costPerMinute?: number; costPerPage?: number; directUrl?: string; language?: string; directFormat?: string; directProvider?: string; /** Set on creation only — scope is immutable thereafter. */ companyId?: string; }; declare class AiConnection extends AbstractApiData implements AiConnectionInterface { private _name?; private _connectionType?; private _provider?; private _position?; private _enabled?; private _model?; private _url?; private _region?; private _instance?; private _apiVersion?; private _allowFallbacks?; private _reasoningEffort?; private _maxOutputTokens?; private _dimensions?; private _inputCostPer1MTokens?; private _outputCostPer1MTokens?; private _cachedInputCostPer1MTokens?; private _costPerMinute?; private _costPerPage?; private _directUrl?; private _language?; private _directFormat?; private _directProvider?; private _hasApiKey?; private _hasGoogleCredentials?; private _companyId?; get name(): string; get connectionType(): string; get provider(): string; get position(): number; get enabled(): boolean; get model(): string | undefined; get url(): string | undefined; get region(): string | undefined; get instance(): string | undefined; get apiVersion(): string | undefined; get allowFallbacks(): boolean | undefined; get reasoningEffort(): string | undefined; get maxOutputTokens(): number | undefined; get dimensions(): number | undefined; get inputCostPer1MTokens(): number | undefined; get outputCostPer1MTokens(): number | undefined; get cachedInputCostPer1MTokens(): number | undefined; get costPerMinute(): number | undefined; get costPerPage(): number | undefined; get directUrl(): string | undefined; get language(): string | undefined; get directFormat(): string | undefined; get directProvider(): string | undefined; get hasApiKey(): boolean; get hasGoogleCredentials(): boolean; get companyId(): string | undefined; rehydrate(data: JsonApiHydratedDataInterface): this; createJsonApi(data: AiConnectionInput): any; /** * Body for POST /ai-connections/reorder. A dedicated model method so the * service never constructs a JSON:API payload itself — the sanctioned pairing * for `overridesJsonApiCreation`. */ createReorderJsonApi(params: { ids: string[]; }): any; } declare enum AiConnectionFields { name = "name", provider = "provider", model = "model", enabled = "enabled" } declare class AiConnectionService extends AbstractService { /** * Full list plus the editor meta in one round-trip: the list endpoint carries * the provider registry and the `.env` defaults as top-level JSON:API `meta`. */ static listConnections(): Promise<{ connections: AiConnectionInterface[]; providerRegistry: AiProviderRegistry; envDefaults: AiConnectionEnvDefaults; }>; /** * Create a connection. The optional `companyId` fixes its scope forever. */ static create(params: AiConnectionInput): Promise; /** * Update a connection. Blank/omitted secrets keep the stored values. */ static update(params: AiConnectionInput): Promise; /** * Delete a connection. */ static delete(params: { id: string; }): Promise; /** * Reorder one chain: the ordered id list is renumbered 0..n-1 server-side. * Dedicated model method + `overridesJsonApiCreation` — the sanctioned * pairing, never a hand-built payload here. */ static reorder(params: { ids: string[]; }): Promise; } declare const AiConnectionModule: (factory: ModuleFactory) => ModuleWithPermissions; export { AuthComponent as A, type PasskeyInterface as P, type TotpAuthenticatorInterface as T, getIconByModule as a, getIcon as b, getIconByModuleName as c, getLucideIcon as d, getLucideIconByModule as e, getLucideIconByModuleName as f, getInitials as g, AiConnection as h, AiConnectionFields as i, type AiProviderFieldDescriptor as j, type AiProviderRegistry as k, type AiConnectionEnvDefaults as l, type AiConnectionInterface as m, type AiConnectionInput as n, AiConnectionService as o, AiConnectionModule as p };