@langfuse/core 5.0.0 → 5.0.1
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 +121 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -10
- package/dist/index.d.ts +76 -10
- package/dist/index.mjs +120 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -261,7 +261,7 @@ declare const AnnotationQueueObjectType: {
|
|
|
261
261
|
interface AnnotationQueue {
|
|
262
262
|
id: string;
|
|
263
263
|
name: string;
|
|
264
|
-
description
|
|
264
|
+
description: string | null;
|
|
265
265
|
scoreConfigIds: string[];
|
|
266
266
|
createdAt: string;
|
|
267
267
|
updatedAt: string;
|
|
@@ -305,7 +305,7 @@ interface PaginatedAnnotationQueueItems {
|
|
|
305
305
|
*/
|
|
306
306
|
interface CreateAnnotationQueueRequest {
|
|
307
307
|
name: string;
|
|
308
|
-
description?: string;
|
|
308
|
+
description?: string | null;
|
|
309
309
|
scoreConfigIds: string[];
|
|
310
310
|
}
|
|
311
311
|
|
|
@@ -489,18 +489,20 @@ interface BlobStorageIntegrationResponse {
|
|
|
489
489
|
projectId: string;
|
|
490
490
|
type: BlobStorageIntegrationType;
|
|
491
491
|
bucketName: string;
|
|
492
|
-
endpoint
|
|
492
|
+
endpoint: string | null;
|
|
493
493
|
region: string;
|
|
494
|
-
accessKeyId
|
|
494
|
+
accessKeyId: string | null;
|
|
495
495
|
prefix: string;
|
|
496
496
|
exportFrequency: BlobStorageExportFrequency;
|
|
497
497
|
enabled: boolean;
|
|
498
498
|
forcePathStyle: boolean;
|
|
499
499
|
fileType: BlobStorageIntegrationFileType;
|
|
500
500
|
exportMode: BlobStorageExportMode;
|
|
501
|
-
exportStartDate
|
|
502
|
-
nextSyncAt
|
|
503
|
-
lastSyncAt
|
|
501
|
+
exportStartDate: string | null;
|
|
502
|
+
nextSyncAt: string | null;
|
|
503
|
+
lastSyncAt: string | null;
|
|
504
|
+
lastError: string | null;
|
|
505
|
+
lastErrorAt: string | null;
|
|
504
506
|
createdAt: string;
|
|
505
507
|
updatedAt: string;
|
|
506
508
|
}
|
|
@@ -513,6 +515,49 @@ interface BlobStorageIntegrationsResponse {
|
|
|
513
515
|
data: BlobStorageIntegrationResponse[];
|
|
514
516
|
}
|
|
515
517
|
|
|
518
|
+
/**
|
|
519
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
520
|
+
*/
|
|
521
|
+
/**
|
|
522
|
+
* Sync status of the blob storage integration:
|
|
523
|
+
* - `disabled` — integration is not enabled
|
|
524
|
+
* - `error` — last export failed (see `lastError` for details)
|
|
525
|
+
* - `idle` — enabled but has never exported yet
|
|
526
|
+
* - `queued` — next export is overdue (`nextSyncAt` is in the past) and waiting to be picked up by the worker
|
|
527
|
+
* - `up_to_date` — all available data has been exported; next export is scheduled for the future
|
|
528
|
+
*
|
|
529
|
+
* **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your
|
|
530
|
+
* ETL bookmark to determine if new data is available. Note that exports run with a 30-minute lag buffer,
|
|
531
|
+
* so `lastSyncAt` will always be at least 30 minutes behind real-time.
|
|
532
|
+
*/
|
|
533
|
+
type BlobStorageSyncStatus = "idle" | "queued" | "up_to_date" | "disabled" | "error";
|
|
534
|
+
declare const BlobStorageSyncStatus: {
|
|
535
|
+
readonly Idle: "idle";
|
|
536
|
+
readonly Queued: "queued";
|
|
537
|
+
readonly UpToDate: "up_to_date";
|
|
538
|
+
readonly Disabled: "disabled";
|
|
539
|
+
readonly Error: "error";
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
544
|
+
*/
|
|
545
|
+
|
|
546
|
+
interface BlobStorageIntegrationStatusResponse {
|
|
547
|
+
id: string;
|
|
548
|
+
projectId: string;
|
|
549
|
+
syncStatus: BlobStorageSyncStatus;
|
|
550
|
+
enabled: boolean;
|
|
551
|
+
/** 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. */
|
|
552
|
+
lastSyncAt: string | null;
|
|
553
|
+
/** When the next export is scheduled. Null if no sync has occurred yet. */
|
|
554
|
+
nextSyncAt: string | null;
|
|
555
|
+
/** Raw error message from the storage provider (S3/Azure/GCS) if the last export failed. Cleared on successful export. */
|
|
556
|
+
lastError: string | null;
|
|
557
|
+
/** When the last error occurred. Cleared on successful export. */
|
|
558
|
+
lastErrorAt: string | null;
|
|
559
|
+
}
|
|
560
|
+
|
|
516
561
|
/**
|
|
517
562
|
* This file was auto-generated by Fern from our API Definition.
|
|
518
563
|
*/
|
|
@@ -525,11 +570,13 @@ declare const index$s_BlobStorageExportMode: typeof BlobStorageExportMode;
|
|
|
525
570
|
type index$s_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
|
|
526
571
|
declare const index$s_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
|
|
527
572
|
type index$s_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
|
|
573
|
+
type index$s_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
|
|
528
574
|
declare const index$s_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
|
|
529
575
|
type index$s_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
|
|
576
|
+
declare const index$s_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
|
|
530
577
|
type index$s_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
|
|
531
578
|
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 };
|
|
579
|
+
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
580
|
}
|
|
534
581
|
|
|
535
582
|
/**
|
|
@@ -4019,7 +4066,7 @@ interface BasePrompt {
|
|
|
4019
4066
|
tags: string[];
|
|
4020
4067
|
/** Commit message for this prompt version. */
|
|
4021
4068
|
commitMessage?: string;
|
|
4022
|
-
/** The dependency resolution graph for the current prompt. Null if prompt has no dependencies. */
|
|
4069
|
+
/** The dependency resolution graph for the current prompt. Null if the prompt has no dependencies or if `resolve=false` was used. */
|
|
4023
4070
|
resolutionGraph?: Record<string, unknown>;
|
|
4024
4071
|
}
|
|
4025
4072
|
|
|
@@ -4108,6 +4155,8 @@ interface GetPromptRequest {
|
|
|
4108
4155
|
version?: number;
|
|
4109
4156
|
/** Label of the prompt to be retrieved. Defaults to "production" if no label or version is set. */
|
|
4110
4157
|
label?: string;
|
|
4158
|
+
/** 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. */
|
|
4159
|
+
resolve?: boolean;
|
|
4111
4160
|
}
|
|
4112
4161
|
|
|
4113
4162
|
/**
|
|
@@ -5209,6 +5258,23 @@ declare class BlobStorageIntegrations {
|
|
|
5209
5258
|
*/
|
|
5210
5259
|
upsertBlobStorageIntegration(request: CreateBlobStorageIntegrationRequest, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationResponse>;
|
|
5211
5260
|
private __upsertBlobStorageIntegration;
|
|
5261
|
+
/**
|
|
5262
|
+
* Get the sync status of a blob storage integration by integration ID (requires organization-scoped API key)
|
|
5263
|
+
*
|
|
5264
|
+
* @param {string} id
|
|
5265
|
+
* @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.
|
|
5266
|
+
*
|
|
5267
|
+
* @throws {@link LangfuseAPI.Error}
|
|
5268
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
5269
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
5270
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
5271
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
5272
|
+
*
|
|
5273
|
+
* @example
|
|
5274
|
+
* await client.blobStorageIntegrations.getBlobStorageIntegrationStatus("id")
|
|
5275
|
+
*/
|
|
5276
|
+
getBlobStorageIntegrationStatus(id: string, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationStatusResponse>;
|
|
5277
|
+
private __getBlobStorageIntegrationStatus;
|
|
5212
5278
|
/**
|
|
5213
5279
|
* Delete a blob storage integration by ID (requires organization-scoped API key)
|
|
5214
5280
|
*
|
|
@@ -8444,4 +8510,4 @@ interface PropagateAttributesParams {
|
|
|
8444
8510
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8445
8511
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8446
8512
|
|
|
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 };
|
|
8513
|
+
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
|
@@ -261,7 +261,7 @@ declare const AnnotationQueueObjectType: {
|
|
|
261
261
|
interface AnnotationQueue {
|
|
262
262
|
id: string;
|
|
263
263
|
name: string;
|
|
264
|
-
description
|
|
264
|
+
description: string | null;
|
|
265
265
|
scoreConfigIds: string[];
|
|
266
266
|
createdAt: string;
|
|
267
267
|
updatedAt: string;
|
|
@@ -305,7 +305,7 @@ interface PaginatedAnnotationQueueItems {
|
|
|
305
305
|
*/
|
|
306
306
|
interface CreateAnnotationQueueRequest {
|
|
307
307
|
name: string;
|
|
308
|
-
description?: string;
|
|
308
|
+
description?: string | null;
|
|
309
309
|
scoreConfigIds: string[];
|
|
310
310
|
}
|
|
311
311
|
|
|
@@ -489,18 +489,20 @@ interface BlobStorageIntegrationResponse {
|
|
|
489
489
|
projectId: string;
|
|
490
490
|
type: BlobStorageIntegrationType;
|
|
491
491
|
bucketName: string;
|
|
492
|
-
endpoint
|
|
492
|
+
endpoint: string | null;
|
|
493
493
|
region: string;
|
|
494
|
-
accessKeyId
|
|
494
|
+
accessKeyId: string | null;
|
|
495
495
|
prefix: string;
|
|
496
496
|
exportFrequency: BlobStorageExportFrequency;
|
|
497
497
|
enabled: boolean;
|
|
498
498
|
forcePathStyle: boolean;
|
|
499
499
|
fileType: BlobStorageIntegrationFileType;
|
|
500
500
|
exportMode: BlobStorageExportMode;
|
|
501
|
-
exportStartDate
|
|
502
|
-
nextSyncAt
|
|
503
|
-
lastSyncAt
|
|
501
|
+
exportStartDate: string | null;
|
|
502
|
+
nextSyncAt: string | null;
|
|
503
|
+
lastSyncAt: string | null;
|
|
504
|
+
lastError: string | null;
|
|
505
|
+
lastErrorAt: string | null;
|
|
504
506
|
createdAt: string;
|
|
505
507
|
updatedAt: string;
|
|
506
508
|
}
|
|
@@ -513,6 +515,49 @@ interface BlobStorageIntegrationsResponse {
|
|
|
513
515
|
data: BlobStorageIntegrationResponse[];
|
|
514
516
|
}
|
|
515
517
|
|
|
518
|
+
/**
|
|
519
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
520
|
+
*/
|
|
521
|
+
/**
|
|
522
|
+
* Sync status of the blob storage integration:
|
|
523
|
+
* - `disabled` — integration is not enabled
|
|
524
|
+
* - `error` — last export failed (see `lastError` for details)
|
|
525
|
+
* - `idle` — enabled but has never exported yet
|
|
526
|
+
* - `queued` — next export is overdue (`nextSyncAt` is in the past) and waiting to be picked up by the worker
|
|
527
|
+
* - `up_to_date` — all available data has been exported; next export is scheduled for the future
|
|
528
|
+
*
|
|
529
|
+
* **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your
|
|
530
|
+
* ETL bookmark to determine if new data is available. Note that exports run with a 30-minute lag buffer,
|
|
531
|
+
* so `lastSyncAt` will always be at least 30 minutes behind real-time.
|
|
532
|
+
*/
|
|
533
|
+
type BlobStorageSyncStatus = "idle" | "queued" | "up_to_date" | "disabled" | "error";
|
|
534
|
+
declare const BlobStorageSyncStatus: {
|
|
535
|
+
readonly Idle: "idle";
|
|
536
|
+
readonly Queued: "queued";
|
|
537
|
+
readonly UpToDate: "up_to_date";
|
|
538
|
+
readonly Disabled: "disabled";
|
|
539
|
+
readonly Error: "error";
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
544
|
+
*/
|
|
545
|
+
|
|
546
|
+
interface BlobStorageIntegrationStatusResponse {
|
|
547
|
+
id: string;
|
|
548
|
+
projectId: string;
|
|
549
|
+
syncStatus: BlobStorageSyncStatus;
|
|
550
|
+
enabled: boolean;
|
|
551
|
+
/** 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. */
|
|
552
|
+
lastSyncAt: string | null;
|
|
553
|
+
/** When the next export is scheduled. Null if no sync has occurred yet. */
|
|
554
|
+
nextSyncAt: string | null;
|
|
555
|
+
/** Raw error message from the storage provider (S3/Azure/GCS) if the last export failed. Cleared on successful export. */
|
|
556
|
+
lastError: string | null;
|
|
557
|
+
/** When the last error occurred. Cleared on successful export. */
|
|
558
|
+
lastErrorAt: string | null;
|
|
559
|
+
}
|
|
560
|
+
|
|
516
561
|
/**
|
|
517
562
|
* This file was auto-generated by Fern from our API Definition.
|
|
518
563
|
*/
|
|
@@ -525,11 +570,13 @@ declare const index$s_BlobStorageExportMode: typeof BlobStorageExportMode;
|
|
|
525
570
|
type index$s_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
|
|
526
571
|
declare const index$s_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
|
|
527
572
|
type index$s_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
|
|
573
|
+
type index$s_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
|
|
528
574
|
declare const index$s_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
|
|
529
575
|
type index$s_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
|
|
576
|
+
declare const index$s_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
|
|
530
577
|
type index$s_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
|
|
531
578
|
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 };
|
|
579
|
+
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
580
|
}
|
|
534
581
|
|
|
535
582
|
/**
|
|
@@ -4019,7 +4066,7 @@ interface BasePrompt {
|
|
|
4019
4066
|
tags: string[];
|
|
4020
4067
|
/** Commit message for this prompt version. */
|
|
4021
4068
|
commitMessage?: string;
|
|
4022
|
-
/** The dependency resolution graph for the current prompt. Null if prompt has no dependencies. */
|
|
4069
|
+
/** The dependency resolution graph for the current prompt. Null if the prompt has no dependencies or if `resolve=false` was used. */
|
|
4023
4070
|
resolutionGraph?: Record<string, unknown>;
|
|
4024
4071
|
}
|
|
4025
4072
|
|
|
@@ -4108,6 +4155,8 @@ interface GetPromptRequest {
|
|
|
4108
4155
|
version?: number;
|
|
4109
4156
|
/** Label of the prompt to be retrieved. Defaults to "production" if no label or version is set. */
|
|
4110
4157
|
label?: string;
|
|
4158
|
+
/** 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. */
|
|
4159
|
+
resolve?: boolean;
|
|
4111
4160
|
}
|
|
4112
4161
|
|
|
4113
4162
|
/**
|
|
@@ -5209,6 +5258,23 @@ declare class BlobStorageIntegrations {
|
|
|
5209
5258
|
*/
|
|
5210
5259
|
upsertBlobStorageIntegration(request: CreateBlobStorageIntegrationRequest, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationResponse>;
|
|
5211
5260
|
private __upsertBlobStorageIntegration;
|
|
5261
|
+
/**
|
|
5262
|
+
* Get the sync status of a blob storage integration by integration ID (requires organization-scoped API key)
|
|
5263
|
+
*
|
|
5264
|
+
* @param {string} id
|
|
5265
|
+
* @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.
|
|
5266
|
+
*
|
|
5267
|
+
* @throws {@link LangfuseAPI.Error}
|
|
5268
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
5269
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
5270
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
5271
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
5272
|
+
*
|
|
5273
|
+
* @example
|
|
5274
|
+
* await client.blobStorageIntegrations.getBlobStorageIntegrationStatus("id")
|
|
5275
|
+
*/
|
|
5276
|
+
getBlobStorageIntegrationStatus(id: string, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationStatusResponse>;
|
|
5277
|
+
private __getBlobStorageIntegrationStatus;
|
|
5212
5278
|
/**
|
|
5213
5279
|
* Delete a blob storage integration by ID (requires organization-scoped API key)
|
|
5214
5280
|
*
|
|
@@ -8444,4 +8510,4 @@ interface PropagateAttributesParams {
|
|
|
8444
8510
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8445
8511
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8446
8512
|
|
|
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 };
|
|
8513
|
+
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
|
@@ -273,7 +273,7 @@ var resetGlobalLogger = () => {
|
|
|
273
273
|
// package.json
|
|
274
274
|
var package_default = {
|
|
275
275
|
name: "@langfuse/core",
|
|
276
|
-
version: "
|
|
276
|
+
version: "5.0.1",
|
|
277
277
|
description: "Core functions and utilities for Langfuse packages",
|
|
278
278
|
type: "module",
|
|
279
279
|
sideEffects: false,
|
|
@@ -384,7 +384,8 @@ __export(blobStorageIntegrations_exports, {
|
|
|
384
384
|
BlobStorageExportFrequency: () => BlobStorageExportFrequency,
|
|
385
385
|
BlobStorageExportMode: () => BlobStorageExportMode,
|
|
386
386
|
BlobStorageIntegrationFileType: () => BlobStorageIntegrationFileType,
|
|
387
|
-
BlobStorageIntegrationType: () => BlobStorageIntegrationType
|
|
387
|
+
BlobStorageIntegrationType: () => BlobStorageIntegrationType,
|
|
388
|
+
BlobStorageSyncStatus: () => BlobStorageSyncStatus
|
|
388
389
|
});
|
|
389
390
|
|
|
390
391
|
// src/api/api/resources/blobStorageIntegrations/types/BlobStorageIntegrationType.ts
|
|
@@ -415,6 +416,15 @@ var BlobStorageExportFrequency = {
|
|
|
415
416
|
Weekly: "weekly"
|
|
416
417
|
};
|
|
417
418
|
|
|
419
|
+
// src/api/api/resources/blobStorageIntegrations/types/BlobStorageSyncStatus.ts
|
|
420
|
+
var BlobStorageSyncStatus = {
|
|
421
|
+
Idle: "idle",
|
|
422
|
+
Queued: "queued",
|
|
423
|
+
UpToDate: "up_to_date",
|
|
424
|
+
Disabled: "disabled",
|
|
425
|
+
Error: "error"
|
|
426
|
+
};
|
|
427
|
+
|
|
418
428
|
// src/api/api/resources/comments/index.ts
|
|
419
429
|
var comments_exports = {};
|
|
420
430
|
|
|
@@ -2920,6 +2930,109 @@ var BlobStorageIntegrations = class {
|
|
|
2920
2930
|
});
|
|
2921
2931
|
}
|
|
2922
2932
|
}
|
|
2933
|
+
/**
|
|
2934
|
+
* Get the sync status of a blob storage integration by integration ID (requires organization-scoped API key)
|
|
2935
|
+
*
|
|
2936
|
+
* @param {string} id
|
|
2937
|
+
* @param {BlobStorageIntegrations.RequestOptions} requestOptions - Request-specific configuration.
|
|
2938
|
+
*
|
|
2939
|
+
* @throws {@link LangfuseAPI.Error}
|
|
2940
|
+
* @throws {@link LangfuseAPI.UnauthorizedError}
|
|
2941
|
+
* @throws {@link LangfuseAPI.AccessDeniedError}
|
|
2942
|
+
* @throws {@link LangfuseAPI.MethodNotAllowedError}
|
|
2943
|
+
* @throws {@link LangfuseAPI.NotFoundError}
|
|
2944
|
+
*
|
|
2945
|
+
* @example
|
|
2946
|
+
* await client.blobStorageIntegrations.getBlobStorageIntegrationStatus("id")
|
|
2947
|
+
*/
|
|
2948
|
+
getBlobStorageIntegrationStatus(id, requestOptions) {
|
|
2949
|
+
return HttpResponsePromise.fromPromise(
|
|
2950
|
+
this.__getBlobStorageIntegrationStatus(id, requestOptions)
|
|
2951
|
+
);
|
|
2952
|
+
}
|
|
2953
|
+
async __getBlobStorageIntegrationStatus(id, requestOptions) {
|
|
2954
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
2955
|
+
let _headers = mergeHeaders(
|
|
2956
|
+
(_a2 = this._options) == null ? void 0 : _a2.headers,
|
|
2957
|
+
mergeOnlyDefinedHeaders({
|
|
2958
|
+
Authorization: await this._getAuthorizationHeader(),
|
|
2959
|
+
"X-Langfuse-Sdk-Name": (_c = requestOptions == null ? void 0 : requestOptions.xLangfuseSdkName) != null ? _c : (_b = this._options) == null ? void 0 : _b.xLangfuseSdkName,
|
|
2960
|
+
"X-Langfuse-Sdk-Version": (_e = requestOptions == null ? void 0 : requestOptions.xLangfuseSdkVersion) != null ? _e : (_d = this._options) == null ? void 0 : _d.xLangfuseSdkVersion,
|
|
2961
|
+
"X-Langfuse-Public-Key": (_g = requestOptions == null ? void 0 : requestOptions.xLangfusePublicKey) != null ? _g : (_f = this._options) == null ? void 0 : _f.xLangfusePublicKey
|
|
2962
|
+
}),
|
|
2963
|
+
requestOptions == null ? void 0 : requestOptions.headers
|
|
2964
|
+
);
|
|
2965
|
+
const _response = await fetcher({
|
|
2966
|
+
url: url_exports.join(
|
|
2967
|
+
(_h = await Supplier.get(this._options.baseUrl)) != null ? _h : await Supplier.get(this._options.environment),
|
|
2968
|
+
`/api/public/integrations/blob-storage/${encodeURIComponent(id)}`
|
|
2969
|
+
),
|
|
2970
|
+
method: "GET",
|
|
2971
|
+
headers: _headers,
|
|
2972
|
+
queryParameters: requestOptions == null ? void 0 : requestOptions.queryParams,
|
|
2973
|
+
timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 6e4,
|
|
2974
|
+
maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
|
|
2975
|
+
abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
|
|
2976
|
+
});
|
|
2977
|
+
if (_response.ok) {
|
|
2978
|
+
return {
|
|
2979
|
+
data: _response.body,
|
|
2980
|
+
rawResponse: _response.rawResponse
|
|
2981
|
+
};
|
|
2982
|
+
}
|
|
2983
|
+
if (_response.error.reason === "status-code") {
|
|
2984
|
+
switch (_response.error.statusCode) {
|
|
2985
|
+
case 400:
|
|
2986
|
+
throw new Error2(
|
|
2987
|
+
_response.error.body,
|
|
2988
|
+
_response.rawResponse
|
|
2989
|
+
);
|
|
2990
|
+
case 401:
|
|
2991
|
+
throw new UnauthorizedError(
|
|
2992
|
+
_response.error.body,
|
|
2993
|
+
_response.rawResponse
|
|
2994
|
+
);
|
|
2995
|
+
case 403:
|
|
2996
|
+
throw new AccessDeniedError(
|
|
2997
|
+
_response.error.body,
|
|
2998
|
+
_response.rawResponse
|
|
2999
|
+
);
|
|
3000
|
+
case 405:
|
|
3001
|
+
throw new MethodNotAllowedError(
|
|
3002
|
+
_response.error.body,
|
|
3003
|
+
_response.rawResponse
|
|
3004
|
+
);
|
|
3005
|
+
case 404:
|
|
3006
|
+
throw new NotFoundError(
|
|
3007
|
+
_response.error.body,
|
|
3008
|
+
_response.rawResponse
|
|
3009
|
+
);
|
|
3010
|
+
default:
|
|
3011
|
+
throw new LangfuseAPIError({
|
|
3012
|
+
statusCode: _response.error.statusCode,
|
|
3013
|
+
body: _response.error.body,
|
|
3014
|
+
rawResponse: _response.rawResponse
|
|
3015
|
+
});
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
switch (_response.error.reason) {
|
|
3019
|
+
case "non-json":
|
|
3020
|
+
throw new LangfuseAPIError({
|
|
3021
|
+
statusCode: _response.error.statusCode,
|
|
3022
|
+
body: _response.error.rawBody,
|
|
3023
|
+
rawResponse: _response.rawResponse
|
|
3024
|
+
});
|
|
3025
|
+
case "timeout":
|
|
3026
|
+
throw new LangfuseAPITimeoutError(
|
|
3027
|
+
"Timeout exceeded when calling GET /api/public/integrations/blob-storage/{id}."
|
|
3028
|
+
);
|
|
3029
|
+
case "unknown":
|
|
3030
|
+
throw new LangfuseAPIError({
|
|
3031
|
+
message: _response.error.errorMessage,
|
|
3032
|
+
rawResponse: _response.rawResponse
|
|
3033
|
+
});
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
2923
3036
|
/**
|
|
2924
3037
|
* Delete a blob storage integration by ID (requires organization-scoped API key)
|
|
2925
3038
|
*
|
|
@@ -9184,7 +9297,7 @@ var Prompts = class {
|
|
|
9184
9297
|
}
|
|
9185
9298
|
async __get(promptName, request = {}, requestOptions) {
|
|
9186
9299
|
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
9187
|
-
const { version, label } = request;
|
|
9300
|
+
const { version, label, resolve } = request;
|
|
9188
9301
|
const _queryParams = {};
|
|
9189
9302
|
if (version != null) {
|
|
9190
9303
|
_queryParams["version"] = version.toString();
|
|
@@ -9192,6 +9305,9 @@ var Prompts = class {
|
|
|
9192
9305
|
if (label != null) {
|
|
9193
9306
|
_queryParams["label"] = label;
|
|
9194
9307
|
}
|
|
9308
|
+
if (resolve != null) {
|
|
9309
|
+
_queryParams["resolve"] = resolve.toString();
|
|
9310
|
+
}
|
|
9195
9311
|
let _headers = mergeHeaders(
|
|
9196
9312
|
(_a2 = this._options) == null ? void 0 : _a2.headers,
|
|
9197
9313
|
mergeOnlyDefinedHeaders({
|
|
@@ -12612,6 +12728,7 @@ export {
|
|
|
12612
12728
|
BlobStorageExportMode,
|
|
12613
12729
|
BlobStorageIntegrationFileType,
|
|
12614
12730
|
BlobStorageIntegrationType,
|
|
12731
|
+
BlobStorageSyncStatus,
|
|
12615
12732
|
ChatMessageType,
|
|
12616
12733
|
CommentObjectType,
|
|
12617
12734
|
CreateChatPromptType,
|