@langfuse/core 5.0.0 → 5.0.2

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.d.cts CHANGED
@@ -4,6 +4,8 @@ import { Context } from '@opentelemetry/api';
4
4
  * Enumeration of log levels in order of severity (lowest to highest).
5
5
  */
6
6
  declare enum LogLevel {
7
+ /** Not logging anything */
8
+ NONE = 4,
7
9
  /** Critical errors that may cause application failure */
8
10
  ERROR = 3,
9
11
  /** Warning messages for potentially harmful situations */
@@ -261,7 +263,7 @@ declare const AnnotationQueueObjectType: {
261
263
  interface AnnotationQueue {
262
264
  id: string;
263
265
  name: string;
264
- description?: string;
266
+ description: string | null;
265
267
  scoreConfigIds: string[];
266
268
  createdAt: string;
267
269
  updatedAt: string;
@@ -305,7 +307,7 @@ interface PaginatedAnnotationQueueItems {
305
307
  */
306
308
  interface CreateAnnotationQueueRequest {
307
309
  name: string;
308
- description?: string;
310
+ description?: string | null;
309
311
  scoreConfigIds: string[];
310
312
  }
311
313
 
@@ -478,6 +480,8 @@ interface CreateBlobStorageIntegrationRequest {
478
480
  exportMode: BlobStorageExportMode;
479
481
  /** Custom start date for exports (required when exportMode is FROM_CUSTOM_DATE) */
480
482
  exportStartDate?: string;
483
+ /** Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. */
484
+ compressed?: boolean;
481
485
  }
482
486
 
483
487
  /**
@@ -489,18 +493,21 @@ interface BlobStorageIntegrationResponse {
489
493
  projectId: string;
490
494
  type: BlobStorageIntegrationType;
491
495
  bucketName: string;
492
- endpoint?: string;
496
+ endpoint: string | null;
493
497
  region: string;
494
- accessKeyId?: string;
498
+ accessKeyId: string | null;
495
499
  prefix: string;
496
500
  exportFrequency: BlobStorageExportFrequency;
497
501
  enabled: boolean;
498
502
  forcePathStyle: boolean;
499
503
  fileType: BlobStorageIntegrationFileType;
500
504
  exportMode: BlobStorageExportMode;
501
- exportStartDate?: string;
502
- nextSyncAt?: string;
503
- lastSyncAt?: string;
505
+ exportStartDate: string | null;
506
+ compressed: boolean;
507
+ nextSyncAt: string | null;
508
+ lastSyncAt: string | null;
509
+ lastError: string | null;
510
+ lastErrorAt: string | null;
504
511
  createdAt: string;
505
512
  updatedAt: string;
506
513
  }
@@ -513,6 +520,49 @@ interface BlobStorageIntegrationsResponse {
513
520
  data: BlobStorageIntegrationResponse[];
514
521
  }
515
522
 
523
+ /**
524
+ * This file was auto-generated by Fern from our API Definition.
525
+ */
526
+ /**
527
+ * Sync status of the blob storage integration:
528
+ * - `disabled` — integration is not enabled
529
+ * - `error` — last export failed (see `lastError` for details)
530
+ * - `idle` — enabled but has never exported yet
531
+ * - `queued` — next export is overdue (`nextSyncAt` is in the past) and waiting to be picked up by the worker
532
+ * - `up_to_date` — all available data has been exported; next export is scheduled for the future
533
+ *
534
+ * **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your
535
+ * ETL bookmark to determine if new data is available. Note that exports run with a 30-minute lag buffer,
536
+ * so `lastSyncAt` will always be at least 30 minutes behind real-time.
537
+ */
538
+ type BlobStorageSyncStatus = "idle" | "queued" | "up_to_date" | "disabled" | "error";
539
+ declare const BlobStorageSyncStatus: {
540
+ readonly Idle: "idle";
541
+ readonly Queued: "queued";
542
+ readonly UpToDate: "up_to_date";
543
+ readonly Disabled: "disabled";
544
+ readonly Error: "error";
545
+ };
546
+
547
+ /**
548
+ * This file was auto-generated by Fern from our API Definition.
549
+ */
550
+
551
+ interface BlobStorageIntegrationStatusResponse {
552
+ id: string;
553
+ projectId: string;
554
+ syncStatus: BlobStorageSyncStatus;
555
+ enabled: boolean;
556
+ /** End of the last successfully exported time window. Compare against your ETL bookmark to determine if new data is available. Null if the integration has never synced. */
557
+ lastSyncAt: string | null;
558
+ /** When the next export is scheduled. Null if no sync has occurred yet. */
559
+ nextSyncAt: string | null;
560
+ /** Raw error message from the storage provider (S3/Azure/GCS) if the last export failed. Cleared on successful export. */
561
+ lastError: string | null;
562
+ /** When the last error occurred. Cleared on successful export. */
563
+ lastErrorAt: string | null;
564
+ }
565
+
516
566
  /**
517
567
  * This file was auto-generated by Fern from our API Definition.
518
568
  */
@@ -525,11 +575,13 @@ declare const index$s_BlobStorageExportMode: typeof BlobStorageExportMode;
525
575
  type index$s_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
526
576
  declare const index$s_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
527
577
  type index$s_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
578
+ type index$s_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
528
579
  declare const index$s_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
529
580
  type index$s_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
581
+ declare const index$s_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
530
582
  type index$s_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
531
583
  declare namespace index$s {
532
- export { index$s_BlobStorageExportFrequency as BlobStorageExportFrequency, index$s_BlobStorageExportMode as BlobStorageExportMode, type index$s_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$s_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, type index$s_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, index$s_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$s_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, type index$s_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
584
+ export { index$s_BlobStorageExportFrequency as BlobStorageExportFrequency, index$s_BlobStorageExportMode as BlobStorageExportMode, type index$s_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$s_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, type index$s_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, type index$s_BlobStorageIntegrationStatusResponse as BlobStorageIntegrationStatusResponse, index$s_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$s_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, index$s_BlobStorageSyncStatus as BlobStorageSyncStatus, type index$s_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
533
585
  }
534
586
 
535
587
  /**
@@ -1817,6 +1869,8 @@ interface CreateDatasetRunItemRequest {
1817
1869
  * If not provided, uses the latest version of dataset items.
1818
1870
  */
1819
1871
  datasetVersion?: string;
1872
+ /** Optional timestamp to set the createdAt field of the dataset run item. If not provided or null, defaults to current timestamp. */
1873
+ createdAt?: string;
1820
1874
  }
1821
1875
 
1822
1876
  /**
@@ -4019,7 +4073,7 @@ interface BasePrompt {
4019
4073
  tags: string[];
4020
4074
  /** Commit message for this prompt version. */
4021
4075
  commitMessage?: string;
4022
- /** The dependency resolution graph for the current prompt. Null if prompt has no dependencies. */
4076
+ /** The dependency resolution graph for the current prompt. Null if the prompt has no dependencies or if `resolve=false` was used. */
4023
4077
  resolutionGraph?: Record<string, unknown>;
4024
4078
  }
4025
4079
 
@@ -4108,6 +4162,8 @@ interface GetPromptRequest {
4108
4162
  version?: number;
4109
4163
  /** Label of the prompt to be retrieved. Defaults to "production" if no label or version is set. */
4110
4164
  label?: string;
4165
+ /** Resolve prompt dependencies before returning the prompt. Defaults to `true`. Set to `false` to return the raw stored prompt with dependency tags intact. This bypasses prompt caching and is intended for debugging or one-off jobs, not production runtime fetches. */
4166
+ resolve?: boolean;
4111
4167
  }
4112
4168
 
4113
4169
  /**
@@ -5204,11 +5260,29 @@ declare class BlobStorageIntegrations {
5204
5260
  * forcePathStyle: true,
5205
5261
  * fileType: "JSON",
5206
5262
  * exportMode: "FULL_HISTORY",
5207
- * exportStartDate: undefined
5263
+ * exportStartDate: undefined,
5264
+ * compressed: undefined
5208
5265
  * })
5209
5266
  */
5210
5267
  upsertBlobStorageIntegration(request: CreateBlobStorageIntegrationRequest, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationResponse>;
5211
5268
  private __upsertBlobStorageIntegration;
5269
+ /**
5270
+ * Get the sync status of a blob storage integration by integration ID (requires organization-scoped API key)
5271
+ *
5272
+ * @param {string} id
5273
+ * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.
5274
+ *
5275
+ * @throws {@link LangfuseAPI.Error}
5276
+ * @throws {@link LangfuseAPI.UnauthorizedError}
5277
+ * @throws {@link LangfuseAPI.AccessDeniedError}
5278
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
5279
+ * @throws {@link LangfuseAPI.NotFoundError}
5280
+ *
5281
+ * @example
5282
+ * await client.blobStorageIntegrations.getBlobStorageIntegrationStatus("id")
5283
+ */
5284
+ getBlobStorageIntegrationStatus(id: string, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationStatusResponse>;
5285
+ private __getBlobStorageIntegrationStatus;
5212
5286
  /**
5213
5287
  * Delete a blob storage integration by ID (requires organization-scoped API key)
5214
5288
  *
@@ -5516,7 +5590,8 @@ declare class DatasetRunItems {
5516
5590
  * datasetItemId: "datasetItemId",
5517
5591
  * observationId: undefined,
5518
5592
  * traceId: undefined,
5519
- * datasetVersion: undefined
5593
+ * datasetVersion: undefined,
5594
+ * createdAt: undefined
5520
5595
  * })
5521
5596
  */
5522
5597
  create(request: CreateDatasetRunItemRequest, requestOptions?: DatasetRunItems.RequestOptions): HttpResponsePromise<DatasetRunItem>;
@@ -8444,4 +8519,4 @@ interface PropagateAttributesParams {
8444
8519
  declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
8445
8520
  declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
8446
8521
 
8447
- export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
8522
+ export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ import { Context } from '@opentelemetry/api';
4
4
  * Enumeration of log levels in order of severity (lowest to highest).
5
5
  */
6
6
  declare enum LogLevel {
7
+ /** Not logging anything */
8
+ NONE = 4,
7
9
  /** Critical errors that may cause application failure */
8
10
  ERROR = 3,
9
11
  /** Warning messages for potentially harmful situations */
@@ -261,7 +263,7 @@ declare const AnnotationQueueObjectType: {
261
263
  interface AnnotationQueue {
262
264
  id: string;
263
265
  name: string;
264
- description?: string;
266
+ description: string | null;
265
267
  scoreConfigIds: string[];
266
268
  createdAt: string;
267
269
  updatedAt: string;
@@ -305,7 +307,7 @@ interface PaginatedAnnotationQueueItems {
305
307
  */
306
308
  interface CreateAnnotationQueueRequest {
307
309
  name: string;
308
- description?: string;
310
+ description?: string | null;
309
311
  scoreConfigIds: string[];
310
312
  }
311
313
 
@@ -478,6 +480,8 @@ interface CreateBlobStorageIntegrationRequest {
478
480
  exportMode: BlobStorageExportMode;
479
481
  /** Custom start date for exports (required when exportMode is FROM_CUSTOM_DATE) */
480
482
  exportStartDate?: string;
483
+ /** Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. */
484
+ compressed?: boolean;
481
485
  }
482
486
 
483
487
  /**
@@ -489,18 +493,21 @@ interface BlobStorageIntegrationResponse {
489
493
  projectId: string;
490
494
  type: BlobStorageIntegrationType;
491
495
  bucketName: string;
492
- endpoint?: string;
496
+ endpoint: string | null;
493
497
  region: string;
494
- accessKeyId?: string;
498
+ accessKeyId: string | null;
495
499
  prefix: string;
496
500
  exportFrequency: BlobStorageExportFrequency;
497
501
  enabled: boolean;
498
502
  forcePathStyle: boolean;
499
503
  fileType: BlobStorageIntegrationFileType;
500
504
  exportMode: BlobStorageExportMode;
501
- exportStartDate?: string;
502
- nextSyncAt?: string;
503
- lastSyncAt?: string;
505
+ exportStartDate: string | null;
506
+ compressed: boolean;
507
+ nextSyncAt: string | null;
508
+ lastSyncAt: string | null;
509
+ lastError: string | null;
510
+ lastErrorAt: string | null;
504
511
  createdAt: string;
505
512
  updatedAt: string;
506
513
  }
@@ -513,6 +520,49 @@ interface BlobStorageIntegrationsResponse {
513
520
  data: BlobStorageIntegrationResponse[];
514
521
  }
515
522
 
523
+ /**
524
+ * This file was auto-generated by Fern from our API Definition.
525
+ */
526
+ /**
527
+ * Sync status of the blob storage integration:
528
+ * - `disabled` — integration is not enabled
529
+ * - `error` — last export failed (see `lastError` for details)
530
+ * - `idle` — enabled but has never exported yet
531
+ * - `queued` — next export is overdue (`nextSyncAt` is in the past) and waiting to be picked up by the worker
532
+ * - `up_to_date` — all available data has been exported; next export is scheduled for the future
533
+ *
534
+ * **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your
535
+ * ETL bookmark to determine if new data is available. Note that exports run with a 30-minute lag buffer,
536
+ * so `lastSyncAt` will always be at least 30 minutes behind real-time.
537
+ */
538
+ type BlobStorageSyncStatus = "idle" | "queued" | "up_to_date" | "disabled" | "error";
539
+ declare const BlobStorageSyncStatus: {
540
+ readonly Idle: "idle";
541
+ readonly Queued: "queued";
542
+ readonly UpToDate: "up_to_date";
543
+ readonly Disabled: "disabled";
544
+ readonly Error: "error";
545
+ };
546
+
547
+ /**
548
+ * This file was auto-generated by Fern from our API Definition.
549
+ */
550
+
551
+ interface BlobStorageIntegrationStatusResponse {
552
+ id: string;
553
+ projectId: string;
554
+ syncStatus: BlobStorageSyncStatus;
555
+ enabled: boolean;
556
+ /** End of the last successfully exported time window. Compare against your ETL bookmark to determine if new data is available. Null if the integration has never synced. */
557
+ lastSyncAt: string | null;
558
+ /** When the next export is scheduled. Null if no sync has occurred yet. */
559
+ nextSyncAt: string | null;
560
+ /** Raw error message from the storage provider (S3/Azure/GCS) if the last export failed. Cleared on successful export. */
561
+ lastError: string | null;
562
+ /** When the last error occurred. Cleared on successful export. */
563
+ lastErrorAt: string | null;
564
+ }
565
+
516
566
  /**
517
567
  * This file was auto-generated by Fern from our API Definition.
518
568
  */
@@ -525,11 +575,13 @@ declare const index$s_BlobStorageExportMode: typeof BlobStorageExportMode;
525
575
  type index$s_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
526
576
  declare const index$s_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
527
577
  type index$s_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
578
+ type index$s_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
528
579
  declare const index$s_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
529
580
  type index$s_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
581
+ declare const index$s_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
530
582
  type index$s_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
531
583
  declare namespace index$s {
532
- export { index$s_BlobStorageExportFrequency as BlobStorageExportFrequency, index$s_BlobStorageExportMode as BlobStorageExportMode, type index$s_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$s_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, type index$s_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, index$s_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$s_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, type index$s_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
584
+ export { index$s_BlobStorageExportFrequency as BlobStorageExportFrequency, index$s_BlobStorageExportMode as BlobStorageExportMode, type index$s_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$s_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, type index$s_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, type index$s_BlobStorageIntegrationStatusResponse as BlobStorageIntegrationStatusResponse, index$s_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$s_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, index$s_BlobStorageSyncStatus as BlobStorageSyncStatus, type index$s_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
533
585
  }
534
586
 
535
587
  /**
@@ -1817,6 +1869,8 @@ interface CreateDatasetRunItemRequest {
1817
1869
  * If not provided, uses the latest version of dataset items.
1818
1870
  */
1819
1871
  datasetVersion?: string;
1872
+ /** Optional timestamp to set the createdAt field of the dataset run item. If not provided or null, defaults to current timestamp. */
1873
+ createdAt?: string;
1820
1874
  }
1821
1875
 
1822
1876
  /**
@@ -4019,7 +4073,7 @@ interface BasePrompt {
4019
4073
  tags: string[];
4020
4074
  /** Commit message for this prompt version. */
4021
4075
  commitMessage?: string;
4022
- /** The dependency resolution graph for the current prompt. Null if prompt has no dependencies. */
4076
+ /** The dependency resolution graph for the current prompt. Null if the prompt has no dependencies or if `resolve=false` was used. */
4023
4077
  resolutionGraph?: Record<string, unknown>;
4024
4078
  }
4025
4079
 
@@ -4108,6 +4162,8 @@ interface GetPromptRequest {
4108
4162
  version?: number;
4109
4163
  /** Label of the prompt to be retrieved. Defaults to "production" if no label or version is set. */
4110
4164
  label?: string;
4165
+ /** Resolve prompt dependencies before returning the prompt. Defaults to `true`. Set to `false` to return the raw stored prompt with dependency tags intact. This bypasses prompt caching and is intended for debugging or one-off jobs, not production runtime fetches. */
4166
+ resolve?: boolean;
4111
4167
  }
4112
4168
 
4113
4169
  /**
@@ -5204,11 +5260,29 @@ declare class BlobStorageIntegrations {
5204
5260
  * forcePathStyle: true,
5205
5261
  * fileType: "JSON",
5206
5262
  * exportMode: "FULL_HISTORY",
5207
- * exportStartDate: undefined
5263
+ * exportStartDate: undefined,
5264
+ * compressed: undefined
5208
5265
  * })
5209
5266
  */
5210
5267
  upsertBlobStorageIntegration(request: CreateBlobStorageIntegrationRequest, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationResponse>;
5211
5268
  private __upsertBlobStorageIntegration;
5269
+ /**
5270
+ * Get the sync status of a blob storage integration by integration ID (requires organization-scoped API key)
5271
+ *
5272
+ * @param {string} id
5273
+ * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.
5274
+ *
5275
+ * @throws {@link LangfuseAPI.Error}
5276
+ * @throws {@link LangfuseAPI.UnauthorizedError}
5277
+ * @throws {@link LangfuseAPI.AccessDeniedError}
5278
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
5279
+ * @throws {@link LangfuseAPI.NotFoundError}
5280
+ *
5281
+ * @example
5282
+ * await client.blobStorageIntegrations.getBlobStorageIntegrationStatus("id")
5283
+ */
5284
+ getBlobStorageIntegrationStatus(id: string, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationStatusResponse>;
5285
+ private __getBlobStorageIntegrationStatus;
5212
5286
  /**
5213
5287
  * Delete a blob storage integration by ID (requires organization-scoped API key)
5214
5288
  *
@@ -5516,7 +5590,8 @@ declare class DatasetRunItems {
5516
5590
  * datasetItemId: "datasetItemId",
5517
5591
  * observationId: undefined,
5518
5592
  * traceId: undefined,
5519
- * datasetVersion: undefined
5593
+ * datasetVersion: undefined,
5594
+ * createdAt: undefined
5520
5595
  * })
5521
5596
  */
5522
5597
  create(request: CreateDatasetRunItemRequest, requestOptions?: DatasetRunItems.RequestOptions): HttpResponsePromise<DatasetRunItem>;
@@ -8444,4 +8519,4 @@ interface PropagateAttributesParams {
8444
8519
  declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
8445
8520
  declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
8446
8521
 
8447
- export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
8522
+ export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
package/dist/index.mjs CHANGED
@@ -80,6 +80,7 @@ function serializeValue(value) {
80
80
 
81
81
  // src/logger/index.ts
82
82
  var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
83
+ LogLevel2[LogLevel2["NONE"] = 4] = "NONE";
83
84
  LogLevel2[LogLevel2["ERROR"] = 3] = "ERROR";
84
85
  LogLevel2[LogLevel2["WARN"] = 2] = "WARN";
85
86
  LogLevel2[LogLevel2["INFO"] = 1] = "INFO";
@@ -94,6 +95,8 @@ function parseLogLevelFromEnv() {
94
95
  const envValue = getEnv("LANGFUSE_LOG_LEVEL");
95
96
  const value = (envValue != null ? envValue : "").toUpperCase();
96
97
  switch (value) {
98
+ case "NONE":
99
+ return 4 /* NONE */;
97
100
  case "ERROR":
98
101
  return 3 /* ERROR */;
99
102
  case "WARN":
@@ -273,7 +276,7 @@ var resetGlobalLogger = () => {
273
276
  // package.json
274
277
  var package_default = {
275
278
  name: "@langfuse/core",
276
- version: "4.6.1",
279
+ version: "5.0.2",
277
280
  description: "Core functions and utilities for Langfuse packages",
278
281
  type: "module",
279
282
  sideEffects: false,
@@ -384,7 +387,8 @@ __export(blobStorageIntegrations_exports, {
384
387
  BlobStorageExportFrequency: () => BlobStorageExportFrequency,
385
388
  BlobStorageExportMode: () => BlobStorageExportMode,
386
389
  BlobStorageIntegrationFileType: () => BlobStorageIntegrationFileType,
387
- BlobStorageIntegrationType: () => BlobStorageIntegrationType
390
+ BlobStorageIntegrationType: () => BlobStorageIntegrationType,
391
+ BlobStorageSyncStatus: () => BlobStorageSyncStatus
388
392
  });
389
393
 
390
394
  // src/api/api/resources/blobStorageIntegrations/types/BlobStorageIntegrationType.ts
@@ -415,6 +419,15 @@ var BlobStorageExportFrequency = {
415
419
  Weekly: "weekly"
416
420
  };
417
421
 
422
+ // src/api/api/resources/blobStorageIntegrations/types/BlobStorageSyncStatus.ts
423
+ var BlobStorageSyncStatus = {
424
+ Idle: "idle",
425
+ Queued: "queued",
426
+ UpToDate: "up_to_date",
427
+ Disabled: "disabled",
428
+ Error: "error"
429
+ };
430
+
418
431
  // src/api/api/resources/comments/index.ts
419
432
  var comments_exports = {};
420
433
 
@@ -2826,7 +2839,8 @@ var BlobStorageIntegrations = class {
2826
2839
  * forcePathStyle: true,
2827
2840
  * fileType: "JSON",
2828
2841
  * exportMode: "FULL_HISTORY",
2829
- * exportStartDate: undefined
2842
+ * exportStartDate: undefined,
2843
+ * compressed: undefined
2830
2844
  * })
2831
2845
  */
2832
2846
  upsertBlobStorageIntegration(request, requestOptions) {
@@ -2920,6 +2934,109 @@ var BlobStorageIntegrations = class {
2920
2934
  });
2921
2935
  }
2922
2936
  }
2937
+ /**
2938
+ * Get the sync status of a blob storage integration by integration ID (requires organization-scoped API key)
2939
+ *
2940
+ * @param {string} id
2941
+ * @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.
2942
+ *
2943
+ * @throws {@link LangfuseAPI.Error}
2944
+ * @throws {@link LangfuseAPI.UnauthorizedError}
2945
+ * @throws {@link LangfuseAPI.AccessDeniedError}
2946
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
2947
+ * @throws {@link LangfuseAPI.NotFoundError}
2948
+ *
2949
+ * @example
2950
+ * await client.blobStorageIntegrations.getBlobStorageIntegrationStatus("id")
2951
+ */
2952
+ getBlobStorageIntegrationStatus(id, requestOptions) {
2953
+ return HttpResponsePromise.fromPromise(
2954
+ this.__getBlobStorageIntegrationStatus(id, requestOptions)
2955
+ );
2956
+ }
2957
+ async __getBlobStorageIntegrationStatus(id, requestOptions) {
2958
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
2959
+ let _headers = mergeHeaders(
2960
+ (_a2 = this._options) == null ? void 0 : _a2.headers,
2961
+ mergeOnlyDefinedHeaders({
2962
+ Authorization: await this._getAuthorizationHeader(),
2963
+ "X-Langfuse-Sdk-Name": (_c = requestOptions == null ? void 0 : requestOptions.xLangfuseSdkName) != null ? _c : (_b = this._options) == null ? void 0 : _b.xLangfuseSdkName,
2964
+ "X-Langfuse-Sdk-Version": (_e = requestOptions == null ? void 0 : requestOptions.xLangfuseSdkVersion) != null ? _e : (_d = this._options) == null ? void 0 : _d.xLangfuseSdkVersion,
2965
+ "X-Langfuse-Public-Key": (_g = requestOptions == null ? void 0 : requestOptions.xLangfusePublicKey) != null ? _g : (_f = this._options) == null ? void 0 : _f.xLangfusePublicKey
2966
+ }),
2967
+ requestOptions == null ? void 0 : requestOptions.headers
2968
+ );
2969
+ const _response = await fetcher({
2970
+ url: url_exports.join(
2971
+ (_h = await Supplier.get(this._options.baseUrl)) != null ? _h : await Supplier.get(this._options.environment),
2972
+ `/api/public/integrations/blob-storage/${encodeURIComponent(id)}`
2973
+ ),
2974
+ method: "GET",
2975
+ headers: _headers,
2976
+ queryParameters: requestOptions == null ? void 0 : requestOptions.queryParams,
2977
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 6e4,
2978
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2979
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2980
+ });
2981
+ if (_response.ok) {
2982
+ return {
2983
+ data: _response.body,
2984
+ rawResponse: _response.rawResponse
2985
+ };
2986
+ }
2987
+ if (_response.error.reason === "status-code") {
2988
+ switch (_response.error.statusCode) {
2989
+ case 400:
2990
+ throw new Error2(
2991
+ _response.error.body,
2992
+ _response.rawResponse
2993
+ );
2994
+ case 401:
2995
+ throw new UnauthorizedError(
2996
+ _response.error.body,
2997
+ _response.rawResponse
2998
+ );
2999
+ case 403:
3000
+ throw new AccessDeniedError(
3001
+ _response.error.body,
3002
+ _response.rawResponse
3003
+ );
3004
+ case 405:
3005
+ throw new MethodNotAllowedError(
3006
+ _response.error.body,
3007
+ _response.rawResponse
3008
+ );
3009
+ case 404:
3010
+ throw new NotFoundError(
3011
+ _response.error.body,
3012
+ _response.rawResponse
3013
+ );
3014
+ default:
3015
+ throw new LangfuseAPIError({
3016
+ statusCode: _response.error.statusCode,
3017
+ body: _response.error.body,
3018
+ rawResponse: _response.rawResponse
3019
+ });
3020
+ }
3021
+ }
3022
+ switch (_response.error.reason) {
3023
+ case "non-json":
3024
+ throw new LangfuseAPIError({
3025
+ statusCode: _response.error.statusCode,
3026
+ body: _response.error.rawBody,
3027
+ rawResponse: _response.rawResponse
3028
+ });
3029
+ case "timeout":
3030
+ throw new LangfuseAPITimeoutError(
3031
+ "Timeout exceeded when calling GET /api/public/integrations/blob-storage/{id}."
3032
+ );
3033
+ case "unknown":
3034
+ throw new LangfuseAPIError({
3035
+ message: _response.error.errorMessage,
3036
+ rawResponse: _response.rawResponse
3037
+ });
3038
+ }
3039
+ }
2923
3040
  /**
2924
3041
  * Delete a blob storage integration by ID (requires organization-scoped API key)
2925
3042
  *
@@ -3882,7 +3999,8 @@ var DatasetRunItems = class {
3882
3999
  * datasetItemId: "datasetItemId",
3883
4000
  * observationId: undefined,
3884
4001
  * traceId: undefined,
3885
- * datasetVersion: undefined
4002
+ * datasetVersion: undefined,
4003
+ * createdAt: undefined
3886
4004
  * })
3887
4005
  */
3888
4006
  create(request, requestOptions) {
@@ -9184,7 +9302,7 @@ var Prompts = class {
9184
9302
  }
9185
9303
  async __get(promptName, request = {}, requestOptions) {
9186
9304
  var _a2, _b, _c, _d, _e, _f, _g, _h;
9187
- const { version, label } = request;
9305
+ const { version, label, resolve } = request;
9188
9306
  const _queryParams = {};
9189
9307
  if (version != null) {
9190
9308
  _queryParams["version"] = version.toString();
@@ -9192,6 +9310,9 @@ var Prompts = class {
9192
9310
  if (label != null) {
9193
9311
  _queryParams["label"] = label;
9194
9312
  }
9313
+ if (resolve != null) {
9314
+ _queryParams["resolve"] = resolve.toString();
9315
+ }
9195
9316
  let _headers = mergeHeaders(
9196
9317
  (_a2 = this._options) == null ? void 0 : _a2.headers,
9197
9318
  mergeOnlyDefinedHeaders({
@@ -12612,6 +12733,7 @@ export {
12612
12733
  BlobStorageExportMode,
12613
12734
  BlobStorageIntegrationFileType,
12614
12735
  BlobStorageIntegrationType,
12736
+ BlobStorageSyncStatus,
12615
12737
  ChatMessageType,
12616
12738
  CommentObjectType,
12617
12739
  CreateChatPromptType,