import { ConfigService } from "@nestjs/config"; import { EventEmitter2 } from "@nestjs/event-emitter"; import { ClsService } from "nestjs-cls"; import { BaseConfigInterface } from "../../../config/interfaces/base.config.interface"; import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service"; import { AbstractService } from "../../../core/neo4j/abstracts/abstract.service"; import { AiConnection, AiConnectionDescriptor } from "../entities/ai-connection"; import { AiConnectionRepository } from "../repositories/ai-connection.repository"; import { AiConnectionEncryptionService } from "./ai-connection-encryption.service"; export declare class AiConnectionService extends AbstractService { private readonly aiConnectionRepository; private readonly encryption; private readonly eventEmitter; private readonly configService; protected readonly descriptor: import("../../..").EntityDescriptor; constructor(jsonApiService: JsonApiService, aiConnectionRepository: AiConnectionRepository, clsService: ClsService, encryption: AiConnectionEncryptionService, eventEmitter: EventEmitter2, configService: ConfigService); /** * List with the editor's meta: the provider field registry and the .env * defaults per connection type (never secrets) โ€” spec ยง 3. */ findAllWithMeta(params: { query: any; }): Promise; /** * Create from a JSON:API body: validate against the provider registry, * encrypt secrets, persist, then refresh every resolver snapshot. * * This name shadows `AbstractService.create()`, which `createFromDTO()` calls * back into with *mapped repository params* (`{ id, ...fields }`) โ€” routing * those through the body path would recurse forever. The shape guard below * keeps both entry points working: a JSON:API body always carries `data`, * mapped repository params never do. */ create(body: any, included?: unknown[]): Promise; update(body: { data: { id: string; attributes: Record; [k: string]: any; }; }): Promise; reorder(params: { ids: string[]; }): Promise; deleteConnection(params: { id: string; }): Promise; /** * The inherited `AbstractService.delete()` enforces company ownership * (`clsService.companyId === entity.company?.id`). That check is meaningless * here and would reject every delete: this entity is `isCompanyScoped: false` * and its `company` edge is the CONFIGURES *target* (the company a chain is * scoped TO), not an owner โ€” a global connection has no company at all, so * `"" !== undefined` would always throw ForbiddenException. * * Authorisation is enforced at the controller (`AdminJwtAuthGuard` + * `@Roles(RoleId.Administrator)`), matching every other admin-only foundation. */ delete(params: { id: string; }): Promise; /** * Registry validation + secret encryption. `onlyEncrypt` limits encryption to * the secrets this request actually supplied (update path: kept secrets are * already ciphertext). */ private validateAndEncrypt; } //# sourceMappingURL=ai-connection.service.d.ts.map