/** * @ethicalzen/sdk - AI Safety Guardrails Made Simple * * The official EthicalZen SDK for Node.js and browser environments. * * @example Quick Start (3 lines!) * ```typescript * import { EthicalZen } from '@ethicalzen/sdk'; * * const ez = new EthicalZen('your-api-key'); * const response = await ez.call('https://api.openai.com/v1/chat/completions', data); * ``` * * @example Protect OpenAI SDK * ```typescript * import OpenAI from 'openai'; * import { protectOpenAI } from '@ethicalzen/sdk'; * * const openai = protectOpenAI(new OpenAI({ apiKey: '...' }), 'ez-api-key'); * // Use normally - all calls go through EthicalZen! * ``` * * @example Express Middleware * ```typescript * import { EthicalZen } from '@ethicalzen/sdk'; * * const ez = new EthicalZen('your-api-key'); * app.use(ez.middleware()); * ``` * * @packageDocumentation */ export { EthicalZen, protect } from './ethicalzen'; export type { EthicalZenOptions, CallOptions, MiddlewareOptions } from './ethicalzen'; export { protectOpenAI, createProtectedOpenAI, protectGroq, createProtectedGroq, protectAnthropic, createProtectedAnthropic } from './wrappers'; export type { OpenAIWrapperOptions, GroqWrapperOptions, AnthropicWrapperOptions } from './wrappers'; /** * @deprecated Use `EthicalZen` class instead * * Migration guide: * ```typescript * // Old way (deprecated) * const client = new EthicalZenClient({ apiKey, tenantId, ... }); * const result = await client.enforce({ contractId, payload }); * * // New way * const ez = new EthicalZen(apiKey); * const result = await ez.validatePayload(payload, certificate); * ``` */ export { EthicalZenClient } from './client'; /** * @deprecated Use `ez.middleware()` instead * * Migration guide: * ```typescript * // Old way (deprecated) * app.use(EthicalZenMiddleware({ apiKey, tenantId, contractId, ... })); * * // New way * const ez = new EthicalZen(apiKey); * app.use(ez.middleware({ certificate: 'my-cert' })); * ``` */ export { EthicalZenMiddleware, enforceRoute } from './middleware'; /** * @deprecated Use `EthicalZen` class or `protectOpenAI` instead */ export { createProxyClient, wrapWithProxy, addContractHeaders } from './proxy'; /** * @deprecated Use `EthicalZen` class instead */ export { EthicalZenProxyClient } from './proxy-client'; export type { EthicalZenConfig, EnforcementRequest, EnforcementResponse, Violation, ServiceRegistration, RegistrationResponse } from './client'; export type { MiddlewareConfig } from './middleware'; export type { ProxyConfig } from './proxy'; export type { ProxyClientConfig } from './proxy-client'; export { default } from './ethicalzen'; //# sourceMappingURL=index.d.ts.map