@elasticdash/core 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/utils.ts","../src/logger/index.ts","../package.json","../src/constants.ts","../src/api/api/resources/annotationQueues/index.ts","../src/api/api/resources/annotationQueues/types/AnnotationQueueStatus.ts","../src/api/api/resources/annotationQueues/types/AnnotationQueueObjectType.ts","../src/api/api/resources/blobStorageIntegrations/index.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageIntegrationType.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageIntegrationFileType.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageExportMode.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageExportFrequency.ts","../src/api/api/resources/comments/index.ts","../src/api/api/resources/commons/index.ts","../src/api/api/resources/commons/types/PricingTierOperator.ts","../src/api/api/resources/commons/types/ModelUsageUnit.ts","../src/api/api/resources/commons/types/ObservationLevel.ts","../src/api/api/resources/commons/types/CommentObjectType.ts","../src/api/api/resources/commons/types/DatasetStatus.ts","../src/api/api/resources/commons/types/ScoreSource.ts","../src/api/api/resources/commons/types/ScoreConfigDataType.ts","../src/api/api/resources/commons/types/ScoreDataType.ts","../src/api/core/json.ts","../src/api/errors/LangfuseAPIError.ts","../src/api/errors/LangfuseAPITimeoutError.ts","../src/api/api/resources/commons/errors/Error.ts","../src/api/api/resources/commons/errors/UnauthorizedError.ts","../src/api/api/resources/commons/errors/AccessDeniedError.ts","../src/api/api/resources/commons/errors/NotFoundError.ts","../src/api/api/resources/commons/errors/MethodNotAllowedError.ts","../src/api/api/resources/datasetItems/index.ts","../src/api/api/resources/datasetRunItems/index.ts","../src/api/api/resources/datasets/index.ts","../src/api/api/resources/health/index.ts","../src/api/api/resources/health/errors/ServiceUnavailableError.ts","../src/api/api/resources/ingestion/index.ts","../src/api/api/resources/ingestion/types/ObservationType.ts","../src/api/api/resources/llmConnections/index.ts","../src/api/api/resources/llmConnections/types/LlmAdapter.ts","../src/api/api/resources/media/index.ts","../src/api/api/resources/media/types/MediaContentType.ts","../src/api/api/resources/metricsV2/index.ts","../src/api/api/resources/metrics/index.ts","../src/api/api/resources/models/index.ts","../src/api/api/resources/observationsV2/index.ts","../src/api/api/resources/observations/index.ts","../src/api/api/resources/opentelemetry/index.ts","../src/api/api/resources/organizations/index.ts","../src/api/api/resources/organizations/types/MembershipRole.ts","../src/api/api/resources/projects/index.ts","../src/api/api/resources/prompts/index.ts","../src/api/api/resources/prompts/types/PromptType.ts","../src/api/api/resources/scim/index.ts","../src/api/api/resources/scoreConfigs/index.ts","../src/api/api/resources/scoreV2/index.ts","../src/api/api/resources/score/index.ts","../src/api/api/resources/sessions/index.ts","../src/api/api/resources/trace/index.ts","../src/api/api/resources/utils/index.ts","../src/api/api/resources/utils/resources/pagination/index.ts","../src/api/api/resources/promptVersion/index.ts","../src/api/core/headers.ts","../src/api/core/url/qs.ts","../src/api/core/fetcher/createRequestUrl.ts","../src/api/core/fetcher/BinaryResponse.ts","../src/api/core/fetcher/ResponseWithBody.ts","../src/api/core/fetcher/getResponseBody.ts","../src/api/core/fetcher/getErrorResponseBody.ts","../src/api/core/fetcher/getFetchFn.ts","../src/api/core/fetcher/getRequestBody.ts","../src/api/core/fetcher/signals.ts","../src/api/core/fetcher/makeRequest.ts","../src/api/core/fetcher/Headers.ts","../src/api/core/fetcher/RawResponse.ts","../src/api/core/fetcher/requestWithRetries.ts","../src/api/core/fetcher/Supplier.ts","../src/api/core/fetcher/Fetcher.ts","../src/api/core/fetcher/HttpResponsePromise.ts","../src/api/core/url/index.ts","../src/api/core/url/join.ts","../src/api/core/base64.ts","../src/api/core/auth/BasicAuth.ts","../src/api/api/resources/annotationQueues/client/Client.ts","../src/api/api/resources/blobStorageIntegrations/client/Client.ts","../src/api/api/resources/comments/client/Client.ts","../src/api/api/resources/datasetItems/client/Client.ts","../src/api/api/resources/datasetRunItems/client/Client.ts","../src/api/api/resources/datasets/client/Client.ts","../src/api/api/resources/health/client/Client.ts","../src/api/api/resources/ingestion/client/Client.ts","../src/api/api/resources/llmConnections/client/Client.ts","../src/api/api/resources/media/client/Client.ts","../src/api/api/resources/metricsV2/client/Client.ts","../src/api/api/resources/metrics/client/Client.ts","../src/api/api/resources/models/client/Client.ts","../src/api/api/resources/observationsV2/client/Client.ts","../src/api/api/resources/observations/client/Client.ts","../src/api/api/resources/opentelemetry/client/Client.ts","../src/api/api/resources/organizations/client/Client.ts","../src/api/api/resources/projects/client/Client.ts","../src/api/api/resources/promptVersion/client/Client.ts","../src/api/api/resources/prompts/client/Client.ts","../src/api/api/resources/scim/client/Client.ts","../src/api/api/resources/scoreConfigs/client/Client.ts","../src/api/api/resources/scoreV2/client/Client.ts","../src/api/api/resources/score/client/Client.ts","../src/api/api/resources/sessions/client/Client.ts","../src/api/api/resources/trace/client/Client.ts","../src/api/Client.ts","../src/media.ts","../src/propagation.ts"],"sourcesContent":["export * from \"./logger/index.js\";\nexport * from \"./constants.js\";\nexport * from \"./api/api/index.js\";\nexport {\n LangfuseAPIError,\n LangfuseAPITimeoutError,\n} from \"./api/errors/index.js\";\nexport { LangfuseAPIClient } from \"./api/Client.js\";\nexport * from \"./utils.js\";\nexport * from \"./types.js\";\nexport * from \"./media.js\";\nexport * from \"./propagation.js\";\n","type LangfuseEnvVar =\n | \"ELASTICDASH_PUBLIC_KEY\"\n | \"ELASTICDASH_SECRET_KEY\"\n | \"ELASTICDASH_BASE_URL\"\n | \"ELASTICDASH_BASEURL\" // legacy v2\n | \"ELASTICDASH_TIMEOUT\"\n | \"ELASTICDASH_FLUSH_AT\"\n | \"ELASTICDASH_FLUSH_INTERVAL\"\n | \"ELASTICDASH_LOG_LEVEL\"\n | \"ELASTICDASH_RELEASE\"\n | \"ELASTICDASH_TRACING_ENVIRONMENT\";\n\nexport function getEnv(key: LangfuseEnvVar): string | undefined {\n if (typeof process !== \"undefined\" && process.env[key]) {\n return process.env[key];\n } else if (typeof globalThis !== \"undefined\") {\n return (globalThis as any)[key];\n }\n\n return;\n}\n\n// https://stackoverflow.com/a/8809472\nexport function generateUUID(globalThis?: any): string {\n // Public Domain/MIT\n let d = new Date().getTime(); //Timestamp\n let d2 =\n (globalThis &&\n globalThis.performance &&\n globalThis.performance.now &&\n globalThis.performance.now() * 1000) ||\n 0; //Time in microseconds since page-load or 0 if unsupported\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n let r = Math.random() * 16; //random number between 0 and 16\n if (d > 0) {\n //Use timestamp until depleted\n r = (d + r) % 16 | 0;\n d = Math.floor(d / 16);\n } else {\n //Use microseconds since page-load if supported\n r = (d2 + r) % 16 | 0;\n d2 = Math.floor(d2 / 16);\n }\n return (c === \"x\" ? r : (r & 0x3) | 0x8).toString(16);\n });\n}\n\nexport function safeSetTimeout(fn: () => void, timeout: number): any {\n const t = setTimeout(fn, timeout) as any;\n // We unref if available to prevent Node.js hanging on exit\n if (t?.unref) {\n t?.unref();\n }\n\n return t;\n}\n\nexport function base64ToBytes(base64: string): Uint8Array {\n const binString = atob(base64);\n\n return Uint8Array.from(binString, (m) => m.codePointAt(0)!);\n}\n\nexport function bytesToBase64(bytes: Uint8Array): string {\n const binString = Array.from(bytes, (byte) => String.fromCharCode(byte)).join(\n \"\",\n );\n return btoa(binString);\n}\n\nexport function base64Encode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"utf8\").toString(\"base64\");\n }\n\n const bytes = new TextEncoder().encode(input);\n return bytesToBase64(bytes);\n}\n\nexport function base64Decode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"base64\").toString(\"utf8\");\n }\n\n const bytes = base64ToBytes(input);\n return new TextDecoder().decode(bytes);\n}\n\n/**\n * Generate a random experiment ID (16 hex characters from 8 random bytes).\n * @internal\n */\nexport async function createExperimentId(): Promise<string> {\n const randomBytes = new Uint8Array(8);\n crypto.getRandomValues(randomBytes);\n\n return Array.from(randomBytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n\n/**\n * Generate experiment item ID from input hash (first 16 hex chars of SHA-256).\n * Skips serialization if input is already a string.\n * @internal\n */\nexport async function createExperimentItemId(input: any): Promise<string> {\n const serialized = serializeValue(input);\n const data = new TextEncoder().encode(serialized);\n\n const hashBuffer = await crypto.subtle.digest(\"SHA-256\", data);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n const hashHex = hashArray\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n\n return hashHex.slice(0, 16);\n}\n\n/**\n * Serialize a value to JSON string, handling undefined/null.\n * Skips serialization if value is already a string.\n * @internal\n */\nexport function serializeValue(value: any): string | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"string\") return value;\n\n return JSON.stringify(value);\n}\n","import { getEnv } from \"../utils.js\";\n/**\n * Enumeration of log levels in order of severity (lowest to highest).\n */\nexport enum LogLevel {\n /** Critical errors that may cause application failure */\n ERROR = 3,\n /** Warning messages for potentially harmful situations */\n WARN = 2,\n /** General informational messages */\n INFO = 1,\n /** Detailed debug information for troubleshooting */\n DEBUG = 0,\n}\n\nfunction parseLogLevelFromEnv(): LogLevel | undefined {\n if (typeof process === \"object\" && \"env\" in process) {\n const envValue = getEnv(\"ELASTICDASH_LOG_LEVEL\");\n const value = (envValue ?? \"\").toUpperCase();\n\n switch (value) {\n case \"ERROR\":\n return LogLevel.ERROR;\n case \"WARN\":\n return LogLevel.WARN;\n case \"INFO\":\n return LogLevel.INFO;\n case \"DEBUG\":\n return LogLevel.DEBUG;\n default:\n return undefined;\n }\n }\n return undefined;\n}\n\n/**\n * Configuration options for the Logger.\n */\nexport interface LoggerConfig {\n /** The minimum log level to output */\n level: LogLevel;\n /** Optional prefix to prepend to all log messages */\n prefix?: string;\n /** Whether to include timestamps in log messages (default: true) */\n enableTimestamp?: boolean;\n}\n\n/**\n * A configurable logger class that supports different log levels and formatting.\n *\n * @example\n * ```typescript\n * const logger = new Logger({ level: LogLevel.DEBUG, prefix: 'Langfuse SDK' });\n * logger.info('Application started');\n * logger.error('An error occurred', error);\n * ```\n */\nexport class Logger {\n private config: LoggerConfig;\n\n /**\n * Creates a new Logger instance.\n *\n * @param config - Configuration options for the logger\n */\n constructor(config: LoggerConfig = { level: LogLevel.INFO }) {\n this.config = {\n enableTimestamp: true,\n ...config,\n };\n }\n\n /**\n * Determines if a message should be logged based on the current log level.\n *\n * @param level - The log level to check\n * @returns True if the message should be logged, false otherwise\n */\n private shouldLog(level: LogLevel): boolean {\n return level >= this.config.level;\n }\n\n /**\n * Formats a log message with timestamp, prefix, and log level.\n *\n * @param level - The log level string\n * @param message - The message to format\n * @returns The formatted message string\n */\n private formatMessage(level: string, message: string): string {\n const timestamp = this.config.enableTimestamp\n ? new Date().toISOString()\n : \"\";\n const prefix = this.config.prefix || \"[Langfuse SDK]\";\n const parts = [timestamp, prefix, `[${level}]`, message].filter(Boolean);\n\n return parts.join(\" \");\n }\n\n /**\n * Logs an error message.\n *\n * @param message - The error message to log\n * @param args - Additional arguments to pass to console.error\n */\n error(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.ERROR)) {\n console.error(this.formatMessage(\"ERROR\", message), ...args);\n }\n }\n\n /**\n * Logs a warning message.\n *\n * @param message - The warning message to log\n * @param args - Additional arguments to pass to console.warn\n */\n warn(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.WARN)) {\n console.warn(this.formatMessage(\"WARN\", message), ...args);\n }\n }\n\n /**\n * Logs an informational message.\n *\n * @param message - The info message to log\n * @param args - Additional arguments to pass to console.info\n */\n info(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.INFO)) {\n console.info(this.formatMessage(\"INFO\", message), ...args);\n }\n }\n\n /**\n * Logs a debug message.\n *\n * @param message - The debug message to log\n * @param args - Additional arguments to pass to console.debug\n */\n debug(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.DEBUG)) {\n console.debug(this.formatMessage(\"DEBUG\", message), ...args);\n }\n }\n\n /**\n * Sets the minimum log level.\n *\n * @param level - The new log level\n */\n setLevel(level: LogLevel): void {\n this.config.level = level;\n }\n\n /**\n * Gets the current log level.\n *\n * @returns The current log level\n */\n getLevel(): LogLevel {\n return this.config.level;\n }\n}\n\n/**\n * Singleton class that manages a global logger instance.\n */\nclass LoggerSingleton {\n private static instance: Logger | null = null;\n private static defaultConfig: LoggerConfig = {\n level: parseLogLevelFromEnv() ?? LogLevel.INFO,\n };\n\n /**\n * Gets the singleton logger instance, creating it if it doesn't exist.\n *\n * @returns The singleton logger instance\n */\n static getInstance(): Logger {\n if (!LoggerSingleton.instance) {\n LoggerSingleton.instance = new Logger(LoggerSingleton.defaultConfig);\n }\n return LoggerSingleton.instance;\n }\n\n /**\n * Configures the global logger with new settings.\n * This will replace the existing logger instance.\n *\n * @param config - The new logger configuration\n */\n static configure(config: LoggerConfig): void {\n LoggerSingleton.defaultConfig = config;\n LoggerSingleton.instance = new Logger(config);\n }\n\n /**\n * Resets the singleton logger instance and configuration.\n * Useful for testing or reinitializing the logger.\n */\n static reset(): void {\n LoggerSingleton.instance = null;\n LoggerSingleton.defaultConfig = { level: LogLevel.INFO };\n }\n}\n\n/**\n * Creates a new Logger instance with the specified configuration.\n * This is independent of the global singleton logger.\n *\n * @param config - Optional configuration for the logger\n * @returns A new Logger instance\n *\n * @example\n * ```typescript\n * const customLogger = createLogger({ level: LogLevel.DEBUG, prefix: 'Custom' });\n * customLogger.debug('This is a debug message');\n * ```\n */\nexport const createLogger = (config?: LoggerConfig): Logger => {\n return new Logger(config);\n};\n\n/**\n * Gets the global singleton logger instance.\n * If no logger exists, creates one with default configuration.\n *\n * @returns The global logger instance\n *\n * @example\n * ```typescript\n * const logger = getGlobalLogger();\n * logger.info('Application started');\n * ```\n */\nexport const getGlobalLogger = (): Logger => {\n return LoggerSingleton.getInstance();\n};\n\n/**\n * Configures the global logger with new settings.\n * This should be called early in your application initialization.\n *\n * @param config - The logger configuration\n *\n * @example\n * ```typescript\n * configureGlobalLogger({\n * level: LogLevel.DEBUG,\n * prefix: 'Langfuse SDK',\n * enableTimestamp: true\n * });\n * ```\n */\nexport const configureGlobalLogger = (config: LoggerConfig): void => {\n LoggerSingleton.configure(config);\n};\n\n/**\n * Resets the global logger instance and configuration.\n * Primarily used for testing to ensure clean state between tests.\n *\n * @example\n * ```typescript\n * // In test teardown\n * resetGlobalLogger();\n * ```\n */\nexport const resetGlobalLogger = (): void => {\n LoggerSingleton.reset();\n};\n\n/**\n * The singleton logger instance for convenient access.\n * Use this for quick access to the global logger.\n *\n * @example\n * ```typescript\n * import { logger } from '@elasticdash/core';\n *\n * logger.getInstance().info('Quick logging');\n * ```\n */\nexport { LoggerSingleton as logger };\n","{\n \"name\": \"@elasticdash/core\",\n \"version\": \"0.0.4\",\n \"description\": \"Core functions and utilities for ElasticDash packages\",\n \"type\": \"module\",\n \"sideEffects\": false,\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.ts\\\"\",\n \"clean\": \"rm -rf dist\"\n },\n \"author\": \"ElasticDash\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/terryjiang2020/elasticdash-js.git\",\n \"directory\": \"packages/core\"\n },\n \"files\": [\n \"dist\"\n ],\n \"peerDependencies\": {\n \"@opentelemetry/api\": \"^1.9.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^24.1.0\"\n }\n}\n","export type ElasticDashEnvVar =\n | \"ELASTICDASH_PUBLIC_KEY\"\n | \"ELASTICDASH_SECRET_KEY\"\n | \"ELASTICDASH_BASE_URL\"\n | \"ELASTICDASH_BASEURL\"\n | \"ELASTICDASH_TIMEOUT\"\n | \"ELASTICDASH_FLUSH_AT\"\n | \"ELASTICDASH_FLUSH_INTERVAL\"\n | \"ELASTICDASH_TRACING_ENVIRONMENT\";\nimport packageJson from \"../package.json\" with { type: \"json\" };\n\nexport const ELASTICDASH_TRACER_NAME = \"langfuse-sdk\";\nexport const ELASTICDASH_SDK_VERSION = packageJson.version;\nexport const ELASTICDASH_SDK_NAME = \"javascript\";\n\nexport const ELASTICDASH_SDK_EXPERIMENT_ENVIRONMENT = \"sdk-experiment\";\n\n// From Langfuse platform: web/src/features/otel/server/attributes.ts\nexport enum LangfuseOtelSpanAttributes {\n // Langfuse-Trace attributes\n TRACE_NAME = \"langfuse.trace.name\",\n TRACE_USER_ID = \"user.id\",\n TRACE_SESSION_ID = \"session.id\",\n TRACE_TAGS = \"langfuse.trace.tags\",\n TRACE_PUBLIC = \"langfuse.trace.public\",\n TRACE_METADATA = \"langfuse.trace.metadata\",\n TRACE_INPUT = \"langfuse.trace.input\",\n TRACE_OUTPUT = \"langfuse.trace.output\",\n\n // Langfuse-observation attributes\n OBSERVATION_TYPE = \"langfuse.observation.type\",\n OBSERVATION_METADATA = \"langfuse.observation.metadata\",\n OBSERVATION_LEVEL = \"langfuse.observation.level\",\n OBSERVATION_STATUS_MESSAGE = \"langfuse.observation.status_message\",\n OBSERVATION_INPUT = \"langfuse.observation.input\",\n OBSERVATION_OUTPUT = \"langfuse.observation.output\",\n\n // Langfuse-observation of type Generation attributes\n OBSERVATION_COMPLETION_START_TIME = \"langfuse.observation.completion_start_time\",\n OBSERVATION_MODEL = \"langfuse.observation.model.name\",\n OBSERVATION_MODEL_PARAMETERS = \"langfuse.observation.model.parameters\",\n OBSERVATION_USAGE_DETAILS = \"langfuse.observation.usage_details\",\n OBSERVATION_COST_DETAILS = \"langfuse.observation.cost_details\",\n OBSERVATION_PROMPT_NAME = \"langfuse.observation.prompt.name\",\n OBSERVATION_PROMPT_VERSION = \"langfuse.observation.prompt.version\",\n\n // General\n ENVIRONMENT = \"langfuse.environment\",\n RELEASE = \"langfuse.release\",\n VERSION = \"langfuse.version\",\n\n // Internal\n AS_ROOT = \"langfuse.internal.as_root\",\n\n // Experiment attributes\n EXPERIMENT_ID = \"langfuse.experiment.id\",\n EXPERIMENT_NAME = \"langfuse.experiment.name\",\n EXPERIMENT_DESCRIPTION = \"langfuse.experiment.description\",\n EXPERIMENT_METADATA = \"langfuse.experiment.metadata\",\n EXPERIMENT_DATASET_ID = \"langfuse.experiment.dataset.id\",\n EXPERIMENT_ITEM_ID = \"langfuse.experiment.item.id\",\n EXPERIMENT_ITEM_EXPECTED_OUTPUT = \"langfuse.experiment.item.expected_output\",\n EXPERIMENT_ITEM_METADATA = \"langfuse.experiment.item.metadata\",\n EXPERIMENT_ITEM_ROOT_OBSERVATION_ID = \"langfuse.experiment.item.root_observation_id\",\n\n // Compatibility - Map properties that were documented in https://langfuse.com/docs/opentelemetry/get-started#property-mapping,\n // but have a new assignment\n TRACE_COMPAT_USER_ID = \"langfuse.user.id\",\n TRACE_COMPAT_SESSION_ID = \"langfuse.session.id\",\n}\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type AnnotationQueueStatus = \"PENDING\" | \"COMPLETED\";\nexport const AnnotationQueueStatus = {\n Pending: \"PENDING\",\n Completed: \"COMPLETED\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type AnnotationQueueObjectType = \"TRACE\" | \"OBSERVATION\" | \"SESSION\";\nexport const AnnotationQueueObjectType = {\n Trace: \"TRACE\",\n Observation: \"OBSERVATION\",\n Session: \"SESSION\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageIntegrationType =\n | \"S3\"\n | \"S3_COMPATIBLE\"\n | \"AZURE_BLOB_STORAGE\";\nexport const BlobStorageIntegrationType = {\n S3: \"S3\",\n S3Compatible: \"S3_COMPATIBLE\",\n AzureBlobStorage: \"AZURE_BLOB_STORAGE\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageIntegrationFileType = \"JSON\" | \"CSV\" | \"JSONL\";\nexport const BlobStorageIntegrationFileType = {\n Json: \"JSON\",\n Csv: \"CSV\",\n Jsonl: \"JSONL\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageExportMode =\n | \"FULL_HISTORY\"\n | \"FROM_TODAY\"\n | \"FROM_CUSTOM_DATE\";\nexport const BlobStorageExportMode = {\n FullHistory: \"FULL_HISTORY\",\n FromToday: \"FROM_TODAY\",\n FromCustomDate: \"FROM_CUSTOM_DATE\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageExportFrequency = \"hourly\" | \"daily\" | \"weekly\";\nexport const BlobStorageExportFrequency = {\n Hourly: \"hourly\",\n Daily: \"daily\",\n Weekly: \"weekly\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./errors/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * Comparison operators for pricing tier conditions\n */\nexport type PricingTierOperator = \"gt\" | \"gte\" | \"lt\" | \"lte\" | \"eq\" | \"neq\";\nexport const PricingTierOperator = {\n Gt: \"gt\",\n Gte: \"gte\",\n Lt: \"lt\",\n Lte: \"lte\",\n Eq: \"eq\",\n Neq: \"neq\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * Unit of usage in Langfuse\n */\nexport type ModelUsageUnit =\n | \"CHARACTERS\"\n | \"TOKENS\"\n | \"MILLISECONDS\"\n | \"SECONDS\"\n | \"IMAGES\"\n | \"REQUESTS\";\nexport const ModelUsageUnit = {\n Characters: \"CHARACTERS\",\n Tokens: \"TOKENS\",\n Milliseconds: \"MILLISECONDS\",\n Seconds: \"SECONDS\",\n Images: \"IMAGES\",\n Requests: \"REQUESTS\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ObservationLevel = \"DEBUG\" | \"DEFAULT\" | \"WARNING\" | \"ERROR\";\nexport const ObservationLevel = {\n Debug: \"DEBUG\",\n Default: \"DEFAULT\",\n Warning: \"WARNING\",\n Error: \"ERROR\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type CommentObjectType = \"TRACE\" | \"OBSERVATION\" | \"SESSION\" | \"PROMPT\";\nexport const CommentObjectType = {\n Trace: \"TRACE\",\n Observation: \"OBSERVATION\",\n Session: \"SESSION\",\n Prompt: \"PROMPT\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type DatasetStatus = \"ACTIVE\" | \"ARCHIVED\";\nexport const DatasetStatus = {\n Active: \"ACTIVE\",\n Archived: \"ARCHIVED\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ScoreSource = \"ANNOTATION\" | \"API\" | \"EVAL\";\nexport const ScoreSource = {\n Annotation: \"ANNOTATION\",\n Api: \"API\",\n Eval: \"EVAL\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ScoreConfigDataType = \"NUMERIC\" | \"BOOLEAN\" | \"CATEGORICAL\";\nexport const ScoreConfigDataType = {\n Numeric: \"NUMERIC\",\n Boolean: \"BOOLEAN\",\n Categorical: \"CATEGORICAL\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ScoreDataType =\n | \"NUMERIC\"\n | \"BOOLEAN\"\n | \"CATEGORICAL\"\n | \"CORRECTION\";\nexport const ScoreDataType = {\n Numeric: \"NUMERIC\",\n Boolean: \"BOOLEAN\",\n Categorical: \"CATEGORICAL\",\n Correction: \"CORRECTION\",\n} as const;\n","/**\n * Serialize a value to JSON\n * @param value A JavaScript value, usually an object or array, to be converted.\n * @param replacer A function that transforms the results.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n * @returns JSON string\n */\nexport const toJson = (\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string => {\n return JSON.stringify(value, replacer, space);\n};\n\n/**\n * Parse JSON string to object, array, or other type\n * @param text A valid JSON string.\n * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.\n * @returns Parsed object, array, or other type\n */\nexport function fromJson<T = unknown>(\n text: string,\n reviver?: (this: unknown, key: string, value: unknown) => unknown,\n): T {\n return JSON.parse(text, reviver);\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../core/index.js\";\nimport { toJson } from \"../core/json.js\";\n\nexport class LangfuseAPIError extends Error {\n public readonly statusCode?: number;\n public readonly body?: unknown;\n public readonly rawResponse?: core.RawResponse;\n\n constructor({\n message,\n statusCode,\n body,\n rawResponse,\n }: {\n message?: string;\n statusCode?: number;\n body?: unknown;\n rawResponse?: core.RawResponse;\n }) {\n super(buildMessage({ message, statusCode, body }));\n Object.setPrototypeOf(this, LangfuseAPIError.prototype);\n this.statusCode = statusCode;\n this.body = body;\n this.rawResponse = rawResponse;\n }\n}\n\nfunction buildMessage({\n message,\n statusCode,\n body,\n}: {\n message: string | undefined;\n statusCode: number | undefined;\n body: unknown | undefined;\n}): string {\n let lines: string[] = [];\n if (message != null) {\n lines.push(message);\n }\n\n if (statusCode != null) {\n lines.push(`Status code: ${statusCode.toString()}`);\n }\n\n if (body != null) {\n lines.push(`Body: ${toJson(body, undefined, 2)}`);\n }\n\n return lines.join(\"\\n\");\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport class LangfuseAPITimeoutError extends Error {\n constructor(message: string) {\n super(message);\n Object.setPrototypeOf(this, LangfuseAPITimeoutError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class Error extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"Error\",\n statusCode: 400,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, Error.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class UnauthorizedError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"UnauthorizedError\",\n statusCode: 401,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class AccessDeniedError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"AccessDeniedError\",\n statusCode: 403,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, AccessDeniedError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class NotFoundError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"NotFoundError\",\n statusCode: 404,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class MethodNotAllowedError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"MethodNotAllowedError\",\n statusCode: 405,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, MethodNotAllowedError.prototype);\n }\n}\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./errors/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class ServiceUnavailableError extends errors.LangfuseAPIError {\n constructor(rawResponse?: core.RawResponse) {\n super({\n message: \"ServiceUnavailableError\",\n statusCode: 503,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, ServiceUnavailableError.prototype);\n }\n}\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ObservationType =\n | \"SPAN\"\n | \"GENERATION\"\n | \"EVENT\"\n | \"AGENT\"\n | \"TOOL\"\n | \"CHAIN\"\n | \"RETRIEVER\"\n | \"EVALUATOR\"\n | \"EMBEDDING\"\n | \"GUARDRAIL\";\nexport const ObservationType = {\n Span: \"SPAN\",\n Generation: \"GENERATION\",\n Event: \"EVENT\",\n Agent: \"AGENT\",\n Tool: \"TOOL\",\n Chain: \"CHAIN\",\n Retriever: \"RETRIEVER\",\n Evaluator: \"EVALUATOR\",\n Embedding: \"EMBEDDING\",\n Guardrail: \"GUARDRAIL\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type LlmAdapter =\n | \"anthropic\"\n | \"openai\"\n | \"azure\"\n | \"bedrock\"\n | \"google-vertex-ai\"\n | \"google-ai-studio\";\nexport const LlmAdapter = {\n Anthropic: \"anthropic\",\n OpenAi: \"openai\",\n Azure: \"azure\",\n Bedrock: \"bedrock\",\n GoogleVertexAi: \"google-vertex-ai\",\n GoogleAiStudio: \"google-ai-studio\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * The MIME type of the media record\n */\nexport type MediaContentType =\n | \"image/png\"\n | \"image/jpeg\"\n | \"image/jpg\"\n | \"image/webp\"\n | \"image/gif\"\n | \"image/svg+xml\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/avif\"\n | \"image/heic\"\n | \"audio/mpeg\"\n | \"audio/mp3\"\n | \"audio/wav\"\n | \"audio/ogg\"\n | \"audio/oga\"\n | \"audio/aac\"\n | \"audio/mp4\"\n | \"audio/flac\"\n | \"audio/opus\"\n | \"audio/webm\"\n | \"video/mp4\"\n | \"video/webm\"\n | \"video/ogg\"\n | \"video/mpeg\"\n | \"video/quicktime\"\n | \"video/x-msvideo\"\n | \"video/x-matroska\"\n | \"text/plain\"\n | \"text/html\"\n | \"text/css\"\n | \"text/csv\"\n | \"text/markdown\"\n | \"text/x-python\"\n | \"application/javascript\"\n | \"text/x-typescript\"\n | \"application/x-yaml\"\n | \"application/pdf\"\n | \"application/msword\"\n | \"application/vnd.ms-excel\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/zip\"\n | \"application/json\"\n | \"application/xml\"\n | \"application/octet-stream\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\"\n | \"application/rtf\"\n | \"application/x-ndjson\"\n | \"application/vnd.apache.parquet\"\n | \"application/gzip\"\n | \"application/x-tar\"\n | \"application/x-7z-compressed\";\nexport const MediaContentType = {\n ImagePng: \"image/png\",\n ImageJpeg: \"image/jpeg\",\n ImageJpg: \"image/jpg\",\n ImageWebp: \"image/webp\",\n ImageGif: \"image/gif\",\n ImageSvgXml: \"image/svg+xml\",\n ImageTiff: \"image/tiff\",\n ImageBmp: \"image/bmp\",\n ImageAvif: \"image/avif\",\n ImageHeic: \"image/heic\",\n AudioMpeg: \"audio/mpeg\",\n AudioMp3: \"audio/mp3\",\n AudioWav: \"audio/wav\",\n AudioOgg: \"audio/ogg\",\n AudioOga: \"audio/oga\",\n AudioAac: \"audio/aac\",\n AudioMp4: \"audio/mp4\",\n AudioFlac: \"audio/flac\",\n AudioOpus: \"audio/opus\",\n AudioWebm: \"audio/webm\",\n VideoMp4: \"video/mp4\",\n VideoWebm: \"video/webm\",\n VideoOgg: \"video/ogg\",\n VideoMpeg: \"video/mpeg\",\n VideoQuicktime: \"video/quicktime\",\n VideoXMsvideo: \"video/x-msvideo\",\n VideoXMatroska: \"video/x-matroska\",\n TextPlain: \"text/plain\",\n TextHtml: \"text/html\",\n TextCss: \"text/css\",\n TextCsv: \"text/csv\",\n TextMarkdown: \"text/markdown\",\n TextXPython: \"text/x-python\",\n ApplicationJavascript: \"application/javascript\",\n TextXTypescript: \"text/x-typescript\",\n ApplicationXYaml: \"application/x-yaml\",\n ApplicationPdf: \"application/pdf\",\n ApplicationMsword: \"application/msword\",\n ApplicationMsExcel: \"application/vnd.ms-excel\",\n ApplicationOpenxmlSpreadsheet:\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n ApplicationZip: \"application/zip\",\n ApplicationJson: \"application/json\",\n ApplicationXml: \"application/xml\",\n ApplicationOctetStream: \"application/octet-stream\",\n ApplicationOpenxmlWord:\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n ApplicationOpenxmlPresentation:\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n ApplicationRtf: \"application/rtf\",\n ApplicationXNdjson: \"application/x-ndjson\",\n ApplicationParquet: \"application/vnd.apache.parquet\",\n ApplicationGzip: \"application/gzip\",\n ApplicationXTar: \"application/x-tar\",\n ApplicationX7ZCompressed: \"application/x-7z-compressed\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type MembershipRole = \"OWNER\" | \"ADMIN\" | \"MEMBER\" | \"VIEWER\";\nexport const MembershipRole = {\n Owner: \"OWNER\",\n Admin: \"ADMIN\",\n Member: \"MEMBER\",\n Viewer: \"VIEWER\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type PromptType = \"chat\" | \"text\";\nexport const PromptType = {\n Chat: \"chat\",\n Text: \"text\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./resources/index.js\";\n","export * from \"./types/index.js\";\n","export * from \"./client/index.js\";\n","import * as core from \"./index.js\";\n\nexport function mergeHeaders(\n ...headersArray: (\n | Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >\n | null\n | undefined\n )[]\n): Record<string, string | core.Supplier<string | null | undefined>> {\n const result: Record<\n string,\n string | core.Supplier<string | null | undefined>\n > = {};\n\n for (const [key, value] of headersArray\n .filter((headers) => headers != null)\n .flatMap((headers) => Object.entries(headers))) {\n if (value != null) {\n result[key] = value;\n } else if (key in result) {\n delete result[key];\n }\n }\n\n return result;\n}\n\nexport function mergeOnlyDefinedHeaders(\n ...headersArray: (\n | Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >\n | null\n | undefined\n )[]\n): Record<string, string | core.Supplier<string | null | undefined>> {\n const result: Record<\n string,\n string | core.Supplier<string | null | undefined>\n > = {};\n\n for (const [key, value] of headersArray\n .filter((headers) => headers != null)\n .flatMap((headers) => Object.entries(headers))) {\n if (value != null) {\n result[key] = value;\n }\n }\n\n return result;\n}\n","interface QueryStringOptions {\n arrayFormat?: \"indices\" | \"repeat\";\n encode?: boolean;\n}\n\nconst defaultQsOptions: Required<QueryStringOptions> = {\n arrayFormat: \"indices\",\n encode: true,\n} as const;\n\nfunction encodeValue(value: unknown, shouldEncode: boolean): string {\n if (value === undefined) {\n return \"\";\n }\n if (value === null) {\n return \"\";\n }\n const stringValue = String(value);\n return shouldEncode ? encodeURIComponent(stringValue) : stringValue;\n}\n\nfunction stringifyObject(\n obj: Record<string, unknown>,\n prefix = \"\",\n options: Required<QueryStringOptions>,\n): string[] {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(obj)) {\n const fullKey = prefix ? `${prefix}[${key}]` : key;\n\n if (value === undefined) {\n continue;\n }\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n continue;\n }\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n if (item === undefined) {\n continue;\n }\n if (typeof item === \"object\" && !Array.isArray(item) && item !== null) {\n const arrayKey =\n options.arrayFormat === \"indices\" ? `${fullKey}[${i}]` : fullKey;\n parts.push(\n ...stringifyObject(\n item as Record<string, unknown>,\n arrayKey,\n options,\n ),\n );\n } else {\n const arrayKey =\n options.arrayFormat === \"indices\" ? `${fullKey}[${i}]` : fullKey;\n const encodedKey = options.encode\n ? encodeURIComponent(arrayKey)\n : arrayKey;\n parts.push(`${encodedKey}=${encodeValue(item, options.encode)}`);\n }\n }\n } else if (typeof value === \"object\" && value !== null) {\n if (Object.keys(value as Record<string, unknown>).length === 0) {\n continue;\n }\n parts.push(\n ...stringifyObject(value as Record<string, unknown>, fullKey, options),\n );\n } else {\n const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;\n parts.push(`${encodedKey}=${encodeValue(value, options.encode)}`);\n }\n }\n\n return parts;\n}\n\nexport function toQueryString(\n obj: unknown,\n options?: QueryStringOptions,\n): string {\n if (obj == null || typeof obj !== \"object\") {\n return \"\";\n }\n\n const parts = stringifyObject(obj as Record<string, unknown>, \"\", {\n ...defaultQsOptions,\n ...options,\n });\n return parts.join(\"&\");\n}\n","import { toQueryString } from \"../url/qs.js\";\n\nexport function createRequestUrl(\n baseUrl: string,\n queryParameters?: Record<string, unknown>,\n): string {\n const queryString = toQueryString(queryParameters, { arrayFormat: \"repeat\" });\n return queryString ? `${baseUrl}?${queryString}` : baseUrl;\n}\n","import { ResponseWithBody } from \"./ResponseWithBody.js\";\n\nexport type BinaryResponse = {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */\n bodyUsed: boolean;\n /**\n * Returns a ReadableStream of the response body.\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body)\n */\n stream: () => ReadableStream<Uint8Array>;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */\n arrayBuffer: () => Promise<ArrayBuffer>;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */\n blob: () => Promise<Blob>;\n /**\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)\n * Some versions of the Fetch API may not support this method.\n */\n bytes?(): Promise<Uint8Array>;\n};\n\nexport function getBinaryResponse(response: ResponseWithBody): BinaryResponse {\n const binaryResponse: BinaryResponse = {\n get bodyUsed() {\n return response.bodyUsed;\n },\n stream: () => response.body,\n arrayBuffer: response.arrayBuffer.bind(response),\n blob: response.blob.bind(response),\n };\n if (\"bytes\" in response && typeof response.bytes === \"function\") {\n binaryResponse.bytes = response.bytes.bind(response);\n }\n\n return binaryResponse;\n}\n","export type ResponseWithBody = Response & {\n body: ReadableStream<Uint8Array>;\n};\n\nexport function isResponseWithBody(\n response: Response,\n): response is ResponseWithBody {\n return (response as ResponseWithBody).body != null;\n}\n","import { getBinaryResponse } from \"./BinaryResponse.js\";\nimport { isResponseWithBody } from \"./ResponseWithBody.js\";\nimport { fromJson } from \"../json.js\";\n\nexport async function getResponseBody(\n response: Response,\n responseType?: string,\n): Promise<unknown> {\n if (!isResponseWithBody(response)) {\n return undefined;\n }\n switch (responseType) {\n case \"binary-response\":\n return getBinaryResponse(response);\n case \"blob\":\n return await response.blob();\n case \"arrayBuffer\":\n return await response.arrayBuffer();\n case \"sse\":\n return response.body;\n case \"streaming\":\n return response.body;\n\n case \"text\":\n return await response.text();\n }\n\n // if responseType is \"json\" or not specified, try to parse as JSON\n const text = await response.text();\n if (text.length > 0) {\n try {\n let responseBody = fromJson(text);\n return responseBody;\n } catch (err) {\n return {\n ok: false,\n error: {\n reason: \"non-json\",\n statusCode: response.status,\n rawBody: text,\n },\n };\n }\n }\n return undefined;\n}\n","import { fromJson } from \"../json.js\";\nimport { getResponseBody } from \"./getResponseBody.js\";\n\nexport async function getErrorResponseBody(\n response: Response,\n): Promise<unknown> {\n let contentType = response.headers.get(\"Content-Type\")?.toLowerCase();\n if (contentType == null || contentType.length === 0) {\n return getResponseBody(response);\n }\n\n if (contentType.indexOf(\";\") !== -1) {\n contentType = contentType.split(\";\")[0]?.trim() ?? \"\";\n }\n switch (contentType) {\n case \"application/hal+json\":\n case \"application/json\":\n case \"application/ld+json\":\n case \"application/problem+json\":\n case \"application/vnd.api+json\":\n case \"text/json\":\n const text = await response.text();\n return text.length > 0 ? fromJson(text) : undefined;\n default:\n if (\n contentType.startsWith(\"application/vnd.\") &&\n contentType.endsWith(\"+json\")\n ) {\n const text = await response.text();\n return text.length > 0 ? fromJson(text) : undefined;\n }\n\n // Fallback to plain text if content type is not recognized\n // Even if no body is present, the response will be an empty string\n return await response.text();\n }\n}\n","export async function getFetchFn(): Promise<typeof fetch> {\n return fetch;\n}\n","import { toJson } from \"../json.js\";\n\nexport declare namespace GetRequestBody {\n interface Args {\n body: unknown;\n type: \"json\" | \"file\" | \"bytes\" | \"other\";\n }\n}\n\nexport async function getRequestBody({\n body,\n type,\n}: GetRequestBody.Args): Promise<BodyInit | undefined> {\n if (type.includes(\"json\")) {\n return toJson(body);\n } else {\n return body as BodyInit;\n }\n}\n","const TIMEOUT = \"timeout\";\n\nexport function getTimeoutSignal(timeoutMs: number): {\n signal: AbortSignal;\n abortId: NodeJS.Timeout;\n} {\n const controller = new AbortController();\n const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);\n return { signal: controller.signal, abortId };\n}\n\n/**\n * Returns an abort signal that is getting aborted when\n * at least one of the specified abort signals is aborted.\n *\n * Requires at least node.js 18.\n */\nexport function anySignal(\n ...args: AbortSignal[] | [AbortSignal[]]\n): AbortSignal {\n // Allowing signals to be passed either as array\n // of signals or as multiple arguments.\n const signals = (\n args.length === 1 && Array.isArray(args[0]) ? args[0] : args\n ) as AbortSignal[];\n\n const controller = new AbortController();\n\n for (const signal of signals) {\n if (signal.aborted) {\n // Exiting early if one of the signals\n // is already aborted.\n controller.abort((signal as any)?.reason);\n break;\n }\n\n // Listening for signals and removing the listeners\n // when at least one symbol is aborted.\n signal.addEventListener(\n \"abort\",\n () => controller.abort((signal as any)?.reason),\n {\n signal: controller.signal,\n },\n );\n }\n\n return controller.signal;\n}\n","import { anySignal, getTimeoutSignal } from \"./signals.js\";\n\nexport const makeRequest = async (\n fetchFn: (url: string, init: RequestInit) => Promise<Response>,\n url: string,\n method: string,\n headers: Record<string, string>,\n requestBody: BodyInit | undefined,\n timeoutMs?: number,\n abortSignal?: AbortSignal,\n withCredentials?: boolean,\n duplex?: \"half\",\n): Promise<Response> => {\n const signals: AbortSignal[] = [];\n\n // Add timeout signal\n let timeoutAbortId: NodeJS.Timeout | undefined = undefined;\n if (timeoutMs != null) {\n const { signal, abortId } = getTimeoutSignal(timeoutMs);\n timeoutAbortId = abortId;\n signals.push(signal);\n }\n\n // Add arbitrary signal\n if (abortSignal != null) {\n signals.push(abortSignal);\n }\n let newSignals = anySignal(signals);\n const response = await fetchFn(url, {\n method: method,\n headers,\n body: requestBody,\n signal: newSignals,\n credentials: withCredentials ? \"include\" : undefined,\n // @ts-ignore\n duplex,\n });\n\n if (timeoutAbortId != null) {\n clearTimeout(timeoutAbortId);\n }\n\n return response;\n};\n","let Headers: typeof globalThis.Headers;\n\nif (typeof globalThis.Headers !== \"undefined\") {\n Headers = globalThis.Headers;\n} else {\n Headers = class Headers implements Headers {\n private headers: Map<string, string[]>;\n\n constructor(init?: HeadersInit) {\n this.headers = new Map();\n\n if (init) {\n if (init instanceof Headers) {\n init.forEach((value, key) => this.append(key, value));\n } else if (Array.isArray(init)) {\n for (const [key, value] of init) {\n if (typeof key === \"string\" && typeof value === \"string\") {\n this.append(key, value);\n } else {\n throw new TypeError(\n \"Each header entry must be a [string, string] tuple\",\n );\n }\n }\n } else {\n for (const [key, value] of Object.entries(init)) {\n if (typeof value === \"string\") {\n this.append(key, value);\n } else {\n throw new TypeError(\"Header values must be strings\");\n }\n }\n }\n }\n }\n\n append(name: string, value: string): void {\n const key = name.toLowerCase();\n const existing = this.headers.get(key) || [];\n this.headers.set(key, [...existing, value]);\n }\n\n delete(name: string): void {\n const key = name.toLowerCase();\n this.headers.delete(key);\n }\n\n get(name: string): string | null {\n const key = name.toLowerCase();\n const values = this.headers.get(key);\n return values ? values.join(\", \") : null;\n }\n\n has(name: string): boolean {\n const key = name.toLowerCase();\n return this.headers.has(key);\n }\n\n set(name: string, value: string): void {\n const key = name.toLowerCase();\n this.headers.set(key, [value]);\n }\n\n forEach(\n callbackfn: (value: string, key: string, parent: Headers) => void,\n thisArg?: unknown,\n ): void {\n const boundCallback = thisArg ? callbackfn.bind(thisArg) : callbackfn;\n this.headers.forEach((values, key) =>\n boundCallback(values.join(\", \"), key, this),\n );\n }\n\n getSetCookie(): string[] {\n return this.headers.get(\"set-cookie\") || [];\n }\n\n *entries(): HeadersIterator<[string, string]> {\n for (const [key, values] of this.headers.entries()) {\n yield [key, values.join(\", \")];\n }\n }\n\n *keys(): HeadersIterator<string> {\n yield* this.headers.keys();\n }\n\n *values(): HeadersIterator<string> {\n for (const values of this.headers.values()) {\n yield values.join(\", \");\n }\n }\n\n [Symbol.iterator](): HeadersIterator<[string, string]> {\n return this.entries();\n }\n };\n}\n\nexport { Headers };\n","import { Headers } from \"./Headers.js\";\n\n/**\n * The raw response from the fetch call excluding the body.\n */\nexport type RawResponse = Omit<\n {\n [K in keyof Response as Response[K] extends Function\n ? never\n : K]: Response[K]; // strips out functions\n },\n \"ok\" | \"body\" | \"bodyUsed\"\n>; // strips out body and bodyUsed\n\n/**\n * A raw response indicating that the request was aborted.\n */\nexport const abortRawResponse: RawResponse = {\n headers: new Headers(),\n redirected: false,\n status: 499,\n statusText: \"Client Closed Request\",\n type: \"error\",\n url: \"\",\n} as const;\n\n/**\n * A raw response indicating an unknown error.\n */\nexport const unknownRawResponse: RawResponse = {\n headers: new Headers(),\n redirected: false,\n status: 0,\n statusText: \"Unknown Error\",\n type: \"error\",\n url: \"\",\n} as const;\n\n/**\n * Converts a `RawResponse` object into a `RawResponse` by extracting its properties,\n * excluding the `body` and `bodyUsed` fields.\n *\n * @param response - The `RawResponse` object to convert.\n * @returns A `RawResponse` object containing the extracted properties of the input response.\n */\nexport function toRawResponse(response: Response): RawResponse {\n return {\n headers: response.headers,\n redirected: response.redirected,\n status: response.status,\n statusText: response.statusText,\n type: response.type,\n url: response.url,\n };\n}\n\n/**\n * Creates a `RawResponse` from a standard `Response` object.\n */\nexport interface WithRawResponse<T> {\n readonly data: T;\n readonly rawResponse: RawResponse;\n}\n","const INITIAL_RETRY_DELAY = 1000; // in milliseconds\nconst MAX_RETRY_DELAY = 60000; // in milliseconds\nconst DEFAULT_MAX_RETRIES = 2;\nconst JITTER_FACTOR = 0.2; // 20% random jitter\n\nfunction addPositiveJitter(delay: number): number {\n // Generate a random value between 0 and +JITTER_FACTOR\n const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;\n return delay * jitterMultiplier;\n}\n\nfunction addSymmetricJitter(delay: number): number {\n // Generate a random value in a JITTER_FACTOR-sized percentage range around delay\n const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR;\n return delay * jitterMultiplier;\n}\n\nfunction getRetryDelayFromHeaders(\n response: Response,\n retryAttempt: number,\n): number {\n // Check for Retry-After header first (RFC 7231), with no jitter\n const retryAfter = response.headers.get(\"Retry-After\");\n if (retryAfter) {\n // Parse as number of seconds...\n const retryAfterSeconds = parseInt(retryAfter, 10);\n if (!isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {\n return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);\n }\n\n // ...or as an HTTP date; both are valid\n const retryAfterDate = new Date(retryAfter);\n if (!isNaN(retryAfterDate.getTime())) {\n const delay = retryAfterDate.getTime() - Date.now();\n if (delay > 0) {\n return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);\n }\n }\n }\n\n // Then check for industry-standard X-RateLimit-Reset header, with positive jitter\n const rateLimitReset = response.headers.get(\"X-RateLimit-Reset\");\n if (rateLimitReset) {\n const resetTime = parseInt(rateLimitReset, 10);\n if (!isNaN(resetTime)) {\n // Assume Unix timestamp in epoch seconds\n const delay = resetTime * 1000 - Date.now();\n if (delay > 0) {\n return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY));\n }\n }\n }\n\n // Fall back to exponential backoff, with symmetric jitter\n return addSymmetricJitter(\n Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY),\n );\n}\n\nexport async function requestWithRetries(\n requestFn: () => Promise<Response>,\n maxRetries: number = DEFAULT_MAX_RETRIES,\n): Promise<Response> {\n let response: Response = await requestFn();\n\n for (let i = 0; i < maxRetries; ++i) {\n if ([408, 429].includes(response.status) || response.status >= 500) {\n // Get delay with appropriate jitter applied\n const delay = getRetryDelayFromHeaders(response, i);\n\n await new Promise((resolve) => setTimeout(resolve, delay));\n response = await requestFn();\n } else {\n break;\n }\n }\n return response!;\n}\n","export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);\n\nexport const Supplier = {\n get: async <T>(supplier: Supplier<T>): Promise<T> => {\n if (typeof supplier === \"function\") {\n return (supplier as () => T)();\n } else {\n return supplier;\n }\n },\n};\n","import { toJson } from \"../json.js\";\nimport { APIResponse } from \"./APIResponse.js\";\nimport { createRequestUrl } from \"./createRequestUrl.js\";\nimport { getErrorResponseBody } from \"./getErrorResponseBody.js\";\nimport { getFetchFn } from \"./getFetchFn.js\";\nimport { getRequestBody } from \"./getRequestBody.js\";\nimport { getResponseBody } from \"./getResponseBody.js\";\nimport { makeRequest } from \"./makeRequest.js\";\nimport {\n abortRawResponse,\n toRawResponse,\n unknownRawResponse,\n} from \"./RawResponse.js\";\nimport { requestWithRetries } from \"./requestWithRetries.js\";\nimport { Supplier } from \"./Supplier.js\";\n\nexport type FetchFunction = <R = unknown>(\n args: Fetcher.Args,\n) => Promise<APIResponse<R, Fetcher.Error>>;\n\nexport declare namespace Fetcher {\n export interface Args {\n url: string;\n method: string;\n contentType?: string;\n headers?: Record<\n string,\n string | Supplier<string | null | undefined> | null | undefined\n >;\n queryParameters?: Record<string, unknown>;\n body?: unknown;\n timeoutMs?: number;\n maxRetries?: number;\n withCredentials?: boolean;\n abortSignal?: AbortSignal;\n requestType?: \"json\" | \"file\" | \"bytes\";\n responseType?:\n | \"json\"\n | \"blob\"\n | \"sse\"\n | \"streaming\"\n | \"text\"\n | \"arrayBuffer\"\n | \"binary-response\";\n duplex?: \"half\";\n }\n\n export type Error =\n | FailedStatusCodeError\n | NonJsonError\n | TimeoutError\n | UnknownError;\n\n export interface FailedStatusCodeError {\n reason: \"status-code\";\n statusCode: number;\n body: unknown;\n }\n\n export interface NonJsonError {\n reason: \"non-json\";\n statusCode: number;\n rawBody: string;\n }\n\n export interface TimeoutError {\n reason: \"timeout\";\n }\n\n export interface UnknownError {\n reason: \"unknown\";\n errorMessage: string;\n }\n}\n\nasync function getHeaders(args: Fetcher.Args): Promise<Record<string, string>> {\n const newHeaders: Record<string, string> = {};\n if (args.body !== undefined && args.contentType != null) {\n newHeaders[\"Content-Type\"] = args.contentType;\n }\n\n if (args.headers == null) {\n return newHeaders;\n }\n\n for (const [key, value] of Object.entries(args.headers)) {\n const result = await Supplier.get(value);\n if (typeof result === \"string\") {\n newHeaders[key] = result;\n continue;\n }\n if (result == null) {\n continue;\n }\n newHeaders[key] = `${result}`;\n }\n return newHeaders;\n}\n\nexport async function fetcherImpl<R = unknown>(\n args: Fetcher.Args,\n): Promise<APIResponse<R, Fetcher.Error>> {\n const url = createRequestUrl(args.url, args.queryParameters);\n const requestBody: BodyInit | undefined = await getRequestBody({\n body: args.body,\n type: args.requestType === \"json\" ? \"json\" : \"other\",\n });\n const fetchFn = await getFetchFn();\n\n try {\n const response = await requestWithRetries(\n async () =>\n makeRequest(\n fetchFn,\n url,\n args.method,\n await getHeaders(args),\n requestBody,\n args.timeoutMs,\n args.abortSignal,\n args.withCredentials,\n args.duplex,\n ),\n args.maxRetries,\n );\n\n if (response.status >= 200 && response.status < 400) {\n return {\n ok: true,\n body: (await getResponseBody(response, args.responseType)) as R,\n headers: response.headers,\n rawResponse: toRawResponse(response),\n };\n } else {\n return {\n ok: false,\n error: {\n reason: \"status-code\",\n statusCode: response.status,\n body: await getErrorResponseBody(response),\n },\n rawResponse: toRawResponse(response),\n };\n }\n } catch (error) {\n if (args.abortSignal != null && args.abortSignal.aborted) {\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: \"The user aborted a request\",\n },\n rawResponse: abortRawResponse,\n };\n } else if (error instanceof Error && error.name === \"AbortError\") {\n return {\n ok: false,\n error: {\n reason: \"timeout\",\n },\n rawResponse: abortRawResponse,\n };\n } else if (error instanceof Error) {\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: error.message,\n },\n rawResponse: unknownRawResponse,\n };\n }\n\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: toJson(error),\n },\n rawResponse: unknownRawResponse,\n };\n }\n}\n\nexport const fetcher: FetchFunction = fetcherImpl;\n","import { WithRawResponse } from \"./RawResponse.js\";\n\n/**\n * A promise that returns the parsed response and lets you retrieve the raw response too.\n */\nexport class HttpResponsePromise<T> extends Promise<T> {\n private innerPromise: Promise<WithRawResponse<T>>;\n private unwrappedPromise: Promise<T> | undefined;\n\n private constructor(promise: Promise<WithRawResponse<T>>) {\n // Initialize with a no-op to avoid premature parsing\n super((resolve) => {\n resolve(undefined as unknown as T);\n });\n this.innerPromise = promise;\n }\n\n /**\n * Creates an `HttpResponsePromise` from a function that returns a promise.\n *\n * @param fn - A function that returns a promise resolving to a `WithRawResponse` object.\n * @param args - Arguments to pass to the function.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromFunction<\n F extends (...args: never[]) => Promise<WithRawResponse<T>>,\n T,\n >(fn: F, ...args: Parameters<F>): HttpResponsePromise<T> {\n return new HttpResponsePromise<T>(fn(...args));\n }\n\n /**\n * Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.\n *\n * @param fn - A function that returns a promise resolving to a `WithRawResponse` object.\n * @returns A function that returns an `HttpResponsePromise` instance.\n */\n public static interceptFunction<\n F extends (...args: never[]) => Promise<WithRawResponse<T>>,\n T = Awaited<ReturnType<F>>[\"data\"],\n >(fn: F): (...args: Parameters<F>) => HttpResponsePromise<T> {\n return (...args: Parameters<F>): HttpResponsePromise<T> => {\n return HttpResponsePromise.fromPromise<T>(fn(...args));\n };\n }\n\n /**\n * Creates an `HttpResponsePromise` from an existing promise.\n *\n * @param promise - A promise resolving to a `WithRawResponse` object.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromPromise<T>(\n promise: Promise<WithRawResponse<T>>,\n ): HttpResponsePromise<T> {\n return new HttpResponsePromise<T>(promise);\n }\n\n /**\n * Creates an `HttpResponsePromise` from an executor function.\n *\n * @param executor - A function that takes resolve and reject callbacks to create a promise.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromExecutor<T>(\n executor: (\n resolve: (value: WithRawResponse<T>) => void,\n reject: (reason?: unknown) => void,\n ) => void,\n ): HttpResponsePromise<T> {\n const promise = new Promise<WithRawResponse<T>>(executor);\n return new HttpResponsePromise<T>(promise);\n }\n\n /**\n * Creates an `HttpResponsePromise` from a resolved result.\n *\n * @param result - A `WithRawResponse` object to resolve immediately.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromResult<T>(\n result: WithRawResponse<T>,\n ): HttpResponsePromise<T> {\n const promise = Promise.resolve(result);\n return new HttpResponsePromise<T>(promise);\n }\n\n private unwrap(): Promise<T> {\n if (!this.unwrappedPromise) {\n this.unwrappedPromise = this.innerPromise.then(({ data }) => data);\n }\n return this.unwrappedPromise;\n }\n\n /** @inheritdoc */\n public override then<TResult1 = T, TResult2 = never>(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,\n ): Promise<TResult1 | TResult2> {\n return this.unwrap().then(onfulfilled, onrejected);\n }\n\n /** @inheritdoc */\n public override catch<TResult = never>(\n onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,\n ): Promise<T | TResult> {\n return this.unwrap().catch(onrejected);\n }\n\n /** @inheritdoc */\n public override finally(onfinally?: (() => void) | null): Promise<T> {\n return this.unwrap().finally(onfinally);\n }\n\n /**\n * Retrieves the data and raw response.\n *\n * @returns A promise resolving to a `WithRawResponse` object.\n */\n public async withRawResponse(): Promise<WithRawResponse<T>> {\n return await this.innerPromise;\n }\n}\n","export { join } from \"./join.js\";\nexport { toQueryString } from \"./qs.js\";\n","export function join(base: string, ...segments: string[]): string {\n if (!base) {\n return \"\";\n }\n\n if (segments.length === 0) {\n return base;\n }\n\n if (base.includes(\"://\")) {\n let url: URL;\n try {\n url = new URL(base);\n } catch {\n // Fallback to path joining if URL is malformed\n return joinPath(base, ...segments);\n }\n\n const lastSegment = segments[segments.length - 1];\n const shouldPreserveTrailingSlash =\n lastSegment && lastSegment.endsWith(\"/\");\n\n for (const segment of segments) {\n const cleanSegment = trimSlashes(segment);\n if (cleanSegment) {\n url.pathname = joinPathSegments(url.pathname, cleanSegment);\n }\n }\n\n if (shouldPreserveTrailingSlash && !url.pathname.endsWith(\"/\")) {\n url.pathname += \"/\";\n }\n\n return url.toString();\n }\n\n return joinPath(base, ...segments);\n}\n\nfunction joinPath(base: string, ...segments: string[]): string {\n if (segments.length === 0) {\n return base;\n }\n\n let result = base;\n\n const lastSegment = segments[segments.length - 1];\n const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith(\"/\");\n\n for (const segment of segments) {\n const cleanSegment = trimSlashes(segment);\n if (cleanSegment) {\n result = joinPathSegments(result, cleanSegment);\n }\n }\n\n if (shouldPreserveTrailingSlash && !result.endsWith(\"/\")) {\n result += \"/\";\n }\n\n return result;\n}\n\nfunction joinPathSegments(left: string, right: string): string {\n if (left.endsWith(\"/\")) {\n return left + right;\n }\n return left + \"/\" + right;\n}\n\nfunction trimSlashes(str: string): string {\n if (!str) return str;\n\n let start = 0;\n let end = str.length;\n\n if (str.startsWith(\"/\")) start = 1;\n if (str.endsWith(\"/\")) end = str.length - 1;\n\n return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n","function base64ToBytes(base64: string): Uint8Array {\n const binString = atob(base64);\n return Uint8Array.from(binString, (m) => m.codePointAt(0)!);\n}\n\nfunction bytesToBase64(bytes: Uint8Array): string {\n const binString = String.fromCodePoint(...bytes);\n return btoa(binString);\n}\n\nexport function base64Encode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"utf8\").toString(\"base64\");\n }\n\n const bytes = new TextEncoder().encode(input);\n return bytesToBase64(bytes);\n}\n\nexport function base64Decode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"base64\").toString(\"utf8\");\n }\n\n const bytes = base64ToBytes(input);\n return new TextDecoder().decode(bytes);\n}\n","import { base64Decode, base64Encode } from \"../base64.js\";\n\nexport interface BasicAuth {\n username: string;\n password: string;\n}\n\nconst BASIC_AUTH_HEADER_PREFIX = /^Basic /i;\n\nexport const BasicAuth = {\n toAuthorizationHeader: (\n basicAuth: BasicAuth | undefined,\n ): string | undefined => {\n if (basicAuth == null) {\n return undefined;\n }\n const token = base64Encode(`${basicAuth.username}:${basicAuth.password}`);\n return `Basic ${token}`;\n },\n fromAuthorizationHeader: (header: string): BasicAuth => {\n const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, \"\");\n const decoded = base64Decode(credentials);\n const [username, password] = decoded.split(\":\", 2);\n\n if (username == null || password == null) {\n throw new Error(\"Invalid basic auth\");\n }\n return {\n username,\n password,\n };\n },\n};\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace AnnotationQueues {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class AnnotationQueues {\n protected readonly _options: AnnotationQueues.Options;\n\n constructor(_options: AnnotationQueues.Options) {\n this._options = _options;\n }\n\n /**\n * Get all annotation queues\n *\n * @param {LangfuseAPI.GetAnnotationQueuesRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.listQueues()\n */\n public listQueues(\n request: LangfuseAPI.GetAnnotationQueuesRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedAnnotationQueues> {\n return core.HttpResponsePromise.fromPromise(\n this.__listQueues(request, requestOptions),\n );\n }\n\n private async __listQueues(\n request: LangfuseAPI.GetAnnotationQueuesRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedAnnotationQueues>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/annotation-queues\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedAnnotationQueues,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create an annotation queue\n *\n * @param {LangfuseAPI.CreateAnnotationQueueRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.createQueue({\n * name: \"name\",\n * description: undefined,\n * scoreConfigIds: [\"scoreConfigIds\", \"scoreConfigIds\"]\n * })\n */\n public createQueue(\n request: LangfuseAPI.CreateAnnotationQueueRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueue> {\n return core.HttpResponsePromise.fromPromise(\n this.__createQueue(request, requestOptions),\n );\n }\n\n private async __createQueue(\n request: LangfuseAPI.CreateAnnotationQueueRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueue>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/annotation-queues\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueue,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/annotation-queues.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get an annotation queue by ID\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.getQueue(\"queueId\")\n */\n public getQueue(\n queueId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueue> {\n return core.HttpResponsePromise.fromPromise(\n this.__getQueue(queueId, requestOptions),\n );\n }\n\n private async __getQueue(\n queueId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueue>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueue,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues/{queueId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get items for a specific annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.GetAnnotationQueueItemsRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.listQueueItems(\"queueId\")\n */\n public listQueueItems(\n queueId: string,\n request: LangfuseAPI.GetAnnotationQueueItemsRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedAnnotationQueueItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__listQueueItems(queueId, request, requestOptions),\n );\n }\n\n private async __listQueueItems(\n queueId: string,\n request: LangfuseAPI.GetAnnotationQueueItemsRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedAnnotationQueueItems>> {\n const { status, page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (status != null) {\n _queryParams[\"status\"] = status;\n }\n\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedAnnotationQueueItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues/{queueId}/items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a specific item from an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {string} itemId - The unique identifier of the annotation queue item\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.getQueueItem(\"queueId\", \"itemId\")\n */\n public getQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueueItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__getQueueItem(queueId, itemId, requestOptions),\n );\n }\n\n private async __getQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueueItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items/${encodeURIComponent(itemId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueueItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues/{queueId}/items/{itemId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Add an item to an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.CreateAnnotationQueueItemRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.createQueueItem(\"queueId\", {\n * objectId: \"objectId\",\n * objectType: \"TRACE\",\n * status: undefined\n * })\n */\n public createQueueItem(\n queueId: string,\n request: LangfuseAPI.CreateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueueItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__createQueueItem(queueId, request, requestOptions),\n );\n }\n\n private async __createQueueItem(\n queueId: string,\n request: LangfuseAPI.CreateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueueItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueueItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/annotation-queues/{queueId}/items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Update an annotation queue item\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {string} itemId - The unique identifier of the annotation queue item\n * @param {LangfuseAPI.UpdateAnnotationQueueItemRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.updateQueueItem(\"queueId\", \"itemId\", {\n * status: undefined\n * })\n */\n public updateQueueItem(\n queueId: string,\n itemId: string,\n request: LangfuseAPI.UpdateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueueItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__updateQueueItem(queueId, itemId, request, requestOptions),\n );\n }\n\n private async __updateQueueItem(\n queueId: string,\n itemId: string,\n request: LangfuseAPI.UpdateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueueItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items/${encodeURIComponent(itemId)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueueItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/annotation-queues/{queueId}/items/{itemId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Remove an item from an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {string} itemId - The unique identifier of the annotation queue item\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.deleteQueueItem(\"queueId\", \"itemId\")\n */\n public deleteQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteAnnotationQueueItemResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteQueueItem(queueId, itemId, requestOptions),\n );\n }\n\n private async __deleteQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.DeleteAnnotationQueueItemResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items/${encodeURIComponent(itemId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteAnnotationQueueItemResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/annotation-queues/{queueId}/items/{itemId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create an assignment for a user to an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.AnnotationQueueAssignmentRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.createQueueAssignment(\"queueId\", {\n * userId: \"userId\"\n * })\n */\n public createQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.CreateAnnotationQueueAssignmentResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__createQueueAssignment(queueId, request, requestOptions),\n );\n }\n\n private async __createQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.CreateAnnotationQueueAssignmentResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/assignments`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.CreateAnnotationQueueAssignmentResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/annotation-queues/{queueId}/assignments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete an assignment for a user to an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.AnnotationQueueAssignmentRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.deleteQueueAssignment(\"queueId\", {\n * userId: \"userId\"\n * })\n */\n public deleteQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteAnnotationQueueAssignmentResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteQueueAssignment(queueId, request, requestOptions),\n );\n }\n\n private async __deleteQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.DeleteAnnotationQueueAssignmentResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/assignments`,\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteAnnotationQueueAssignmentResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/annotation-queues/{queueId}/assignments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace BlobStorageIntegrations {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class BlobStorageIntegrations {\n protected readonly _options: BlobStorageIntegrations.Options;\n\n constructor(_options: BlobStorageIntegrations.Options) {\n this._options = _options;\n }\n\n /**\n * Get all blob storage integrations for the organization (requires organization-scoped API key)\n *\n * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.blobStorageIntegrations.getBlobStorageIntegrations()\n */\n public getBlobStorageIntegrations(\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.BlobStorageIntegrationsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getBlobStorageIntegrations(requestOptions),\n );\n }\n\n private async __getBlobStorageIntegrations(\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.BlobStorageIntegrationsResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/integrations/blob-storage\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.BlobStorageIntegrationsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/integrations/blob-storage.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update a blob storage integration for a specific project (requires organization-scoped API key). The configuration is validated by performing a test upload to the bucket.\n *\n * @param {LangfuseAPI.CreateBlobStorageIntegrationRequest} request\n * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.blobStorageIntegrations.upsertBlobStorageIntegration({\n * projectId: \"projectId\",\n * type: \"S3\",\n * bucketName: \"bucketName\",\n * endpoint: undefined,\n * region: \"region\",\n * accessKeyId: undefined,\n * secretAccessKey: undefined,\n * prefix: undefined,\n * exportFrequency: \"hourly\",\n * enabled: true,\n * forcePathStyle: true,\n * fileType: \"JSON\",\n * exportMode: \"FULL_HISTORY\",\n * exportStartDate: undefined\n * })\n */\n public upsertBlobStorageIntegration(\n request: LangfuseAPI.CreateBlobStorageIntegrationRequest,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.BlobStorageIntegrationResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__upsertBlobStorageIntegration(request, requestOptions),\n );\n }\n\n private async __upsertBlobStorageIntegration(\n request: LangfuseAPI.CreateBlobStorageIntegrationRequest,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.BlobStorageIntegrationResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/integrations/blob-storage\",\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.BlobStorageIntegrationResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/integrations/blob-storage.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a blob storage integration by ID (requires organization-scoped API key)\n *\n * @param {string} id\n * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.blobStorageIntegrations.deleteBlobStorageIntegration(\"id\")\n */\n public deleteBlobStorageIntegration(\n id: string,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.BlobStorageIntegrationDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteBlobStorageIntegration(id, requestOptions),\n );\n }\n\n private async __deleteBlobStorageIntegration(\n id: string,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.BlobStorageIntegrationDeletionResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/integrations/blob-storage/${encodeURIComponent(id)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.BlobStorageIntegrationDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/integrations/blob-storage/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Comments {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Comments {\n protected readonly _options: Comments.Options;\n\n constructor(_options: Comments.Options) {\n this._options = _options;\n }\n\n /**\n * Create a comment. Comments may be attached to different object types (trace, observation, session, prompt).\n *\n * @param {LangfuseAPI.CreateCommentRequest} request\n * @param {Comments.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.comments.create({\n * projectId: \"projectId\",\n * objectType: \"objectType\",\n * objectId: \"objectId\",\n * content: \"content\",\n * authorUserId: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateCommentRequest,\n requestOptions?: Comments.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.CreateCommentResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateCommentRequest,\n requestOptions?: Comments.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.CreateCommentResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/comments\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.CreateCommentResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/comments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all comments\n *\n * @param {LangfuseAPI.GetCommentsRequest} request\n * @param {Comments.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.comments.get()\n */\n public get(\n request: LangfuseAPI.GetCommentsRequest = {},\n requestOptions?: Comments.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetCommentsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(request, requestOptions),\n );\n }\n\n private async __get(\n request: LangfuseAPI.GetCommentsRequest = {},\n requestOptions?: Comments.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetCommentsResponse>> {\n const { page, limit, objectType, objectId, authorUserId } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (objectType != null) {\n _queryParams[\"objectType\"] = objectType;\n }\n\n if (objectId != null) {\n _queryParams[\"objectId\"] = objectId;\n }\n\n if (authorUserId != null) {\n _queryParams[\"authorUserId\"] = authorUserId;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/comments\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetCommentsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/comments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a comment by id\n *\n * @param {string} commentId - The unique langfuse identifier of a comment\n * @param {Comments.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.comments.getById(\"commentId\")\n */\n public getById(\n commentId: string,\n requestOptions?: Comments.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Comment> {\n return core.HttpResponsePromise.fromPromise(\n this.__getById(commentId, requestOptions),\n );\n }\n\n private async __getById(\n commentId: string,\n requestOptions?: Comments.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Comment>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/comments/${encodeURIComponent(commentId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Comment,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/comments/{commentId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace DatasetItems {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class DatasetItems {\n protected readonly _options: DatasetItems.Options;\n\n constructor(_options: DatasetItems.Options) {\n this._options = _options;\n }\n\n /**\n * Create a dataset item\n *\n * @param {LangfuseAPI.CreateDatasetItemRequest} request\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.create({\n * datasetName: \"datasetName\",\n * input: undefined,\n * expectedOutput: undefined,\n * metadata: undefined,\n * sourceTraceId: undefined,\n * sourceObservationId: undefined,\n * id: undefined,\n * status: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateDatasetItemRequest,\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateDatasetItemRequest,\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-items\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/dataset-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a dataset item\n *\n * @param {string} id\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.get(\"id\")\n */\n public get(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetItem> {\n return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));\n }\n\n private async __get(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/dataset-items/${encodeURIComponent(id)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/dataset-items/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get dataset items\n *\n * @param {LangfuseAPI.GetDatasetItemsRequest} request\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.list()\n */\n public list(\n request: LangfuseAPI.GetDatasetItemsRequest = {},\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasetItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetDatasetItemsRequest = {},\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasetItems>> {\n const { datasetName, sourceTraceId, sourceObservationId, page, limit } =\n request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (datasetName != null) {\n _queryParams[\"datasetName\"] = datasetName;\n }\n\n if (sourceTraceId != null) {\n _queryParams[\"sourceTraceId\"] = sourceTraceId;\n }\n\n if (sourceObservationId != null) {\n _queryParams[\"sourceObservationId\"] = sourceObservationId;\n }\n\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-items\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasetItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/dataset-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a dataset item and all its run items. This action is irreversible.\n *\n * @param {string} id\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.delete(\"id\")\n */\n public delete(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteDatasetItemResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(id, requestOptions),\n );\n }\n\n private async __delete(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteDatasetItemResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/dataset-items/${encodeURIComponent(id)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteDatasetItemResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/dataset-items/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace DatasetRunItems {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class DatasetRunItems {\n protected readonly _options: DatasetRunItems.Options;\n\n constructor(_options: DatasetRunItems.Options) {\n this._options = _options;\n }\n\n /**\n * Create a dataset run item\n *\n * @param {LangfuseAPI.CreateDatasetRunItemRequest} request\n * @param {DatasetRunItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetRunItems.create({\n * runName: \"runName\",\n * runDescription: undefined,\n * metadata: undefined,\n * datasetItemId: \"datasetItemId\",\n * observationId: undefined,\n * traceId: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateDatasetRunItemRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetRunItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateDatasetRunItemRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetRunItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-run-items\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetRunItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/dataset-run-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * List dataset run items\n *\n * @param {LangfuseAPI.ListDatasetRunItemsRequest} request\n * @param {DatasetRunItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetRunItems.list({\n * datasetId: \"datasetId\",\n * runName: \"runName\"\n * })\n */\n public list(\n request: LangfuseAPI.ListDatasetRunItemsRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasetRunItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.ListDatasetRunItemsRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasetRunItems>> {\n const { datasetId, runName, page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n _queryParams[\"datasetId\"] = datasetId;\n _queryParams[\"runName\"] = runName;\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-run-items\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasetRunItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/dataset-run-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Datasets {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Datasets {\n protected readonly _options: Datasets.Options;\n\n constructor(_options: Datasets.Options) {\n this._options = _options;\n }\n\n /**\n * Get all datasets\n *\n * @param {LangfuseAPI.GetDatasetsRequest} request\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.list()\n */\n public list(\n request: LangfuseAPI.GetDatasetsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasets> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetDatasetsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasets>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/datasets\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasets,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/datasets.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a dataset\n *\n * @param {string} datasetName\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.get(\"datasetName\")\n */\n public get(\n datasetName: string,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Dataset> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(datasetName, requestOptions),\n );\n }\n\n private async __get(\n datasetName: string,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Dataset>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/datasets/${encodeURIComponent(datasetName)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Dataset,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/datasets/{datasetName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a dataset\n *\n * @param {LangfuseAPI.CreateDatasetRequest} request\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.create({\n * name: \"name\",\n * description: undefined,\n * metadata: undefined,\n * inputSchema: undefined,\n * expectedOutputSchema: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateDatasetRequest,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Dataset> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateDatasetRequest,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Dataset>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/datasets\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Dataset,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/v2/datasets.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a dataset run and its items\n *\n * @param {string} datasetName\n * @param {string} runName\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.getRun(\"datasetName\", \"runName\")\n */\n public getRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetRunWithItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__getRun(datasetName, runName, requestOptions),\n );\n }\n\n private async __getRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetRunWithItems>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetRunWithItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/datasets/{datasetName}/runs/{runName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a dataset run and all its run items. This action is irreversible.\n *\n * @param {string} datasetName\n * @param {string} runName\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.deleteRun(\"datasetName\", \"runName\")\n */\n public deleteRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteDatasetRunResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteRun(datasetName, runName, requestOptions),\n );\n }\n\n private async __deleteRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteDatasetRunResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteDatasetRunResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/datasets/{datasetName}/runs/{runName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get dataset runs\n *\n * @param {string} datasetName\n * @param {LangfuseAPI.GetDatasetRunsRequest} request\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.getRuns(\"datasetName\")\n */\n public getRuns(\n datasetName: string,\n request: LangfuseAPI.GetDatasetRunsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasetRuns> {\n return core.HttpResponsePromise.fromPromise(\n this.__getRuns(datasetName, request, requestOptions),\n );\n }\n\n private async __getRuns(\n datasetName: string,\n request: LangfuseAPI.GetDatasetRunsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasetRuns>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/datasets/${encodeURIComponent(datasetName)}/runs`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasetRuns,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/datasets/{datasetName}/runs.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Health {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Health {\n protected readonly _options: Health.Options;\n\n constructor(_options: Health.Options) {\n this._options = _options;\n }\n\n /**\n * Check health of API and database\n *\n * @param {Health.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.ServiceUnavailableError}\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.health.health()\n */\n public health(\n requestOptions?: Health.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.HealthResponse> {\n return core.HttpResponsePromise.fromPromise(this.__health(requestOptions));\n }\n\n private async __health(\n requestOptions?: Health.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.HealthResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/health\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.HealthResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 503:\n throw new LangfuseAPI.ServiceUnavailableError(_response.rawResponse);\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/health.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Ingestion {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Ingestion {\n protected readonly _options: Ingestion.Options;\n\n constructor(_options: Ingestion.Options) {\n this._options = _options;\n }\n\n /**\n * **Legacy endpoint for batch ingestion for Langfuse Observability.**\n *\n * -> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://langfuse.com/integrations/native/opentelemetry\n *\n * Within each batch, there can be multiple events.\n * Each event has a type, an id, a timestamp, metadata and a body.\n * Internally, we refer to this as the \"event envelope\" as it tells us something about the event but not the trace.\n * We use the event id within this envelope to deduplicate messages to avoid processing the same event twice, i.e. the event id should be unique per request.\n * The event.body.id is the ID of the actual trace and will be used for updates and will be visible within the Langfuse App.\n * I.e. if you want to update a trace, you'd use the same body id, but separate event IDs.\n *\n * Notes:\n * - Introduction to data model: https://langfuse.com/docs/observability/data-model\n * - Batch sizes are limited to 3.5 MB in total. You need to adjust the number of events per batch accordingly.\n * - The API does not return a 4xx status code for input errors. Instead, it responds with a 207 status code, which includes a list of the encountered errors.\n *\n * @param {LangfuseAPI.IngestionRequest} request\n * @param {Ingestion.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.ingestion.batch({\n * batch: [{\n * type: \"trace-create\",\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * body: {\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * environment: \"production\",\n * name: \"My Trace\",\n * userId: \"1234-5678-90ab-cdef\",\n * input: \"My input\",\n * output: \"My output\",\n * sessionId: \"1234-5678-90ab-cdef\",\n * release: \"1.0.0\",\n * version: \"1.0.0\",\n * metadata: \"My metadata\",\n * tags: [\"tag1\", \"tag2\"],\n * \"public\": true\n * }\n * }]\n * })\n *\n * @example\n * await client.ingestion.batch({\n * batch: [{\n * type: \"span-create\",\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * body: {\n * id: \"abcdef-1234-5678-90ab\",\n * traceId: \"1234-5678-90ab-cdef\",\n * startTime: \"2022-01-01T00:00:00.000Z\",\n * environment: \"test\"\n * }\n * }]\n * })\n *\n * @example\n * await client.ingestion.batch({\n * batch: [{\n * type: \"score-create\",\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * body: {\n * id: \"abcdef-1234-5678-90ab\",\n * traceId: \"1234-5678-90ab-cdef\",\n * name: \"My Score\",\n * value: 0.9,\n * environment: \"default\"\n * }\n * }]\n * })\n */\n public batch(\n request: LangfuseAPI.IngestionRequest,\n requestOptions?: Ingestion.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.IngestionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__batch(request, requestOptions),\n );\n }\n\n private async __batch(\n request: LangfuseAPI.IngestionRequest,\n requestOptions?: Ingestion.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.IngestionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/ingestion\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.IngestionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/ingestion.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace LlmConnections {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class LlmConnections {\n protected readonly _options: LlmConnections.Options;\n\n constructor(_options: LlmConnections.Options) {\n this._options = _options;\n }\n\n /**\n * Get all LLM connections in a project\n *\n * @param {LangfuseAPI.GetLlmConnectionsRequest} request\n * @param {LlmConnections.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.llmConnections.list()\n */\n public list(\n request: LangfuseAPI.GetLlmConnectionsRequest = {},\n requestOptions?: LlmConnections.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedLlmConnections> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetLlmConnectionsRequest = {},\n requestOptions?: LlmConnections.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedLlmConnections>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/llm-connections\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedLlmConnections,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/llm-connections.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update an LLM connection. The connection is upserted on provider.\n *\n * @param {LangfuseAPI.UpsertLlmConnectionRequest} request\n * @param {LlmConnections.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.llmConnections.upsert({\n * provider: \"provider\",\n * adapter: \"anthropic\",\n * secretKey: \"secretKey\",\n * baseURL: undefined,\n * customModels: undefined,\n * withDefaultModels: undefined,\n * extraHeaders: undefined,\n * config: undefined\n * })\n */\n public upsert(\n request: LangfuseAPI.UpsertLlmConnectionRequest,\n requestOptions?: LlmConnections.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.LlmConnection> {\n return core.HttpResponsePromise.fromPromise(\n this.__upsert(request, requestOptions),\n );\n }\n\n private async __upsert(\n request: LangfuseAPI.UpsertLlmConnectionRequest,\n requestOptions?: LlmConnections.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.LlmConnection>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/llm-connections\",\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.LlmConnection,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/llm-connections.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Media {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Media {\n protected readonly _options: Media.Options;\n\n constructor(_options: Media.Options) {\n this._options = _options;\n }\n\n /**\n * Get a media record\n *\n * @param {string} mediaId - The unique langfuse identifier of a media record\n * @param {Media.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.media.get(\"mediaId\")\n */\n public get(\n mediaId: string,\n requestOptions?: Media.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetMediaResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(mediaId, requestOptions),\n );\n }\n\n private async __get(\n mediaId: string,\n requestOptions?: Media.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetMediaResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/media/${encodeURIComponent(mediaId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetMediaResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/media/{mediaId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Patch a media record\n *\n * @param {string} mediaId - The unique langfuse identifier of a media record\n * @param {LangfuseAPI.PatchMediaBody} request\n * @param {Media.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.media.patch(\"mediaId\", {\n * uploadedAt: \"2024-01-15T09:30:00Z\",\n * uploadHttpStatus: 1,\n * uploadHttpError: undefined,\n * uploadTimeMs: undefined\n * })\n */\n public patch(\n mediaId: string,\n request: LangfuseAPI.PatchMediaBody,\n requestOptions?: Media.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__patch(mediaId, request, requestOptions),\n );\n }\n\n private async __patch(\n mediaId: string,\n request: LangfuseAPI.PatchMediaBody,\n requestOptions?: Media.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/media/${encodeURIComponent(mediaId)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/media/{mediaId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a presigned upload URL for a media record\n *\n * @param {LangfuseAPI.GetMediaUploadUrlRequest} request\n * @param {Media.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.media.getUploadUrl({\n * traceId: \"traceId\",\n * observationId: undefined,\n * contentType: \"image/png\",\n * contentLength: 1,\n * sha256Hash: \"sha256Hash\",\n * field: \"field\"\n * })\n */\n public getUploadUrl(\n request: LangfuseAPI.GetMediaUploadUrlRequest,\n requestOptions?: Media.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetMediaUploadUrlResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getUploadUrl(request, requestOptions),\n );\n }\n\n private async __getUploadUrl(\n request: LangfuseAPI.GetMediaUploadUrlRequest,\n requestOptions?: Media.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetMediaUploadUrlResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/media\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetMediaUploadUrlResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/media.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace MetricsV2 {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class MetricsV2 {\n protected readonly _options: MetricsV2.Options;\n\n constructor(_options: MetricsV2.Options) {\n this._options = _options;\n }\n\n /**\n * Get metrics from the Langfuse project using a query object. V2 endpoint with optimized performance.\n *\n * ## V2 Differences\n * - Supports `observations`, `scores-numeric`, and `scores-categorical` views only (traces view not supported)\n * - Direct access to tags and release fields on observations\n * - Backwards-compatible: traceName, traceRelease, traceVersion dimensions are still available on observations view\n * - High cardinality dimensions are not supported and will return a 400 error (see below)\n *\n * For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).\n *\n * ## Available Views\n *\n * ### observations\n * Query observation-level data (spans, generations, events).\n *\n * **Dimensions:**\n * - `environment` - Deployment environment (e.g., production, staging)\n * - `type` - Type of observation (SPAN, GENERATION, EVENT)\n * - `name` - Name of the observation\n * - `level` - Logging level of the observation\n * - `version` - Version of the observation\n * - `tags` - User-defined tags\n * - `release` - Release version\n * - `traceName` - Name of the parent trace (backwards-compatible)\n * - `traceRelease` - Release version of the parent trace (backwards-compatible, maps to release)\n * - `traceVersion` - Version of the parent trace (backwards-compatible, maps to version)\n * - `providedModelName` - Name of the model used\n * - `promptName` - Name of the prompt used\n * - `promptVersion` - Version of the prompt used\n * - `startTimeMonth` - Month of start_time in YYYY-MM format\n *\n * **Measures:**\n * - `count` - Total number of observations\n * - `latency` - Observation latency (milliseconds)\n * - `streamingLatency` - Generation latency from completion start to end (milliseconds)\n * - `inputTokens` - Sum of input tokens consumed\n * - `outputTokens` - Sum of output tokens produced\n * - `totalTokens` - Sum of all tokens consumed\n * - `outputTokensPerSecond` - Output tokens per second\n * - `tokensPerSecond` - Total tokens per second\n * - `inputCost` - Input cost (USD)\n * - `outputCost` - Output cost (USD)\n * - `totalCost` - Total cost (USD)\n * - `timeToFirstToken` - Time to first token (milliseconds)\n * - `countScores` - Number of scores attached to the observation\n *\n * ### scores-numeric\n * Query numeric and boolean score data.\n *\n * **Dimensions:**\n * - `environment` - Deployment environment\n * - `name` - Name of the score (e.g., accuracy, toxicity)\n * - `source` - Origin of the score (API, ANNOTATION, EVAL)\n * - `dataType` - Data type (NUMERIC, BOOLEAN)\n * - `configId` - Identifier of the score config\n * - `timestampMonth` - Month in YYYY-MM format\n * - `timestampDay` - Day in YYYY-MM-DD format\n * - `value` - Numeric value of the score\n * - `traceName` - Name of the parent trace\n * - `tags` - Tags\n * - `traceRelease` - Release version\n * - `traceVersion` - Version\n * - `observationName` - Name of the associated observation\n * - `observationModelName` - Model name of the associated observation\n * - `observationPromptName` - Prompt name of the associated observation\n * - `observationPromptVersion` - Prompt version of the associated observation\n *\n * **Measures:**\n * - `count` - Total number of scores\n * - `value` - Score value (for aggregations)\n *\n * ### scores-categorical\n * Query categorical score data. Same dimensions as scores-numeric except uses `stringValue` instead of `value`.\n *\n * **Measures:**\n * - `count` - Total number of scores\n *\n * ## High Cardinality Dimensions\n * The following dimensions cannot be used as grouping dimensions in v2 metrics API as they can cause performance issues.\n * Use them in filters instead.\n *\n * **observations view:**\n * - `id` - Use traceId filter to narrow down results\n * - `traceId` - Use traceId filter instead\n * - `userId` - Use userId filter instead\n * - `sessionId` - Use sessionId filter instead\n * - `parentObservationId` - Use parentObservationId filter instead\n *\n * **scores-numeric / scores-categorical views:**\n * - `id` - Use specific filters to narrow down results\n * - `traceId` - Use traceId filter instead\n * - `userId` - Use userId filter instead\n * - `sessionId` - Use sessionId filter instead\n * - `observationId` - Use observationId filter instead\n *\n * ## Aggregations\n * Available aggregation functions: `sum`, `avg`, `count`, `max`, `min`, `p50`, `p75`, `p90`, `p95`, `p99`, `histogram`\n *\n * ## Time Granularities\n * Available granularities for timeDimension: `auto`, `minute`, `hour`, `day`, `week`, `month`\n * - `auto` bins the data into approximately 50 buckets based on the time range\n *\n * @param {LangfuseAPI.GetMetricsV2Request} request\n * @param {MetricsV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.metricsV2.metrics({\n * query: \"query\"\n * })\n */\n public metrics(\n request: LangfuseAPI.GetMetricsV2Request,\n requestOptions?: MetricsV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MetricsV2Response> {\n return core.HttpResponsePromise.fromPromise(\n this.__metrics(request, requestOptions),\n );\n }\n\n private async __metrics(\n request: LangfuseAPI.GetMetricsV2Request,\n requestOptions?: MetricsV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MetricsV2Response>> {\n const { query } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n _queryParams[\"query\"] = query;\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/metrics\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MetricsV2Response,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/metrics.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Metrics {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Metrics {\n protected readonly _options: Metrics.Options;\n\n constructor(_options: Metrics.Options) {\n this._options = _options;\n }\n\n /**\n * Get metrics from the Langfuse project using a query object.\n *\n * Consider using the [v2 metrics endpoint](/api-reference#tag/metricsv2/GET/api/public/v2/metrics) for better performance.\n *\n * For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).\n *\n * @param {LangfuseAPI.GetMetricsRequest} request\n * @param {Metrics.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.metrics.metrics({\n * query: \"query\"\n * })\n */\n public metrics(\n request: LangfuseAPI.GetMetricsRequest,\n requestOptions?: Metrics.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MetricsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__metrics(request, requestOptions),\n );\n }\n\n private async __metrics(\n request: LangfuseAPI.GetMetricsRequest,\n requestOptions?: Metrics.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MetricsResponse>> {\n const { query } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n _queryParams[\"query\"] = query;\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/metrics\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MetricsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/metrics.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Models {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Models {\n protected readonly _options: Models.Options;\n\n constructor(_options: Models.Options) {\n this._options = _options;\n }\n\n /**\n * Create a model\n *\n * @param {LangfuseAPI.CreateModelRequest} request\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.create({\n * modelName: \"modelName\",\n * matchPattern: \"matchPattern\",\n * startDate: undefined,\n * unit: undefined,\n * inputPrice: undefined,\n * outputPrice: undefined,\n * totalPrice: undefined,\n * pricingTiers: undefined,\n * tokenizerId: undefined,\n * tokenizerConfig: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateModelRequest,\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Model> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateModelRequest,\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Model>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/models\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Model,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/models.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all models\n *\n * @param {LangfuseAPI.GetModelsRequest} request\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.list()\n */\n public list(\n request: LangfuseAPI.GetModelsRequest = {},\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedModels> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetModelsRequest = {},\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedModels>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/models\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedModels,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/models.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a model\n *\n * @param {string} id\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.get(\"id\")\n */\n public get(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Model> {\n return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));\n }\n\n private async __get(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Model>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/models/${encodeURIComponent(id)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Model,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/models/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a model. Cannot delete models managed by Langfuse. You can create your own definition with the same modelName to override the definition though.\n *\n * @param {string} id\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.delete(\"id\")\n */\n public delete(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(id, requestOptions),\n );\n }\n\n private async __delete(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/models/${encodeURIComponent(id)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/models/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace ObservationsV2 {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class ObservationsV2 {\n protected readonly _options: ObservationsV2.Options;\n\n constructor(_options: ObservationsV2.Options) {\n this._options = _options;\n }\n\n /**\n * Get a list of observations with cursor-based pagination and flexible field selection.\n *\n * ## Cursor-based Pagination\n * This endpoint uses cursor-based pagination for efficient traversal of large datasets.\n * The cursor is returned in the response metadata and should be passed in subsequent requests\n * to retrieve the next page of results.\n *\n * ## Field Selection\n * Use the `fields` parameter to control which observation fields are returned:\n * - `core` - Always included: id, traceId, startTime, endTime, projectId, parentObservationId, type\n * - `basic` - name, level, statusMessage, version, environment, bookmarked, public, userId, sessionId\n * - `time` - completionStartTime, createdAt, updatedAt\n * - `io` - input, output\n * - `metadata` - metadata (truncated to 200 chars by default, use `expandMetadata` to get full values)\n * - `model` - providedModelName, internalModelId, modelParameters\n * - `usage` - usageDetails, costDetails, totalCost\n * - `prompt` - promptId, promptName, promptVersion\n * - `metrics` - latency, timeToFirstToken\n *\n * If not specified, `core` and `basic` field groups are returned.\n *\n * ## Filters\n * Multiple filtering options are available via query parameters or the structured `filter` parameter.\n * When using the `filter` parameter, it takes precedence over individual query parameter filters.\n *\n * @param {LangfuseAPI.GetObservationsV2Request} request\n * @param {ObservationsV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.observationsV2.getMany()\n */\n public getMany(\n request: LangfuseAPI.GetObservationsV2Request = {},\n requestOptions?: ObservationsV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ObservationsV2Response> {\n return core.HttpResponsePromise.fromPromise(\n this.__getMany(request, requestOptions),\n );\n }\n\n private async __getMany(\n request: LangfuseAPI.GetObservationsV2Request = {},\n requestOptions?: ObservationsV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ObservationsV2Response>> {\n const {\n fields,\n expandMetadata,\n limit,\n cursor,\n parseIoAsJson,\n name,\n userId,\n type: type_,\n traceId,\n level,\n parentObservationId,\n environment,\n fromStartTime,\n toStartTime,\n version,\n filter,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (fields != null) {\n _queryParams[\"fields\"] = fields;\n }\n\n if (expandMetadata != null) {\n _queryParams[\"expandMetadata\"] = expandMetadata;\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (cursor != null) {\n _queryParams[\"cursor\"] = cursor;\n }\n\n if (parseIoAsJson != null) {\n _queryParams[\"parseIoAsJson\"] = parseIoAsJson.toString();\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (type_ != null) {\n _queryParams[\"type\"] = type_;\n }\n\n if (traceId != null) {\n _queryParams[\"traceId\"] = traceId;\n }\n\n if (level != null) {\n _queryParams[\"level\"] = level;\n }\n\n if (parentObservationId != null) {\n _queryParams[\"parentObservationId\"] = parentObservationId;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (fromStartTime != null) {\n _queryParams[\"fromStartTime\"] = fromStartTime;\n }\n\n if (toStartTime != null) {\n _queryParams[\"toStartTime\"] = toStartTime;\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version;\n }\n\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/observations\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ObservationsV2Response,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/observations.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Observations {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Observations {\n protected readonly _options: Observations.Options;\n\n constructor(_options: Observations.Options) {\n this._options = _options;\n }\n\n /**\n * Get a observation\n *\n * @param {string} observationId - The unique langfuse identifier of an observation, can be an event, span or generation\n * @param {Observations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.observations.get(\"observationId\")\n */\n public get(\n observationId: string,\n requestOptions?: Observations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ObservationsView> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(observationId, requestOptions),\n );\n }\n\n private async __get(\n observationId: string,\n requestOptions?: Observations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ObservationsView>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/observations/${encodeURIComponent(observationId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ObservationsView,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/observations/{observationId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a list of observations.\n *\n * Consider using the [v2 observations endpoint](/api-reference#tag/observationsv2/GET/api/public/v2/observations) for cursor-based pagination and field selection.\n *\n * @param {LangfuseAPI.GetObservationsRequest} request\n * @param {Observations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.observations.getMany()\n */\n public getMany(\n request: LangfuseAPI.GetObservationsRequest = {},\n requestOptions?: Observations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ObservationsViews> {\n return core.HttpResponsePromise.fromPromise(\n this.__getMany(request, requestOptions),\n );\n }\n\n private async __getMany(\n request: LangfuseAPI.GetObservationsRequest = {},\n requestOptions?: Observations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ObservationsViews>> {\n const {\n page,\n limit,\n name,\n userId,\n type: type_,\n traceId,\n level,\n parentObservationId,\n environment,\n fromStartTime,\n toStartTime,\n version,\n filter,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (type_ != null) {\n _queryParams[\"type\"] = type_;\n }\n\n if (traceId != null) {\n _queryParams[\"traceId\"] = traceId;\n }\n\n if (level != null) {\n _queryParams[\"level\"] = level;\n }\n\n if (parentObservationId != null) {\n _queryParams[\"parentObservationId\"] = parentObservationId;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (fromStartTime != null) {\n _queryParams[\"fromStartTime\"] = fromStartTime;\n }\n\n if (toStartTime != null) {\n _queryParams[\"toStartTime\"] = toStartTime;\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version;\n }\n\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/observations\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ObservationsViews,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/observations.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Opentelemetry {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Opentelemetry {\n protected readonly _options: Opentelemetry.Options;\n\n constructor(_options: Opentelemetry.Options) {\n this._options = _options;\n }\n\n /**\n * **OpenTelemetry Traces Ingestion Endpoint**\n *\n * This endpoint implements the OTLP/HTTP specification for trace ingestion, providing native OpenTelemetry integration for Langfuse Observability.\n *\n * **Supported Formats:**\n * - Binary Protobuf: `Content-Type: application/x-protobuf`\n * - JSON Protobuf: `Content-Type: application/json`\n * - Supports gzip compression via `Content-Encoding: gzip` header\n *\n * **Specification Compliance:**\n * - Conforms to [OTLP/HTTP Trace Export](https://opentelemetry.io/docs/specs/otlp/#otlphttp)\n * - Implements `ExportTraceServiceRequest` message format\n *\n * **Documentation:**\n * - Integration guide: https://langfuse.com/integrations/native/opentelemetry\n * - Data model: https://langfuse.com/docs/observability/data-model\n *\n * @param {LangfuseAPI.OtelTraceRequest} request\n * @param {Opentelemetry.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.opentelemetry.exportTraces({\n * resourceSpans: [{\n * resource: {\n * attributes: [{\n * key: \"service.name\",\n * value: {\n * stringValue: \"my-service\"\n * }\n * }, {\n * key: \"service.version\",\n * value: {\n * stringValue: \"1.0.0\"\n * }\n * }]\n * },\n * scopeSpans: [{\n * scope: {\n * name: \"langfuse-sdk\",\n * version: \"2.60.3\"\n * },\n * spans: [{\n * traceId: \"0123456789abcdef0123456789abcdef\",\n * spanId: \"0123456789abcdef\",\n * name: \"my-operation\",\n * kind: 1,\n * startTimeUnixNano: \"1747872000000000000\",\n * endTimeUnixNano: \"1747872001000000000\",\n * attributes: [{\n * key: \"langfuse.observation.type\",\n * value: {\n * stringValue: \"generation\"\n * }\n * }],\n * status: {}\n * }]\n * }]\n * }]\n * })\n */\n public exportTraces(\n request: LangfuseAPI.OtelTraceRequest,\n requestOptions?: Opentelemetry.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.OtelTraceResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__exportTraces(request, requestOptions),\n );\n }\n\n private async __exportTraces(\n request: LangfuseAPI.OtelTraceRequest,\n requestOptions?: Opentelemetry.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.OtelTraceResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/otel/v1/traces\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.OtelTraceResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/otel/v1/traces.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Organizations {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Organizations {\n protected readonly _options: Organizations.Options;\n\n constructor(_options: Organizations.Options) {\n this._options = _options;\n }\n\n /**\n * Get all memberships for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getOrganizationMemberships()\n */\n public getOrganizationMemberships(\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getOrganizationMemberships(requestOptions),\n );\n }\n\n private async __getOrganizationMemberships(\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipsResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/memberships\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/organizations/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update a membership for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.MembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.updateOrganizationMembership({\n * userId: \"userId\",\n * role: \"OWNER\"\n * })\n */\n public updateOrganizationMembership(\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__updateOrganizationMembership(request, requestOptions),\n );\n }\n\n private async __updateOrganizationMembership(\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/memberships\",\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/organizations/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a membership from the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.DeleteMembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.deleteOrganizationMembership({\n * userId: \"userId\"\n * })\n */\n public deleteOrganizationMembership(\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteOrganizationMembership(request, requestOptions),\n );\n }\n\n private async __deleteOrganizationMembership(\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/memberships\",\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/organizations/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all memberships for a specific project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getProjectMemberships(\"projectId\")\n */\n public getProjectMemberships(\n projectId: string,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getProjectMemberships(projectId, requestOptions),\n );\n }\n\n private async __getProjectMemberships(\n projectId: string,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipsResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/memberships`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/projects/{projectId}/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update a membership for a specific project (requires organization-scoped API key). The user must already be a member of the organization.\n *\n * @param {string} projectId\n * @param {LangfuseAPI.MembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.updateProjectMembership(\"projectId\", {\n * userId: \"userId\",\n * role: \"OWNER\"\n * })\n */\n public updateProjectMembership(\n projectId: string,\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__updateProjectMembership(projectId, request, requestOptions),\n );\n }\n\n private async __updateProjectMembership(\n projectId: string,\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/memberships`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/projects/{projectId}/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a membership from a specific project (requires organization-scoped API key). The user must be a member of the organization.\n *\n * @param {string} projectId\n * @param {LangfuseAPI.DeleteMembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.deleteProjectMembership(\"projectId\", {\n * userId: \"userId\"\n * })\n */\n public deleteProjectMembership(\n projectId: string,\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteProjectMembership(projectId, request, requestOptions),\n );\n }\n\n private async __deleteProjectMembership(\n projectId: string,\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/memberships`,\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/projects/{projectId}/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all projects for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getOrganizationProjects()\n */\n public getOrganizationProjects(\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.OrganizationProjectsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getOrganizationProjects(requestOptions),\n );\n }\n\n private async __getOrganizationProjects(\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.OrganizationProjectsResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/projects\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.OrganizationProjectsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/organizations/projects.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all API keys for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getOrganizationApiKeys()\n */\n public getOrganizationApiKeys(\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.OrganizationApiKeysResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getOrganizationApiKeys(requestOptions),\n );\n }\n\n private async __getOrganizationApiKeys(\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.OrganizationApiKeysResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/apiKeys\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.OrganizationApiKeysResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/organizations/apiKeys.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Projects {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Projects {\n protected readonly _options: Projects.Options;\n\n constructor(_options: Projects.Options) {\n this._options = _options;\n }\n\n /**\n * Get Project associated with API key (requires project-scoped API key). You can use GET /api/public/organizations/projects to get all projects with an organization-scoped key.\n *\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.get()\n */\n public get(\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Projects> {\n return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));\n }\n\n private async __get(\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Projects>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/projects\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Projects,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/projects.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new project (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.CreateProjectRequest} request\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.create({\n * name: \"name\",\n * metadata: undefined,\n * retention: 1\n * })\n */\n public create(\n request: LangfuseAPI.CreateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Project> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Project>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/projects\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Project,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/projects.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Update a project by ID (requires organization-scoped API key).\n *\n * @param {string} projectId\n * @param {LangfuseAPI.UpdateProjectRequest} request\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.update(\"projectId\", {\n * name: \"name\",\n * metadata: undefined,\n * retention: undefined\n * })\n */\n public update(\n projectId: string,\n request: LangfuseAPI.UpdateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Project> {\n return core.HttpResponsePromise.fromPromise(\n this.__update(projectId, request, requestOptions),\n );\n }\n\n private async __update(\n projectId: string,\n request: LangfuseAPI.UpdateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Project>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Project,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/projects/{projectId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a project by ID (requires organization-scoped API key). Project deletion is processed asynchronously.\n *\n * @param {string} projectId\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.delete(\"projectId\")\n */\n public delete(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ProjectDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(projectId, requestOptions),\n );\n }\n\n private async __delete(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ProjectDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ProjectDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/projects/{projectId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all API keys for a project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.getApiKeys(\"projectId\")\n */\n public getApiKeys(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ApiKeyList> {\n return core.HttpResponsePromise.fromPromise(\n this.__getApiKeys(projectId, requestOptions),\n );\n }\n\n private async __getApiKeys(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ApiKeyList>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/apiKeys`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ApiKeyList,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/projects/{projectId}/apiKeys.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new API key for a project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {LangfuseAPI.CreateApiKeyRequest} request\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.createApiKey(\"projectId\", {\n * note: undefined,\n * publicKey: undefined,\n * secretKey: undefined\n * })\n */\n public createApiKey(\n projectId: string,\n request: LangfuseAPI.CreateApiKeyRequest = {},\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ApiKeyResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__createApiKey(projectId, request, requestOptions),\n );\n }\n\n private async __createApiKey(\n projectId: string,\n request: LangfuseAPI.CreateApiKeyRequest = {},\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ApiKeyResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/apiKeys`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ApiKeyResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/projects/{projectId}/apiKeys.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete an API key for a project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {string} apiKeyId\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.deleteApiKey(\"projectId\", \"apiKeyId\")\n */\n public deleteApiKey(\n projectId: string,\n apiKeyId: string,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ApiKeyDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteApiKey(projectId, apiKeyId, requestOptions),\n );\n }\n\n private async __deleteApiKey(\n projectId: string,\n apiKeyId: string,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ApiKeyDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/apiKeys/${encodeURIComponent(apiKeyId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ApiKeyDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/projects/{projectId}/apiKeys/{apiKeyId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace PromptVersion {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class PromptVersion {\n protected readonly _options: PromptVersion.Options;\n\n constructor(_options: PromptVersion.Options) {\n this._options = _options;\n }\n\n /**\n * Update labels for a specific prompt version\n *\n * @param {string} name - The name of the prompt. If the prompt is in a folder (e.g., \"folder/subfolder/prompt-name\"),\n * the folder path must be URL encoded.\n * @param {number} version - Version of the prompt to update\n * @param {LangfuseAPI.UpdatePromptRequest} request\n * @param {PromptVersion.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.promptVersion.update(\"name\", 1, {\n * newLabels: [\"newLabels\", \"newLabels\"]\n * })\n */\n public update(\n name: string,\n version: number,\n request: LangfuseAPI.UpdatePromptRequest,\n requestOptions?: PromptVersion.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Prompt> {\n return core.HttpResponsePromise.fromPromise(\n this.__update(name, version, request, requestOptions),\n );\n }\n\n private async __update(\n name: string,\n version: number,\n request: LangfuseAPI.UpdatePromptRequest,\n requestOptions?: PromptVersion.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Prompt>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/prompts/${encodeURIComponent(name)}/versions/${encodeURIComponent(version)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Prompt,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/v2/prompts/{name}/versions/{version}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Prompts {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Prompts {\n protected readonly _options: Prompts.Options;\n\n constructor(_options: Prompts.Options) {\n this._options = _options;\n }\n\n /**\n * Get a prompt\n *\n * @param {string} promptName - The name of the prompt. If the prompt is in a folder (e.g., \"folder/subfolder/prompt-name\"),\n * the folder path must be URL encoded.\n * @param {LangfuseAPI.GetPromptRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.get(\"promptName\")\n */\n public get(\n promptName: string,\n request: LangfuseAPI.GetPromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Prompt> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(promptName, request, requestOptions),\n );\n }\n\n private async __get(\n promptName: string,\n request: LangfuseAPI.GetPromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Prompt>> {\n const { version, label } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (version != null) {\n _queryParams[\"version\"] = version.toString();\n }\n\n if (label != null) {\n _queryParams[\"label\"] = label;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/prompts/${encodeURIComponent(promptName)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Prompt,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/prompts/{promptName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a list of prompt names with versions and labels\n *\n * @param {LangfuseAPI.ListPromptsMetaRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.list()\n */\n public list(\n request: LangfuseAPI.ListPromptsMetaRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PromptMetaListResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.ListPromptsMetaRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PromptMetaListResponse>> {\n const { name, label, tag, page, limit, fromUpdatedAt, toUpdatedAt } =\n request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (label != null) {\n _queryParams[\"label\"] = label;\n }\n\n if (tag != null) {\n _queryParams[\"tag\"] = tag;\n }\n\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (fromUpdatedAt != null) {\n _queryParams[\"fromUpdatedAt\"] = fromUpdatedAt;\n }\n\n if (toUpdatedAt != null) {\n _queryParams[\"toUpdatedAt\"] = toUpdatedAt;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/prompts\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PromptMetaListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/prompts.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new version for the prompt with the given `name`\n *\n * @param {LangfuseAPI.CreatePromptRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.create({\n * type: \"chat\",\n * name: \"name\",\n * prompt: [{\n * type: \"chatmessage\",\n * role: \"role\",\n * content: \"content\"\n * }, {\n * type: \"chatmessage\",\n * role: \"role\",\n * content: \"content\"\n * }],\n * config: undefined,\n * labels: undefined,\n * tags: undefined,\n * commitMessage: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreatePromptRequest,\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Prompt> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreatePromptRequest,\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Prompt>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/prompts\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Prompt,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/v2/prompts.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete prompt versions. If neither version nor label is specified, all versions of the prompt are deleted.\n *\n * @param {string} promptName - The name of the prompt\n * @param {LangfuseAPI.DeletePromptRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.delete(\"promptName\")\n */\n public delete(\n promptName: string,\n request: LangfuseAPI.DeletePromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(promptName, request, requestOptions),\n );\n }\n\n private async __delete(\n promptName: string,\n request: LangfuseAPI.DeletePromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n const { label, version } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (label != null) {\n _queryParams[\"label\"] = label;\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/prompts/${encodeURIComponent(promptName)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/v2/prompts/{promptName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Scim {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Scim {\n protected readonly _options: Scim.Options;\n\n constructor(_options: Scim.Options) {\n this._options = _options;\n }\n\n /**\n * Get SCIM Service Provider Configuration (requires organization-scoped API key)\n *\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getServiceProviderConfig()\n */\n public getServiceProviderConfig(\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ServiceProviderConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__getServiceProviderConfig(requestOptions),\n );\n }\n\n private async __getServiceProviderConfig(\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ServiceProviderConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/ServiceProviderConfig\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ServiceProviderConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/ServiceProviderConfig.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get SCIM Resource Types (requires organization-scoped API key)\n *\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getResourceTypes()\n */\n public getResourceTypes(\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ResourceTypesResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getResourceTypes(requestOptions),\n );\n }\n\n private async __getResourceTypes(\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ResourceTypesResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/ResourceTypes\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ResourceTypesResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/ResourceTypes.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get SCIM Schemas (requires organization-scoped API key)\n *\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getSchemas()\n */\n public getSchemas(\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.SchemasResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getSchemas(requestOptions),\n );\n }\n\n private async __getSchemas(\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.SchemasResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/Schemas\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.SchemasResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/Schemas.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * List users in the organization (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.ListUsersRequest} request\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.listUsers()\n */\n public listUsers(\n request: LangfuseAPI.ListUsersRequest = {},\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScimUsersListResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__listUsers(request, requestOptions),\n );\n }\n\n private async __listUsers(\n request: LangfuseAPI.ListUsersRequest = {},\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScimUsersListResponse>> {\n const { filter, startIndex, count } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n if (startIndex != null) {\n _queryParams[\"startIndex\"] = startIndex.toString();\n }\n\n if (count != null) {\n _queryParams[\"count\"] = count.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/Users\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScimUsersListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/Users.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new user in the organization (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.CreateUserRequest} request\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.createUser({\n * userName: \"userName\",\n * name: {\n * formatted: undefined\n * },\n * emails: undefined,\n * active: undefined,\n * password: undefined\n * })\n */\n public createUser(\n request: LangfuseAPI.CreateUserRequest,\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScimUser> {\n return core.HttpResponsePromise.fromPromise(\n this.__createUser(request, requestOptions),\n );\n }\n\n private async __createUser(\n request: LangfuseAPI.CreateUserRequest,\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScimUser>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/Users\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScimUser,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/scim/Users.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a specific user by ID (requires organization-scoped API key)\n *\n * @param {string} userId\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getUser(\"userId\")\n */\n public getUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScimUser> {\n return core.HttpResponsePromise.fromPromise(\n this.__getUser(userId, requestOptions),\n );\n }\n\n private async __getUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScimUser>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/scim/Users/${encodeURIComponent(userId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScimUser,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/Users/{userId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Remove a user from the organization (requires organization-scoped API key). Note that this only removes the user from the organization but does not delete the user entity itself.\n *\n * @param {string} userId\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.deleteUser(\"userId\")\n */\n public deleteUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.EmptyResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteUser(userId, requestOptions),\n );\n }\n\n private async __deleteUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.EmptyResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/scim/Users/${encodeURIComponent(userId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.EmptyResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/scim/Users/{userId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace ScoreConfigs {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class ScoreConfigs {\n protected readonly _options: ScoreConfigs.Options;\n\n constructor(_options: ScoreConfigs.Options) {\n this._options = _options;\n }\n\n /**\n * Create a score configuration (config). Score configs are used to define the structure of scores\n *\n * @param {LangfuseAPI.CreateScoreConfigRequest} request\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.create({\n * name: \"name\",\n * dataType: \"NUMERIC\",\n * categories: undefined,\n * minValue: undefined,\n * maxValue: undefined,\n * description: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/score-configs\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/score-configs.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all score configs\n *\n * @param {LangfuseAPI.GetScoreConfigsRequest} request\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.get()\n */\n public get(\n request: LangfuseAPI.GetScoreConfigsRequest = {},\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfigs> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(request, requestOptions),\n );\n }\n\n private async __get(\n request: LangfuseAPI.GetScoreConfigsRequest = {},\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfigs>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/score-configs\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfigs,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/score-configs.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a score config\n *\n * @param {string} configId - The unique langfuse identifier of a score config\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.getById(\"configId\")\n */\n public getById(\n configId: string,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__getById(configId, requestOptions),\n );\n }\n\n private async __getById(\n configId: string,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/score-configs/${encodeURIComponent(configId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/score-configs/{configId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Update a score config\n *\n * @param {string} configId - The unique langfuse identifier of a score config\n * @param {LangfuseAPI.UpdateScoreConfigRequest} request\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.update(\"configId\", {\n * isArchived: undefined,\n * name: undefined,\n * categories: undefined,\n * minValue: undefined,\n * maxValue: undefined,\n * description: undefined\n * })\n */\n public update(\n configId: string,\n request: LangfuseAPI.UpdateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__update(configId, request, requestOptions),\n );\n }\n\n private async __update(\n configId: string,\n request: LangfuseAPI.UpdateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/score-configs/${encodeURIComponent(configId)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/score-configs/{configId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace ScoreV2 {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class ScoreV2 {\n protected readonly _options: ScoreV2.Options;\n\n constructor(_options: ScoreV2.Options) {\n this._options = _options;\n }\n\n /**\n * Get a list of scores (supports both trace and session scores)\n *\n * @param {LangfuseAPI.GetScoresRequest} request\n * @param {ScoreV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreV2.get()\n */\n public get(\n request: LangfuseAPI.GetScoresRequest = {},\n requestOptions?: ScoreV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetScoresResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(request, requestOptions),\n );\n }\n\n private async __get(\n request: LangfuseAPI.GetScoresRequest = {},\n requestOptions?: ScoreV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetScoresResponse>> {\n const {\n page,\n limit,\n userId,\n name,\n fromTimestamp,\n toTimestamp,\n environment,\n source,\n operator,\n value,\n scoreIds,\n configId,\n sessionId,\n datasetRunId,\n traceId,\n queueId,\n dataType,\n traceTags,\n fields,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (fromTimestamp != null) {\n _queryParams[\"fromTimestamp\"] = fromTimestamp;\n }\n\n if (toTimestamp != null) {\n _queryParams[\"toTimestamp\"] = toTimestamp;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (source != null) {\n _queryParams[\"source\"] = source;\n }\n\n if (operator != null) {\n _queryParams[\"operator\"] = operator;\n }\n\n if (value != null) {\n _queryParams[\"value\"] = value.toString();\n }\n\n if (scoreIds != null) {\n _queryParams[\"scoreIds\"] = scoreIds;\n }\n\n if (configId != null) {\n _queryParams[\"configId\"] = configId;\n }\n\n if (sessionId != null) {\n _queryParams[\"sessionId\"] = sessionId;\n }\n\n if (datasetRunId != null) {\n _queryParams[\"datasetRunId\"] = datasetRunId;\n }\n\n if (traceId != null) {\n _queryParams[\"traceId\"] = traceId;\n }\n\n if (queueId != null) {\n _queryParams[\"queueId\"] = queueId;\n }\n\n if (dataType != null) {\n _queryParams[\"dataType\"] = dataType;\n }\n\n if (traceTags != null) {\n if (Array.isArray(traceTags)) {\n _queryParams[\"traceTags\"] = traceTags.map((item) => item);\n } else {\n _queryParams[\"traceTags\"] = traceTags;\n }\n }\n\n if (fields != null) {\n _queryParams[\"fields\"] = fields;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/scores\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetScoresResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/scores.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a score (supports both trace and session scores)\n *\n * @param {string} scoreId - The unique langfuse identifier of a score\n * @param {ScoreV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreV2.getById(\"scoreId\")\n */\n public getById(\n scoreId: string,\n requestOptions?: ScoreV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Score> {\n return core.HttpResponsePromise.fromPromise(\n this.__getById(scoreId, requestOptions),\n );\n }\n\n private async __getById(\n scoreId: string,\n requestOptions?: ScoreV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Score>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/scores/${encodeURIComponent(scoreId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Score,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/scores/{scoreId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Score {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Score {\n protected readonly _options: Score.Options;\n\n constructor(_options: Score.Options) {\n this._options = _options;\n }\n\n /**\n * Create a score (supports both trace and session scores)\n *\n * @param {LangfuseAPI.CreateScoreRequest} request\n * @param {Score.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.score.create({\n * id: undefined,\n * traceId: undefined,\n * sessionId: undefined,\n * observationId: undefined,\n * datasetRunId: undefined,\n * name: \"name\",\n * value: 1.1,\n * comment: undefined,\n * metadata: undefined,\n * environment: undefined,\n * queueId: undefined,\n * dataType: undefined,\n * configId: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateScoreRequest,\n requestOptions?: Score.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.CreateScoreResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateScoreRequest,\n requestOptions?: Score.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.CreateScoreResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scores\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.CreateScoreResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/scores.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a score (supports both trace and session scores)\n *\n * @param {string} scoreId - The unique langfuse identifier of a score\n * @param {Score.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.score.delete(\"scoreId\")\n */\n public delete(\n scoreId: string,\n requestOptions?: Score.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(scoreId, requestOptions),\n );\n }\n\n private async __delete(\n scoreId: string,\n requestOptions?: Score.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/scores/${encodeURIComponent(scoreId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/scores/{scoreId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Sessions {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Sessions {\n protected readonly _options: Sessions.Options;\n\n constructor(_options: Sessions.Options) {\n this._options = _options;\n }\n\n /**\n * Get sessions\n *\n * @param {LangfuseAPI.GetSessionsRequest} request\n * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.sessions.list()\n */\n public list(\n request: LangfuseAPI.GetSessionsRequest = {},\n requestOptions?: Sessions.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedSessions> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetSessionsRequest = {},\n requestOptions?: Sessions.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedSessions>> {\n const { page, limit, fromTimestamp, toTimestamp, environment } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (fromTimestamp != null) {\n _queryParams[\"fromTimestamp\"] = fromTimestamp;\n }\n\n if (toTimestamp != null) {\n _queryParams[\"toTimestamp\"] = toTimestamp;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/sessions\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedSessions,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/sessions.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`\n *\n * @param {string} sessionId - The unique id of a session\n * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.sessions.get(\"sessionId\")\n */\n public get(\n sessionId: string,\n requestOptions?: Sessions.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.SessionWithTraces> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(sessionId, requestOptions),\n );\n }\n\n private async __get(\n sessionId: string,\n requestOptions?: Sessions.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.SessionWithTraces>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/sessions/${encodeURIComponent(sessionId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.SessionWithTraces,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/sessions/{sessionId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Trace {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Trace {\n protected readonly _options: Trace.Options;\n\n constructor(_options: Trace.Options) {\n this._options = _options;\n }\n\n /**\n * Get a specific trace\n *\n * @param {string} traceId - The unique langfuse identifier of a trace\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.get(\"traceId\")\n */\n public get(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.TraceWithFullDetails> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(traceId, requestOptions),\n );\n }\n\n private async __get(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.TraceWithFullDetails>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/traces/${encodeURIComponent(traceId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.TraceWithFullDetails,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/traces/{traceId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a specific trace\n *\n * @param {string} traceId - The unique langfuse identifier of the trace to delete\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.delete(\"traceId\")\n */\n public delete(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteTraceResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(traceId, requestOptions),\n );\n }\n\n private async __delete(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteTraceResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/traces/${encodeURIComponent(traceId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteTraceResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/traces/{traceId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get list of traces\n *\n * @param {LangfuseAPI.GetTracesRequest} request\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.list()\n */\n public list(\n request: LangfuseAPI.GetTracesRequest = {},\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Traces> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetTracesRequest = {},\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Traces>> {\n const {\n page,\n limit,\n userId,\n name,\n sessionId,\n fromTimestamp,\n toTimestamp,\n orderBy,\n tags,\n version,\n release,\n environment,\n fields,\n filter,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (sessionId != null) {\n _queryParams[\"sessionId\"] = sessionId;\n }\n\n if (fromTimestamp != null) {\n _queryParams[\"fromTimestamp\"] = fromTimestamp;\n }\n\n if (toTimestamp != null) {\n _queryParams[\"toTimestamp\"] = toTimestamp;\n }\n\n if (orderBy != null) {\n _queryParams[\"orderBy\"] = orderBy;\n }\n\n if (tags != null) {\n if (Array.isArray(tags)) {\n _queryParams[\"tags\"] = tags.map((item) => item);\n } else {\n _queryParams[\"tags\"] = tags;\n }\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version;\n }\n\n if (release != null) {\n _queryParams[\"release\"] = release;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (fields != null) {\n _queryParams[\"fields\"] = fields;\n }\n\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/traces\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Traces,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/traces.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete multiple traces\n *\n * @param {LangfuseAPI.DeleteTracesRequest} request\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.deleteMultiple({\n * traceIds: [\"traceIds\", \"traceIds\"]\n * })\n */\n public deleteMultiple(\n request: LangfuseAPI.DeleteTracesRequest,\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteTraceResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteMultiple(request, requestOptions),\n );\n }\n\n private async __deleteMultiple(\n request: LangfuseAPI.DeleteTracesRequest,\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteTraceResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/traces\",\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteTraceResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/traces.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"./core/index.js\";\nimport { mergeHeaders } from \"./core/headers.js\";\nimport { AnnotationQueues } from \"./api/resources/annotationQueues/client/Client.js\";\nimport { BlobStorageIntegrations } from \"./api/resources/blobStorageIntegrations/client/Client.js\";\nimport { Comments } from \"./api/resources/comments/client/Client.js\";\nimport { DatasetItems } from \"./api/resources/datasetItems/client/Client.js\";\nimport { DatasetRunItems } from \"./api/resources/datasetRunItems/client/Client.js\";\nimport { Datasets } from \"./api/resources/datasets/client/Client.js\";\nimport { Health } from \"./api/resources/health/client/Client.js\";\nimport { Ingestion } from \"./api/resources/ingestion/client/Client.js\";\nimport { LlmConnections } from \"./api/resources/llmConnections/client/Client.js\";\nimport { Media } from \"./api/resources/media/client/Client.js\";\nimport { MetricsV2 } from \"./api/resources/metricsV2/client/Client.js\";\nimport { Metrics } from \"./api/resources/metrics/client/Client.js\";\nimport { Models } from \"./api/resources/models/client/Client.js\";\nimport { ObservationsV2 } from \"./api/resources/observationsV2/client/Client.js\";\nimport { Observations } from \"./api/resources/observations/client/Client.js\";\nimport { Opentelemetry } from \"./api/resources/opentelemetry/client/Client.js\";\nimport { Organizations } from \"./api/resources/organizations/client/Client.js\";\nimport { Projects } from \"./api/resources/projects/client/Client.js\";\nimport { PromptVersion } from \"./api/resources/promptVersion/client/Client.js\";\nimport { Prompts } from \"./api/resources/prompts/client/Client.js\";\nimport { Scim } from \"./api/resources/scim/client/Client.js\";\nimport { ScoreConfigs } from \"./api/resources/scoreConfigs/client/Client.js\";\nimport { ScoreV2 } from \"./api/resources/scoreV2/client/Client.js\";\nimport { Score } from \"./api/resources/score/client/Client.js\";\nimport { Sessions } from \"./api/resources/sessions/client/Client.js\";\nimport { Trace } from \"./api/resources/trace/client/Client.js\";\n\nexport declare namespace LangfuseAPIClient {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class LangfuseAPIClient {\n protected readonly _options: LangfuseAPIClient.Options;\n protected _annotationQueues: AnnotationQueues | undefined;\n protected _blobStorageIntegrations: BlobStorageIntegrations | undefined;\n protected _comments: Comments | undefined;\n protected _datasetItems: DatasetItems | undefined;\n protected _datasetRunItems: DatasetRunItems | undefined;\n protected _datasets: Datasets | undefined;\n protected _health: Health | undefined;\n protected _ingestion: Ingestion | undefined;\n protected _llmConnections: LlmConnections | undefined;\n protected _media: Media | undefined;\n protected _metricsV2: MetricsV2 | undefined;\n protected _metrics: Metrics | undefined;\n protected _models: Models | undefined;\n protected _observationsV2: ObservationsV2 | undefined;\n protected _observations: Observations | undefined;\n protected _opentelemetry: Opentelemetry | undefined;\n protected _organizations: Organizations | undefined;\n protected _projects: Projects | undefined;\n protected _promptVersion: PromptVersion | undefined;\n protected _prompts: Prompts | undefined;\n protected _scim: Scim | undefined;\n protected _scoreConfigs: ScoreConfigs | undefined;\n protected _scoreV2: ScoreV2 | undefined;\n protected _score: Score | undefined;\n protected _sessions: Sessions | undefined;\n protected _trace: Trace | undefined;\n\n constructor(_options: LangfuseAPIClient.Options) {\n this._options = {\n ..._options,\n headers: mergeHeaders(\n {\n \"X-Langfuse-Sdk-Name\": _options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\": _options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\": _options?.xLangfusePublicKey,\n },\n _options?.headers,\n ),\n };\n }\n\n public get annotationQueues(): AnnotationQueues {\n return (this._annotationQueues ??= new AnnotationQueues(this._options));\n }\n\n public get blobStorageIntegrations(): BlobStorageIntegrations {\n return (this._blobStorageIntegrations ??= new BlobStorageIntegrations(\n this._options,\n ));\n }\n\n public get comments(): Comments {\n return (this._comments ??= new Comments(this._options));\n }\n\n public get datasetItems(): DatasetItems {\n return (this._datasetItems ??= new DatasetItems(this._options));\n }\n\n public get datasetRunItems(): DatasetRunItems {\n return (this._datasetRunItems ??= new DatasetRunItems(this._options));\n }\n\n public get datasets(): Datasets {\n return (this._datasets ??= new Datasets(this._options));\n }\n\n public get health(): Health {\n return (this._health ??= new Health(this._options));\n }\n\n public get ingestion(): Ingestion {\n return (this._ingestion ??= new Ingestion(this._options));\n }\n\n public get llmConnections(): LlmConnections {\n return (this._llmConnections ??= new LlmConnections(this._options));\n }\n\n public get media(): Media {\n return (this._media ??= new Media(this._options));\n }\n\n public get metricsV2(): MetricsV2 {\n return (this._metricsV2 ??= new MetricsV2(this._options));\n }\n\n public get metrics(): Metrics {\n return (this._metrics ??= new Metrics(this._options));\n }\n\n public get models(): Models {\n return (this._models ??= new Models(this._options));\n }\n\n public get observationsV2(): ObservationsV2 {\n return (this._observationsV2 ??= new ObservationsV2(this._options));\n }\n\n public get observations(): Observations {\n return (this._observations ??= new Observations(this._options));\n }\n\n public get opentelemetry(): Opentelemetry {\n return (this._opentelemetry ??= new Opentelemetry(this._options));\n }\n\n public get organizations(): Organizations {\n return (this._organizations ??= new Organizations(this._options));\n }\n\n public get projects(): Projects {\n return (this._projects ??= new Projects(this._options));\n }\n\n public get promptVersion(): PromptVersion {\n return (this._promptVersion ??= new PromptVersion(this._options));\n }\n\n public get prompts(): Prompts {\n return (this._prompts ??= new Prompts(this._options));\n }\n\n public get scim(): Scim {\n return (this._scim ??= new Scim(this._options));\n }\n\n public get scoreConfigs(): ScoreConfigs {\n return (this._scoreConfigs ??= new ScoreConfigs(this._options));\n }\n\n public get scoreV2(): ScoreV2 {\n return (this._scoreV2 ??= new ScoreV2(this._options));\n }\n\n public get score(): Score {\n return (this._score ??= new Score(this._options));\n }\n\n public get sessions(): Sessions {\n return (this._sessions ??= new Sessions(this._options));\n }\n\n public get trace(): Trace {\n return (this._trace ??= new Trace(this._options));\n }\n}\n","import { MediaContentType } from \"./api/api/index.js\";\nimport { getGlobalLogger } from \"./logger/index.js\";\nimport { base64ToBytes, bytesToBase64 } from \"./utils.js\";\n\n/**\n * Parameters for creating a LangfuseMedia instance.\n *\n * Supports two input formats:\n * - Base64 data URI (e.g., \"data:image/png;base64,...\")\n * - Raw bytes with explicit content type\n *\n * @public\n */\nexport type LangfuseMediaParams =\n | {\n /** Indicates the media is provided as a base64 data URI */\n source: \"base64_data_uri\";\n /** The complete base64 data URI string */\n base64DataUri: string;\n }\n | {\n /** Indicates the media is provided as raw bytes */\n source: \"bytes\";\n /** The raw content bytes */\n contentBytes: Uint8Array;\n /** The MIME type of the content */\n contentType: MediaContentType;\n };\n\n/**\n * A class for wrapping media objects for upload to Langfuse.\n *\n * This class handles the preparation and formatting of media content for Langfuse,\n * supporting both base64 data URIs and raw content bytes. It automatically:\n * - Parses base64 data URIs to extract content type and bytes\n * - Generates SHA-256 hashes for content integrity\n * - Creates unique media IDs based on content hash\n * - Formats media references for embedding in traces\n *\n * @example\n * ```typescript\n * // From base64 data URI\n * const media1 = new LangfuseMedia({\n * source: \"base64_data_uri\",\n * base64DataUri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==\"\n * });\n *\n * // From raw bytes\n * const media2 = new LangfuseMedia({\n * source: \"bytes\",\n * contentBytes: new Uint8Array([72, 101, 108, 108, 111])\n * contentType: \"text/plain\"\n * });\n *\n * console.log(media1.id); // Unique media ID\n * console.log(media1.tag); // Media reference tag\n * ```\n *\n * @public\n */\nexport class LangfuseMedia {\n _contentBytes?: Uint8Array;\n _contentType?: MediaContentType;\n _source?: string;\n\n /**\n * Creates a new LangfuseMedia instance.\n *\n * @param params - Media parameters specifying the source and content\n *\n * @example\n * ```typescript\n * // Create from base64 data URI\n * const media = new LangfuseMedia({\n * source: \"base64_data_uri\",\n * base64DataUri: \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\"\n * });\n * ```\n */\n constructor(params: LangfuseMediaParams) {\n const { source } = params;\n\n this._source = source;\n\n if (source === \"base64_data_uri\") {\n const [contentBytesParsed, contentTypeParsed] = this.parseBase64DataUri(\n params.base64DataUri,\n );\n this._contentBytes = contentBytesParsed;\n this._contentType = contentTypeParsed;\n } else {\n this._contentBytes = params.contentBytes;\n this._contentType = params.contentType;\n }\n }\n\n /**\n * Parses a base64 data URI to extract content bytes and type.\n *\n * @param data - The base64 data URI string\n * @returns Tuple of [contentBytes, contentType] or [undefined, undefined] on error\n * @private\n */\n private parseBase64DataUri(\n data: string,\n ): [Uint8Array | undefined, MediaContentType | undefined] {\n try {\n if (!data || typeof data !== \"string\") {\n throw new Error(\"Data URI is not a string\");\n }\n\n if (!data.startsWith(\"data:\")) {\n throw new Error(\"Data URI does not start with 'data:'\");\n }\n\n const [header, actualData] = data.slice(5).split(\",\", 2);\n if (!header || !actualData) {\n throw new Error(\"Invalid URI\");\n }\n\n const headerParts = header.split(\";\");\n if (!headerParts.includes(\"base64\")) {\n throw new Error(\"Data is not base64 encoded\");\n }\n\n const contentType = headerParts[0];\n if (!contentType) {\n throw new Error(\"Content type is empty\");\n }\n\n return [base64ToBytes(actualData), contentType as MediaContentType];\n } catch (error) {\n getGlobalLogger().error(\"Error parsing base64 data URI\", error);\n return [undefined, undefined];\n }\n }\n\n /**\n * Gets a unique identifier for this media based on its content hash.\n *\n * The ID is derived from the first 22 characters of the URL-safe base64-encoded\n * SHA-256 hash of the content.\n *\n * @returns The unique media ID, or null if hash generation failed\n *\n * @example\n * ```typescript\n * const media = new LangfuseMedia({...});\n * console.log(media.id); // \"A1B2C3D4E5F6G7H8I9J0K1\"\n * ```\n */\n async getId(): Promise<string | null> {\n const contentSha256Hash = await this.getSha256Hash();\n if (!contentSha256Hash) return null;\n\n const urlSafeContentHash = contentSha256Hash\n .replaceAll(\"+\", \"-\")\n .replaceAll(\"/\", \"_\");\n\n return urlSafeContentHash.slice(0, 22);\n }\n\n /**\n * Gets the length of the media content in bytes.\n *\n * @returns The content length in bytes, or undefined if no content is available\n */\n get contentLength(): number | undefined {\n return this._contentBytes?.length;\n }\n\n /**\n * Gets the SHA-256 hash of the media content.\n *\n * The hash is used for content integrity verification and generating unique media IDs.\n * Returns undefined if crypto is not available or hash generation fails.\n *\n * @returns The base64-encoded SHA-256 hash, or undefined if unavailable\n */\n async getSha256Hash(): Promise<string | undefined> {\n if (!this._contentBytes) {\n return undefined;\n }\n\n try {\n const hash = await crypto.subtle.digest(\"SHA-256\", this._contentBytes);\n\n return bytesToBase64(new Uint8Array(hash));\n } catch (error) {\n getGlobalLogger().warn(\n \"[Langfuse] Failed to generate SHA-256 hash for media content:\",\n error,\n );\n\n return undefined;\n }\n }\n\n /**\n * Gets the media reference tag for embedding in trace data.\n *\n * The tag format is: `@@@langfuseMedia:type=<contentType>|id=<mediaId>|source=<source>@@@`\n * This tag can be embedded in trace attributes and will be replaced with actual\n * media content when the trace is viewed in Langfuse.\n *\n * @returns The media reference tag, or null if required data is missing\n *\n * @example\n * ```typescript\n * const media = new LangfuseMedia({...});\n * console.log(media.tag);\n * // \"@@@langfuseMedia:type=image/png|id=A1B2C3D4E5F6G7H8I9J0K1|source=base64_data_uri@@@\"\n * ```\n */\n async getTag(): Promise<string | null> {\n const id = await this.getId();\n\n if (!this._contentType || !this._source || !id) return null;\n\n return `@@@langfuseMedia:type=${this._contentType}|id=${id}|source=${this._source}@@@`;\n }\n\n /**\n * Gets the media content as a base64 data URI.\n *\n * @returns The complete data URI string, or null if no content is available\n *\n * @example\n * ```typescript\n * const media = new LangfuseMedia({...});\n * console.log(media.base64DataUri);\n * // \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...\"\n * ```\n */\n get base64DataUri(): string | null {\n if (!this._contentBytes) return null;\n\n return `data:${this._contentType};base64,${bytesToBase64(this._contentBytes)}`;\n }\n\n /**\n * Serializes the media to JSON (returns the base64 data URI).\n *\n * @returns The base64 data URI, or null if no content is available\n */\n toJSON(): string | null {\n return this.base64DataUri;\n }\n}\n","/**\n * Attribute propagation utilities for Langfuse OpenTelemetry integration.\n *\n * This module provides the `propagateAttributes` function for setting trace-level\n * attributes (userId, sessionId, metadata) that automatically propagate to all child spans\n * within the context.\n */\n\nimport {\n context as otelContextApi,\n trace as otelTraceApi,\n propagation,\n Context,\n createContextKey,\n} from \"@opentelemetry/api\";\n\nimport {\n ELASTICDASH_SDK_EXPERIMENT_ENVIRONMENT,\n LangfuseOtelSpanAttributes,\n} from \"./constants.js\";\nimport { getGlobalLogger } from \"./logger/index.js\";\n\ntype CorrelatedKey =\n | \"userId\"\n | \"sessionId\"\n | \"metadata\"\n | \"version\"\n | \"tags\"\n | \"traceName\";\n\nconst experimentKeys = [\n \"experimentId\",\n \"experimentName\",\n \"experimentMetadata\",\n \"experimentDatasetId\",\n \"experimentItemId\",\n \"experimentItemMetadata\",\n \"experimentItemRootObservationId\",\n] as const;\ntype ExperimentKey = (typeof experimentKeys)[number];\ntype PropagatedKey = CorrelatedKey | ExperimentKey;\n\ntype PropagatedExperimentAttributes = {\n experimentId: string;\n experimentName: string;\n experimentMetadata?: string; // serialized JSON\n experimentDatasetId?: string;\n experimentItemId: string;\n experimentItemMetadata?: string; // serialized JSON\n experimentItemRootObservationId: string;\n};\n\nexport const LangfuseOtelContextKeys: Record<PropagatedKey, symbol> = {\n userId: createContextKey(\"langfuse_user_id\"),\n sessionId: createContextKey(\"langfuse_session_id\"),\n metadata: createContextKey(\"langfuse_metadata\"),\n version: createContextKey(\"langfuse_version\"),\n tags: createContextKey(\"langfuse_tags\"),\n traceName: createContextKey(\"langfuse_trace_name\"),\n\n // Experiments\n experimentId: createContextKey(\"langfuse_experiment_id\"),\n experimentName: createContextKey(\"langfuse_experiment_name\"),\n experimentMetadata: createContextKey(\"langfuse_experiment_metadata\"),\n experimentDatasetId: createContextKey(\"langfuse_experiment_dataset_id\"),\n experimentItemId: createContextKey(\"langfuse_experiment_item_id\"),\n experimentItemMetadata: createContextKey(\"langfuse_experiment_item_metadata\"),\n experimentItemRootObservationId: createContextKey(\n \"langfuse_experiment_item_root_observation_id\",\n ),\n};\n\nconst ELASTICDASH_BAGGAGE_PREFIX = \"langfuse_\";\nconst ELASTICDASH_BAGGAGE_TAGS_SEPARATOR = \",\";\n\n/**\n * Parameters for propagateAttributes function.\n *\n * @public\n */\nexport interface PropagateAttributesParams {\n /**\n * User identifier to associate with all spans in this context.\n * Must be a string ≤200 characters. Use this to track which user\n * generated each trace and enable e.g. per-user cost/performance analysis.\n */\n userId?: string;\n\n /**\n * Session identifier to associate with all spans in this context.\n * Must be a string ≤200 characters. Use this to group related traces\n * within a user session (e.g., a conversation thread, multi-turn interaction).\n */\n sessionId?: string;\n\n /**\n * Additional key-value metadata to propagate to all spans.\n * - Keys and values must be strings\n * - All values must be ≤200 characters\n * - Use for dimensions like internal correlating identifiers\n * - AVOID: large payloads, sensitive data, non-string values (will be dropped with warning)\n */\n metadata?: Record<string, string>;\n\n /**\n * Version identifier for parts of your application that are independently versioned, e.g. agents\n */\n version?: string;\n\n /**\n * List of tags to categorize the group of observations\n */\n tags?: string[];\n\n /**\n * Trace name to associate with all spans in this context.\n * Must be a string ≤200 characters.\n */\n traceName?: string;\n\n /**\n * If true, propagates attributes using OpenTelemetry baggage for\n * cross-process/service propagation.\n *\n * **Security warning**: When enabled, attribute values are added to HTTP headers\n * on ALL outbound requests. Only enable if values are safe to transmit via HTTP\n * headers and you need cross-service tracing.\n *\n * @defaultValue false\n */\n asBaggage?: boolean;\n\n /**\n * **INTERNAL USE ONLY** - For Langfuse experiment framework.\n *\n * This parameter is used internally by the Langfuse experiment system to propagate\n * experiment context to child spans. It should NOT be used by external code.\n *\n * @internal\n */\n _internalExperiment?: PropagatedExperimentAttributes;\n}\n\n/**\n * Propagate trace-level attributes to all spans created within this context.\n *\n * This function sets attributes on the currently active span AND automatically\n * propagates them to all new child spans created within the callback. This is the\n * recommended way to set trace-level attributes like userId, sessionId, and metadata\n * dimensions that should be consistently applied across all observations in a trace.\n *\n * **IMPORTANT**: Call this as early as possible within your trace/workflow. Only the\n * currently active span and spans created after entering this context will have these\n * attributes. Pre-existing spans will NOT be retroactively updated.\n *\n * **Why this matters**: Langfuse aggregation queries (e.g., total cost by userId,\n * filtering by sessionId) only include observations that have the attribute set.\n * If you call `propagateAttributes` late in your workflow, earlier spans won't be\n * included in aggregations for that attribute.\n *\n * @param params - Configuration for attributes to propagate\n * @param fn - Callback function (sync or async) within which attributes are propagated\n * @returns The result of the callback function\n *\n * @example\n * Basic usage with user and session tracking:\n *\n * ```typescript\n * import { startActiveObservation, propagateAttributes } from '@elasticdash/tracing';\n *\n * // Set attributes early in the trace\n * await startActiveObservation('user_workflow', async (span) => {\n * await propagateAttributes({\n * userId: 'user_123',\n * sessionId: 'session_abc',\n * metadata: { experiment: 'variant_a', environment: 'production' }\n * }, async () => {\n * // All spans created here will have userId, sessionId, and metadata\n * const llmSpan = startObservation('llm_call', { input: 'Hello' });\n * // This span inherits: userId, sessionId, experiment, environment\n * llmSpan.end();\n *\n * const gen = startObservation('completion', {}, { asType: 'generation' });\n * // This span also inherits all attributes\n * gen.end();\n * });\n * });\n * ```\n *\n * @example\n * Late propagation (anti-pattern):\n *\n * ```typescript\n * await startActiveObservation('workflow', async (span) => {\n * // These spans WON'T have userId\n * const earlySpan = startObservation('early_work', { input: 'data' });\n * earlySpan.end();\n *\n * // Set attributes in the middle\n * await propagateAttributes({ userId: 'user_123' }, async () => {\n * // Only spans created AFTER this point will have userId\n * const lateSpan = startObservation('late_work', { input: 'more' });\n * lateSpan.end();\n * });\n *\n * // Result: Aggregations by userId will miss \"early_work\" span\n * });\n * ```\n *\n * @example\n * Cross-service propagation with baggage (advanced):\n *\n * ```typescript\n * import fetch from 'node-fetch';\n *\n * // Service A - originating service\n * await startActiveObservation('api_request', async () => {\n * await propagateAttributes({\n * userId: 'user_123',\n * sessionId: 'session_abc',\n * asBaggage: true // Propagate via HTTP headers\n * }, async () => {\n * // Make HTTP request to Service B\n * const response = await fetch('https://service-b.example.com/api');\n * // userId and sessionId are now in HTTP headers\n * });\n * });\n *\n * // Service B - downstream service\n * // OpenTelemetry will automatically extract baggage from HTTP headers\n * // and propagate to spans in Service B\n * ```\n *\n * @remarks\n * - **Validation**: All attribute values (userId, sessionId, metadata values)\n * must be strings ≤200 characters. Invalid values will be dropped with a\n * warning logged. Ensure values meet constraints before calling.\n * - **OpenTelemetry**: This uses OpenTelemetry context propagation under the hood,\n * making it compatible with other OTel-instrumented libraries.\n * - **Baggage Security**: When `asBaggage=true`, attribute values are added to HTTP\n * headers on outbound requests. Only use for non-sensitive values and when you\n * need cross-service tracing.\n *\n * @public\n */\nexport function propagateAttributes<\n A extends unknown[],\n F extends (...args: A) => ReturnType<F>,\n>(params: PropagateAttributesParams, fn: F): ReturnType<F> {\n let context = otelContextApi.active();\n\n const span = otelTraceApi.getActiveSpan();\n const asBaggage = params.asBaggage ?? false;\n\n const {\n userId,\n sessionId,\n metadata,\n version,\n tags,\n traceName,\n _internalExperiment,\n } = params;\n\n // Validate and set userId\n if (userId) {\n if (isValidPropagatedString({ value: userId, attributeName: \"userId\" })) {\n context = setPropagatedAttribute({\n key: \"userId\",\n value: userId,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set sessionId\n if (sessionId) {\n if (\n isValidPropagatedString({\n value: sessionId,\n attributeName: \"sessionId\",\n })\n ) {\n context = setPropagatedAttribute({\n key: \"sessionId\",\n value: sessionId,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set version\n if (version) {\n if (\n isValidPropagatedString({\n value: version,\n attributeName: \"version\",\n })\n ) {\n context = setPropagatedAttribute({\n key: \"version\",\n value: version,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set traceName\n if (traceName) {\n if (\n isValidPropagatedString({\n value: traceName,\n attributeName: \"traceName\",\n })\n ) {\n context = setPropagatedAttribute({\n key: \"traceName\",\n value: traceName,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set tags\n if (tags && tags.length > 0) {\n const validTags = tags.filter((tag) =>\n isValidPropagatedString({\n value: tag,\n attributeName: \"tag\",\n }),\n );\n\n if (validTags.length > 0) {\n context = setPropagatedAttribute({\n key: \"tags\",\n value: validTags,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set metadata\n if (metadata) {\n // Filter metadata to only include valid string values\n const validatedMetadata: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(metadata)) {\n if (\n isValidPropagatedString({\n value: value,\n attributeName: `metadata.${key}`,\n })\n ) {\n validatedMetadata[key] = value;\n }\n }\n\n if (Object.keys(validatedMetadata).length > 0) {\n context = setPropagatedAttribute({\n key: \"metadata\",\n value: validatedMetadata,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Handle experiment attributes\n if (_internalExperiment) {\n for (const [key, value] of Object.entries(_internalExperiment)) {\n if (value !== undefined) {\n // Experiment attributes are already serialized, no validation needed\n context = setPropagatedAttribute({\n key: key as ExperimentKey,\n value,\n context,\n span,\n asBaggage,\n });\n }\n }\n }\n\n // Execute callback in the new context\n return otelContextApi.with(context, fn);\n}\n\nexport function getPropagatedAttributesFromContext(\n context: Context,\n): Record<string, string | string[]> {\n const propagatedAttributes: Record<string, string | string[]> = {};\n\n // Handle baggage\n const baggage = propagation.getBaggage(context);\n\n if (baggage) {\n baggage.getAllEntries().forEach(([baggageKey, baggageEntry]) => {\n if (baggageKey.startsWith(ELASTICDASH_BAGGAGE_PREFIX)) {\n const spanKey = getSpanKeyFromBaggageKey(baggageKey);\n\n if (spanKey) {\n const isMergedTags =\n baggageKey == getBaggageKeyForPropagatedKey(\"tags\");\n\n propagatedAttributes[spanKey] = isMergedTags\n ? baggageEntry.value.split(ELASTICDASH_BAGGAGE_TAGS_SEPARATOR)\n : baggageEntry.value;\n }\n }\n });\n }\n\n // Handle OTEL context values\n const userId = context.getValue(LangfuseOtelContextKeys[\"userId\"]);\n if (userId && typeof userId === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"userId\");\n\n propagatedAttributes[spanKey] = userId;\n }\n\n const sessionId = context.getValue(LangfuseOtelContextKeys[\"sessionId\"]);\n if (sessionId && typeof sessionId === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"sessionId\");\n\n propagatedAttributes[spanKey] = sessionId;\n }\n\n const version = context.getValue(LangfuseOtelContextKeys[\"version\"]);\n if (version && typeof version === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"version\");\n\n propagatedAttributes[spanKey] = version;\n }\n\n const traceName = context.getValue(LangfuseOtelContextKeys[\"traceName\"]);\n if (traceName && typeof traceName === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"traceName\");\n\n propagatedAttributes[spanKey] = traceName;\n }\n\n const tags = context.getValue(LangfuseOtelContextKeys[\"tags\"]);\n if (tags && Array.isArray(tags)) {\n const spanKey = getSpanKeyForPropagatedKey(\"tags\");\n\n propagatedAttributes[spanKey] = tags;\n }\n\n const metadata = context.getValue(LangfuseOtelContextKeys[\"metadata\"]);\n if (metadata && typeof metadata === \"object\" && metadata !== null) {\n for (const [k, v] of Object.entries(metadata)) {\n const spanKey = `${LangfuseOtelSpanAttributes.TRACE_METADATA}.${k}`;\n\n propagatedAttributes[spanKey] = String(v);\n }\n }\n\n // Extract experiment attributes\n for (const key of experimentKeys) {\n const contextKey = LangfuseOtelContextKeys[key];\n const value = context.getValue(contextKey);\n\n if (value && typeof value === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(key);\n propagatedAttributes[spanKey] = value;\n }\n }\n\n // add environment if propagation is for experiment\n if (\n propagatedAttributes[\n getSpanKeyForPropagatedKey(\"experimentItemRootObservationId\")\n ]\n ) {\n propagatedAttributes[LangfuseOtelSpanAttributes.ENVIRONMENT] =\n ELASTICDASH_SDK_EXPERIMENT_ENVIRONMENT;\n }\n\n return propagatedAttributes;\n}\n\ntype SetPropagatedAttributeParams = {\n context: Context;\n span: ReturnType<typeof otelTraceApi.getActiveSpan>;\n asBaggage: boolean;\n} & (\n | {\n key: \"userId\" | \"sessionId\" | \"version\" | \"traceName\" | ExperimentKey;\n value: string;\n }\n | {\n key: \"metadata\";\n value: Record<string, string>;\n }\n | {\n key: \"tags\";\n value: string[];\n }\n);\n\nfunction setPropagatedAttribute(params: SetPropagatedAttributeParams): Context {\n const { key, value, span, asBaggage } = params;\n\n let context = params.context;\n let mergedMetadata: Record<string, string> =\n key === \"metadata\" ? getContextMergedMetadata(context, value) : {};\n let mergedTags = key === \"tags\" ? getContextMergedTags(context, value) : [];\n\n // Get the context key for this attribute\n const contextKey = getContextKeyForPropagatedKey(key);\n\n // Set in context\n if (key === \"metadata\") {\n context = context.setValue(contextKey, mergedMetadata);\n } else if (key === \"tags\") {\n context = context.setValue(contextKey, mergedTags);\n } else {\n context = context.setValue(contextKey, value);\n }\n\n // Set on current span\n if (span && span.isRecording()) {\n if (key === \"metadata\") {\n for (const [k, v] of Object.entries(mergedMetadata)) {\n span.setAttribute(\n `${LangfuseOtelSpanAttributes.TRACE_METADATA}.${k}`,\n v,\n );\n }\n } else if (key === \"tags\") {\n const spanKey = getSpanKeyForPropagatedKey(key);\n span.setAttribute(spanKey, mergedTags);\n } else {\n const spanKey = getSpanKeyForPropagatedKey(key);\n span.setAttribute(spanKey, value);\n }\n }\n\n // Set on baggage\n if (asBaggage) {\n const baggageKey = getBaggageKeyForPropagatedKey(key);\n let baggage =\n propagation.getBaggage(context) || propagation.createBaggage();\n\n if (key === \"metadata\") {\n for (const [k, v] of Object.entries(mergedMetadata)) {\n baggage = baggage.setEntry(`${baggageKey}_${k}`, { value: v });\n }\n } else if (key === \"tags\") {\n baggage = baggage.setEntry(baggageKey, {\n value: mergedTags.join(ELASTICDASH_BAGGAGE_TAGS_SEPARATOR),\n });\n } else {\n baggage = baggage.setEntry(baggageKey, { value });\n }\n\n context = propagation.setBaggage(context, baggage);\n }\n\n return context;\n}\n\nfunction getContextMergedTags(context: Context, newTags: string[]): string[] {\n const existingTags = context.getValue(LangfuseOtelContextKeys[\"tags\"]);\n\n if (existingTags && Array.isArray(existingTags)) {\n return [...new Set([...existingTags, ...newTags])];\n } else {\n return newTags;\n }\n}\n\nfunction getContextMergedMetadata(\n context: Context,\n newMetadata: Record<string, string>,\n): Record<string, string> {\n const existingMetadata = context.getValue(\n LangfuseOtelContextKeys[\"metadata\"],\n );\n\n if (\n existingMetadata &&\n typeof existingMetadata === \"object\" &&\n existingMetadata !== null &&\n !Array.isArray(existingMetadata)\n ) {\n return { ...(existingMetadata as Record<string, string>), ...newMetadata };\n } else {\n return newMetadata;\n }\n}\n\nfunction isValidPropagatedString(params: {\n value: string;\n attributeName: string;\n}): boolean {\n const logger = getGlobalLogger();\n const { value, attributeName } = params;\n\n if (typeof value !== \"string\") {\n logger.warn(\n `Propagated attribute '${attributeName}' must be a string. Dropping value.`,\n );\n return false;\n }\n\n if (value.length > 200) {\n logger.warn(\n `Propagated attribute '${attributeName}' value is over 200 characters (${value.length} chars). Dropping value.`,\n );\n\n return false;\n }\n\n return true;\n}\n\nfunction getContextKeyForPropagatedKey(key: PropagatedKey): symbol {\n return LangfuseOtelContextKeys[key];\n}\n\nfunction getSpanKeyForPropagatedKey(key: PropagatedKey): string {\n switch (key) {\n case \"userId\":\n return LangfuseOtelSpanAttributes.TRACE_USER_ID;\n case \"sessionId\":\n return LangfuseOtelSpanAttributes.TRACE_SESSION_ID;\n case \"version\":\n return LangfuseOtelSpanAttributes.VERSION;\n case \"traceName\":\n return LangfuseOtelSpanAttributes.TRACE_NAME;\n case \"metadata\":\n return LangfuseOtelSpanAttributes.TRACE_METADATA;\n case \"tags\":\n return LangfuseOtelSpanAttributes.TRACE_TAGS;\n case \"experimentId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ID;\n case \"experimentName\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_NAME;\n case \"experimentMetadata\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_METADATA;\n case \"experimentDatasetId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_DATASET_ID;\n case \"experimentItemId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ITEM_ID;\n case \"experimentItemMetadata\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ITEM_METADATA;\n case \"experimentItemRootObservationId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ITEM_ROOT_OBSERVATION_ID;\n default: {\n const fallback: never = key;\n\n throw Error(\"Unhandled propagated key\", fallback);\n }\n }\n}\n\nfunction getBaggageKeyForPropagatedKey(key: PropagatedKey): string {\n // baggage keys must be snake case for correct cross service propagation\n // second service might run Python SDK that is expecting snake case keys\n switch (key) {\n case \"userId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}user_id`;\n case \"sessionId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}session_id`;\n case \"version\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}version`;\n case \"traceName\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}trace_name`;\n case \"metadata\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}metadata`;\n case \"tags\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}tags`;\n case \"experimentId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_id`;\n case \"experimentName\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_name`;\n case \"experimentMetadata\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_metadata`;\n case \"experimentDatasetId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_dataset_id`;\n case \"experimentItemId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_item_id`;\n case \"experimentItemMetadata\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_item_metadata`;\n case \"experimentItemRootObservationId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_item_root_observation_id`;\n default: {\n const fallback: never = key;\n\n throw Error(\"Unhandled propagated key\", fallback);\n }\n }\n}\n\nfunction getSpanKeyFromBaggageKey(baggageKey: string): string | undefined {\n if (!baggageKey.startsWith(ELASTICDASH_BAGGAGE_PREFIX)) return;\n\n const suffix = baggageKey.slice(ELASTICDASH_BAGGAGE_PREFIX.length);\n\n // Metadata keys have format: langfuse_metadata_{key_name}\n if (suffix.startsWith(\"metadata_\")) {\n const metadataKey = suffix.slice(\"metadata_\".length);\n\n return `${LangfuseOtelSpanAttributes.TRACE_METADATA}.${metadataKey}`;\n }\n\n switch (suffix) {\n case \"user_id\":\n return getSpanKeyForPropagatedKey(\"userId\");\n case \"session_id\":\n return getSpanKeyForPropagatedKey(\"sessionId\");\n case \"version\":\n return getSpanKeyForPropagatedKey(\"version\");\n case \"trace_name\":\n return getSpanKeyForPropagatedKey(\"traceName\");\n case \"tags\":\n return getSpanKeyForPropagatedKey(\"tags\");\n case \"experiment_id\":\n return getSpanKeyForPropagatedKey(\"experimentId\");\n case \"experiment_name\":\n return getSpanKeyForPropagatedKey(\"experimentName\");\n case \"experiment_metadata\":\n return getSpanKeyForPropagatedKey(\"experimentMetadata\");\n case \"experiment_dataset_id\":\n return getSpanKeyForPropagatedKey(\"experimentDatasetId\");\n case \"experiment_item_id\":\n return getSpanKeyForPropagatedKey(\"experimentItemId\");\n case \"experiment_item_metadata\":\n return getSpanKeyForPropagatedKey(\"experimentItemMetadata\");\n case \"experiment_item_root_observation_id\":\n return getSpanKeyForPropagatedKey(\"experimentItemRootObservationId\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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OAAO,MAAM,YAAY,MAAM;AAEnD,WAAO,iDAA4C,IAAI,WAAW;AAAA,EACpE;AAEA,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO,2BAA2B,QAAQ;AAAA,IAC5C,KAAK;AACH,aAAO,2BAA2B,WAAW;AAAA,IAC/C,KAAK;AACH,aAAO,2BAA2B,SAAS;AAAA,IAC7C,KAAK;AACH,aAAO,2BAA2B,WAAW;AAAA,IAC/C,KAAK;AACH,aAAO,2BAA2B,MAAM;AAAA,IAC1C,KAAK;AACH,aAAO,2BAA2B,cAAc;AAAA,IAClD,KAAK;AACH,aAAO,2BAA2B,gBAAgB;AAAA,IACpD,KAAK;AACH,aAAO,2BAA2B,oBAAoB;AAAA,IACxD,KAAK;AACH,aAAO,2BAA2B,qBAAqB;AAAA,IACzD,KAAK;AACH,aAAO,2BAA2B,kBAAkB;AAAA,IACtD,KAAK;AACH,aAAO,2BAA2B,wBAAwB;AAAA,IAC5D,KAAK;AACH,aAAO,2BAA2B,iCAAiC;AAAA,EACvE;AACF;","names":["Error","globalThis","LogLevel","LangfuseOtelSpanAttributes","Error","Error","_a","text","Headers","base64ToBytes","bytesToBase64","base64Encode","base64Decode","base64Encode","base64Decode","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","_a","_a","otelContextApi","otelTraceApi"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/utils.ts","../src/logger/index.ts","../package.json","../src/constants.ts","../src/api/api/resources/annotationQueues/index.ts","../src/api/api/resources/annotationQueues/types/AnnotationQueueStatus.ts","../src/api/api/resources/annotationQueues/types/AnnotationQueueObjectType.ts","../src/api/api/resources/blobStorageIntegrations/index.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageIntegrationType.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageIntegrationFileType.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageExportMode.ts","../src/api/api/resources/blobStorageIntegrations/types/BlobStorageExportFrequency.ts","../src/api/api/resources/comments/index.ts","../src/api/api/resources/commons/index.ts","../src/api/api/resources/commons/types/PricingTierOperator.ts","../src/api/api/resources/commons/types/ModelUsageUnit.ts","../src/api/api/resources/commons/types/ObservationLevel.ts","../src/api/api/resources/commons/types/CommentObjectType.ts","../src/api/api/resources/commons/types/DatasetStatus.ts","../src/api/api/resources/commons/types/ScoreSource.ts","../src/api/api/resources/commons/types/ScoreConfigDataType.ts","../src/api/api/resources/commons/types/ScoreDataType.ts","../src/api/core/json.ts","../src/api/errors/LangfuseAPIError.ts","../src/api/errors/LangfuseAPITimeoutError.ts","../src/api/api/resources/commons/errors/Error.ts","../src/api/api/resources/commons/errors/UnauthorizedError.ts","../src/api/api/resources/commons/errors/AccessDeniedError.ts","../src/api/api/resources/commons/errors/NotFoundError.ts","../src/api/api/resources/commons/errors/MethodNotAllowedError.ts","../src/api/api/resources/datasetItems/index.ts","../src/api/api/resources/datasetRunItems/index.ts","../src/api/api/resources/datasets/index.ts","../src/api/api/resources/health/index.ts","../src/api/api/resources/health/errors/ServiceUnavailableError.ts","../src/api/api/resources/ingestion/index.ts","../src/api/api/resources/ingestion/types/ObservationType.ts","../src/api/api/resources/llmConnections/index.ts","../src/api/api/resources/llmConnections/types/LlmAdapter.ts","../src/api/api/resources/media/index.ts","../src/api/api/resources/media/types/MediaContentType.ts","../src/api/api/resources/metricsV2/index.ts","../src/api/api/resources/metrics/index.ts","../src/api/api/resources/models/index.ts","../src/api/api/resources/observationsV2/index.ts","../src/api/api/resources/observations/index.ts","../src/api/api/resources/opentelemetry/index.ts","../src/api/api/resources/organizations/index.ts","../src/api/api/resources/organizations/types/MembershipRole.ts","../src/api/api/resources/projects/index.ts","../src/api/api/resources/prompts/index.ts","../src/api/api/resources/prompts/types/PromptType.ts","../src/api/api/resources/scim/index.ts","../src/api/api/resources/scoreConfigs/index.ts","../src/api/api/resources/scoreV2/index.ts","../src/api/api/resources/score/index.ts","../src/api/api/resources/sessions/index.ts","../src/api/api/resources/trace/index.ts","../src/api/api/resources/utils/index.ts","../src/api/api/resources/utils/resources/pagination/index.ts","../src/api/api/resources/promptVersion/index.ts","../src/api/core/headers.ts","../src/api/core/url/qs.ts","../src/api/core/fetcher/createRequestUrl.ts","../src/api/core/fetcher/BinaryResponse.ts","../src/api/core/fetcher/ResponseWithBody.ts","../src/api/core/fetcher/getResponseBody.ts","../src/api/core/fetcher/getErrorResponseBody.ts","../src/api/core/fetcher/getFetchFn.ts","../src/api/core/fetcher/getRequestBody.ts","../src/api/core/fetcher/signals.ts","../src/api/core/fetcher/makeRequest.ts","../src/api/core/fetcher/Headers.ts","../src/api/core/fetcher/RawResponse.ts","../src/api/core/fetcher/requestWithRetries.ts","../src/api/core/fetcher/Supplier.ts","../src/api/core/fetcher/Fetcher.ts","../src/api/core/fetcher/HttpResponsePromise.ts","../src/api/core/url/index.ts","../src/api/core/url/join.ts","../src/api/core/base64.ts","../src/api/core/auth/BasicAuth.ts","../src/api/api/resources/annotationQueues/client/Client.ts","../src/api/api/resources/blobStorageIntegrations/client/Client.ts","../src/api/api/resources/comments/client/Client.ts","../src/api/api/resources/datasetItems/client/Client.ts","../src/api/api/resources/datasetRunItems/client/Client.ts","../src/api/api/resources/datasets/client/Client.ts","../src/api/api/resources/health/client/Client.ts","../src/api/api/resources/ingestion/client/Client.ts","../src/api/api/resources/llmConnections/client/Client.ts","../src/api/api/resources/media/client/Client.ts","../src/api/api/resources/metricsV2/client/Client.ts","../src/api/api/resources/metrics/client/Client.ts","../src/api/api/resources/models/client/Client.ts","../src/api/api/resources/observationsV2/client/Client.ts","../src/api/api/resources/observations/client/Client.ts","../src/api/api/resources/opentelemetry/client/Client.ts","../src/api/api/resources/organizations/client/Client.ts","../src/api/api/resources/projects/client/Client.ts","../src/api/api/resources/promptVersion/client/Client.ts","../src/api/api/resources/prompts/client/Client.ts","../src/api/api/resources/scim/client/Client.ts","../src/api/api/resources/scoreConfigs/client/Client.ts","../src/api/api/resources/scoreV2/client/Client.ts","../src/api/api/resources/score/client/Client.ts","../src/api/api/resources/sessions/client/Client.ts","../src/api/api/resources/trace/client/Client.ts","../src/api/Client.ts","../src/media.ts","../src/propagation.ts"],"sourcesContent":["export * from \"./logger/index.js\";\nexport * from \"./constants.js\";\nexport * from \"./api/api/index.js\";\nexport {\n LangfuseAPIError,\n LangfuseAPITimeoutError,\n} from \"./api/errors/index.js\";\nexport { LangfuseAPIClient } from \"./api/Client.js\";\nexport * from \"./utils.js\";\nexport * from \"./types.js\";\nexport * from \"./media.js\";\nexport * from \"./propagation.js\";\n","type LangfuseEnvVar =\n | \"ELASTICDASH_PUBLIC_KEY\"\n | \"ELASTICDASH_SECRET_KEY\"\n | \"ELASTICDASH_BASE_URL\"\n | \"ELASTICDASH_BASEURL\" // legacy v2\n | \"ELASTICDASH_TIMEOUT\"\n | \"ELASTICDASH_FLUSH_AT\"\n | \"ELASTICDASH_FLUSH_INTERVAL\"\n | \"ELASTICDASH_LOG_LEVEL\"\n | \"ELASTICDASH_RELEASE\"\n | \"ELASTICDASH_TRACING_ENVIRONMENT\";\n\nexport function getEnv(key: LangfuseEnvVar): string | undefined {\n if (typeof process !== \"undefined\" && process.env[key]) {\n return process.env[key];\n } else if (typeof globalThis !== \"undefined\") {\n return (globalThis as any)[key];\n }\n\n return;\n}\n\n// https://stackoverflow.com/a/8809472\nexport function generateUUID(globalThis?: any): string {\n // Public Domain/MIT\n let d = new Date().getTime(); //Timestamp\n let d2 =\n (globalThis &&\n globalThis.performance &&\n globalThis.performance.now &&\n globalThis.performance.now() * 1000) ||\n 0; //Time in microseconds since page-load or 0 if unsupported\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n let r = Math.random() * 16; //random number between 0 and 16\n if (d > 0) {\n //Use timestamp until depleted\n r = (d + r) % 16 | 0;\n d = Math.floor(d / 16);\n } else {\n //Use microseconds since page-load if supported\n r = (d2 + r) % 16 | 0;\n d2 = Math.floor(d2 / 16);\n }\n return (c === \"x\" ? r : (r & 0x3) | 0x8).toString(16);\n });\n}\n\nexport function safeSetTimeout(fn: () => void, timeout: number): any {\n const t = setTimeout(fn, timeout) as any;\n // We unref if available to prevent Node.js hanging on exit\n if (t?.unref) {\n t?.unref();\n }\n\n return t;\n}\n\nexport function base64ToBytes(base64: string): Uint8Array {\n const binString = atob(base64);\n\n return Uint8Array.from(binString, (m) => m.codePointAt(0)!);\n}\n\nexport function bytesToBase64(bytes: Uint8Array): string {\n const binString = Array.from(bytes, (byte) => String.fromCharCode(byte)).join(\n \"\",\n );\n return btoa(binString);\n}\n\nexport function base64Encode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"utf8\").toString(\"base64\");\n }\n\n const bytes = new TextEncoder().encode(input);\n return bytesToBase64(bytes);\n}\n\nexport function base64Decode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"base64\").toString(\"utf8\");\n }\n\n const bytes = base64ToBytes(input);\n return new TextDecoder().decode(bytes);\n}\n\n/**\n * Generate a random experiment ID (16 hex characters from 8 random bytes).\n * @internal\n */\nexport async function createExperimentId(): Promise<string> {\n const randomBytes = new Uint8Array(8);\n crypto.getRandomValues(randomBytes);\n\n return Array.from(randomBytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n\n/**\n * Generate experiment item ID from input hash (first 16 hex chars of SHA-256).\n * Skips serialization if input is already a string.\n * @internal\n */\nexport async function createExperimentItemId(input: any): Promise<string> {\n const serialized = serializeValue(input);\n const data = new TextEncoder().encode(serialized);\n\n const hashBuffer = await crypto.subtle.digest(\"SHA-256\", data);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n const hashHex = hashArray\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n\n return hashHex.slice(0, 16);\n}\n\n/**\n * Serialize a value to JSON string, handling undefined/null.\n * Skips serialization if value is already a string.\n * @internal\n */\nexport function serializeValue(value: any): string | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"string\") return value;\n\n return JSON.stringify(value);\n}\n","import { getEnv } from \"../utils.js\";\n/**\n * Enumeration of log levels in order of severity (lowest to highest).\n */\nexport enum LogLevel {\n /** Critical errors that may cause application failure */\n ERROR = 3,\n /** Warning messages for potentially harmful situations */\n WARN = 2,\n /** General informational messages */\n INFO = 1,\n /** Detailed debug information for troubleshooting */\n DEBUG = 0,\n}\n\nfunction parseLogLevelFromEnv(): LogLevel | undefined {\n if (typeof process === \"object\" && \"env\" in process) {\n const envValue = getEnv(\"ELASTICDASH_LOG_LEVEL\");\n const value = (envValue ?? \"\").toUpperCase();\n\n switch (value) {\n case \"ERROR\":\n return LogLevel.ERROR;\n case \"WARN\":\n return LogLevel.WARN;\n case \"INFO\":\n return LogLevel.INFO;\n case \"DEBUG\":\n return LogLevel.DEBUG;\n default:\n return undefined;\n }\n }\n return undefined;\n}\n\n/**\n * Configuration options for the Logger.\n */\nexport interface LoggerConfig {\n /** The minimum log level to output */\n level: LogLevel;\n /** Optional prefix to prepend to all log messages */\n prefix?: string;\n /** Whether to include timestamps in log messages (default: true) */\n enableTimestamp?: boolean;\n}\n\n/**\n * A configurable logger class that supports different log levels and formatting.\n *\n * @example\n * ```typescript\n * const logger = new Logger({ level: LogLevel.DEBUG, prefix: 'Langfuse SDK' });\n * logger.info('Application started');\n * logger.error('An error occurred', error);\n * ```\n */\nexport class Logger {\n private config: LoggerConfig;\n\n /**\n * Creates a new Logger instance.\n *\n * @param config - Configuration options for the logger\n */\n constructor(config: LoggerConfig = { level: LogLevel.INFO }) {\n this.config = {\n enableTimestamp: true,\n ...config,\n };\n }\n\n /**\n * Determines if a message should be logged based on the current log level.\n *\n * @param level - The log level to check\n * @returns True if the message should be logged, false otherwise\n */\n private shouldLog(level: LogLevel): boolean {\n return level >= this.config.level;\n }\n\n /**\n * Formats a log message with timestamp, prefix, and log level.\n *\n * @param level - The log level string\n * @param message - The message to format\n * @returns The formatted message string\n */\n private formatMessage(level: string, message: string): string {\n const timestamp = this.config.enableTimestamp\n ? new Date().toISOString()\n : \"\";\n const prefix = this.config.prefix || \"[Langfuse SDK]\";\n const parts = [timestamp, prefix, `[${level}]`, message].filter(Boolean);\n\n return parts.join(\" \");\n }\n\n /**\n * Logs an error message.\n *\n * @param message - The error message to log\n * @param args - Additional arguments to pass to console.error\n */\n error(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.ERROR)) {\n console.error(this.formatMessage(\"ERROR\", message), ...args);\n }\n }\n\n /**\n * Logs a warning message.\n *\n * @param message - The warning message to log\n * @param args - Additional arguments to pass to console.warn\n */\n warn(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.WARN)) {\n console.warn(this.formatMessage(\"WARN\", message), ...args);\n }\n }\n\n /**\n * Logs an informational message.\n *\n * @param message - The info message to log\n * @param args - Additional arguments to pass to console.info\n */\n info(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.INFO)) {\n console.info(this.formatMessage(\"INFO\", message), ...args);\n }\n }\n\n /**\n * Logs a debug message.\n *\n * @param message - The debug message to log\n * @param args - Additional arguments to pass to console.debug\n */\n debug(message: string, ...args: unknown[]): void {\n if (this.shouldLog(LogLevel.DEBUG)) {\n console.debug(this.formatMessage(\"DEBUG\", message), ...args);\n }\n }\n\n /**\n * Sets the minimum log level.\n *\n * @param level - The new log level\n */\n setLevel(level: LogLevel): void {\n this.config.level = level;\n }\n\n /**\n * Gets the current log level.\n *\n * @returns The current log level\n */\n getLevel(): LogLevel {\n return this.config.level;\n }\n}\n\n/**\n * Singleton class that manages a global logger instance.\n */\nclass LoggerSingleton {\n private static instance: Logger | null = null;\n private static defaultConfig: LoggerConfig = {\n level: parseLogLevelFromEnv() ?? LogLevel.INFO,\n };\n\n /**\n * Gets the singleton logger instance, creating it if it doesn't exist.\n *\n * @returns The singleton logger instance\n */\n static getInstance(): Logger {\n if (!LoggerSingleton.instance) {\n LoggerSingleton.instance = new Logger(LoggerSingleton.defaultConfig);\n }\n return LoggerSingleton.instance;\n }\n\n /**\n * Configures the global logger with new settings.\n * This will replace the existing logger instance.\n *\n * @param config - The new logger configuration\n */\n static configure(config: LoggerConfig): void {\n LoggerSingleton.defaultConfig = config;\n LoggerSingleton.instance = new Logger(config);\n }\n\n /**\n * Resets the singleton logger instance and configuration.\n * Useful for testing or reinitializing the logger.\n */\n static reset(): void {\n LoggerSingleton.instance = null;\n LoggerSingleton.defaultConfig = { level: LogLevel.INFO };\n }\n}\n\n/**\n * Creates a new Logger instance with the specified configuration.\n * This is independent of the global singleton logger.\n *\n * @param config - Optional configuration for the logger\n * @returns A new Logger instance\n *\n * @example\n * ```typescript\n * const customLogger = createLogger({ level: LogLevel.DEBUG, prefix: 'Custom' });\n * customLogger.debug('This is a debug message');\n * ```\n */\nexport const createLogger = (config?: LoggerConfig): Logger => {\n return new Logger(config);\n};\n\n/**\n * Gets the global singleton logger instance.\n * If no logger exists, creates one with default configuration.\n *\n * @returns The global logger instance\n *\n * @example\n * ```typescript\n * const logger = getGlobalLogger();\n * logger.info('Application started');\n * ```\n */\nexport const getGlobalLogger = (): Logger => {\n return LoggerSingleton.getInstance();\n};\n\n/**\n * Configures the global logger with new settings.\n * This should be called early in your application initialization.\n *\n * @param config - The logger configuration\n *\n * @example\n * ```typescript\n * configureGlobalLogger({\n * level: LogLevel.DEBUG,\n * prefix: 'Langfuse SDK',\n * enableTimestamp: true\n * });\n * ```\n */\nexport const configureGlobalLogger = (config: LoggerConfig): void => {\n LoggerSingleton.configure(config);\n};\n\n/**\n * Resets the global logger instance and configuration.\n * Primarily used for testing to ensure clean state between tests.\n *\n * @example\n * ```typescript\n * // In test teardown\n * resetGlobalLogger();\n * ```\n */\nexport const resetGlobalLogger = (): void => {\n LoggerSingleton.reset();\n};\n\n/**\n * The singleton logger instance for convenient access.\n * Use this for quick access to the global logger.\n *\n * @example\n * ```typescript\n * import { logger } from '@elasticdash/core';\n *\n * logger.getInstance().info('Quick logging');\n * ```\n */\nexport { LoggerSingleton as logger };\n","{\n \"name\": \"@elasticdash/core\",\n \"version\": \"0.0.5\",\n \"description\": \"Core functions and utilities for ElasticDash packages\",\n \"type\": \"module\",\n \"sideEffects\": false,\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.ts\\\"\",\n \"clean\": \"rm -rf dist\"\n },\n \"author\": \"ElasticDash\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/terryjiang2020/elasticdash-js.git\",\n \"directory\": \"packages/core\"\n },\n \"files\": [\n \"dist\"\n ],\n \"peerDependencies\": {\n \"@opentelemetry/api\": \"^1.9.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^24.1.0\"\n }\n}\n","export type ElasticDashEnvVar =\n | \"ELASTICDASH_PUBLIC_KEY\"\n | \"ELASTICDASH_SECRET_KEY\"\n | \"ELASTICDASH_BASE_URL\"\n | \"ELASTICDASH_BASEURL\"\n | \"ELASTICDASH_TIMEOUT\"\n | \"ELASTICDASH_FLUSH_AT\"\n | \"ELASTICDASH_FLUSH_INTERVAL\"\n | \"ELASTICDASH_TRACING_ENVIRONMENT\";\nimport packageJson from \"../package.json\" with { type: \"json\" };\n\nexport const ELASTICDASH_TRACER_NAME = \"langfuse-sdk\";\nexport const ELASTICDASH_SDK_VERSION = packageJson.version;\nexport const ELASTICDASH_SDK_NAME = \"javascript\";\n\nexport const ELASTICDASH_SDK_EXPERIMENT_ENVIRONMENT = \"sdk-experiment\";\n\n// From Langfuse platform: web/src/features/otel/server/attributes.ts\nexport enum LangfuseOtelSpanAttributes {\n // Langfuse-Trace attributes\n TRACE_NAME = \"langfuse.trace.name\",\n TRACE_USER_ID = \"user.id\",\n TRACE_SESSION_ID = \"session.id\",\n TRACE_TAGS = \"langfuse.trace.tags\",\n TRACE_PUBLIC = \"langfuse.trace.public\",\n TRACE_METADATA = \"langfuse.trace.metadata\",\n TRACE_INPUT = \"langfuse.trace.input\",\n TRACE_OUTPUT = \"langfuse.trace.output\",\n\n // Langfuse-observation attributes\n OBSERVATION_TYPE = \"langfuse.observation.type\",\n OBSERVATION_METADATA = \"langfuse.observation.metadata\",\n OBSERVATION_LEVEL = \"langfuse.observation.level\",\n OBSERVATION_STATUS_MESSAGE = \"langfuse.observation.status_message\",\n OBSERVATION_INPUT = \"langfuse.observation.input\",\n OBSERVATION_OUTPUT = \"langfuse.observation.output\",\n\n // Langfuse-observation of type Generation attributes\n OBSERVATION_COMPLETION_START_TIME = \"langfuse.observation.completion_start_time\",\n OBSERVATION_MODEL = \"langfuse.observation.model.name\",\n OBSERVATION_MODEL_PARAMETERS = \"langfuse.observation.model.parameters\",\n OBSERVATION_USAGE_DETAILS = \"langfuse.observation.usage_details\",\n OBSERVATION_COST_DETAILS = \"langfuse.observation.cost_details\",\n OBSERVATION_PROMPT_NAME = \"langfuse.observation.prompt.name\",\n OBSERVATION_PROMPT_VERSION = \"langfuse.observation.prompt.version\",\n\n // General\n ENVIRONMENT = \"langfuse.environment\",\n RELEASE = \"langfuse.release\",\n VERSION = \"langfuse.version\",\n\n // Internal\n AS_ROOT = \"langfuse.internal.as_root\",\n\n // Experiment attributes\n EXPERIMENT_ID = \"langfuse.experiment.id\",\n EXPERIMENT_NAME = \"langfuse.experiment.name\",\n EXPERIMENT_DESCRIPTION = \"langfuse.experiment.description\",\n EXPERIMENT_METADATA = \"langfuse.experiment.metadata\",\n EXPERIMENT_DATASET_ID = \"langfuse.experiment.dataset.id\",\n EXPERIMENT_ITEM_ID = \"langfuse.experiment.item.id\",\n EXPERIMENT_ITEM_EXPECTED_OUTPUT = \"langfuse.experiment.item.expected_output\",\n EXPERIMENT_ITEM_METADATA = \"langfuse.experiment.item.metadata\",\n EXPERIMENT_ITEM_ROOT_OBSERVATION_ID = \"langfuse.experiment.item.root_observation_id\",\n\n // Compatibility - Map properties that were documented in https://langfuse.com/docs/opentelemetry/get-started#property-mapping,\n // but have a new assignment\n TRACE_COMPAT_USER_ID = \"langfuse.user.id\",\n TRACE_COMPAT_SESSION_ID = \"langfuse.session.id\",\n}\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type AnnotationQueueStatus = \"PENDING\" | \"COMPLETED\";\nexport const AnnotationQueueStatus = {\n Pending: \"PENDING\",\n Completed: \"COMPLETED\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type AnnotationQueueObjectType = \"TRACE\" | \"OBSERVATION\" | \"SESSION\";\nexport const AnnotationQueueObjectType = {\n Trace: \"TRACE\",\n Observation: \"OBSERVATION\",\n Session: \"SESSION\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageIntegrationType =\n | \"S3\"\n | \"S3_COMPATIBLE\"\n | \"AZURE_BLOB_STORAGE\";\nexport const BlobStorageIntegrationType = {\n S3: \"S3\",\n S3Compatible: \"S3_COMPATIBLE\",\n AzureBlobStorage: \"AZURE_BLOB_STORAGE\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageIntegrationFileType = \"JSON\" | \"CSV\" | \"JSONL\";\nexport const BlobStorageIntegrationFileType = {\n Json: \"JSON\",\n Csv: \"CSV\",\n Jsonl: \"JSONL\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageExportMode =\n | \"FULL_HISTORY\"\n | \"FROM_TODAY\"\n | \"FROM_CUSTOM_DATE\";\nexport const BlobStorageExportMode = {\n FullHistory: \"FULL_HISTORY\",\n FromToday: \"FROM_TODAY\",\n FromCustomDate: \"FROM_CUSTOM_DATE\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type BlobStorageExportFrequency = \"hourly\" | \"daily\" | \"weekly\";\nexport const BlobStorageExportFrequency = {\n Hourly: \"hourly\",\n Daily: \"daily\",\n Weekly: \"weekly\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./errors/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * Comparison operators for pricing tier conditions\n */\nexport type PricingTierOperator = \"gt\" | \"gte\" | \"lt\" | \"lte\" | \"eq\" | \"neq\";\nexport const PricingTierOperator = {\n Gt: \"gt\",\n Gte: \"gte\",\n Lt: \"lt\",\n Lte: \"lte\",\n Eq: \"eq\",\n Neq: \"neq\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * Unit of usage in Langfuse\n */\nexport type ModelUsageUnit =\n | \"CHARACTERS\"\n | \"TOKENS\"\n | \"MILLISECONDS\"\n | \"SECONDS\"\n | \"IMAGES\"\n | \"REQUESTS\";\nexport const ModelUsageUnit = {\n Characters: \"CHARACTERS\",\n Tokens: \"TOKENS\",\n Milliseconds: \"MILLISECONDS\",\n Seconds: \"SECONDS\",\n Images: \"IMAGES\",\n Requests: \"REQUESTS\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ObservationLevel = \"DEBUG\" | \"DEFAULT\" | \"WARNING\" | \"ERROR\";\nexport const ObservationLevel = {\n Debug: \"DEBUG\",\n Default: \"DEFAULT\",\n Warning: \"WARNING\",\n Error: \"ERROR\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type CommentObjectType = \"TRACE\" | \"OBSERVATION\" | \"SESSION\" | \"PROMPT\";\nexport const CommentObjectType = {\n Trace: \"TRACE\",\n Observation: \"OBSERVATION\",\n Session: \"SESSION\",\n Prompt: \"PROMPT\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type DatasetStatus = \"ACTIVE\" | \"ARCHIVED\";\nexport const DatasetStatus = {\n Active: \"ACTIVE\",\n Archived: \"ARCHIVED\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ScoreSource = \"ANNOTATION\" | \"API\" | \"EVAL\";\nexport const ScoreSource = {\n Annotation: \"ANNOTATION\",\n Api: \"API\",\n Eval: \"EVAL\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ScoreConfigDataType = \"NUMERIC\" | \"BOOLEAN\" | \"CATEGORICAL\";\nexport const ScoreConfigDataType = {\n Numeric: \"NUMERIC\",\n Boolean: \"BOOLEAN\",\n Categorical: \"CATEGORICAL\",\n} as const;\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ScoreDataType =\n | \"NUMERIC\"\n | \"BOOLEAN\"\n | \"CATEGORICAL\"\n | \"CORRECTION\";\nexport const ScoreDataType = {\n Numeric: \"NUMERIC\",\n Boolean: \"BOOLEAN\",\n Categorical: \"CATEGORICAL\",\n Correction: \"CORRECTION\",\n} as const;\n","/**\n * Serialize a value to JSON\n * @param value A JavaScript value, usually an object or array, to be converted.\n * @param replacer A function that transforms the results.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n * @returns JSON string\n */\nexport const toJson = (\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string => {\n return JSON.stringify(value, replacer, space);\n};\n\n/**\n * Parse JSON string to object, array, or other type\n * @param text A valid JSON string.\n * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.\n * @returns Parsed object, array, or other type\n */\nexport function fromJson<T = unknown>(\n text: string,\n reviver?: (this: unknown, key: string, value: unknown) => unknown,\n): T {\n return JSON.parse(text, reviver);\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../core/index.js\";\nimport { toJson } from \"../core/json.js\";\n\nexport class LangfuseAPIError extends Error {\n public readonly statusCode?: number;\n public readonly body?: unknown;\n public readonly rawResponse?: core.RawResponse;\n\n constructor({\n message,\n statusCode,\n body,\n rawResponse,\n }: {\n message?: string;\n statusCode?: number;\n body?: unknown;\n rawResponse?: core.RawResponse;\n }) {\n super(buildMessage({ message, statusCode, body }));\n Object.setPrototypeOf(this, LangfuseAPIError.prototype);\n this.statusCode = statusCode;\n this.body = body;\n this.rawResponse = rawResponse;\n }\n}\n\nfunction buildMessage({\n message,\n statusCode,\n body,\n}: {\n message: string | undefined;\n statusCode: number | undefined;\n body: unknown | undefined;\n}): string {\n let lines: string[] = [];\n if (message != null) {\n lines.push(message);\n }\n\n if (statusCode != null) {\n lines.push(`Status code: ${statusCode.toString()}`);\n }\n\n if (body != null) {\n lines.push(`Body: ${toJson(body, undefined, 2)}`);\n }\n\n return lines.join(\"\\n\");\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport class LangfuseAPITimeoutError extends Error {\n constructor(message: string) {\n super(message);\n Object.setPrototypeOf(this, LangfuseAPITimeoutError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class Error extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"Error\",\n statusCode: 400,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, Error.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class UnauthorizedError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"UnauthorizedError\",\n statusCode: 401,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class AccessDeniedError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"AccessDeniedError\",\n statusCode: 403,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, AccessDeniedError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class NotFoundError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"NotFoundError\",\n statusCode: 404,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class MethodNotAllowedError extends errors.LangfuseAPIError {\n constructor(body?: unknown, rawResponse?: core.RawResponse) {\n super({\n message: \"MethodNotAllowedError\",\n statusCode: 405,\n body: body,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, MethodNotAllowedError.prototype);\n }\n}\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./errors/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as errors from \"../../../../errors/index.js\";\nimport * as core from \"../../../../core/index.js\";\n\nexport class ServiceUnavailableError extends errors.LangfuseAPIError {\n constructor(rawResponse?: core.RawResponse) {\n super({\n message: \"ServiceUnavailableError\",\n statusCode: 503,\n rawResponse: rawResponse,\n });\n Object.setPrototypeOf(this, ServiceUnavailableError.prototype);\n }\n}\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type ObservationType =\n | \"SPAN\"\n | \"GENERATION\"\n | \"EVENT\"\n | \"AGENT\"\n | \"TOOL\"\n | \"CHAIN\"\n | \"RETRIEVER\"\n | \"EVALUATOR\"\n | \"EMBEDDING\"\n | \"GUARDRAIL\";\nexport const ObservationType = {\n Span: \"SPAN\",\n Generation: \"GENERATION\",\n Event: \"EVENT\",\n Agent: \"AGENT\",\n Tool: \"TOOL\",\n Chain: \"CHAIN\",\n Retriever: \"RETRIEVER\",\n Evaluator: \"EVALUATOR\",\n Embedding: \"EMBEDDING\",\n Guardrail: \"GUARDRAIL\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type LlmAdapter =\n | \"anthropic\"\n | \"openai\"\n | \"azure\"\n | \"bedrock\"\n | \"google-vertex-ai\"\n | \"google-ai-studio\";\nexport const LlmAdapter = {\n Anthropic: \"anthropic\",\n OpenAi: \"openai\",\n Azure: \"azure\",\n Bedrock: \"bedrock\",\n GoogleVertexAi: \"google-vertex-ai\",\n GoogleAiStudio: \"google-ai-studio\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * The MIME type of the media record\n */\nexport type MediaContentType =\n | \"image/png\"\n | \"image/jpeg\"\n | \"image/jpg\"\n | \"image/webp\"\n | \"image/gif\"\n | \"image/svg+xml\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/avif\"\n | \"image/heic\"\n | \"audio/mpeg\"\n | \"audio/mp3\"\n | \"audio/wav\"\n | \"audio/ogg\"\n | \"audio/oga\"\n | \"audio/aac\"\n | \"audio/mp4\"\n | \"audio/flac\"\n | \"audio/opus\"\n | \"audio/webm\"\n | \"video/mp4\"\n | \"video/webm\"\n | \"video/ogg\"\n | \"video/mpeg\"\n | \"video/quicktime\"\n | \"video/x-msvideo\"\n | \"video/x-matroska\"\n | \"text/plain\"\n | \"text/html\"\n | \"text/css\"\n | \"text/csv\"\n | \"text/markdown\"\n | \"text/x-python\"\n | \"application/javascript\"\n | \"text/x-typescript\"\n | \"application/x-yaml\"\n | \"application/pdf\"\n | \"application/msword\"\n | \"application/vnd.ms-excel\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/zip\"\n | \"application/json\"\n | \"application/xml\"\n | \"application/octet-stream\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\"\n | \"application/rtf\"\n | \"application/x-ndjson\"\n | \"application/vnd.apache.parquet\"\n | \"application/gzip\"\n | \"application/x-tar\"\n | \"application/x-7z-compressed\";\nexport const MediaContentType = {\n ImagePng: \"image/png\",\n ImageJpeg: \"image/jpeg\",\n ImageJpg: \"image/jpg\",\n ImageWebp: \"image/webp\",\n ImageGif: \"image/gif\",\n ImageSvgXml: \"image/svg+xml\",\n ImageTiff: \"image/tiff\",\n ImageBmp: \"image/bmp\",\n ImageAvif: \"image/avif\",\n ImageHeic: \"image/heic\",\n AudioMpeg: \"audio/mpeg\",\n AudioMp3: \"audio/mp3\",\n AudioWav: \"audio/wav\",\n AudioOgg: \"audio/ogg\",\n AudioOga: \"audio/oga\",\n AudioAac: \"audio/aac\",\n AudioMp4: \"audio/mp4\",\n AudioFlac: \"audio/flac\",\n AudioOpus: \"audio/opus\",\n AudioWebm: \"audio/webm\",\n VideoMp4: \"video/mp4\",\n VideoWebm: \"video/webm\",\n VideoOgg: \"video/ogg\",\n VideoMpeg: \"video/mpeg\",\n VideoQuicktime: \"video/quicktime\",\n VideoXMsvideo: \"video/x-msvideo\",\n VideoXMatroska: \"video/x-matroska\",\n TextPlain: \"text/plain\",\n TextHtml: \"text/html\",\n TextCss: \"text/css\",\n TextCsv: \"text/csv\",\n TextMarkdown: \"text/markdown\",\n TextXPython: \"text/x-python\",\n ApplicationJavascript: \"application/javascript\",\n TextXTypescript: \"text/x-typescript\",\n ApplicationXYaml: \"application/x-yaml\",\n ApplicationPdf: \"application/pdf\",\n ApplicationMsword: \"application/msword\",\n ApplicationMsExcel: \"application/vnd.ms-excel\",\n ApplicationOpenxmlSpreadsheet:\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n ApplicationZip: \"application/zip\",\n ApplicationJson: \"application/json\",\n ApplicationXml: \"application/xml\",\n ApplicationOctetStream: \"application/octet-stream\",\n ApplicationOpenxmlWord:\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n ApplicationOpenxmlPresentation:\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n ApplicationRtf: \"application/rtf\",\n ApplicationXNdjson: \"application/x-ndjson\",\n ApplicationParquet: \"application/vnd.apache.parquet\",\n ApplicationGzip: \"application/gzip\",\n ApplicationXTar: \"application/x-tar\",\n ApplicationX7ZCompressed: \"application/x-7z-compressed\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type MembershipRole = \"OWNER\" | \"ADMIN\" | \"MEMBER\" | \"VIEWER\";\nexport const MembershipRole = {\n Owner: \"OWNER\",\n Admin: \"ADMIN\",\n Member: \"MEMBER\",\n Viewer: \"VIEWER\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nexport type PromptType = \"chat\" | \"text\";\nexport const PromptType = {\n Chat: \"chat\",\n Text: \"text\",\n} as const;\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./types/index.js\";\nexport * from \"./client/index.js\";\n","export * from \"./resources/index.js\";\n","export * from \"./types/index.js\";\n","export * from \"./client/index.js\";\n","import * as core from \"./index.js\";\n\nexport function mergeHeaders(\n ...headersArray: (\n | Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >\n | null\n | undefined\n )[]\n): Record<string, string | core.Supplier<string | null | undefined>> {\n const result: Record<\n string,\n string | core.Supplier<string | null | undefined>\n > = {};\n\n for (const [key, value] of headersArray\n .filter((headers) => headers != null)\n .flatMap((headers) => Object.entries(headers))) {\n if (value != null) {\n result[key] = value;\n } else if (key in result) {\n delete result[key];\n }\n }\n\n return result;\n}\n\nexport function mergeOnlyDefinedHeaders(\n ...headersArray: (\n | Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >\n | null\n | undefined\n )[]\n): Record<string, string | core.Supplier<string | null | undefined>> {\n const result: Record<\n string,\n string | core.Supplier<string | null | undefined>\n > = {};\n\n for (const [key, value] of headersArray\n .filter((headers) => headers != null)\n .flatMap((headers) => Object.entries(headers))) {\n if (value != null) {\n result[key] = value;\n }\n }\n\n return result;\n}\n","interface QueryStringOptions {\n arrayFormat?: \"indices\" | \"repeat\";\n encode?: boolean;\n}\n\nconst defaultQsOptions: Required<QueryStringOptions> = {\n arrayFormat: \"indices\",\n encode: true,\n} as const;\n\nfunction encodeValue(value: unknown, shouldEncode: boolean): string {\n if (value === undefined) {\n return \"\";\n }\n if (value === null) {\n return \"\";\n }\n const stringValue = String(value);\n return shouldEncode ? encodeURIComponent(stringValue) : stringValue;\n}\n\nfunction stringifyObject(\n obj: Record<string, unknown>,\n prefix = \"\",\n options: Required<QueryStringOptions>,\n): string[] {\n const parts: string[] = [];\n\n for (const [key, value] of Object.entries(obj)) {\n const fullKey = prefix ? `${prefix}[${key}]` : key;\n\n if (value === undefined) {\n continue;\n }\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n continue;\n }\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n if (item === undefined) {\n continue;\n }\n if (typeof item === \"object\" && !Array.isArray(item) && item !== null) {\n const arrayKey =\n options.arrayFormat === \"indices\" ? `${fullKey}[${i}]` : fullKey;\n parts.push(\n ...stringifyObject(\n item as Record<string, unknown>,\n arrayKey,\n options,\n ),\n );\n } else {\n const arrayKey =\n options.arrayFormat === \"indices\" ? `${fullKey}[${i}]` : fullKey;\n const encodedKey = options.encode\n ? encodeURIComponent(arrayKey)\n : arrayKey;\n parts.push(`${encodedKey}=${encodeValue(item, options.encode)}`);\n }\n }\n } else if (typeof value === \"object\" && value !== null) {\n if (Object.keys(value as Record<string, unknown>).length === 0) {\n continue;\n }\n parts.push(\n ...stringifyObject(value as Record<string, unknown>, fullKey, options),\n );\n } else {\n const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;\n parts.push(`${encodedKey}=${encodeValue(value, options.encode)}`);\n }\n }\n\n return parts;\n}\n\nexport function toQueryString(\n obj: unknown,\n options?: QueryStringOptions,\n): string {\n if (obj == null || typeof obj !== \"object\") {\n return \"\";\n }\n\n const parts = stringifyObject(obj as Record<string, unknown>, \"\", {\n ...defaultQsOptions,\n ...options,\n });\n return parts.join(\"&\");\n}\n","import { toQueryString } from \"../url/qs.js\";\n\nexport function createRequestUrl(\n baseUrl: string,\n queryParameters?: Record<string, unknown>,\n): string {\n const queryString = toQueryString(queryParameters, { arrayFormat: \"repeat\" });\n return queryString ? `${baseUrl}?${queryString}` : baseUrl;\n}\n","import { ResponseWithBody } from \"./ResponseWithBody.js\";\n\nexport type BinaryResponse = {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */\n bodyUsed: boolean;\n /**\n * Returns a ReadableStream of the response body.\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body)\n */\n stream: () => ReadableStream<Uint8Array>;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */\n arrayBuffer: () => Promise<ArrayBuffer>;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */\n blob: () => Promise<Blob>;\n /**\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)\n * Some versions of the Fetch API may not support this method.\n */\n bytes?(): Promise<Uint8Array>;\n};\n\nexport function getBinaryResponse(response: ResponseWithBody): BinaryResponse {\n const binaryResponse: BinaryResponse = {\n get bodyUsed() {\n return response.bodyUsed;\n },\n stream: () => response.body,\n arrayBuffer: response.arrayBuffer.bind(response),\n blob: response.blob.bind(response),\n };\n if (\"bytes\" in response && typeof response.bytes === \"function\") {\n binaryResponse.bytes = response.bytes.bind(response);\n }\n\n return binaryResponse;\n}\n","export type ResponseWithBody = Response & {\n body: ReadableStream<Uint8Array>;\n};\n\nexport function isResponseWithBody(\n response: Response,\n): response is ResponseWithBody {\n return (response as ResponseWithBody).body != null;\n}\n","import { getBinaryResponse } from \"./BinaryResponse.js\";\nimport { isResponseWithBody } from \"./ResponseWithBody.js\";\nimport { fromJson } from \"../json.js\";\n\nexport async function getResponseBody(\n response: Response,\n responseType?: string,\n): Promise<unknown> {\n if (!isResponseWithBody(response)) {\n return undefined;\n }\n switch (responseType) {\n case \"binary-response\":\n return getBinaryResponse(response);\n case \"blob\":\n return await response.blob();\n case \"arrayBuffer\":\n return await response.arrayBuffer();\n case \"sse\":\n return response.body;\n case \"streaming\":\n return response.body;\n\n case \"text\":\n return await response.text();\n }\n\n // if responseType is \"json\" or not specified, try to parse as JSON\n const text = await response.text();\n if (text.length > 0) {\n try {\n let responseBody = fromJson(text);\n return responseBody;\n } catch (err) {\n return {\n ok: false,\n error: {\n reason: \"non-json\",\n statusCode: response.status,\n rawBody: text,\n },\n };\n }\n }\n return undefined;\n}\n","import { fromJson } from \"../json.js\";\nimport { getResponseBody } from \"./getResponseBody.js\";\n\nexport async function getErrorResponseBody(\n response: Response,\n): Promise<unknown> {\n let contentType = response.headers.get(\"Content-Type\")?.toLowerCase();\n if (contentType == null || contentType.length === 0) {\n return getResponseBody(response);\n }\n\n if (contentType.indexOf(\";\") !== -1) {\n contentType = contentType.split(\";\")[0]?.trim() ?? \"\";\n }\n switch (contentType) {\n case \"application/hal+json\":\n case \"application/json\":\n case \"application/ld+json\":\n case \"application/problem+json\":\n case \"application/vnd.api+json\":\n case \"text/json\":\n const text = await response.text();\n return text.length > 0 ? fromJson(text) : undefined;\n default:\n if (\n contentType.startsWith(\"application/vnd.\") &&\n contentType.endsWith(\"+json\")\n ) {\n const text = await response.text();\n return text.length > 0 ? fromJson(text) : undefined;\n }\n\n // Fallback to plain text if content type is not recognized\n // Even if no body is present, the response will be an empty string\n return await response.text();\n }\n}\n","export async function getFetchFn(): Promise<typeof fetch> {\n return fetch;\n}\n","import { toJson } from \"../json.js\";\n\nexport declare namespace GetRequestBody {\n interface Args {\n body: unknown;\n type: \"json\" | \"file\" | \"bytes\" | \"other\";\n }\n}\n\nexport async function getRequestBody({\n body,\n type,\n}: GetRequestBody.Args): Promise<BodyInit | undefined> {\n if (type.includes(\"json\")) {\n return toJson(body);\n } else {\n return body as BodyInit;\n }\n}\n","const TIMEOUT = \"timeout\";\n\nexport function getTimeoutSignal(timeoutMs: number): {\n signal: AbortSignal;\n abortId: NodeJS.Timeout;\n} {\n const controller = new AbortController();\n const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);\n return { signal: controller.signal, abortId };\n}\n\n/**\n * Returns an abort signal that is getting aborted when\n * at least one of the specified abort signals is aborted.\n *\n * Requires at least node.js 18.\n */\nexport function anySignal(\n ...args: AbortSignal[] | [AbortSignal[]]\n): AbortSignal {\n // Allowing signals to be passed either as array\n // of signals or as multiple arguments.\n const signals = (\n args.length === 1 && Array.isArray(args[0]) ? args[0] : args\n ) as AbortSignal[];\n\n const controller = new AbortController();\n\n for (const signal of signals) {\n if (signal.aborted) {\n // Exiting early if one of the signals\n // is already aborted.\n controller.abort((signal as any)?.reason);\n break;\n }\n\n // Listening for signals and removing the listeners\n // when at least one symbol is aborted.\n signal.addEventListener(\n \"abort\",\n () => controller.abort((signal as any)?.reason),\n {\n signal: controller.signal,\n },\n );\n }\n\n return controller.signal;\n}\n","import { anySignal, getTimeoutSignal } from \"./signals.js\";\n\nexport const makeRequest = async (\n fetchFn: (url: string, init: RequestInit) => Promise<Response>,\n url: string,\n method: string,\n headers: Record<string, string>,\n requestBody: BodyInit | undefined,\n timeoutMs?: number,\n abortSignal?: AbortSignal,\n withCredentials?: boolean,\n duplex?: \"half\",\n): Promise<Response> => {\n const signals: AbortSignal[] = [];\n\n // Add timeout signal\n let timeoutAbortId: NodeJS.Timeout | undefined = undefined;\n if (timeoutMs != null) {\n const { signal, abortId } = getTimeoutSignal(timeoutMs);\n timeoutAbortId = abortId;\n signals.push(signal);\n }\n\n // Add arbitrary signal\n if (abortSignal != null) {\n signals.push(abortSignal);\n }\n let newSignals = anySignal(signals);\n const response = await fetchFn(url, {\n method: method,\n headers,\n body: requestBody,\n signal: newSignals,\n credentials: withCredentials ? \"include\" : undefined,\n // @ts-ignore\n duplex,\n });\n\n if (timeoutAbortId != null) {\n clearTimeout(timeoutAbortId);\n }\n\n return response;\n};\n","let Headers: typeof globalThis.Headers;\n\nif (typeof globalThis.Headers !== \"undefined\") {\n Headers = globalThis.Headers;\n} else {\n Headers = class Headers implements Headers {\n private headers: Map<string, string[]>;\n\n constructor(init?: HeadersInit) {\n this.headers = new Map();\n\n if (init) {\n if (init instanceof Headers) {\n init.forEach((value, key) => this.append(key, value));\n } else if (Array.isArray(init)) {\n for (const [key, value] of init) {\n if (typeof key === \"string\" && typeof value === \"string\") {\n this.append(key, value);\n } else {\n throw new TypeError(\n \"Each header entry must be a [string, string] tuple\",\n );\n }\n }\n } else {\n for (const [key, value] of Object.entries(init)) {\n if (typeof value === \"string\") {\n this.append(key, value);\n } else {\n throw new TypeError(\"Header values must be strings\");\n }\n }\n }\n }\n }\n\n append(name: string, value: string): void {\n const key = name.toLowerCase();\n const existing = this.headers.get(key) || [];\n this.headers.set(key, [...existing, value]);\n }\n\n delete(name: string): void {\n const key = name.toLowerCase();\n this.headers.delete(key);\n }\n\n get(name: string): string | null {\n const key = name.toLowerCase();\n const values = this.headers.get(key);\n return values ? values.join(\", \") : null;\n }\n\n has(name: string): boolean {\n const key = name.toLowerCase();\n return this.headers.has(key);\n }\n\n set(name: string, value: string): void {\n const key = name.toLowerCase();\n this.headers.set(key, [value]);\n }\n\n forEach(\n callbackfn: (value: string, key: string, parent: Headers) => void,\n thisArg?: unknown,\n ): void {\n const boundCallback = thisArg ? callbackfn.bind(thisArg) : callbackfn;\n this.headers.forEach((values, key) =>\n boundCallback(values.join(\", \"), key, this),\n );\n }\n\n getSetCookie(): string[] {\n return this.headers.get(\"set-cookie\") || [];\n }\n\n *entries(): HeadersIterator<[string, string]> {\n for (const [key, values] of this.headers.entries()) {\n yield [key, values.join(\", \")];\n }\n }\n\n *keys(): HeadersIterator<string> {\n yield* this.headers.keys();\n }\n\n *values(): HeadersIterator<string> {\n for (const values of this.headers.values()) {\n yield values.join(\", \");\n }\n }\n\n [Symbol.iterator](): HeadersIterator<[string, string]> {\n return this.entries();\n }\n };\n}\n\nexport { Headers };\n","import { Headers } from \"./Headers.js\";\n\n/**\n * The raw response from the fetch call excluding the body.\n */\nexport type RawResponse = Omit<\n {\n [K in keyof Response as Response[K] extends Function\n ? never\n : K]: Response[K]; // strips out functions\n },\n \"ok\" | \"body\" | \"bodyUsed\"\n>; // strips out body and bodyUsed\n\n/**\n * A raw response indicating that the request was aborted.\n */\nexport const abortRawResponse: RawResponse = {\n headers: new Headers(),\n redirected: false,\n status: 499,\n statusText: \"Client Closed Request\",\n type: \"error\",\n url: \"\",\n} as const;\n\n/**\n * A raw response indicating an unknown error.\n */\nexport const unknownRawResponse: RawResponse = {\n headers: new Headers(),\n redirected: false,\n status: 0,\n statusText: \"Unknown Error\",\n type: \"error\",\n url: \"\",\n} as const;\n\n/**\n * Converts a `RawResponse` object into a `RawResponse` by extracting its properties,\n * excluding the `body` and `bodyUsed` fields.\n *\n * @param response - The `RawResponse` object to convert.\n * @returns A `RawResponse` object containing the extracted properties of the input response.\n */\nexport function toRawResponse(response: Response): RawResponse {\n return {\n headers: response.headers,\n redirected: response.redirected,\n status: response.status,\n statusText: response.statusText,\n type: response.type,\n url: response.url,\n };\n}\n\n/**\n * Creates a `RawResponse` from a standard `Response` object.\n */\nexport interface WithRawResponse<T> {\n readonly data: T;\n readonly rawResponse: RawResponse;\n}\n","const INITIAL_RETRY_DELAY = 1000; // in milliseconds\nconst MAX_RETRY_DELAY = 60000; // in milliseconds\nconst DEFAULT_MAX_RETRIES = 2;\nconst JITTER_FACTOR = 0.2; // 20% random jitter\n\nfunction addPositiveJitter(delay: number): number {\n // Generate a random value between 0 and +JITTER_FACTOR\n const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;\n return delay * jitterMultiplier;\n}\n\nfunction addSymmetricJitter(delay: number): number {\n // Generate a random value in a JITTER_FACTOR-sized percentage range around delay\n const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR;\n return delay * jitterMultiplier;\n}\n\nfunction getRetryDelayFromHeaders(\n response: Response,\n retryAttempt: number,\n): number {\n // Check for Retry-After header first (RFC 7231), with no jitter\n const retryAfter = response.headers.get(\"Retry-After\");\n if (retryAfter) {\n // Parse as number of seconds...\n const retryAfterSeconds = parseInt(retryAfter, 10);\n if (!isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {\n return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);\n }\n\n // ...or as an HTTP date; both are valid\n const retryAfterDate = new Date(retryAfter);\n if (!isNaN(retryAfterDate.getTime())) {\n const delay = retryAfterDate.getTime() - Date.now();\n if (delay > 0) {\n return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);\n }\n }\n }\n\n // Then check for industry-standard X-RateLimit-Reset header, with positive jitter\n const rateLimitReset = response.headers.get(\"X-RateLimit-Reset\");\n if (rateLimitReset) {\n const resetTime = parseInt(rateLimitReset, 10);\n if (!isNaN(resetTime)) {\n // Assume Unix timestamp in epoch seconds\n const delay = resetTime * 1000 - Date.now();\n if (delay > 0) {\n return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY));\n }\n }\n }\n\n // Fall back to exponential backoff, with symmetric jitter\n return addSymmetricJitter(\n Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY),\n );\n}\n\nexport async function requestWithRetries(\n requestFn: () => Promise<Response>,\n maxRetries: number = DEFAULT_MAX_RETRIES,\n): Promise<Response> {\n let response: Response = await requestFn();\n\n for (let i = 0; i < maxRetries; ++i) {\n if ([408, 429].includes(response.status) || response.status >= 500) {\n // Get delay with appropriate jitter applied\n const delay = getRetryDelayFromHeaders(response, i);\n\n await new Promise((resolve) => setTimeout(resolve, delay));\n response = await requestFn();\n } else {\n break;\n }\n }\n return response!;\n}\n","export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);\n\nexport const Supplier = {\n get: async <T>(supplier: Supplier<T>): Promise<T> => {\n if (typeof supplier === \"function\") {\n return (supplier as () => T)();\n } else {\n return supplier;\n }\n },\n};\n","import { toJson } from \"../json.js\";\nimport { APIResponse } from \"./APIResponse.js\";\nimport { createRequestUrl } from \"./createRequestUrl.js\";\nimport { getErrorResponseBody } from \"./getErrorResponseBody.js\";\nimport { getFetchFn } from \"./getFetchFn.js\";\nimport { getRequestBody } from \"./getRequestBody.js\";\nimport { getResponseBody } from \"./getResponseBody.js\";\nimport { makeRequest } from \"./makeRequest.js\";\nimport {\n abortRawResponse,\n toRawResponse,\n unknownRawResponse,\n} from \"./RawResponse.js\";\nimport { requestWithRetries } from \"./requestWithRetries.js\";\nimport { Supplier } from \"./Supplier.js\";\n\nexport type FetchFunction = <R = unknown>(\n args: Fetcher.Args,\n) => Promise<APIResponse<R, Fetcher.Error>>;\n\nexport declare namespace Fetcher {\n export interface Args {\n url: string;\n method: string;\n contentType?: string;\n headers?: Record<\n string,\n string | Supplier<string | null | undefined> | null | undefined\n >;\n queryParameters?: Record<string, unknown>;\n body?: unknown;\n timeoutMs?: number;\n maxRetries?: number;\n withCredentials?: boolean;\n abortSignal?: AbortSignal;\n requestType?: \"json\" | \"file\" | \"bytes\";\n responseType?:\n | \"json\"\n | \"blob\"\n | \"sse\"\n | \"streaming\"\n | \"text\"\n | \"arrayBuffer\"\n | \"binary-response\";\n duplex?: \"half\";\n }\n\n export type Error =\n | FailedStatusCodeError\n | NonJsonError\n | TimeoutError\n | UnknownError;\n\n export interface FailedStatusCodeError {\n reason: \"status-code\";\n statusCode: number;\n body: unknown;\n }\n\n export interface NonJsonError {\n reason: \"non-json\";\n statusCode: number;\n rawBody: string;\n }\n\n export interface TimeoutError {\n reason: \"timeout\";\n }\n\n export interface UnknownError {\n reason: \"unknown\";\n errorMessage: string;\n }\n}\n\nasync function getHeaders(args: Fetcher.Args): Promise<Record<string, string>> {\n const newHeaders: Record<string, string> = {};\n if (args.body !== undefined && args.contentType != null) {\n newHeaders[\"Content-Type\"] = args.contentType;\n }\n\n if (args.headers == null) {\n return newHeaders;\n }\n\n for (const [key, value] of Object.entries(args.headers)) {\n const result = await Supplier.get(value);\n if (typeof result === \"string\") {\n newHeaders[key] = result;\n continue;\n }\n if (result == null) {\n continue;\n }\n newHeaders[key] = `${result}`;\n }\n return newHeaders;\n}\n\nexport async function fetcherImpl<R = unknown>(\n args: Fetcher.Args,\n): Promise<APIResponse<R, Fetcher.Error>> {\n const url = createRequestUrl(args.url, args.queryParameters);\n const requestBody: BodyInit | undefined = await getRequestBody({\n body: args.body,\n type: args.requestType === \"json\" ? \"json\" : \"other\",\n });\n const fetchFn = await getFetchFn();\n\n try {\n const response = await requestWithRetries(\n async () =>\n makeRequest(\n fetchFn,\n url,\n args.method,\n await getHeaders(args),\n requestBody,\n args.timeoutMs,\n args.abortSignal,\n args.withCredentials,\n args.duplex,\n ),\n args.maxRetries,\n );\n\n if (response.status >= 200 && response.status < 400) {\n return {\n ok: true,\n body: (await getResponseBody(response, args.responseType)) as R,\n headers: response.headers,\n rawResponse: toRawResponse(response),\n };\n } else {\n return {\n ok: false,\n error: {\n reason: \"status-code\",\n statusCode: response.status,\n body: await getErrorResponseBody(response),\n },\n rawResponse: toRawResponse(response),\n };\n }\n } catch (error) {\n if (args.abortSignal != null && args.abortSignal.aborted) {\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: \"The user aborted a request\",\n },\n rawResponse: abortRawResponse,\n };\n } else if (error instanceof Error && error.name === \"AbortError\") {\n return {\n ok: false,\n error: {\n reason: \"timeout\",\n },\n rawResponse: abortRawResponse,\n };\n } else if (error instanceof Error) {\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: error.message,\n },\n rawResponse: unknownRawResponse,\n };\n }\n\n return {\n ok: false,\n error: {\n reason: \"unknown\",\n errorMessage: toJson(error),\n },\n rawResponse: unknownRawResponse,\n };\n }\n}\n\nexport const fetcher: FetchFunction = fetcherImpl;\n","import { WithRawResponse } from \"./RawResponse.js\";\n\n/**\n * A promise that returns the parsed response and lets you retrieve the raw response too.\n */\nexport class HttpResponsePromise<T> extends Promise<T> {\n private innerPromise: Promise<WithRawResponse<T>>;\n private unwrappedPromise: Promise<T> | undefined;\n\n private constructor(promise: Promise<WithRawResponse<T>>) {\n // Initialize with a no-op to avoid premature parsing\n super((resolve) => {\n resolve(undefined as unknown as T);\n });\n this.innerPromise = promise;\n }\n\n /**\n * Creates an `HttpResponsePromise` from a function that returns a promise.\n *\n * @param fn - A function that returns a promise resolving to a `WithRawResponse` object.\n * @param args - Arguments to pass to the function.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromFunction<\n F extends (...args: never[]) => Promise<WithRawResponse<T>>,\n T,\n >(fn: F, ...args: Parameters<F>): HttpResponsePromise<T> {\n return new HttpResponsePromise<T>(fn(...args));\n }\n\n /**\n * Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.\n *\n * @param fn - A function that returns a promise resolving to a `WithRawResponse` object.\n * @returns A function that returns an `HttpResponsePromise` instance.\n */\n public static interceptFunction<\n F extends (...args: never[]) => Promise<WithRawResponse<T>>,\n T = Awaited<ReturnType<F>>[\"data\"],\n >(fn: F): (...args: Parameters<F>) => HttpResponsePromise<T> {\n return (...args: Parameters<F>): HttpResponsePromise<T> => {\n return HttpResponsePromise.fromPromise<T>(fn(...args));\n };\n }\n\n /**\n * Creates an `HttpResponsePromise` from an existing promise.\n *\n * @param promise - A promise resolving to a `WithRawResponse` object.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromPromise<T>(\n promise: Promise<WithRawResponse<T>>,\n ): HttpResponsePromise<T> {\n return new HttpResponsePromise<T>(promise);\n }\n\n /**\n * Creates an `HttpResponsePromise` from an executor function.\n *\n * @param executor - A function that takes resolve and reject callbacks to create a promise.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromExecutor<T>(\n executor: (\n resolve: (value: WithRawResponse<T>) => void,\n reject: (reason?: unknown) => void,\n ) => void,\n ): HttpResponsePromise<T> {\n const promise = new Promise<WithRawResponse<T>>(executor);\n return new HttpResponsePromise<T>(promise);\n }\n\n /**\n * Creates an `HttpResponsePromise` from a resolved result.\n *\n * @param result - A `WithRawResponse` object to resolve immediately.\n * @returns An `HttpResponsePromise` instance.\n */\n public static fromResult<T>(\n result: WithRawResponse<T>,\n ): HttpResponsePromise<T> {\n const promise = Promise.resolve(result);\n return new HttpResponsePromise<T>(promise);\n }\n\n private unwrap(): Promise<T> {\n if (!this.unwrappedPromise) {\n this.unwrappedPromise = this.innerPromise.then(({ data }) => data);\n }\n return this.unwrappedPromise;\n }\n\n /** @inheritdoc */\n public override then<TResult1 = T, TResult2 = never>(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,\n ): Promise<TResult1 | TResult2> {\n return this.unwrap().then(onfulfilled, onrejected);\n }\n\n /** @inheritdoc */\n public override catch<TResult = never>(\n onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,\n ): Promise<T | TResult> {\n return this.unwrap().catch(onrejected);\n }\n\n /** @inheritdoc */\n public override finally(onfinally?: (() => void) | null): Promise<T> {\n return this.unwrap().finally(onfinally);\n }\n\n /**\n * Retrieves the data and raw response.\n *\n * @returns A promise resolving to a `WithRawResponse` object.\n */\n public async withRawResponse(): Promise<WithRawResponse<T>> {\n return await this.innerPromise;\n }\n}\n","export { join } from \"./join.js\";\nexport { toQueryString } from \"./qs.js\";\n","export function join(base: string, ...segments: string[]): string {\n if (!base) {\n return \"\";\n }\n\n if (segments.length === 0) {\n return base;\n }\n\n if (base.includes(\"://\")) {\n let url: URL;\n try {\n url = new URL(base);\n } catch {\n // Fallback to path joining if URL is malformed\n return joinPath(base, ...segments);\n }\n\n const lastSegment = segments[segments.length - 1];\n const shouldPreserveTrailingSlash =\n lastSegment && lastSegment.endsWith(\"/\");\n\n for (const segment of segments) {\n const cleanSegment = trimSlashes(segment);\n if (cleanSegment) {\n url.pathname = joinPathSegments(url.pathname, cleanSegment);\n }\n }\n\n if (shouldPreserveTrailingSlash && !url.pathname.endsWith(\"/\")) {\n url.pathname += \"/\";\n }\n\n return url.toString();\n }\n\n return joinPath(base, ...segments);\n}\n\nfunction joinPath(base: string, ...segments: string[]): string {\n if (segments.length === 0) {\n return base;\n }\n\n let result = base;\n\n const lastSegment = segments[segments.length - 1];\n const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith(\"/\");\n\n for (const segment of segments) {\n const cleanSegment = trimSlashes(segment);\n if (cleanSegment) {\n result = joinPathSegments(result, cleanSegment);\n }\n }\n\n if (shouldPreserveTrailingSlash && !result.endsWith(\"/\")) {\n result += \"/\";\n }\n\n return result;\n}\n\nfunction joinPathSegments(left: string, right: string): string {\n if (left.endsWith(\"/\")) {\n return left + right;\n }\n return left + \"/\" + right;\n}\n\nfunction trimSlashes(str: string): string {\n if (!str) return str;\n\n let start = 0;\n let end = str.length;\n\n if (str.startsWith(\"/\")) start = 1;\n if (str.endsWith(\"/\")) end = str.length - 1;\n\n return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n","function base64ToBytes(base64: string): Uint8Array {\n const binString = atob(base64);\n return Uint8Array.from(binString, (m) => m.codePointAt(0)!);\n}\n\nfunction bytesToBase64(bytes: Uint8Array): string {\n const binString = String.fromCodePoint(...bytes);\n return btoa(binString);\n}\n\nexport function base64Encode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"utf8\").toString(\"base64\");\n }\n\n const bytes = new TextEncoder().encode(input);\n return bytesToBase64(bytes);\n}\n\nexport function base64Decode(input: string): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(input, \"base64\").toString(\"utf8\");\n }\n\n const bytes = base64ToBytes(input);\n return new TextDecoder().decode(bytes);\n}\n","import { base64Decode, base64Encode } from \"../base64.js\";\n\nexport interface BasicAuth {\n username: string;\n password: string;\n}\n\nconst BASIC_AUTH_HEADER_PREFIX = /^Basic /i;\n\nexport const BasicAuth = {\n toAuthorizationHeader: (\n basicAuth: BasicAuth | undefined,\n ): string | undefined => {\n if (basicAuth == null) {\n return undefined;\n }\n const token = base64Encode(`${basicAuth.username}:${basicAuth.password}`);\n return `Basic ${token}`;\n },\n fromAuthorizationHeader: (header: string): BasicAuth => {\n const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, \"\");\n const decoded = base64Decode(credentials);\n const [username, password] = decoded.split(\":\", 2);\n\n if (username == null || password == null) {\n throw new Error(\"Invalid basic auth\");\n }\n return {\n username,\n password,\n };\n },\n};\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace AnnotationQueues {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class AnnotationQueues {\n protected readonly _options: AnnotationQueues.Options;\n\n constructor(_options: AnnotationQueues.Options) {\n this._options = _options;\n }\n\n /**\n * Get all annotation queues\n *\n * @param {LangfuseAPI.GetAnnotationQueuesRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.listQueues()\n */\n public listQueues(\n request: LangfuseAPI.GetAnnotationQueuesRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedAnnotationQueues> {\n return core.HttpResponsePromise.fromPromise(\n this.__listQueues(request, requestOptions),\n );\n }\n\n private async __listQueues(\n request: LangfuseAPI.GetAnnotationQueuesRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedAnnotationQueues>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/annotation-queues\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedAnnotationQueues,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create an annotation queue\n *\n * @param {LangfuseAPI.CreateAnnotationQueueRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.createQueue({\n * name: \"name\",\n * description: undefined,\n * scoreConfigIds: [\"scoreConfigIds\", \"scoreConfigIds\"]\n * })\n */\n public createQueue(\n request: LangfuseAPI.CreateAnnotationQueueRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueue> {\n return core.HttpResponsePromise.fromPromise(\n this.__createQueue(request, requestOptions),\n );\n }\n\n private async __createQueue(\n request: LangfuseAPI.CreateAnnotationQueueRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueue>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/annotation-queues\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueue,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/annotation-queues.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get an annotation queue by ID\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.getQueue(\"queueId\")\n */\n public getQueue(\n queueId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueue> {\n return core.HttpResponsePromise.fromPromise(\n this.__getQueue(queueId, requestOptions),\n );\n }\n\n private async __getQueue(\n queueId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueue>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueue,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues/{queueId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get items for a specific annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.GetAnnotationQueueItemsRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.listQueueItems(\"queueId\")\n */\n public listQueueItems(\n queueId: string,\n request: LangfuseAPI.GetAnnotationQueueItemsRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedAnnotationQueueItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__listQueueItems(queueId, request, requestOptions),\n );\n }\n\n private async __listQueueItems(\n queueId: string,\n request: LangfuseAPI.GetAnnotationQueueItemsRequest = {},\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedAnnotationQueueItems>> {\n const { status, page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (status != null) {\n _queryParams[\"status\"] = status;\n }\n\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedAnnotationQueueItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues/{queueId}/items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a specific item from an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {string} itemId - The unique identifier of the annotation queue item\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.getQueueItem(\"queueId\", \"itemId\")\n */\n public getQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueueItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__getQueueItem(queueId, itemId, requestOptions),\n );\n }\n\n private async __getQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueueItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items/${encodeURIComponent(itemId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueueItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/annotation-queues/{queueId}/items/{itemId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Add an item to an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.CreateAnnotationQueueItemRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.createQueueItem(\"queueId\", {\n * objectId: \"objectId\",\n * objectType: \"TRACE\",\n * status: undefined\n * })\n */\n public createQueueItem(\n queueId: string,\n request: LangfuseAPI.CreateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueueItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__createQueueItem(queueId, request, requestOptions),\n );\n }\n\n private async __createQueueItem(\n queueId: string,\n request: LangfuseAPI.CreateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueueItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueueItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/annotation-queues/{queueId}/items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Update an annotation queue item\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {string} itemId - The unique identifier of the annotation queue item\n * @param {LangfuseAPI.UpdateAnnotationQueueItemRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.updateQueueItem(\"queueId\", \"itemId\", {\n * status: undefined\n * })\n */\n public updateQueueItem(\n queueId: string,\n itemId: string,\n request: LangfuseAPI.UpdateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.AnnotationQueueItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__updateQueueItem(queueId, itemId, request, requestOptions),\n );\n }\n\n private async __updateQueueItem(\n queueId: string,\n itemId: string,\n request: LangfuseAPI.UpdateAnnotationQueueItemRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.AnnotationQueueItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items/${encodeURIComponent(itemId)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.AnnotationQueueItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/annotation-queues/{queueId}/items/{itemId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Remove an item from an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {string} itemId - The unique identifier of the annotation queue item\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.deleteQueueItem(\"queueId\", \"itemId\")\n */\n public deleteQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteAnnotationQueueItemResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteQueueItem(queueId, itemId, requestOptions),\n );\n }\n\n private async __deleteQueueItem(\n queueId: string,\n itemId: string,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.DeleteAnnotationQueueItemResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/items/${encodeURIComponent(itemId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteAnnotationQueueItemResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/annotation-queues/{queueId}/items/{itemId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create an assignment for a user to an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.AnnotationQueueAssignmentRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.createQueueAssignment(\"queueId\", {\n * userId: \"userId\"\n * })\n */\n public createQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.CreateAnnotationQueueAssignmentResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__createQueueAssignment(queueId, request, requestOptions),\n );\n }\n\n private async __createQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.CreateAnnotationQueueAssignmentResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/assignments`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.CreateAnnotationQueueAssignmentResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/annotation-queues/{queueId}/assignments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete an assignment for a user to an annotation queue\n *\n * @param {string} queueId - The unique identifier of the annotation queue\n * @param {LangfuseAPI.AnnotationQueueAssignmentRequest} request\n * @param {AnnotationQueues.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.annotationQueues.deleteQueueAssignment(\"queueId\", {\n * userId: \"userId\"\n * })\n */\n public deleteQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteAnnotationQueueAssignmentResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteQueueAssignment(queueId, request, requestOptions),\n );\n }\n\n private async __deleteQueueAssignment(\n queueId: string,\n request: LangfuseAPI.AnnotationQueueAssignmentRequest,\n requestOptions?: AnnotationQueues.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.DeleteAnnotationQueueAssignmentResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/annotation-queues/${encodeURIComponent(queueId)}/assignments`,\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteAnnotationQueueAssignmentResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/annotation-queues/{queueId}/assignments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace BlobStorageIntegrations {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class BlobStorageIntegrations {\n protected readonly _options: BlobStorageIntegrations.Options;\n\n constructor(_options: BlobStorageIntegrations.Options) {\n this._options = _options;\n }\n\n /**\n * Get all blob storage integrations for the organization (requires organization-scoped API key)\n *\n * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.blobStorageIntegrations.getBlobStorageIntegrations()\n */\n public getBlobStorageIntegrations(\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.BlobStorageIntegrationsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getBlobStorageIntegrations(requestOptions),\n );\n }\n\n private async __getBlobStorageIntegrations(\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.BlobStorageIntegrationsResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/integrations/blob-storage\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.BlobStorageIntegrationsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/integrations/blob-storage.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update a blob storage integration for a specific project (requires organization-scoped API key). The configuration is validated by performing a test upload to the bucket.\n *\n * @param {LangfuseAPI.CreateBlobStorageIntegrationRequest} request\n * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.blobStorageIntegrations.upsertBlobStorageIntegration({\n * projectId: \"projectId\",\n * type: \"S3\",\n * bucketName: \"bucketName\",\n * endpoint: undefined,\n * region: \"region\",\n * accessKeyId: undefined,\n * secretAccessKey: undefined,\n * prefix: undefined,\n * exportFrequency: \"hourly\",\n * enabled: true,\n * forcePathStyle: true,\n * fileType: \"JSON\",\n * exportMode: \"FULL_HISTORY\",\n * exportStartDate: undefined\n * })\n */\n public upsertBlobStorageIntegration(\n request: LangfuseAPI.CreateBlobStorageIntegrationRequest,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.BlobStorageIntegrationResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__upsertBlobStorageIntegration(request, requestOptions),\n );\n }\n\n private async __upsertBlobStorageIntegration(\n request: LangfuseAPI.CreateBlobStorageIntegrationRequest,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.BlobStorageIntegrationResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/integrations/blob-storage\",\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.BlobStorageIntegrationResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/integrations/blob-storage.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a blob storage integration by ID (requires organization-scoped API key)\n *\n * @param {string} id\n * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.blobStorageIntegrations.deleteBlobStorageIntegration(\"id\")\n */\n public deleteBlobStorageIntegration(\n id: string,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.BlobStorageIntegrationDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteBlobStorageIntegration(id, requestOptions),\n );\n }\n\n private async __deleteBlobStorageIntegration(\n id: string,\n requestOptions?: BlobStorageIntegrations.RequestOptions,\n ): Promise<\n core.WithRawResponse<LangfuseAPI.BlobStorageIntegrationDeletionResponse>\n > {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/integrations/blob-storage/${encodeURIComponent(id)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.BlobStorageIntegrationDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/integrations/blob-storage/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Comments {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Comments {\n protected readonly _options: Comments.Options;\n\n constructor(_options: Comments.Options) {\n this._options = _options;\n }\n\n /**\n * Create a comment. Comments may be attached to different object types (trace, observation, session, prompt).\n *\n * @param {LangfuseAPI.CreateCommentRequest} request\n * @param {Comments.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.comments.create({\n * projectId: \"projectId\",\n * objectType: \"objectType\",\n * objectId: \"objectId\",\n * content: \"content\",\n * authorUserId: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateCommentRequest,\n requestOptions?: Comments.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.CreateCommentResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateCommentRequest,\n requestOptions?: Comments.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.CreateCommentResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/comments\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.CreateCommentResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/comments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all comments\n *\n * @param {LangfuseAPI.GetCommentsRequest} request\n * @param {Comments.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.comments.get()\n */\n public get(\n request: LangfuseAPI.GetCommentsRequest = {},\n requestOptions?: Comments.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetCommentsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(request, requestOptions),\n );\n }\n\n private async __get(\n request: LangfuseAPI.GetCommentsRequest = {},\n requestOptions?: Comments.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetCommentsResponse>> {\n const { page, limit, objectType, objectId, authorUserId } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (objectType != null) {\n _queryParams[\"objectType\"] = objectType;\n }\n\n if (objectId != null) {\n _queryParams[\"objectId\"] = objectId;\n }\n\n if (authorUserId != null) {\n _queryParams[\"authorUserId\"] = authorUserId;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/comments\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetCommentsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/comments.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a comment by id\n *\n * @param {string} commentId - The unique langfuse identifier of a comment\n * @param {Comments.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.comments.getById(\"commentId\")\n */\n public getById(\n commentId: string,\n requestOptions?: Comments.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Comment> {\n return core.HttpResponsePromise.fromPromise(\n this.__getById(commentId, requestOptions),\n );\n }\n\n private async __getById(\n commentId: string,\n requestOptions?: Comments.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Comment>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/comments/${encodeURIComponent(commentId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Comment,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/comments/{commentId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace DatasetItems {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class DatasetItems {\n protected readonly _options: DatasetItems.Options;\n\n constructor(_options: DatasetItems.Options) {\n this._options = _options;\n }\n\n /**\n * Create a dataset item\n *\n * @param {LangfuseAPI.CreateDatasetItemRequest} request\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.create({\n * datasetName: \"datasetName\",\n * input: undefined,\n * expectedOutput: undefined,\n * metadata: undefined,\n * sourceTraceId: undefined,\n * sourceObservationId: undefined,\n * id: undefined,\n * status: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateDatasetItemRequest,\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateDatasetItemRequest,\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-items\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/dataset-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a dataset item\n *\n * @param {string} id\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.get(\"id\")\n */\n public get(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetItem> {\n return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));\n }\n\n private async __get(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/dataset-items/${encodeURIComponent(id)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/dataset-items/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get dataset items\n *\n * @param {LangfuseAPI.GetDatasetItemsRequest} request\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.list()\n */\n public list(\n request: LangfuseAPI.GetDatasetItemsRequest = {},\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasetItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetDatasetItemsRequest = {},\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasetItems>> {\n const { datasetName, sourceTraceId, sourceObservationId, page, limit } =\n request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (datasetName != null) {\n _queryParams[\"datasetName\"] = datasetName;\n }\n\n if (sourceTraceId != null) {\n _queryParams[\"sourceTraceId\"] = sourceTraceId;\n }\n\n if (sourceObservationId != null) {\n _queryParams[\"sourceObservationId\"] = sourceObservationId;\n }\n\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-items\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasetItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/dataset-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a dataset item and all its run items. This action is irreversible.\n *\n * @param {string} id\n * @param {DatasetItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetItems.delete(\"id\")\n */\n public delete(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteDatasetItemResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(id, requestOptions),\n );\n }\n\n private async __delete(\n id: string,\n requestOptions?: DatasetItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteDatasetItemResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/dataset-items/${encodeURIComponent(id)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteDatasetItemResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/dataset-items/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace DatasetRunItems {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class DatasetRunItems {\n protected readonly _options: DatasetRunItems.Options;\n\n constructor(_options: DatasetRunItems.Options) {\n this._options = _options;\n }\n\n /**\n * Create a dataset run item\n *\n * @param {LangfuseAPI.CreateDatasetRunItemRequest} request\n * @param {DatasetRunItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetRunItems.create({\n * runName: \"runName\",\n * runDescription: undefined,\n * metadata: undefined,\n * datasetItemId: \"datasetItemId\",\n * observationId: undefined,\n * traceId: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateDatasetRunItemRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetRunItem> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateDatasetRunItemRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetRunItem>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-run-items\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetRunItem,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/dataset-run-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * List dataset run items\n *\n * @param {LangfuseAPI.ListDatasetRunItemsRequest} request\n * @param {DatasetRunItems.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasetRunItems.list({\n * datasetId: \"datasetId\",\n * runName: \"runName\"\n * })\n */\n public list(\n request: LangfuseAPI.ListDatasetRunItemsRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasetRunItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.ListDatasetRunItemsRequest,\n requestOptions?: DatasetRunItems.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasetRunItems>> {\n const { datasetId, runName, page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n _queryParams[\"datasetId\"] = datasetId;\n _queryParams[\"runName\"] = runName;\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/dataset-run-items\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasetRunItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/dataset-run-items.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Datasets {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Datasets {\n protected readonly _options: Datasets.Options;\n\n constructor(_options: Datasets.Options) {\n this._options = _options;\n }\n\n /**\n * Get all datasets\n *\n * @param {LangfuseAPI.GetDatasetsRequest} request\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.list()\n */\n public list(\n request: LangfuseAPI.GetDatasetsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasets> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetDatasetsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasets>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/datasets\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasets,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/datasets.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a dataset\n *\n * @param {string} datasetName\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.get(\"datasetName\")\n */\n public get(\n datasetName: string,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Dataset> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(datasetName, requestOptions),\n );\n }\n\n private async __get(\n datasetName: string,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Dataset>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/datasets/${encodeURIComponent(datasetName)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Dataset,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/datasets/{datasetName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a dataset\n *\n * @param {LangfuseAPI.CreateDatasetRequest} request\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.create({\n * name: \"name\",\n * description: undefined,\n * metadata: undefined,\n * inputSchema: undefined,\n * expectedOutputSchema: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateDatasetRequest,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Dataset> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateDatasetRequest,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Dataset>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/datasets\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Dataset,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/v2/datasets.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a dataset run and its items\n *\n * @param {string} datasetName\n * @param {string} runName\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.getRun(\"datasetName\", \"runName\")\n */\n public getRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DatasetRunWithItems> {\n return core.HttpResponsePromise.fromPromise(\n this.__getRun(datasetName, runName, requestOptions),\n );\n }\n\n private async __getRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DatasetRunWithItems>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DatasetRunWithItems,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/datasets/{datasetName}/runs/{runName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a dataset run and all its run items. This action is irreversible.\n *\n * @param {string} datasetName\n * @param {string} runName\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.deleteRun(\"datasetName\", \"runName\")\n */\n public deleteRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteDatasetRunResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteRun(datasetName, runName, requestOptions),\n );\n }\n\n private async __deleteRun(\n datasetName: string,\n runName: string,\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteDatasetRunResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteDatasetRunResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/datasets/{datasetName}/runs/{runName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get dataset runs\n *\n * @param {string} datasetName\n * @param {LangfuseAPI.GetDatasetRunsRequest} request\n * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.datasets.getRuns(\"datasetName\")\n */\n public getRuns(\n datasetName: string,\n request: LangfuseAPI.GetDatasetRunsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedDatasetRuns> {\n return core.HttpResponsePromise.fromPromise(\n this.__getRuns(datasetName, request, requestOptions),\n );\n }\n\n private async __getRuns(\n datasetName: string,\n request: LangfuseAPI.GetDatasetRunsRequest = {},\n requestOptions?: Datasets.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedDatasetRuns>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/datasets/${encodeURIComponent(datasetName)}/runs`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedDatasetRuns,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/datasets/{datasetName}/runs.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Health {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Health {\n protected readonly _options: Health.Options;\n\n constructor(_options: Health.Options) {\n this._options = _options;\n }\n\n /**\n * Check health of API and database\n *\n * @param {Health.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.ServiceUnavailableError}\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.health.health()\n */\n public health(\n requestOptions?: Health.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.HealthResponse> {\n return core.HttpResponsePromise.fromPromise(this.__health(requestOptions));\n }\n\n private async __health(\n requestOptions?: Health.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.HealthResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/health\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.HealthResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 503:\n throw new LangfuseAPI.ServiceUnavailableError(_response.rawResponse);\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/health.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Ingestion {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Ingestion {\n protected readonly _options: Ingestion.Options;\n\n constructor(_options: Ingestion.Options) {\n this._options = _options;\n }\n\n /**\n * **Legacy endpoint for batch ingestion for Langfuse Observability.**\n *\n * -> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://langfuse.com/integrations/native/opentelemetry\n *\n * Within each batch, there can be multiple events.\n * Each event has a type, an id, a timestamp, metadata and a body.\n * Internally, we refer to this as the \"event envelope\" as it tells us something about the event but not the trace.\n * We use the event id within this envelope to deduplicate messages to avoid processing the same event twice, i.e. the event id should be unique per request.\n * The event.body.id is the ID of the actual trace and will be used for updates and will be visible within the Langfuse App.\n * I.e. if you want to update a trace, you'd use the same body id, but separate event IDs.\n *\n * Notes:\n * - Introduction to data model: https://langfuse.com/docs/observability/data-model\n * - Batch sizes are limited to 3.5 MB in total. You need to adjust the number of events per batch accordingly.\n * - The API does not return a 4xx status code for input errors. Instead, it responds with a 207 status code, which includes a list of the encountered errors.\n *\n * @param {LangfuseAPI.IngestionRequest} request\n * @param {Ingestion.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.ingestion.batch({\n * batch: [{\n * type: \"trace-create\",\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * body: {\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * environment: \"production\",\n * name: \"My Trace\",\n * userId: \"1234-5678-90ab-cdef\",\n * input: \"My input\",\n * output: \"My output\",\n * sessionId: \"1234-5678-90ab-cdef\",\n * release: \"1.0.0\",\n * version: \"1.0.0\",\n * metadata: \"My metadata\",\n * tags: [\"tag1\", \"tag2\"],\n * \"public\": true\n * }\n * }]\n * })\n *\n * @example\n * await client.ingestion.batch({\n * batch: [{\n * type: \"span-create\",\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * body: {\n * id: \"abcdef-1234-5678-90ab\",\n * traceId: \"1234-5678-90ab-cdef\",\n * startTime: \"2022-01-01T00:00:00.000Z\",\n * environment: \"test\"\n * }\n * }]\n * })\n *\n * @example\n * await client.ingestion.batch({\n * batch: [{\n * type: \"score-create\",\n * id: \"abcdef-1234-5678-90ab\",\n * timestamp: \"2022-01-01T00:00:00.000Z\",\n * body: {\n * id: \"abcdef-1234-5678-90ab\",\n * traceId: \"1234-5678-90ab-cdef\",\n * name: \"My Score\",\n * value: 0.9,\n * environment: \"default\"\n * }\n * }]\n * })\n */\n public batch(\n request: LangfuseAPI.IngestionRequest,\n requestOptions?: Ingestion.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.IngestionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__batch(request, requestOptions),\n );\n }\n\n private async __batch(\n request: LangfuseAPI.IngestionRequest,\n requestOptions?: Ingestion.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.IngestionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/ingestion\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.IngestionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/ingestion.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace LlmConnections {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class LlmConnections {\n protected readonly _options: LlmConnections.Options;\n\n constructor(_options: LlmConnections.Options) {\n this._options = _options;\n }\n\n /**\n * Get all LLM connections in a project\n *\n * @param {LangfuseAPI.GetLlmConnectionsRequest} request\n * @param {LlmConnections.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.llmConnections.list()\n */\n public list(\n request: LangfuseAPI.GetLlmConnectionsRequest = {},\n requestOptions?: LlmConnections.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedLlmConnections> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetLlmConnectionsRequest = {},\n requestOptions?: LlmConnections.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedLlmConnections>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/llm-connections\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedLlmConnections,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/llm-connections.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update an LLM connection. The connection is upserted on provider.\n *\n * @param {LangfuseAPI.UpsertLlmConnectionRequest} request\n * @param {LlmConnections.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.llmConnections.upsert({\n * provider: \"provider\",\n * adapter: \"anthropic\",\n * secretKey: \"secretKey\",\n * baseURL: undefined,\n * customModels: undefined,\n * withDefaultModels: undefined,\n * extraHeaders: undefined,\n * config: undefined\n * })\n */\n public upsert(\n request: LangfuseAPI.UpsertLlmConnectionRequest,\n requestOptions?: LlmConnections.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.LlmConnection> {\n return core.HttpResponsePromise.fromPromise(\n this.__upsert(request, requestOptions),\n );\n }\n\n private async __upsert(\n request: LangfuseAPI.UpsertLlmConnectionRequest,\n requestOptions?: LlmConnections.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.LlmConnection>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/llm-connections\",\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.LlmConnection,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/llm-connections.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Media {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Media {\n protected readonly _options: Media.Options;\n\n constructor(_options: Media.Options) {\n this._options = _options;\n }\n\n /**\n * Get a media record\n *\n * @param {string} mediaId - The unique langfuse identifier of a media record\n * @param {Media.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.media.get(\"mediaId\")\n */\n public get(\n mediaId: string,\n requestOptions?: Media.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetMediaResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(mediaId, requestOptions),\n );\n }\n\n private async __get(\n mediaId: string,\n requestOptions?: Media.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetMediaResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/media/${encodeURIComponent(mediaId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetMediaResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/media/{mediaId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Patch a media record\n *\n * @param {string} mediaId - The unique langfuse identifier of a media record\n * @param {LangfuseAPI.PatchMediaBody} request\n * @param {Media.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.media.patch(\"mediaId\", {\n * uploadedAt: \"2024-01-15T09:30:00Z\",\n * uploadHttpStatus: 1,\n * uploadHttpError: undefined,\n * uploadTimeMs: undefined\n * })\n */\n public patch(\n mediaId: string,\n request: LangfuseAPI.PatchMediaBody,\n requestOptions?: Media.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__patch(mediaId, request, requestOptions),\n );\n }\n\n private async __patch(\n mediaId: string,\n request: LangfuseAPI.PatchMediaBody,\n requestOptions?: Media.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/media/${encodeURIComponent(mediaId)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/media/{mediaId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a presigned upload URL for a media record\n *\n * @param {LangfuseAPI.GetMediaUploadUrlRequest} request\n * @param {Media.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.media.getUploadUrl({\n * traceId: \"traceId\",\n * observationId: undefined,\n * contentType: \"image/png\",\n * contentLength: 1,\n * sha256Hash: \"sha256Hash\",\n * field: \"field\"\n * })\n */\n public getUploadUrl(\n request: LangfuseAPI.GetMediaUploadUrlRequest,\n requestOptions?: Media.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetMediaUploadUrlResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getUploadUrl(request, requestOptions),\n );\n }\n\n private async __getUploadUrl(\n request: LangfuseAPI.GetMediaUploadUrlRequest,\n requestOptions?: Media.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetMediaUploadUrlResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/media\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetMediaUploadUrlResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/media.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace MetricsV2 {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class MetricsV2 {\n protected readonly _options: MetricsV2.Options;\n\n constructor(_options: MetricsV2.Options) {\n this._options = _options;\n }\n\n /**\n * Get metrics from the Langfuse project using a query object. V2 endpoint with optimized performance.\n *\n * ## V2 Differences\n * - Supports `observations`, `scores-numeric`, and `scores-categorical` views only (traces view not supported)\n * - Direct access to tags and release fields on observations\n * - Backwards-compatible: traceName, traceRelease, traceVersion dimensions are still available on observations view\n * - High cardinality dimensions are not supported and will return a 400 error (see below)\n *\n * For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).\n *\n * ## Available Views\n *\n * ### observations\n * Query observation-level data (spans, generations, events).\n *\n * **Dimensions:**\n * - `environment` - Deployment environment (e.g., production, staging)\n * - `type` - Type of observation (SPAN, GENERATION, EVENT)\n * - `name` - Name of the observation\n * - `level` - Logging level of the observation\n * - `version` - Version of the observation\n * - `tags` - User-defined tags\n * - `release` - Release version\n * - `traceName` - Name of the parent trace (backwards-compatible)\n * - `traceRelease` - Release version of the parent trace (backwards-compatible, maps to release)\n * - `traceVersion` - Version of the parent trace (backwards-compatible, maps to version)\n * - `providedModelName` - Name of the model used\n * - `promptName` - Name of the prompt used\n * - `promptVersion` - Version of the prompt used\n * - `startTimeMonth` - Month of start_time in YYYY-MM format\n *\n * **Measures:**\n * - `count` - Total number of observations\n * - `latency` - Observation latency (milliseconds)\n * - `streamingLatency` - Generation latency from completion start to end (milliseconds)\n * - `inputTokens` - Sum of input tokens consumed\n * - `outputTokens` - Sum of output tokens produced\n * - `totalTokens` - Sum of all tokens consumed\n * - `outputTokensPerSecond` - Output tokens per second\n * - `tokensPerSecond` - Total tokens per second\n * - `inputCost` - Input cost (USD)\n * - `outputCost` - Output cost (USD)\n * - `totalCost` - Total cost (USD)\n * - `timeToFirstToken` - Time to first token (milliseconds)\n * - `countScores` - Number of scores attached to the observation\n *\n * ### scores-numeric\n * Query numeric and boolean score data.\n *\n * **Dimensions:**\n * - `environment` - Deployment environment\n * - `name` - Name of the score (e.g., accuracy, toxicity)\n * - `source` - Origin of the score (API, ANNOTATION, EVAL)\n * - `dataType` - Data type (NUMERIC, BOOLEAN)\n * - `configId` - Identifier of the score config\n * - `timestampMonth` - Month in YYYY-MM format\n * - `timestampDay` - Day in YYYY-MM-DD format\n * - `value` - Numeric value of the score\n * - `traceName` - Name of the parent trace\n * - `tags` - Tags\n * - `traceRelease` - Release version\n * - `traceVersion` - Version\n * - `observationName` - Name of the associated observation\n * - `observationModelName` - Model name of the associated observation\n * - `observationPromptName` - Prompt name of the associated observation\n * - `observationPromptVersion` - Prompt version of the associated observation\n *\n * **Measures:**\n * - `count` - Total number of scores\n * - `value` - Score value (for aggregations)\n *\n * ### scores-categorical\n * Query categorical score data. Same dimensions as scores-numeric except uses `stringValue` instead of `value`.\n *\n * **Measures:**\n * - `count` - Total number of scores\n *\n * ## High Cardinality Dimensions\n * The following dimensions cannot be used as grouping dimensions in v2 metrics API as they can cause performance issues.\n * Use them in filters instead.\n *\n * **observations view:**\n * - `id` - Use traceId filter to narrow down results\n * - `traceId` - Use traceId filter instead\n * - `userId` - Use userId filter instead\n * - `sessionId` - Use sessionId filter instead\n * - `parentObservationId` - Use parentObservationId filter instead\n *\n * **scores-numeric / scores-categorical views:**\n * - `id` - Use specific filters to narrow down results\n * - `traceId` - Use traceId filter instead\n * - `userId` - Use userId filter instead\n * - `sessionId` - Use sessionId filter instead\n * - `observationId` - Use observationId filter instead\n *\n * ## Aggregations\n * Available aggregation functions: `sum`, `avg`, `count`, `max`, `min`, `p50`, `p75`, `p90`, `p95`, `p99`, `histogram`\n *\n * ## Time Granularities\n * Available granularities for timeDimension: `auto`, `minute`, `hour`, `day`, `week`, `month`\n * - `auto` bins the data into approximately 50 buckets based on the time range\n *\n * @param {LangfuseAPI.GetMetricsV2Request} request\n * @param {MetricsV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.metricsV2.metrics({\n * query: \"query\"\n * })\n */\n public metrics(\n request: LangfuseAPI.GetMetricsV2Request,\n requestOptions?: MetricsV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MetricsV2Response> {\n return core.HttpResponsePromise.fromPromise(\n this.__metrics(request, requestOptions),\n );\n }\n\n private async __metrics(\n request: LangfuseAPI.GetMetricsV2Request,\n requestOptions?: MetricsV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MetricsV2Response>> {\n const { query } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n _queryParams[\"query\"] = query;\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/metrics\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MetricsV2Response,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/metrics.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Metrics {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Metrics {\n protected readonly _options: Metrics.Options;\n\n constructor(_options: Metrics.Options) {\n this._options = _options;\n }\n\n /**\n * Get metrics from the Langfuse project using a query object.\n *\n * Consider using the [v2 metrics endpoint](/api-reference#tag/metricsv2/GET/api/public/v2/metrics) for better performance.\n *\n * For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).\n *\n * @param {LangfuseAPI.GetMetricsRequest} request\n * @param {Metrics.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.metrics.metrics({\n * query: \"query\"\n * })\n */\n public metrics(\n request: LangfuseAPI.GetMetricsRequest,\n requestOptions?: Metrics.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MetricsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__metrics(request, requestOptions),\n );\n }\n\n private async __metrics(\n request: LangfuseAPI.GetMetricsRequest,\n requestOptions?: Metrics.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MetricsResponse>> {\n const { query } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n _queryParams[\"query\"] = query;\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/metrics\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MetricsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/metrics.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Models {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Models {\n protected readonly _options: Models.Options;\n\n constructor(_options: Models.Options) {\n this._options = _options;\n }\n\n /**\n * Create a model\n *\n * @param {LangfuseAPI.CreateModelRequest} request\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.create({\n * modelName: \"modelName\",\n * matchPattern: \"matchPattern\",\n * startDate: undefined,\n * unit: undefined,\n * inputPrice: undefined,\n * outputPrice: undefined,\n * totalPrice: undefined,\n * pricingTiers: undefined,\n * tokenizerId: undefined,\n * tokenizerConfig: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateModelRequest,\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Model> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateModelRequest,\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Model>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/models\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Model,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/models.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all models\n *\n * @param {LangfuseAPI.GetModelsRequest} request\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.list()\n */\n public list(\n request: LangfuseAPI.GetModelsRequest = {},\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedModels> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetModelsRequest = {},\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedModels>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/models\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedModels,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/models.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a model\n *\n * @param {string} id\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.get(\"id\")\n */\n public get(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Model> {\n return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));\n }\n\n private async __get(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Model>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/models/${encodeURIComponent(id)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Model,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/models/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a model. Cannot delete models managed by Langfuse. You can create your own definition with the same modelName to override the definition though.\n *\n * @param {string} id\n * @param {Models.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.models.delete(\"id\")\n */\n public delete(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(id, requestOptions),\n );\n }\n\n private async __delete(\n id: string,\n requestOptions?: Models.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/models/${encodeURIComponent(id)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/models/{id}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace ObservationsV2 {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class ObservationsV2 {\n protected readonly _options: ObservationsV2.Options;\n\n constructor(_options: ObservationsV2.Options) {\n this._options = _options;\n }\n\n /**\n * Get a list of observations with cursor-based pagination and flexible field selection.\n *\n * ## Cursor-based Pagination\n * This endpoint uses cursor-based pagination for efficient traversal of large datasets.\n * The cursor is returned in the response metadata and should be passed in subsequent requests\n * to retrieve the next page of results.\n *\n * ## Field Selection\n * Use the `fields` parameter to control which observation fields are returned:\n * - `core` - Always included: id, traceId, startTime, endTime, projectId, parentObservationId, type\n * - `basic` - name, level, statusMessage, version, environment, bookmarked, public, userId, sessionId\n * - `time` - completionStartTime, createdAt, updatedAt\n * - `io` - input, output\n * - `metadata` - metadata (truncated to 200 chars by default, use `expandMetadata` to get full values)\n * - `model` - providedModelName, internalModelId, modelParameters\n * - `usage` - usageDetails, costDetails, totalCost\n * - `prompt` - promptId, promptName, promptVersion\n * - `metrics` - latency, timeToFirstToken\n *\n * If not specified, `core` and `basic` field groups are returned.\n *\n * ## Filters\n * Multiple filtering options are available via query parameters or the structured `filter` parameter.\n * When using the `filter` parameter, it takes precedence over individual query parameter filters.\n *\n * @param {LangfuseAPI.GetObservationsV2Request} request\n * @param {ObservationsV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.observationsV2.getMany()\n */\n public getMany(\n request: LangfuseAPI.GetObservationsV2Request = {},\n requestOptions?: ObservationsV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ObservationsV2Response> {\n return core.HttpResponsePromise.fromPromise(\n this.__getMany(request, requestOptions),\n );\n }\n\n private async __getMany(\n request: LangfuseAPI.GetObservationsV2Request = {},\n requestOptions?: ObservationsV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ObservationsV2Response>> {\n const {\n fields,\n expandMetadata,\n limit,\n cursor,\n parseIoAsJson,\n name,\n userId,\n type: type_,\n traceId,\n level,\n parentObservationId,\n environment,\n fromStartTime,\n toStartTime,\n version,\n filter,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (fields != null) {\n _queryParams[\"fields\"] = fields;\n }\n\n if (expandMetadata != null) {\n _queryParams[\"expandMetadata\"] = expandMetadata;\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (cursor != null) {\n _queryParams[\"cursor\"] = cursor;\n }\n\n if (parseIoAsJson != null) {\n _queryParams[\"parseIoAsJson\"] = parseIoAsJson.toString();\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (type_ != null) {\n _queryParams[\"type\"] = type_;\n }\n\n if (traceId != null) {\n _queryParams[\"traceId\"] = traceId;\n }\n\n if (level != null) {\n _queryParams[\"level\"] = level;\n }\n\n if (parentObservationId != null) {\n _queryParams[\"parentObservationId\"] = parentObservationId;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (fromStartTime != null) {\n _queryParams[\"fromStartTime\"] = fromStartTime;\n }\n\n if (toStartTime != null) {\n _queryParams[\"toStartTime\"] = toStartTime;\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version;\n }\n\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/observations\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ObservationsV2Response,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/observations.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Observations {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Observations {\n protected readonly _options: Observations.Options;\n\n constructor(_options: Observations.Options) {\n this._options = _options;\n }\n\n /**\n * Get a observation\n *\n * @param {string} observationId - The unique langfuse identifier of an observation, can be an event, span or generation\n * @param {Observations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.observations.get(\"observationId\")\n */\n public get(\n observationId: string,\n requestOptions?: Observations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ObservationsView> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(observationId, requestOptions),\n );\n }\n\n private async __get(\n observationId: string,\n requestOptions?: Observations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ObservationsView>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/observations/${encodeURIComponent(observationId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ObservationsView,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/observations/{observationId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a list of observations.\n *\n * Consider using the [v2 observations endpoint](/api-reference#tag/observationsv2/GET/api/public/v2/observations) for cursor-based pagination and field selection.\n *\n * @param {LangfuseAPI.GetObservationsRequest} request\n * @param {Observations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.observations.getMany()\n */\n public getMany(\n request: LangfuseAPI.GetObservationsRequest = {},\n requestOptions?: Observations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ObservationsViews> {\n return core.HttpResponsePromise.fromPromise(\n this.__getMany(request, requestOptions),\n );\n }\n\n private async __getMany(\n request: LangfuseAPI.GetObservationsRequest = {},\n requestOptions?: Observations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ObservationsViews>> {\n const {\n page,\n limit,\n name,\n userId,\n type: type_,\n traceId,\n level,\n parentObservationId,\n environment,\n fromStartTime,\n toStartTime,\n version,\n filter,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (type_ != null) {\n _queryParams[\"type\"] = type_;\n }\n\n if (traceId != null) {\n _queryParams[\"traceId\"] = traceId;\n }\n\n if (level != null) {\n _queryParams[\"level\"] = level;\n }\n\n if (parentObservationId != null) {\n _queryParams[\"parentObservationId\"] = parentObservationId;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (fromStartTime != null) {\n _queryParams[\"fromStartTime\"] = fromStartTime;\n }\n\n if (toStartTime != null) {\n _queryParams[\"toStartTime\"] = toStartTime;\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version;\n }\n\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/observations\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ObservationsViews,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/observations.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Opentelemetry {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Opentelemetry {\n protected readonly _options: Opentelemetry.Options;\n\n constructor(_options: Opentelemetry.Options) {\n this._options = _options;\n }\n\n /**\n * **OpenTelemetry Traces Ingestion Endpoint**\n *\n * This endpoint implements the OTLP/HTTP specification for trace ingestion, providing native OpenTelemetry integration for Langfuse Observability.\n *\n * **Supported Formats:**\n * - Binary Protobuf: `Content-Type: application/x-protobuf`\n * - JSON Protobuf: `Content-Type: application/json`\n * - Supports gzip compression via `Content-Encoding: gzip` header\n *\n * **Specification Compliance:**\n * - Conforms to [OTLP/HTTP Trace Export](https://opentelemetry.io/docs/specs/otlp/#otlphttp)\n * - Implements `ExportTraceServiceRequest` message format\n *\n * **Documentation:**\n * - Integration guide: https://langfuse.com/integrations/native/opentelemetry\n * - Data model: https://langfuse.com/docs/observability/data-model\n *\n * @param {LangfuseAPI.OtelTraceRequest} request\n * @param {Opentelemetry.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.opentelemetry.exportTraces({\n * resourceSpans: [{\n * resource: {\n * attributes: [{\n * key: \"service.name\",\n * value: {\n * stringValue: \"my-service\"\n * }\n * }, {\n * key: \"service.version\",\n * value: {\n * stringValue: \"1.0.0\"\n * }\n * }]\n * },\n * scopeSpans: [{\n * scope: {\n * name: \"langfuse-sdk\",\n * version: \"2.60.3\"\n * },\n * spans: [{\n * traceId: \"0123456789abcdef0123456789abcdef\",\n * spanId: \"0123456789abcdef\",\n * name: \"my-operation\",\n * kind: 1,\n * startTimeUnixNano: \"1747872000000000000\",\n * endTimeUnixNano: \"1747872001000000000\",\n * attributes: [{\n * key: \"langfuse.observation.type\",\n * value: {\n * stringValue: \"generation\"\n * }\n * }],\n * status: {}\n * }]\n * }]\n * }]\n * })\n */\n public exportTraces(\n request: LangfuseAPI.OtelTraceRequest,\n requestOptions?: Opentelemetry.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.OtelTraceResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__exportTraces(request, requestOptions),\n );\n }\n\n private async __exportTraces(\n request: LangfuseAPI.OtelTraceRequest,\n requestOptions?: Opentelemetry.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.OtelTraceResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/otel/v1/traces\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.OtelTraceResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/otel/v1/traces.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Organizations {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Organizations {\n protected readonly _options: Organizations.Options;\n\n constructor(_options: Organizations.Options) {\n this._options = _options;\n }\n\n /**\n * Get all memberships for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getOrganizationMemberships()\n */\n public getOrganizationMemberships(\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getOrganizationMemberships(requestOptions),\n );\n }\n\n private async __getOrganizationMemberships(\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipsResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/memberships\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/organizations/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update a membership for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.MembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.updateOrganizationMembership({\n * userId: \"userId\",\n * role: \"OWNER\"\n * })\n */\n public updateOrganizationMembership(\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__updateOrganizationMembership(request, requestOptions),\n );\n }\n\n private async __updateOrganizationMembership(\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/memberships\",\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/organizations/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a membership from the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.DeleteMembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.deleteOrganizationMembership({\n * userId: \"userId\"\n * })\n */\n public deleteOrganizationMembership(\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteOrganizationMembership(request, requestOptions),\n );\n }\n\n private async __deleteOrganizationMembership(\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/memberships\",\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/organizations/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all memberships for a specific project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getProjectMemberships(\"projectId\")\n */\n public getProjectMemberships(\n projectId: string,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getProjectMemberships(projectId, requestOptions),\n );\n }\n\n private async __getProjectMemberships(\n projectId: string,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipsResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/memberships`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/projects/{projectId}/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create or update a membership for a specific project (requires organization-scoped API key). The user must already be a member of the organization.\n *\n * @param {string} projectId\n * @param {LangfuseAPI.MembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.updateProjectMembership(\"projectId\", {\n * userId: \"userId\",\n * role: \"OWNER\"\n * })\n */\n public updateProjectMembership(\n projectId: string,\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__updateProjectMembership(projectId, request, requestOptions),\n );\n }\n\n private async __updateProjectMembership(\n projectId: string,\n request: LangfuseAPI.MembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/memberships`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/projects/{projectId}/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a membership from a specific project (requires organization-scoped API key). The user must be a member of the organization.\n *\n * @param {string} projectId\n * @param {LangfuseAPI.DeleteMembershipRequest} request\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.deleteProjectMembership(\"projectId\", {\n * userId: \"userId\"\n * })\n */\n public deleteProjectMembership(\n projectId: string,\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.MembershipDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteProjectMembership(projectId, request, requestOptions),\n );\n }\n\n private async __deleteProjectMembership(\n projectId: string,\n request: LangfuseAPI.DeleteMembershipRequest,\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.MembershipDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/memberships`,\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.MembershipDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/projects/{projectId}/memberships.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all projects for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getOrganizationProjects()\n */\n public getOrganizationProjects(\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.OrganizationProjectsResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getOrganizationProjects(requestOptions),\n );\n }\n\n private async __getOrganizationProjects(\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.OrganizationProjectsResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/projects\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.OrganizationProjectsResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/organizations/projects.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all API keys for the organization associated with the API key (requires organization-scoped API key)\n *\n * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.organizations.getOrganizationApiKeys()\n */\n public getOrganizationApiKeys(\n requestOptions?: Organizations.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.OrganizationApiKeysResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getOrganizationApiKeys(requestOptions),\n );\n }\n\n private async __getOrganizationApiKeys(\n requestOptions?: Organizations.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.OrganizationApiKeysResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/organizations/apiKeys\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.OrganizationApiKeysResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/organizations/apiKeys.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Projects {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Projects {\n protected readonly _options: Projects.Options;\n\n constructor(_options: Projects.Options) {\n this._options = _options;\n }\n\n /**\n * Get Project associated with API key (requires project-scoped API key). You can use GET /api/public/organizations/projects to get all projects with an organization-scoped key.\n *\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.get()\n */\n public get(\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Projects> {\n return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));\n }\n\n private async __get(\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Projects>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/projects\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Projects,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/projects.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new project (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.CreateProjectRequest} request\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.create({\n * name: \"name\",\n * metadata: undefined,\n * retention: 1\n * })\n */\n public create(\n request: LangfuseAPI.CreateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Project> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Project>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/projects\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Project,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/projects.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Update a project by ID (requires organization-scoped API key).\n *\n * @param {string} projectId\n * @param {LangfuseAPI.UpdateProjectRequest} request\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.update(\"projectId\", {\n * name: \"name\",\n * metadata: undefined,\n * retention: undefined\n * })\n */\n public update(\n projectId: string,\n request: LangfuseAPI.UpdateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Project> {\n return core.HttpResponsePromise.fromPromise(\n this.__update(projectId, request, requestOptions),\n );\n }\n\n private async __update(\n projectId: string,\n request: LangfuseAPI.UpdateProjectRequest,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Project>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}`,\n ),\n method: \"PUT\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Project,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PUT /api/public/projects/{projectId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a project by ID (requires organization-scoped API key). Project deletion is processed asynchronously.\n *\n * @param {string} projectId\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.delete(\"projectId\")\n */\n public delete(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ProjectDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(projectId, requestOptions),\n );\n }\n\n private async __delete(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ProjectDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ProjectDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/projects/{projectId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all API keys for a project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.getApiKeys(\"projectId\")\n */\n public getApiKeys(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ApiKeyList> {\n return core.HttpResponsePromise.fromPromise(\n this.__getApiKeys(projectId, requestOptions),\n );\n }\n\n private async __getApiKeys(\n projectId: string,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ApiKeyList>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/apiKeys`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ApiKeyList,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/projects/{projectId}/apiKeys.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new API key for a project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {LangfuseAPI.CreateApiKeyRequest} request\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.createApiKey(\"projectId\", {\n * note: undefined,\n * publicKey: undefined,\n * secretKey: undefined\n * })\n */\n public createApiKey(\n projectId: string,\n request: LangfuseAPI.CreateApiKeyRequest = {},\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ApiKeyResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__createApiKey(projectId, request, requestOptions),\n );\n }\n\n private async __createApiKey(\n projectId: string,\n request: LangfuseAPI.CreateApiKeyRequest = {},\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ApiKeyResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/apiKeys`,\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ApiKeyResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/projects/{projectId}/apiKeys.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete an API key for a project (requires organization-scoped API key)\n *\n * @param {string} projectId\n * @param {string} apiKeyId\n * @param {Projects.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.projects.deleteApiKey(\"projectId\", \"apiKeyId\")\n */\n public deleteApiKey(\n projectId: string,\n apiKeyId: string,\n requestOptions?: Projects.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ApiKeyDeletionResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteApiKey(projectId, apiKeyId, requestOptions),\n );\n }\n\n private async __deleteApiKey(\n projectId: string,\n apiKeyId: string,\n requestOptions?: Projects.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ApiKeyDeletionResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/projects/${encodeURIComponent(projectId)}/apiKeys/${encodeURIComponent(apiKeyId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ApiKeyDeletionResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/projects/{projectId}/apiKeys/{apiKeyId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace PromptVersion {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class PromptVersion {\n protected readonly _options: PromptVersion.Options;\n\n constructor(_options: PromptVersion.Options) {\n this._options = _options;\n }\n\n /**\n * Update labels for a specific prompt version\n *\n * @param {string} name - The name of the prompt. If the prompt is in a folder (e.g., \"folder/subfolder/prompt-name\"),\n * the folder path must be URL encoded.\n * @param {number} version - Version of the prompt to update\n * @param {LangfuseAPI.UpdatePromptRequest} request\n * @param {PromptVersion.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.promptVersion.update(\"name\", 1, {\n * newLabels: [\"newLabels\", \"newLabels\"]\n * })\n */\n public update(\n name: string,\n version: number,\n request: LangfuseAPI.UpdatePromptRequest,\n requestOptions?: PromptVersion.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Prompt> {\n return core.HttpResponsePromise.fromPromise(\n this.__update(name, version, request, requestOptions),\n );\n }\n\n private async __update(\n name: string,\n version: number,\n request: LangfuseAPI.UpdatePromptRequest,\n requestOptions?: PromptVersion.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Prompt>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/prompts/${encodeURIComponent(name)}/versions/${encodeURIComponent(version)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Prompt,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/v2/prompts/{name}/versions/{version}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Prompts {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Prompts {\n protected readonly _options: Prompts.Options;\n\n constructor(_options: Prompts.Options) {\n this._options = _options;\n }\n\n /**\n * Get a prompt\n *\n * @param {string} promptName - The name of the prompt. If the prompt is in a folder (e.g., \"folder/subfolder/prompt-name\"),\n * the folder path must be URL encoded.\n * @param {LangfuseAPI.GetPromptRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.get(\"promptName\")\n */\n public get(\n promptName: string,\n request: LangfuseAPI.GetPromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Prompt> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(promptName, request, requestOptions),\n );\n }\n\n private async __get(\n promptName: string,\n request: LangfuseAPI.GetPromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Prompt>> {\n const { version, label } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (version != null) {\n _queryParams[\"version\"] = version.toString();\n }\n\n if (label != null) {\n _queryParams[\"label\"] = label;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/prompts/${encodeURIComponent(promptName)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Prompt,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/prompts/{promptName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a list of prompt names with versions and labels\n *\n * @param {LangfuseAPI.ListPromptsMetaRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.list()\n */\n public list(\n request: LangfuseAPI.ListPromptsMetaRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PromptMetaListResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.ListPromptsMetaRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PromptMetaListResponse>> {\n const { name, label, tag, page, limit, fromUpdatedAt, toUpdatedAt } =\n request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (label != null) {\n _queryParams[\"label\"] = label;\n }\n\n if (tag != null) {\n _queryParams[\"tag\"] = tag;\n }\n\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (fromUpdatedAt != null) {\n _queryParams[\"fromUpdatedAt\"] = fromUpdatedAt;\n }\n\n if (toUpdatedAt != null) {\n _queryParams[\"toUpdatedAt\"] = toUpdatedAt;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/prompts\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PromptMetaListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/prompts.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new version for the prompt with the given `name`\n *\n * @param {LangfuseAPI.CreatePromptRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.create({\n * type: \"chat\",\n * name: \"name\",\n * prompt: [{\n * type: \"chatmessage\",\n * role: \"role\",\n * content: \"content\"\n * }, {\n * type: \"chatmessage\",\n * role: \"role\",\n * content: \"content\"\n * }],\n * config: undefined,\n * labels: undefined,\n * tags: undefined,\n * commitMessage: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreatePromptRequest,\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Prompt> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreatePromptRequest,\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Prompt>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/prompts\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Prompt,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/v2/prompts.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete prompt versions. If neither version nor label is specified, all versions of the prompt are deleted.\n *\n * @param {string} promptName - The name of the prompt\n * @param {LangfuseAPI.DeletePromptRequest} request\n * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.prompts.delete(\"promptName\")\n */\n public delete(\n promptName: string,\n request: LangfuseAPI.DeletePromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(promptName, request, requestOptions),\n );\n }\n\n private async __delete(\n promptName: string,\n request: LangfuseAPI.DeletePromptRequest = {},\n requestOptions?: Prompts.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n const { label, version } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (label != null) {\n _queryParams[\"label\"] = label;\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/prompts/${encodeURIComponent(promptName)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/v2/prompts/{promptName}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Scim {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Scim {\n protected readonly _options: Scim.Options;\n\n constructor(_options: Scim.Options) {\n this._options = _options;\n }\n\n /**\n * Get SCIM Service Provider Configuration (requires organization-scoped API key)\n *\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getServiceProviderConfig()\n */\n public getServiceProviderConfig(\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ServiceProviderConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__getServiceProviderConfig(requestOptions),\n );\n }\n\n private async __getServiceProviderConfig(\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ServiceProviderConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/ServiceProviderConfig\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ServiceProviderConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/ServiceProviderConfig.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get SCIM Resource Types (requires organization-scoped API key)\n *\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getResourceTypes()\n */\n public getResourceTypes(\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ResourceTypesResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getResourceTypes(requestOptions),\n );\n }\n\n private async __getResourceTypes(\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ResourceTypesResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/ResourceTypes\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ResourceTypesResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/ResourceTypes.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get SCIM Schemas (requires organization-scoped API key)\n *\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getSchemas()\n */\n public getSchemas(\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.SchemasResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__getSchemas(requestOptions),\n );\n }\n\n private async __getSchemas(\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.SchemasResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/Schemas\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.SchemasResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/Schemas.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * List users in the organization (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.ListUsersRequest} request\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.listUsers()\n */\n public listUsers(\n request: LangfuseAPI.ListUsersRequest = {},\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScimUsersListResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__listUsers(request, requestOptions),\n );\n }\n\n private async __listUsers(\n request: LangfuseAPI.ListUsersRequest = {},\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScimUsersListResponse>> {\n const { filter, startIndex, count } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n if (startIndex != null) {\n _queryParams[\"startIndex\"] = startIndex.toString();\n }\n\n if (count != null) {\n _queryParams[\"count\"] = count.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/Users\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScimUsersListResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/Users.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Create a new user in the organization (requires organization-scoped API key)\n *\n * @param {LangfuseAPI.CreateUserRequest} request\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.createUser({\n * userName: \"userName\",\n * name: {\n * formatted: undefined\n * },\n * emails: undefined,\n * active: undefined,\n * password: undefined\n * })\n */\n public createUser(\n request: LangfuseAPI.CreateUserRequest,\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScimUser> {\n return core.HttpResponsePromise.fromPromise(\n this.__createUser(request, requestOptions),\n );\n }\n\n private async __createUser(\n request: LangfuseAPI.CreateUserRequest,\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScimUser>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scim/Users\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScimUser,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/scim/Users.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a specific user by ID (requires organization-scoped API key)\n *\n * @param {string} userId\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.getUser(\"userId\")\n */\n public getUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScimUser> {\n return core.HttpResponsePromise.fromPromise(\n this.__getUser(userId, requestOptions),\n );\n }\n\n private async __getUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScimUser>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/scim/Users/${encodeURIComponent(userId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScimUser,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/scim/Users/{userId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Remove a user from the organization (requires organization-scoped API key). Note that this only removes the user from the organization but does not delete the user entity itself.\n *\n * @param {string} userId\n * @param {Scim.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scim.deleteUser(\"userId\")\n */\n public deleteUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.EmptyResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteUser(userId, requestOptions),\n );\n }\n\n private async __deleteUser(\n userId: string,\n requestOptions?: Scim.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.EmptyResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/scim/Users/${encodeURIComponent(userId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.EmptyResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/scim/Users/{userId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace ScoreConfigs {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class ScoreConfigs {\n protected readonly _options: ScoreConfigs.Options;\n\n constructor(_options: ScoreConfigs.Options) {\n this._options = _options;\n }\n\n /**\n * Create a score configuration (config). Score configs are used to define the structure of scores\n *\n * @param {LangfuseAPI.CreateScoreConfigRequest} request\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.create({\n * name: \"name\",\n * dataType: \"NUMERIC\",\n * categories: undefined,\n * minValue: undefined,\n * maxValue: undefined,\n * description: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/score-configs\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/score-configs.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get all score configs\n *\n * @param {LangfuseAPI.GetScoreConfigsRequest} request\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.get()\n */\n public get(\n request: LangfuseAPI.GetScoreConfigsRequest = {},\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfigs> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(request, requestOptions),\n );\n }\n\n private async __get(\n request: LangfuseAPI.GetScoreConfigsRequest = {},\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfigs>> {\n const { page, limit } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/score-configs\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfigs,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/score-configs.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a score config\n *\n * @param {string} configId - The unique langfuse identifier of a score config\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.getById(\"configId\")\n */\n public getById(\n configId: string,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__getById(configId, requestOptions),\n );\n }\n\n private async __getById(\n configId: string,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/score-configs/${encodeURIComponent(configId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/score-configs/{configId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Update a score config\n *\n * @param {string} configId - The unique langfuse identifier of a score config\n * @param {LangfuseAPI.UpdateScoreConfigRequest} request\n * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreConfigs.update(\"configId\", {\n * isArchived: undefined,\n * name: undefined,\n * categories: undefined,\n * minValue: undefined,\n * maxValue: undefined,\n * description: undefined\n * })\n */\n public update(\n configId: string,\n request: LangfuseAPI.UpdateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.ScoreConfig> {\n return core.HttpResponsePromise.fromPromise(\n this.__update(configId, request, requestOptions),\n );\n }\n\n private async __update(\n configId: string,\n request: LangfuseAPI.UpdateScoreConfigRequest,\n requestOptions?: ScoreConfigs.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.ScoreConfig>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/score-configs/${encodeURIComponent(configId)}`,\n ),\n method: \"PATCH\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.ScoreConfig,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling PATCH /api/public/score-configs/{configId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace ScoreV2 {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class ScoreV2 {\n protected readonly _options: ScoreV2.Options;\n\n constructor(_options: ScoreV2.Options) {\n this._options = _options;\n }\n\n /**\n * Get a list of scores (supports both trace and session scores)\n *\n * @param {LangfuseAPI.GetScoresRequest} request\n * @param {ScoreV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreV2.get()\n */\n public get(\n request: LangfuseAPI.GetScoresRequest = {},\n requestOptions?: ScoreV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.GetScoresResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(request, requestOptions),\n );\n }\n\n private async __get(\n request: LangfuseAPI.GetScoresRequest = {},\n requestOptions?: ScoreV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.GetScoresResponse>> {\n const {\n page,\n limit,\n userId,\n name,\n fromTimestamp,\n toTimestamp,\n environment,\n source,\n operator,\n value,\n scoreIds,\n configId,\n sessionId,\n datasetRunId,\n traceId,\n queueId,\n dataType,\n traceTags,\n fields,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (fromTimestamp != null) {\n _queryParams[\"fromTimestamp\"] = fromTimestamp;\n }\n\n if (toTimestamp != null) {\n _queryParams[\"toTimestamp\"] = toTimestamp;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (source != null) {\n _queryParams[\"source\"] = source;\n }\n\n if (operator != null) {\n _queryParams[\"operator\"] = operator;\n }\n\n if (value != null) {\n _queryParams[\"value\"] = value.toString();\n }\n\n if (scoreIds != null) {\n _queryParams[\"scoreIds\"] = scoreIds;\n }\n\n if (configId != null) {\n _queryParams[\"configId\"] = configId;\n }\n\n if (sessionId != null) {\n _queryParams[\"sessionId\"] = sessionId;\n }\n\n if (datasetRunId != null) {\n _queryParams[\"datasetRunId\"] = datasetRunId;\n }\n\n if (traceId != null) {\n _queryParams[\"traceId\"] = traceId;\n }\n\n if (queueId != null) {\n _queryParams[\"queueId\"] = queueId;\n }\n\n if (dataType != null) {\n _queryParams[\"dataType\"] = dataType;\n }\n\n if (traceTags != null) {\n if (Array.isArray(traceTags)) {\n _queryParams[\"traceTags\"] = traceTags.map((item) => item);\n } else {\n _queryParams[\"traceTags\"] = traceTags;\n }\n }\n\n if (fields != null) {\n _queryParams[\"fields\"] = fields;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/v2/scores\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.GetScoresResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/scores.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a score (supports both trace and session scores)\n *\n * @param {string} scoreId - The unique langfuse identifier of a score\n * @param {ScoreV2.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.scoreV2.getById(\"scoreId\")\n */\n public getById(\n scoreId: string,\n requestOptions?: ScoreV2.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Score> {\n return core.HttpResponsePromise.fromPromise(\n this.__getById(scoreId, requestOptions),\n );\n }\n\n private async __getById(\n scoreId: string,\n requestOptions?: ScoreV2.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Score>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/v2/scores/${encodeURIComponent(scoreId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Score,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/v2/scores/{scoreId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Score {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Score {\n protected readonly _options: Score.Options;\n\n constructor(_options: Score.Options) {\n this._options = _options;\n }\n\n /**\n * Create a score (supports both trace and session scores)\n *\n * @param {LangfuseAPI.CreateScoreRequest} request\n * @param {Score.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.score.create({\n * id: undefined,\n * traceId: undefined,\n * sessionId: undefined,\n * observationId: undefined,\n * datasetRunId: undefined,\n * name: \"name\",\n * value: 1.1,\n * comment: undefined,\n * metadata: undefined,\n * environment: undefined,\n * queueId: undefined,\n * dataType: undefined,\n * configId: undefined\n * })\n */\n public create(\n request: LangfuseAPI.CreateScoreRequest,\n requestOptions?: Score.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.CreateScoreResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__create(request, requestOptions),\n );\n }\n\n private async __create(\n request: LangfuseAPI.CreateScoreRequest,\n requestOptions?: Score.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.CreateScoreResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/scores\",\n ),\n method: \"POST\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.CreateScoreResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling POST /api/public/scores.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a score (supports both trace and session scores)\n *\n * @param {string} scoreId - The unique langfuse identifier of a score\n * @param {Score.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.score.delete(\"scoreId\")\n */\n public delete(\n scoreId: string,\n requestOptions?: Score.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(scoreId, requestOptions),\n );\n }\n\n private async __delete(\n scoreId: string,\n requestOptions?: Score.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/scores/${encodeURIComponent(scoreId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return { data: undefined, rawResponse: _response.rawResponse };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/scores/{scoreId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Sessions {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Sessions {\n protected readonly _options: Sessions.Options;\n\n constructor(_options: Sessions.Options) {\n this._options = _options;\n }\n\n /**\n * Get sessions\n *\n * @param {LangfuseAPI.GetSessionsRequest} request\n * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.sessions.list()\n */\n public list(\n request: LangfuseAPI.GetSessionsRequest = {},\n requestOptions?: Sessions.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.PaginatedSessions> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetSessionsRequest = {},\n requestOptions?: Sessions.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.PaginatedSessions>> {\n const { page, limit, fromTimestamp, toTimestamp, environment } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (fromTimestamp != null) {\n _queryParams[\"fromTimestamp\"] = fromTimestamp;\n }\n\n if (toTimestamp != null) {\n _queryParams[\"toTimestamp\"] = toTimestamp;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/sessions\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.PaginatedSessions,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/sessions.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`\n *\n * @param {string} sessionId - The unique id of a session\n * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.sessions.get(\"sessionId\")\n */\n public get(\n sessionId: string,\n requestOptions?: Sessions.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.SessionWithTraces> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(sessionId, requestOptions),\n );\n }\n\n private async __get(\n sessionId: string,\n requestOptions?: Sessions.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.SessionWithTraces>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/sessions/${encodeURIComponent(sessionId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.SessionWithTraces,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/sessions/{sessionId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"../../../../core/index.js\";\nimport * as LangfuseAPI from \"../../../index.js\";\nimport {\n mergeHeaders,\n mergeOnlyDefinedHeaders,\n} from \"../../../../core/headers.js\";\nimport * as errors from \"../../../../errors/index.js\";\n\nexport declare namespace Trace {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class Trace {\n protected readonly _options: Trace.Options;\n\n constructor(_options: Trace.Options) {\n this._options = _options;\n }\n\n /**\n * Get a specific trace\n *\n * @param {string} traceId - The unique langfuse identifier of a trace\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.get(\"traceId\")\n */\n public get(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.TraceWithFullDetails> {\n return core.HttpResponsePromise.fromPromise(\n this.__get(traceId, requestOptions),\n );\n }\n\n private async __get(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.TraceWithFullDetails>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/traces/${encodeURIComponent(traceId)}`,\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.TraceWithFullDetails,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/traces/{traceId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete a specific trace\n *\n * @param {string} traceId - The unique langfuse identifier of the trace to delete\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.delete(\"traceId\")\n */\n public delete(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteTraceResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__delete(traceId, requestOptions),\n );\n }\n\n private async __delete(\n traceId: string,\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteTraceResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n `/api/public/traces/${encodeURIComponent(traceId)}`,\n ),\n method: \"DELETE\",\n headers: _headers,\n queryParameters: requestOptions?.queryParams,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteTraceResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/traces/{traceId}.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Get list of traces\n *\n * @param {LangfuseAPI.GetTracesRequest} request\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.list()\n */\n public list(\n request: LangfuseAPI.GetTracesRequest = {},\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.Traces> {\n return core.HttpResponsePromise.fromPromise(\n this.__list(request, requestOptions),\n );\n }\n\n private async __list(\n request: LangfuseAPI.GetTracesRequest = {},\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.Traces>> {\n const {\n page,\n limit,\n userId,\n name,\n sessionId,\n fromTimestamp,\n toTimestamp,\n orderBy,\n tags,\n version,\n release,\n environment,\n fields,\n filter,\n } = request;\n const _queryParams: Record<\n string,\n string | string[] | object | object[] | null\n > = {};\n if (page != null) {\n _queryParams[\"page\"] = page.toString();\n }\n\n if (limit != null) {\n _queryParams[\"limit\"] = limit.toString();\n }\n\n if (userId != null) {\n _queryParams[\"userId\"] = userId;\n }\n\n if (name != null) {\n _queryParams[\"name\"] = name;\n }\n\n if (sessionId != null) {\n _queryParams[\"sessionId\"] = sessionId;\n }\n\n if (fromTimestamp != null) {\n _queryParams[\"fromTimestamp\"] = fromTimestamp;\n }\n\n if (toTimestamp != null) {\n _queryParams[\"toTimestamp\"] = toTimestamp;\n }\n\n if (orderBy != null) {\n _queryParams[\"orderBy\"] = orderBy;\n }\n\n if (tags != null) {\n if (Array.isArray(tags)) {\n _queryParams[\"tags\"] = tags.map((item) => item);\n } else {\n _queryParams[\"tags\"] = tags;\n }\n }\n\n if (version != null) {\n _queryParams[\"version\"] = version;\n }\n\n if (release != null) {\n _queryParams[\"release\"] = release;\n }\n\n if (environment != null) {\n if (Array.isArray(environment)) {\n _queryParams[\"environment\"] = environment.map((item) => item);\n } else {\n _queryParams[\"environment\"] = environment;\n }\n }\n\n if (fields != null) {\n _queryParams[\"fields\"] = fields;\n }\n\n if (filter != null) {\n _queryParams[\"filter\"] = filter;\n }\n\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/traces\",\n ),\n method: \"GET\",\n headers: _headers,\n queryParameters: { ..._queryParams, ...requestOptions?.queryParams },\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.Traces,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling GET /api/public/traces.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n /**\n * Delete multiple traces\n *\n * @param {LangfuseAPI.DeleteTracesRequest} request\n * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link LangfuseAPI.Error}\n * @throws {@link LangfuseAPI.UnauthorizedError}\n * @throws {@link LangfuseAPI.AccessDeniedError}\n * @throws {@link LangfuseAPI.MethodNotAllowedError}\n * @throws {@link LangfuseAPI.NotFoundError}\n *\n * @example\n * await client.trace.deleteMultiple({\n * traceIds: [\"traceIds\", \"traceIds\"]\n * })\n */\n public deleteMultiple(\n request: LangfuseAPI.DeleteTracesRequest,\n requestOptions?: Trace.RequestOptions,\n ): core.HttpResponsePromise<LangfuseAPI.DeleteTraceResponse> {\n return core.HttpResponsePromise.fromPromise(\n this.__deleteMultiple(request, requestOptions),\n );\n }\n\n private async __deleteMultiple(\n request: LangfuseAPI.DeleteTracesRequest,\n requestOptions?: Trace.RequestOptions,\n ): Promise<core.WithRawResponse<LangfuseAPI.DeleteTraceResponse>> {\n let _headers: core.Fetcher.Args[\"headers\"] = mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({\n Authorization: await this._getAuthorizationHeader(),\n \"X-Langfuse-Sdk-Name\":\n requestOptions?.xLangfuseSdkName ?? this._options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\":\n requestOptions?.xLangfuseSdkVersion ??\n this._options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\":\n requestOptions?.xLangfusePublicKey ??\n this._options?.xLangfusePublicKey,\n }),\n requestOptions?.headers,\n );\n const _response = await core.fetcher({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)),\n \"/api/public/traces\",\n ),\n method: \"DELETE\",\n headers: _headers,\n contentType: \"application/json\",\n queryParameters: requestOptions?.queryParams,\n requestType: \"json\",\n body: request,\n timeoutMs:\n requestOptions?.timeoutInSeconds != null\n ? requestOptions.timeoutInSeconds * 1000\n : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: _response.body as LangfuseAPI.DeleteTraceResponse,\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === \"status-code\") {\n switch (_response.error.statusCode) {\n case 400:\n throw new LangfuseAPI.Error(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 401:\n throw new LangfuseAPI.UnauthorizedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 403:\n throw new LangfuseAPI.AccessDeniedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 405:\n throw new LangfuseAPI.MethodNotAllowedError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n case 404:\n throw new LangfuseAPI.NotFoundError(\n _response.error.body as unknown,\n _response.rawResponse,\n );\n default:\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case \"non-json\":\n throw new errors.LangfuseAPIError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case \"timeout\":\n throw new errors.LangfuseAPITimeoutError(\n \"Timeout exceeded when calling DELETE /api/public/traces.\",\n );\n case \"unknown\":\n throw new errors.LangfuseAPIError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getAuthorizationHeader(): Promise<string | undefined> {\n const username = await core.Supplier.get(this._options.username);\n const password = await core.Supplier.get(this._options.password);\n if (username != null && password != null) {\n return core.BasicAuth.toAuthorizationHeader({\n username: username,\n password: password,\n });\n }\n\n return undefined;\n }\n}\n","/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as core from \"./core/index.js\";\nimport { mergeHeaders } from \"./core/headers.js\";\nimport { AnnotationQueues } from \"./api/resources/annotationQueues/client/Client.js\";\nimport { BlobStorageIntegrations } from \"./api/resources/blobStorageIntegrations/client/Client.js\";\nimport { Comments } from \"./api/resources/comments/client/Client.js\";\nimport { DatasetItems } from \"./api/resources/datasetItems/client/Client.js\";\nimport { DatasetRunItems } from \"./api/resources/datasetRunItems/client/Client.js\";\nimport { Datasets } from \"./api/resources/datasets/client/Client.js\";\nimport { Health } from \"./api/resources/health/client/Client.js\";\nimport { Ingestion } from \"./api/resources/ingestion/client/Client.js\";\nimport { LlmConnections } from \"./api/resources/llmConnections/client/Client.js\";\nimport { Media } from \"./api/resources/media/client/Client.js\";\nimport { MetricsV2 } from \"./api/resources/metricsV2/client/Client.js\";\nimport { Metrics } from \"./api/resources/metrics/client/Client.js\";\nimport { Models } from \"./api/resources/models/client/Client.js\";\nimport { ObservationsV2 } from \"./api/resources/observationsV2/client/Client.js\";\nimport { Observations } from \"./api/resources/observations/client/Client.js\";\nimport { Opentelemetry } from \"./api/resources/opentelemetry/client/Client.js\";\nimport { Organizations } from \"./api/resources/organizations/client/Client.js\";\nimport { Projects } from \"./api/resources/projects/client/Client.js\";\nimport { PromptVersion } from \"./api/resources/promptVersion/client/Client.js\";\nimport { Prompts } from \"./api/resources/prompts/client/Client.js\";\nimport { Scim } from \"./api/resources/scim/client/Client.js\";\nimport { ScoreConfigs } from \"./api/resources/scoreConfigs/client/Client.js\";\nimport { ScoreV2 } from \"./api/resources/scoreV2/client/Client.js\";\nimport { Score } from \"./api/resources/score/client/Client.js\";\nimport { Sessions } from \"./api/resources/sessions/client/Client.js\";\nimport { Trace } from \"./api/resources/trace/client/Client.js\";\n\nexport declare namespace LangfuseAPIClient {\n export interface Options {\n environment: core.Supplier<string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n username?: core.Supplier<string | undefined>;\n password?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: core.Supplier<string | undefined>;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: core.Supplier<string | undefined>;\n /** Additional headers to include in requests. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Override the X-Langfuse-Sdk-Name header */\n xLangfuseSdkName?: string | undefined;\n /** Override the X-Langfuse-Sdk-Version header */\n xLangfuseSdkVersion?: string | undefined;\n /** Override the X-Langfuse-Public-Key header */\n xLangfusePublicKey?: string | undefined;\n /** Additional query string parameters to include in the request. */\n queryParams?: Record<string, unknown>;\n /** Additional headers to include in the request. */\n headers?: Record<\n string,\n string | core.Supplier<string | null | undefined> | null | undefined\n >;\n }\n}\n\nexport class LangfuseAPIClient {\n protected readonly _options: LangfuseAPIClient.Options;\n protected _annotationQueues: AnnotationQueues | undefined;\n protected _blobStorageIntegrations: BlobStorageIntegrations | undefined;\n protected _comments: Comments | undefined;\n protected _datasetItems: DatasetItems | undefined;\n protected _datasetRunItems: DatasetRunItems | undefined;\n protected _datasets: Datasets | undefined;\n protected _health: Health | undefined;\n protected _ingestion: Ingestion | undefined;\n protected _llmConnections: LlmConnections | undefined;\n protected _media: Media | undefined;\n protected _metricsV2: MetricsV2 | undefined;\n protected _metrics: Metrics | undefined;\n protected _models: Models | undefined;\n protected _observationsV2: ObservationsV2 | undefined;\n protected _observations: Observations | undefined;\n protected _opentelemetry: Opentelemetry | undefined;\n protected _organizations: Organizations | undefined;\n protected _projects: Projects | undefined;\n protected _promptVersion: PromptVersion | undefined;\n protected _prompts: Prompts | undefined;\n protected _scim: Scim | undefined;\n protected _scoreConfigs: ScoreConfigs | undefined;\n protected _scoreV2: ScoreV2 | undefined;\n protected _score: Score | undefined;\n protected _sessions: Sessions | undefined;\n protected _trace: Trace | undefined;\n\n constructor(_options: LangfuseAPIClient.Options) {\n this._options = {\n ..._options,\n headers: mergeHeaders(\n {\n \"X-Langfuse-Sdk-Name\": _options?.xLangfuseSdkName,\n \"X-Langfuse-Sdk-Version\": _options?.xLangfuseSdkVersion,\n \"X-Langfuse-Public-Key\": _options?.xLangfusePublicKey,\n },\n _options?.headers,\n ),\n };\n }\n\n public get annotationQueues(): AnnotationQueues {\n return (this._annotationQueues ??= new AnnotationQueues(this._options));\n }\n\n public get blobStorageIntegrations(): BlobStorageIntegrations {\n return (this._blobStorageIntegrations ??= new BlobStorageIntegrations(\n this._options,\n ));\n }\n\n public get comments(): Comments {\n return (this._comments ??= new Comments(this._options));\n }\n\n public get datasetItems(): DatasetItems {\n return (this._datasetItems ??= new DatasetItems(this._options));\n }\n\n public get datasetRunItems(): DatasetRunItems {\n return (this._datasetRunItems ??= new DatasetRunItems(this._options));\n }\n\n public get datasets(): Datasets {\n return (this._datasets ??= new Datasets(this._options));\n }\n\n public get health(): Health {\n return (this._health ??= new Health(this._options));\n }\n\n public get ingestion(): Ingestion {\n return (this._ingestion ??= new Ingestion(this._options));\n }\n\n public get llmConnections(): LlmConnections {\n return (this._llmConnections ??= new LlmConnections(this._options));\n }\n\n public get media(): Media {\n return (this._media ??= new Media(this._options));\n }\n\n public get metricsV2(): MetricsV2 {\n return (this._metricsV2 ??= new MetricsV2(this._options));\n }\n\n public get metrics(): Metrics {\n return (this._metrics ??= new Metrics(this._options));\n }\n\n public get models(): Models {\n return (this._models ??= new Models(this._options));\n }\n\n public get observationsV2(): ObservationsV2 {\n return (this._observationsV2 ??= new ObservationsV2(this._options));\n }\n\n public get observations(): Observations {\n return (this._observations ??= new Observations(this._options));\n }\n\n public get opentelemetry(): Opentelemetry {\n return (this._opentelemetry ??= new Opentelemetry(this._options));\n }\n\n public get organizations(): Organizations {\n return (this._organizations ??= new Organizations(this._options));\n }\n\n public get projects(): Projects {\n return (this._projects ??= new Projects(this._options));\n }\n\n public get promptVersion(): PromptVersion {\n return (this._promptVersion ??= new PromptVersion(this._options));\n }\n\n public get prompts(): Prompts {\n return (this._prompts ??= new Prompts(this._options));\n }\n\n public get scim(): Scim {\n return (this._scim ??= new Scim(this._options));\n }\n\n public get scoreConfigs(): ScoreConfigs {\n return (this._scoreConfigs ??= new ScoreConfigs(this._options));\n }\n\n public get scoreV2(): ScoreV2 {\n return (this._scoreV2 ??= new ScoreV2(this._options));\n }\n\n public get score(): Score {\n return (this._score ??= new Score(this._options));\n }\n\n public get sessions(): Sessions {\n return (this._sessions ??= new Sessions(this._options));\n }\n\n public get trace(): Trace {\n return (this._trace ??= new Trace(this._options));\n }\n}\n","import { MediaContentType } from \"./api/api/index.js\";\nimport { getGlobalLogger } from \"./logger/index.js\";\nimport { base64ToBytes, bytesToBase64 } from \"./utils.js\";\n\n/**\n * Parameters for creating a LangfuseMedia instance.\n *\n * Supports two input formats:\n * - Base64 data URI (e.g., \"data:image/png;base64,...\")\n * - Raw bytes with explicit content type\n *\n * @public\n */\nexport type LangfuseMediaParams =\n | {\n /** Indicates the media is provided as a base64 data URI */\n source: \"base64_data_uri\";\n /** The complete base64 data URI string */\n base64DataUri: string;\n }\n | {\n /** Indicates the media is provided as raw bytes */\n source: \"bytes\";\n /** The raw content bytes */\n contentBytes: Uint8Array;\n /** The MIME type of the content */\n contentType: MediaContentType;\n };\n\n/**\n * A class for wrapping media objects for upload to Langfuse.\n *\n * This class handles the preparation and formatting of media content for Langfuse,\n * supporting both base64 data URIs and raw content bytes. It automatically:\n * - Parses base64 data URIs to extract content type and bytes\n * - Generates SHA-256 hashes for content integrity\n * - Creates unique media IDs based on content hash\n * - Formats media references for embedding in traces\n *\n * @example\n * ```typescript\n * // From base64 data URI\n * const media1 = new LangfuseMedia({\n * source: \"base64_data_uri\",\n * base64DataUri: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==\"\n * });\n *\n * // From raw bytes\n * const media2 = new LangfuseMedia({\n * source: \"bytes\",\n * contentBytes: new Uint8Array([72, 101, 108, 108, 111])\n * contentType: \"text/plain\"\n * });\n *\n * console.log(media1.id); // Unique media ID\n * console.log(media1.tag); // Media reference tag\n * ```\n *\n * @public\n */\nexport class LangfuseMedia {\n _contentBytes?: Uint8Array;\n _contentType?: MediaContentType;\n _source?: string;\n\n /**\n * Creates a new LangfuseMedia instance.\n *\n * @param params - Media parameters specifying the source and content\n *\n * @example\n * ```typescript\n * // Create from base64 data URI\n * const media = new LangfuseMedia({\n * source: \"base64_data_uri\",\n * base64DataUri: \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...\"\n * });\n * ```\n */\n constructor(params: LangfuseMediaParams) {\n const { source } = params;\n\n this._source = source;\n\n if (source === \"base64_data_uri\") {\n const [contentBytesParsed, contentTypeParsed] = this.parseBase64DataUri(\n params.base64DataUri,\n );\n this._contentBytes = contentBytesParsed;\n this._contentType = contentTypeParsed;\n } else {\n this._contentBytes = params.contentBytes;\n this._contentType = params.contentType;\n }\n }\n\n /**\n * Parses a base64 data URI to extract content bytes and type.\n *\n * @param data - The base64 data URI string\n * @returns Tuple of [contentBytes, contentType] or [undefined, undefined] on error\n * @private\n */\n private parseBase64DataUri(\n data: string,\n ): [Uint8Array | undefined, MediaContentType | undefined] {\n try {\n if (!data || typeof data !== \"string\") {\n throw new Error(\"Data URI is not a string\");\n }\n\n if (!data.startsWith(\"data:\")) {\n throw new Error(\"Data URI does not start with 'data:'\");\n }\n\n const [header, actualData] = data.slice(5).split(\",\", 2);\n if (!header || !actualData) {\n throw new Error(\"Invalid URI\");\n }\n\n const headerParts = header.split(\";\");\n if (!headerParts.includes(\"base64\")) {\n throw new Error(\"Data is not base64 encoded\");\n }\n\n const contentType = headerParts[0];\n if (!contentType) {\n throw new Error(\"Content type is empty\");\n }\n\n return [base64ToBytes(actualData), contentType as MediaContentType];\n } catch (error) {\n getGlobalLogger().error(\"Error parsing base64 data URI\", error);\n return [undefined, undefined];\n }\n }\n\n /**\n * Gets a unique identifier for this media based on its content hash.\n *\n * The ID is derived from the first 22 characters of the URL-safe base64-encoded\n * SHA-256 hash of the content.\n *\n * @returns The unique media ID, or null if hash generation failed\n *\n * @example\n * ```typescript\n * const media = new LangfuseMedia({...});\n * console.log(media.id); // \"A1B2C3D4E5F6G7H8I9J0K1\"\n * ```\n */\n async getId(): Promise<string | null> {\n const contentSha256Hash = await this.getSha256Hash();\n if (!contentSha256Hash) return null;\n\n const urlSafeContentHash = contentSha256Hash\n .replaceAll(\"+\", \"-\")\n .replaceAll(\"/\", \"_\");\n\n return urlSafeContentHash.slice(0, 22);\n }\n\n /**\n * Gets the length of the media content in bytes.\n *\n * @returns The content length in bytes, or undefined if no content is available\n */\n get contentLength(): number | undefined {\n return this._contentBytes?.length;\n }\n\n /**\n * Gets the SHA-256 hash of the media content.\n *\n * The hash is used for content integrity verification and generating unique media IDs.\n * Returns undefined if crypto is not available or hash generation fails.\n *\n * @returns The base64-encoded SHA-256 hash, or undefined if unavailable\n */\n async getSha256Hash(): Promise<string | undefined> {\n if (!this._contentBytes) {\n return undefined;\n }\n\n try {\n const hash = await crypto.subtle.digest(\"SHA-256\", this._contentBytes);\n\n return bytesToBase64(new Uint8Array(hash));\n } catch (error) {\n getGlobalLogger().warn(\n \"[Langfuse] Failed to generate SHA-256 hash for media content:\",\n error,\n );\n\n return undefined;\n }\n }\n\n /**\n * Gets the media reference tag for embedding in trace data.\n *\n * The tag format is: `@@@langfuseMedia:type=<contentType>|id=<mediaId>|source=<source>@@@`\n * This tag can be embedded in trace attributes and will be replaced with actual\n * media content when the trace is viewed in Langfuse.\n *\n * @returns The media reference tag, or null if required data is missing\n *\n * @example\n * ```typescript\n * const media = new LangfuseMedia({...});\n * console.log(media.tag);\n * // \"@@@langfuseMedia:type=image/png|id=A1B2C3D4E5F6G7H8I9J0K1|source=base64_data_uri@@@\"\n * ```\n */\n async getTag(): Promise<string | null> {\n const id = await this.getId();\n\n if (!this._contentType || !this._source || !id) return null;\n\n return `@@@langfuseMedia:type=${this._contentType}|id=${id}|source=${this._source}@@@`;\n }\n\n /**\n * Gets the media content as a base64 data URI.\n *\n * @returns The complete data URI string, or null if no content is available\n *\n * @example\n * ```typescript\n * const media = new LangfuseMedia({...});\n * console.log(media.base64DataUri);\n * // \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...\"\n * ```\n */\n get base64DataUri(): string | null {\n if (!this._contentBytes) return null;\n\n return `data:${this._contentType};base64,${bytesToBase64(this._contentBytes)}`;\n }\n\n /**\n * Serializes the media to JSON (returns the base64 data URI).\n *\n * @returns The base64 data URI, or null if no content is available\n */\n toJSON(): string | null {\n return this.base64DataUri;\n }\n}\n","/**\n * Attribute propagation utilities for Langfuse OpenTelemetry integration.\n *\n * This module provides the `propagateAttributes` function for setting trace-level\n * attributes (userId, sessionId, metadata) that automatically propagate to all child spans\n * within the context.\n */\n\nimport {\n context as otelContextApi,\n trace as otelTraceApi,\n propagation,\n Context,\n createContextKey,\n} from \"@opentelemetry/api\";\n\nimport {\n ELASTICDASH_SDK_EXPERIMENT_ENVIRONMENT,\n LangfuseOtelSpanAttributes,\n} from \"./constants.js\";\nimport { getGlobalLogger } from \"./logger/index.js\";\n\ntype CorrelatedKey =\n | \"userId\"\n | \"sessionId\"\n | \"metadata\"\n | \"version\"\n | \"tags\"\n | \"traceName\";\n\nconst experimentKeys = [\n \"experimentId\",\n \"experimentName\",\n \"experimentMetadata\",\n \"experimentDatasetId\",\n \"experimentItemId\",\n \"experimentItemMetadata\",\n \"experimentItemRootObservationId\",\n] as const;\ntype ExperimentKey = (typeof experimentKeys)[number];\ntype PropagatedKey = CorrelatedKey | ExperimentKey;\n\ntype PropagatedExperimentAttributes = {\n experimentId: string;\n experimentName: string;\n experimentMetadata?: string; // serialized JSON\n experimentDatasetId?: string;\n experimentItemId: string;\n experimentItemMetadata?: string; // serialized JSON\n experimentItemRootObservationId: string;\n};\n\nexport const LangfuseOtelContextKeys: Record<PropagatedKey, symbol> = {\n userId: createContextKey(\"langfuse_user_id\"),\n sessionId: createContextKey(\"langfuse_session_id\"),\n metadata: createContextKey(\"langfuse_metadata\"),\n version: createContextKey(\"langfuse_version\"),\n tags: createContextKey(\"langfuse_tags\"),\n traceName: createContextKey(\"langfuse_trace_name\"),\n\n // Experiments\n experimentId: createContextKey(\"langfuse_experiment_id\"),\n experimentName: createContextKey(\"langfuse_experiment_name\"),\n experimentMetadata: createContextKey(\"langfuse_experiment_metadata\"),\n experimentDatasetId: createContextKey(\"langfuse_experiment_dataset_id\"),\n experimentItemId: createContextKey(\"langfuse_experiment_item_id\"),\n experimentItemMetadata: createContextKey(\"langfuse_experiment_item_metadata\"),\n experimentItemRootObservationId: createContextKey(\n \"langfuse_experiment_item_root_observation_id\",\n ),\n};\n\nconst ELASTICDASH_BAGGAGE_PREFIX = \"langfuse_\";\nconst ELASTICDASH_BAGGAGE_TAGS_SEPARATOR = \",\";\n\n/**\n * Parameters for propagateAttributes function.\n *\n * @public\n */\nexport interface PropagateAttributesParams {\n /**\n * User identifier to associate with all spans in this context.\n * Must be a string ≤200 characters. Use this to track which user\n * generated each trace and enable e.g. per-user cost/performance analysis.\n */\n userId?: string;\n\n /**\n * Session identifier to associate with all spans in this context.\n * Must be a string ≤200 characters. Use this to group related traces\n * within a user session (e.g., a conversation thread, multi-turn interaction).\n */\n sessionId?: string;\n\n /**\n * Additional key-value metadata to propagate to all spans.\n * - Keys and values must be strings\n * - All values must be ≤200 characters\n * - Use for dimensions like internal correlating identifiers\n * - AVOID: large payloads, sensitive data, non-string values (will be dropped with warning)\n */\n metadata?: Record<string, string>;\n\n /**\n * Version identifier for parts of your application that are independently versioned, e.g. agents\n */\n version?: string;\n\n /**\n * List of tags to categorize the group of observations\n */\n tags?: string[];\n\n /**\n * Trace name to associate with all spans in this context.\n * Must be a string ≤200 characters.\n */\n traceName?: string;\n\n /**\n * If true, propagates attributes using OpenTelemetry baggage for\n * cross-process/service propagation.\n *\n * **Security warning**: When enabled, attribute values are added to HTTP headers\n * on ALL outbound requests. Only enable if values are safe to transmit via HTTP\n * headers and you need cross-service tracing.\n *\n * @defaultValue false\n */\n asBaggage?: boolean;\n\n /**\n * **INTERNAL USE ONLY** - For Langfuse experiment framework.\n *\n * This parameter is used internally by the Langfuse experiment system to propagate\n * experiment context to child spans. It should NOT be used by external code.\n *\n * @internal\n */\n _internalExperiment?: PropagatedExperimentAttributes;\n}\n\n/**\n * Propagate trace-level attributes to all spans created within this context.\n *\n * This function sets attributes on the currently active span AND automatically\n * propagates them to all new child spans created within the callback. This is the\n * recommended way to set trace-level attributes like userId, sessionId, and metadata\n * dimensions that should be consistently applied across all observations in a trace.\n *\n * **IMPORTANT**: Call this as early as possible within your trace/workflow. Only the\n * currently active span and spans created after entering this context will have these\n * attributes. Pre-existing spans will NOT be retroactively updated.\n *\n * **Why this matters**: Langfuse aggregation queries (e.g., total cost by userId,\n * filtering by sessionId) only include observations that have the attribute set.\n * If you call `propagateAttributes` late in your workflow, earlier spans won't be\n * included in aggregations for that attribute.\n *\n * @param params - Configuration for attributes to propagate\n * @param fn - Callback function (sync or async) within which attributes are propagated\n * @returns The result of the callback function\n *\n * @example\n * Basic usage with user and session tracking:\n *\n * ```typescript\n * import { startActiveObservation, propagateAttributes } from '@elasticdash/tracing';\n *\n * // Set attributes early in the trace\n * await startActiveObservation('user_workflow', async (span) => {\n * await propagateAttributes({\n * userId: 'user_123',\n * sessionId: 'session_abc',\n * metadata: { experiment: 'variant_a', environment: 'production' }\n * }, async () => {\n * // All spans created here will have userId, sessionId, and metadata\n * const llmSpan = startObservation('llm_call', { input: 'Hello' });\n * // This span inherits: userId, sessionId, experiment, environment\n * llmSpan.end();\n *\n * const gen = startObservation('completion', {}, { asType: 'generation' });\n * // This span also inherits all attributes\n * gen.end();\n * });\n * });\n * ```\n *\n * @example\n * Late propagation (anti-pattern):\n *\n * ```typescript\n * await startActiveObservation('workflow', async (span) => {\n * // These spans WON'T have userId\n * const earlySpan = startObservation('early_work', { input: 'data' });\n * earlySpan.end();\n *\n * // Set attributes in the middle\n * await propagateAttributes({ userId: 'user_123' }, async () => {\n * // Only spans created AFTER this point will have userId\n * const lateSpan = startObservation('late_work', { input: 'more' });\n * lateSpan.end();\n * });\n *\n * // Result: Aggregations by userId will miss \"early_work\" span\n * });\n * ```\n *\n * @example\n * Cross-service propagation with baggage (advanced):\n *\n * ```typescript\n * import fetch from 'node-fetch';\n *\n * // Service A - originating service\n * await startActiveObservation('api_request', async () => {\n * await propagateAttributes({\n * userId: 'user_123',\n * sessionId: 'session_abc',\n * asBaggage: true // Propagate via HTTP headers\n * }, async () => {\n * // Make HTTP request to Service B\n * const response = await fetch('https://service-b.example.com/api');\n * // userId and sessionId are now in HTTP headers\n * });\n * });\n *\n * // Service B - downstream service\n * // OpenTelemetry will automatically extract baggage from HTTP headers\n * // and propagate to spans in Service B\n * ```\n *\n * @remarks\n * - **Validation**: All attribute values (userId, sessionId, metadata values)\n * must be strings ≤200 characters. Invalid values will be dropped with a\n * warning logged. Ensure values meet constraints before calling.\n * - **OpenTelemetry**: This uses OpenTelemetry context propagation under the hood,\n * making it compatible with other OTel-instrumented libraries.\n * - **Baggage Security**: When `asBaggage=true`, attribute values are added to HTTP\n * headers on outbound requests. Only use for non-sensitive values and when you\n * need cross-service tracing.\n *\n * @public\n */\nexport function propagateAttributes<\n A extends unknown[],\n F extends (...args: A) => ReturnType<F>,\n>(params: PropagateAttributesParams, fn: F): ReturnType<F> {\n let context = otelContextApi.active();\n\n const span = otelTraceApi.getActiveSpan();\n const asBaggage = params.asBaggage ?? false;\n\n const {\n userId,\n sessionId,\n metadata,\n version,\n tags,\n traceName,\n _internalExperiment,\n } = params;\n\n // Validate and set userId\n if (userId) {\n if (isValidPropagatedString({ value: userId, attributeName: \"userId\" })) {\n context = setPropagatedAttribute({\n key: \"userId\",\n value: userId,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set sessionId\n if (sessionId) {\n if (\n isValidPropagatedString({\n value: sessionId,\n attributeName: \"sessionId\",\n })\n ) {\n context = setPropagatedAttribute({\n key: \"sessionId\",\n value: sessionId,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set version\n if (version) {\n if (\n isValidPropagatedString({\n value: version,\n attributeName: \"version\",\n })\n ) {\n context = setPropagatedAttribute({\n key: \"version\",\n value: version,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set traceName\n if (traceName) {\n if (\n isValidPropagatedString({\n value: traceName,\n attributeName: \"traceName\",\n })\n ) {\n context = setPropagatedAttribute({\n key: \"traceName\",\n value: traceName,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set tags\n if (tags && tags.length > 0) {\n const validTags = tags.filter((tag) =>\n isValidPropagatedString({\n value: tag,\n attributeName: \"tag\",\n }),\n );\n\n if (validTags.length > 0) {\n context = setPropagatedAttribute({\n key: \"tags\",\n value: validTags,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Validate and set metadata\n if (metadata) {\n // Filter metadata to only include valid string values\n const validatedMetadata: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(metadata)) {\n if (\n isValidPropagatedString({\n value: value,\n attributeName: `metadata.${key}`,\n })\n ) {\n validatedMetadata[key] = value;\n }\n }\n\n if (Object.keys(validatedMetadata).length > 0) {\n context = setPropagatedAttribute({\n key: \"metadata\",\n value: validatedMetadata,\n context,\n span,\n asBaggage,\n });\n }\n }\n\n // Handle experiment attributes\n if (_internalExperiment) {\n for (const [key, value] of Object.entries(_internalExperiment)) {\n if (value !== undefined) {\n // Experiment attributes are already serialized, no validation needed\n context = setPropagatedAttribute({\n key: key as ExperimentKey,\n value,\n context,\n span,\n asBaggage,\n });\n }\n }\n }\n\n // Execute callback in the new context\n return otelContextApi.with(context, fn);\n}\n\nexport function getPropagatedAttributesFromContext(\n context: Context,\n): Record<string, string | string[]> {\n const propagatedAttributes: Record<string, string | string[]> = {};\n\n // Handle baggage\n const baggage = propagation.getBaggage(context);\n\n if (baggage) {\n baggage.getAllEntries().forEach(([baggageKey, baggageEntry]) => {\n if (baggageKey.startsWith(ELASTICDASH_BAGGAGE_PREFIX)) {\n const spanKey = getSpanKeyFromBaggageKey(baggageKey);\n\n if (spanKey) {\n const isMergedTags =\n baggageKey == getBaggageKeyForPropagatedKey(\"tags\");\n\n propagatedAttributes[spanKey] = isMergedTags\n ? baggageEntry.value.split(ELASTICDASH_BAGGAGE_TAGS_SEPARATOR)\n : baggageEntry.value;\n }\n }\n });\n }\n\n // Handle OTEL context values\n const userId = context.getValue(LangfuseOtelContextKeys[\"userId\"]);\n if (userId && typeof userId === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"userId\");\n\n propagatedAttributes[spanKey] = userId;\n }\n\n const sessionId = context.getValue(LangfuseOtelContextKeys[\"sessionId\"]);\n if (sessionId && typeof sessionId === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"sessionId\");\n\n propagatedAttributes[spanKey] = sessionId;\n }\n\n const version = context.getValue(LangfuseOtelContextKeys[\"version\"]);\n if (version && typeof version === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"version\");\n\n propagatedAttributes[spanKey] = version;\n }\n\n const traceName = context.getValue(LangfuseOtelContextKeys[\"traceName\"]);\n if (traceName && typeof traceName === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(\"traceName\");\n\n propagatedAttributes[spanKey] = traceName;\n }\n\n const tags = context.getValue(LangfuseOtelContextKeys[\"tags\"]);\n if (tags && Array.isArray(tags)) {\n const spanKey = getSpanKeyForPropagatedKey(\"tags\");\n\n propagatedAttributes[spanKey] = tags;\n }\n\n const metadata = context.getValue(LangfuseOtelContextKeys[\"metadata\"]);\n if (metadata && typeof metadata === \"object\" && metadata !== null) {\n for (const [k, v] of Object.entries(metadata)) {\n const spanKey = `${LangfuseOtelSpanAttributes.TRACE_METADATA}.${k}`;\n\n propagatedAttributes[spanKey] = String(v);\n }\n }\n\n // Extract experiment attributes\n for (const key of experimentKeys) {\n const contextKey = LangfuseOtelContextKeys[key];\n const value = context.getValue(contextKey);\n\n if (value && typeof value === \"string\") {\n const spanKey = getSpanKeyForPropagatedKey(key);\n propagatedAttributes[spanKey] = value;\n }\n }\n\n // add environment if propagation is for experiment\n if (\n propagatedAttributes[\n getSpanKeyForPropagatedKey(\"experimentItemRootObservationId\")\n ]\n ) {\n propagatedAttributes[LangfuseOtelSpanAttributes.ENVIRONMENT] =\n ELASTICDASH_SDK_EXPERIMENT_ENVIRONMENT;\n }\n\n return propagatedAttributes;\n}\n\ntype SetPropagatedAttributeParams = {\n context: Context;\n span: ReturnType<typeof otelTraceApi.getActiveSpan>;\n asBaggage: boolean;\n} & (\n | {\n key: \"userId\" | \"sessionId\" | \"version\" | \"traceName\" | ExperimentKey;\n value: string;\n }\n | {\n key: \"metadata\";\n value: Record<string, string>;\n }\n | {\n key: \"tags\";\n value: string[];\n }\n);\n\nfunction setPropagatedAttribute(params: SetPropagatedAttributeParams): Context {\n const { key, value, span, asBaggage } = params;\n\n let context = params.context;\n let mergedMetadata: Record<string, string> =\n key === \"metadata\" ? getContextMergedMetadata(context, value) : {};\n let mergedTags = key === \"tags\" ? getContextMergedTags(context, value) : [];\n\n // Get the context key for this attribute\n const contextKey = getContextKeyForPropagatedKey(key);\n\n // Set in context\n if (key === \"metadata\") {\n context = context.setValue(contextKey, mergedMetadata);\n } else if (key === \"tags\") {\n context = context.setValue(contextKey, mergedTags);\n } else {\n context = context.setValue(contextKey, value);\n }\n\n // Set on current span\n if (span && span.isRecording()) {\n if (key === \"metadata\") {\n for (const [k, v] of Object.entries(mergedMetadata)) {\n span.setAttribute(\n `${LangfuseOtelSpanAttributes.TRACE_METADATA}.${k}`,\n v,\n );\n }\n } else if (key === \"tags\") {\n const spanKey = getSpanKeyForPropagatedKey(key);\n span.setAttribute(spanKey, mergedTags);\n } else {\n const spanKey = getSpanKeyForPropagatedKey(key);\n span.setAttribute(spanKey, value);\n }\n }\n\n // Set on baggage\n if (asBaggage) {\n const baggageKey = getBaggageKeyForPropagatedKey(key);\n let baggage =\n propagation.getBaggage(context) || propagation.createBaggage();\n\n if (key === \"metadata\") {\n for (const [k, v] of Object.entries(mergedMetadata)) {\n baggage = baggage.setEntry(`${baggageKey}_${k}`, { value: v });\n }\n } else if (key === \"tags\") {\n baggage = baggage.setEntry(baggageKey, {\n value: mergedTags.join(ELASTICDASH_BAGGAGE_TAGS_SEPARATOR),\n });\n } else {\n baggage = baggage.setEntry(baggageKey, { value });\n }\n\n context = propagation.setBaggage(context, baggage);\n }\n\n return context;\n}\n\nfunction getContextMergedTags(context: Context, newTags: string[]): string[] {\n const existingTags = context.getValue(LangfuseOtelContextKeys[\"tags\"]);\n\n if (existingTags && Array.isArray(existingTags)) {\n return [...new Set([...existingTags, ...newTags])];\n } else {\n return newTags;\n }\n}\n\nfunction getContextMergedMetadata(\n context: Context,\n newMetadata: Record<string, string>,\n): Record<string, string> {\n const existingMetadata = context.getValue(\n LangfuseOtelContextKeys[\"metadata\"],\n );\n\n if (\n existingMetadata &&\n typeof existingMetadata === \"object\" &&\n existingMetadata !== null &&\n !Array.isArray(existingMetadata)\n ) {\n return { ...(existingMetadata as Record<string, string>), ...newMetadata };\n } else {\n return newMetadata;\n }\n}\n\nfunction isValidPropagatedString(params: {\n value: string;\n attributeName: string;\n}): boolean {\n const logger = getGlobalLogger();\n const { value, attributeName } = params;\n\n if (typeof value !== \"string\") {\n logger.warn(\n `Propagated attribute '${attributeName}' must be a string. Dropping value.`,\n );\n return false;\n }\n\n if (value.length > 200) {\n logger.warn(\n `Propagated attribute '${attributeName}' value is over 200 characters (${value.length} chars). Dropping value.`,\n );\n\n return false;\n }\n\n return true;\n}\n\nfunction getContextKeyForPropagatedKey(key: PropagatedKey): symbol {\n return LangfuseOtelContextKeys[key];\n}\n\nfunction getSpanKeyForPropagatedKey(key: PropagatedKey): string {\n switch (key) {\n case \"userId\":\n return LangfuseOtelSpanAttributes.TRACE_USER_ID;\n case \"sessionId\":\n return LangfuseOtelSpanAttributes.TRACE_SESSION_ID;\n case \"version\":\n return LangfuseOtelSpanAttributes.VERSION;\n case \"traceName\":\n return LangfuseOtelSpanAttributes.TRACE_NAME;\n case \"metadata\":\n return LangfuseOtelSpanAttributes.TRACE_METADATA;\n case \"tags\":\n return LangfuseOtelSpanAttributes.TRACE_TAGS;\n case \"experimentId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ID;\n case \"experimentName\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_NAME;\n case \"experimentMetadata\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_METADATA;\n case \"experimentDatasetId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_DATASET_ID;\n case \"experimentItemId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ITEM_ID;\n case \"experimentItemMetadata\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ITEM_METADATA;\n case \"experimentItemRootObservationId\":\n return LangfuseOtelSpanAttributes.EXPERIMENT_ITEM_ROOT_OBSERVATION_ID;\n default: {\n const fallback: never = key;\n\n throw Error(\"Unhandled propagated key\", fallback);\n }\n }\n}\n\nfunction getBaggageKeyForPropagatedKey(key: PropagatedKey): string {\n // baggage keys must be snake case for correct cross service propagation\n // second service might run Python SDK that is expecting snake case keys\n switch (key) {\n case \"userId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}user_id`;\n case \"sessionId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}session_id`;\n case \"version\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}version`;\n case \"traceName\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}trace_name`;\n case \"metadata\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}metadata`;\n case \"tags\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}tags`;\n case \"experimentId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_id`;\n case \"experimentName\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_name`;\n case \"experimentMetadata\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_metadata`;\n case \"experimentDatasetId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_dataset_id`;\n case \"experimentItemId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_item_id`;\n case \"experimentItemMetadata\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_item_metadata`;\n case \"experimentItemRootObservationId\":\n return `${ELASTICDASH_BAGGAGE_PREFIX}experiment_item_root_observation_id`;\n default: {\n const fallback: never = key;\n\n throw Error(\"Unhandled propagated key\", fallback);\n }\n }\n}\n\nfunction getSpanKeyFromBaggageKey(baggageKey: string): string | undefined {\n if (!baggageKey.startsWith(ELASTICDASH_BAGGAGE_PREFIX)) return;\n\n const suffix = baggageKey.slice(ELASTICDASH_BAGGAGE_PREFIX.length);\n\n // Metadata keys have format: langfuse_metadata_{key_name}\n if (suffix.startsWith(\"metadata_\")) {\n const metadataKey = suffix.slice(\"metadata_\".length);\n\n return `${LangfuseOtelSpanAttributes.TRACE_METADATA}.${metadataKey}`;\n }\n\n switch (suffix) {\n case \"user_id\":\n return getSpanKeyForPropagatedKey(\"userId\");\n case \"session_id\":\n return getSpanKeyForPropagatedKey(\"sessionId\");\n case \"version\":\n return getSpanKeyForPropagatedKey(\"version\");\n case \"trace_name\":\n return getSpanKeyForPropagatedKey(\"traceName\");\n case \"tags\":\n return getSpanKeyForPropagatedKey(\"tags\");\n case \"experiment_id\":\n return getSpanKeyForPropagatedKey(\"experimentId\");\n case \"experiment_name\":\n return getSpanKeyForPropagatedKey(\"experimentName\");\n case \"experiment_metadata\":\n return getSpanKeyForPropagatedKey(\"experimentMetadata\");\n case \"experiment_dataset_id\":\n return getSpanKeyForPropagatedKey(\"experimentDatasetId\");\n case \"experiment_item_id\":\n return getSpanKeyForPropagatedKey(\"experimentItemId\");\n case \"experiment_item_metadata\":\n return getSpanKeyForPropagatedKey(\"experimentItemMetadata\");\n case \"experiment_item_root_observation_id\":\n return getSpanKeyForPropagatedKey(\"experimentItemRootObservationId\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACYO,SAAS,OAAO,KAAyC;AAC9D,MAAI,OAAO,YAAY,eAAe,QAAQ,IAAI,GAAG,GAAG;AACtD,WAAO,QAAQ,IAAI,GAAG;AAAA,EACxB,WAAW,OAAO,eAAe,aAAa;AAC5C,WAAQ,WAAmB,GAAG;AAAA,EAChC;AAEA;AACF;AAGO,SAAS,aAAaC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;AACH,aAAO,2BAA2B,kBAAkB;AAAA,IACtD,KAAK;AACH,aAAO,2BAA2B,wBAAwB;AAAA,IAC5D,KAAK;AACH,aAAO,2BAA2B,iCAAiC;AAAA,EACvE;AACF;","names":["Error","globalThis","LogLevel","LangfuseOtelSpanAttributes","Error","Error","_a","text","Headers","base64ToBytes","bytesToBase64","base64Encode","base64Decode","base64Encode","base64Decode","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","Error","_a","_a","_a","otelContextApi","otelTraceApi"]}
|