@langfuse/core 5.9.1 → 5.10.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.d.cts CHANGED
@@ -393,23 +393,23 @@ interface GetAnnotationQueueItemsRequest {
393
393
  limit?: number;
394
394
  }
395
395
 
396
- type index$z_AnnotationQueue = AnnotationQueue;
397
- type index$z_AnnotationQueueAssignmentRequest = AnnotationQueueAssignmentRequest;
398
- type index$z_AnnotationQueueItem = AnnotationQueueItem;
399
- declare const index$z_AnnotationQueueObjectType: typeof AnnotationQueueObjectType;
400
- declare const index$z_AnnotationQueueStatus: typeof AnnotationQueueStatus;
401
- type index$z_CreateAnnotationQueueAssignmentResponse = CreateAnnotationQueueAssignmentResponse;
402
- type index$z_CreateAnnotationQueueItemRequest = CreateAnnotationQueueItemRequest;
403
- type index$z_CreateAnnotationQueueRequest = CreateAnnotationQueueRequest;
404
- type index$z_DeleteAnnotationQueueAssignmentResponse = DeleteAnnotationQueueAssignmentResponse;
405
- type index$z_DeleteAnnotationQueueItemResponse = DeleteAnnotationQueueItemResponse;
406
- type index$z_GetAnnotationQueueItemsRequest = GetAnnotationQueueItemsRequest;
407
- type index$z_GetAnnotationQueuesRequest = GetAnnotationQueuesRequest;
408
- type index$z_PaginatedAnnotationQueueItems = PaginatedAnnotationQueueItems;
409
- type index$z_PaginatedAnnotationQueues = PaginatedAnnotationQueues;
410
- type index$z_UpdateAnnotationQueueItemRequest = UpdateAnnotationQueueItemRequest;
411
- declare namespace index$z {
412
- export { type index$z_AnnotationQueue as AnnotationQueue, type index$z_AnnotationQueueAssignmentRequest as AnnotationQueueAssignmentRequest, type index$z_AnnotationQueueItem as AnnotationQueueItem, index$z_AnnotationQueueObjectType as AnnotationQueueObjectType, index$z_AnnotationQueueStatus as AnnotationQueueStatus, type index$z_CreateAnnotationQueueAssignmentResponse as CreateAnnotationQueueAssignmentResponse, type index$z_CreateAnnotationQueueItemRequest as CreateAnnotationQueueItemRequest, type index$z_CreateAnnotationQueueRequest as CreateAnnotationQueueRequest, type index$z_DeleteAnnotationQueueAssignmentResponse as DeleteAnnotationQueueAssignmentResponse, type index$z_DeleteAnnotationQueueItemResponse as DeleteAnnotationQueueItemResponse, type index$z_GetAnnotationQueueItemsRequest as GetAnnotationQueueItemsRequest, type index$z_GetAnnotationQueuesRequest as GetAnnotationQueuesRequest, type index$z_PaginatedAnnotationQueueItems as PaginatedAnnotationQueueItems, type index$z_PaginatedAnnotationQueues as PaginatedAnnotationQueues, type index$z_UpdateAnnotationQueueItemRequest as UpdateAnnotationQueueItemRequest };
396
+ type index$D_AnnotationQueue = AnnotationQueue;
397
+ type index$D_AnnotationQueueAssignmentRequest = AnnotationQueueAssignmentRequest;
398
+ type index$D_AnnotationQueueItem = AnnotationQueueItem;
399
+ declare const index$D_AnnotationQueueObjectType: typeof AnnotationQueueObjectType;
400
+ declare const index$D_AnnotationQueueStatus: typeof AnnotationQueueStatus;
401
+ type index$D_CreateAnnotationQueueAssignmentResponse = CreateAnnotationQueueAssignmentResponse;
402
+ type index$D_CreateAnnotationQueueItemRequest = CreateAnnotationQueueItemRequest;
403
+ type index$D_CreateAnnotationQueueRequest = CreateAnnotationQueueRequest;
404
+ type index$D_DeleteAnnotationQueueAssignmentResponse = DeleteAnnotationQueueAssignmentResponse;
405
+ type index$D_DeleteAnnotationQueueItemResponse = DeleteAnnotationQueueItemResponse;
406
+ type index$D_GetAnnotationQueueItemsRequest = GetAnnotationQueueItemsRequest;
407
+ type index$D_GetAnnotationQueuesRequest = GetAnnotationQueuesRequest;
408
+ type index$D_PaginatedAnnotationQueueItems = PaginatedAnnotationQueueItems;
409
+ type index$D_PaginatedAnnotationQueues = PaginatedAnnotationQueues;
410
+ type index$D_UpdateAnnotationQueueItemRequest = UpdateAnnotationQueueItemRequest;
411
+ declare namespace index$D {
412
+ export { type index$D_AnnotationQueue as AnnotationQueue, type index$D_AnnotationQueueAssignmentRequest as AnnotationQueueAssignmentRequest, type index$D_AnnotationQueueItem as AnnotationQueueItem, index$D_AnnotationQueueObjectType as AnnotationQueueObjectType, index$D_AnnotationQueueStatus as AnnotationQueueStatus, type index$D_CreateAnnotationQueueAssignmentResponse as CreateAnnotationQueueAssignmentResponse, type index$D_CreateAnnotationQueueItemRequest as CreateAnnotationQueueItemRequest, type index$D_CreateAnnotationQueueRequest as CreateAnnotationQueueRequest, type index$D_DeleteAnnotationQueueAssignmentResponse as DeleteAnnotationQueueAssignmentResponse, type index$D_DeleteAnnotationQueueItemResponse as DeleteAnnotationQueueItemResponse, type index$D_GetAnnotationQueueItemsRequest as GetAnnotationQueueItemsRequest, type index$D_GetAnnotationQueuesRequest as GetAnnotationQueuesRequest, type index$D_PaginatedAnnotationQueueItems as PaginatedAnnotationQueueItems, type index$D_PaginatedAnnotationQueues as PaginatedAnnotationQueues, type index$D_UpdateAnnotationQueueItemRequest as UpdateAnnotationQueueItemRequest };
413
413
  }
414
414
 
415
415
  /**
@@ -425,11 +425,29 @@ declare const BlobStorageIntegrationType: {
425
425
  /**
426
426
  * This file was auto-generated by Fern from our API Definition.
427
427
  */
428
- type BlobStorageIntegrationFileType = "JSON" | "CSV" | "JSONL";
428
+ /**
429
+ * File format for exported data. `PARQUET` is a columnar binary format encoded and compressed by the storage engine; gzip compression does not apply to it. Note that the model-price columns (`input_price`, `output_price`, `total_price`) are not included in Parquet observation exports.
430
+ */
431
+ type BlobStorageIntegrationFileType = "JSON" | "CSV" | "JSONL" | "PARQUET";
429
432
  declare const BlobStorageIntegrationFileType: {
430
433
  readonly Json: "JSON";
431
434
  readonly Csv: "CSV";
432
435
  readonly Jsonl: "JSONL";
436
+ readonly Parquet: "PARQUET";
437
+ };
438
+
439
+ /**
440
+ * This file was auto-generated by Fern from our API Definition.
441
+ */
442
+ /**
443
+ * File type reported for an existing integration.
444
+ */
445
+ type BlobStorageIntegrationFileTypeResponse = "JSON" | "CSV" | "JSONL" | "PARQUET";
446
+ declare const BlobStorageIntegrationFileTypeResponse: {
447
+ readonly Json: "JSON";
448
+ readonly Csv: "CSV";
449
+ readonly Jsonl: "JSONL";
450
+ readonly Parquet: "PARQUET";
433
451
  };
434
452
 
435
453
  /**
@@ -462,7 +480,7 @@ declare const BlobStorageExportFrequency: {
462
480
  * - `OBSERVATIONS_V2`: same data model as the `/api/public/v2/observations` endpoint, plus scores. Columns are controlled by `exportFieldGroups`.
463
481
  * - `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: both sets. Observation columns of both portions are controlled by `exportFieldGroups`.
464
482
  *
465
- * **Note:** `OBSERVATIONS_V2` and the enriched-observations portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` rely on the enriched observations table (Langfuse Fast Preview / v4), which is currently available on Langfuse Cloud only. See https://langfuse.com/docs/v4.
483
+ * **Note:** which sources a deployment accepts depends on how far it has moved to the v4 data model. `OBSERVATIONS_V2` and the enriched-observations portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` read the enriched observations table, so they require a deployment that already populates it. `LEGACY_TRACES_OBSERVATIONS` and the legacy portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` read the legacy traces and observations tables, so they require a deployment that still populates those. A deployment part-way through the migration populates both and accepts every source. Selecting a source the deployment cannot serve is rejected with `400`, rather than exporting an empty result. See https://langfuse.com/docs/v4.
466
484
  */
467
485
  type BlobStorageExportSource = "LEGACY_TRACES_OBSERVATIONS" | "OBSERVATIONS_V2" | "LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS";
468
486
  declare const BlobStorageExportSource: {
@@ -519,12 +537,12 @@ interface CreateBlobStorageIntegrationRequest {
519
537
  forcePathStyle: boolean;
520
538
  fileType: BlobStorageIntegrationFileType;
521
539
  exportMode: BlobStorageExportMode;
522
- /** Custom start date for exports (required when exportMode is FROM_CUSTOM_DATE) */
540
+ /** Custom start date for exports (required when exportMode is FROM_CUSTOM_DATE). Must not be in the future (27 h tolerance for timezone differences). */
523
541
  exportStartDate?: string;
524
542
  /** Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. */
525
543
  compressed?: boolean;
526
544
  /**
527
- * Data to export. When omitted on update, the existing value is preserved. When omitted on create: integrations on Langfuse Cloud default to `OBSERVATIONS_V2`; self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`. Required when `exportFieldGroups` is provided.
545
+ * Data to export. When omitted on update, the existing value is preserved. When omitted on create, the default is `OBSERVATIONS_V2` on Langfuse Cloud, and on self-hosted deployments `LEGACY_TRACES_OBSERVATIONS` — or `OBSERVATIONS_V2` where the deployment no longer populates the legacy tables. The default is never a source the deployment cannot serve. Required when `exportFieldGroups` is provided.
528
546
  *
529
547
  * **Cloud-only project deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` for all new integrations. Self-hosted deployments are unaffected.
530
548
  *
@@ -555,7 +573,7 @@ interface BlobStorageIntegrationResponse {
555
573
  exportFrequency: BlobStorageExportFrequency;
556
574
  enabled: boolean;
557
575
  forcePathStyle: boolean;
558
- fileType: BlobStorageIntegrationFileType;
576
+ fileType: BlobStorageIntegrationFileTypeResponse;
559
577
  exportMode: BlobStorageExportMode;
560
578
  exportStartDate: string | null;
561
579
  compressed: boolean;
@@ -585,17 +603,19 @@ interface BlobStorageIntegrationsResponse {
585
603
  * Sync status of the blob storage integration:
586
604
  * - `disabled` — integration is not enabled
587
605
  * - `error` — last export failed (see `lastError` for details)
588
- * - `idle` — enabled but has never exported yet
606
+ * - `running` — an export job is currently being processed
589
607
  * - `queued` — next export is overdue (`nextSyncAt` is in the past) and waiting to be picked up by the worker
608
+ * - `idle` — enabled but has never exported yet and no export is queued
590
609
  * - `up_to_date` — all available data has been exported; next export is scheduled for the future
591
610
  *
592
611
  * **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your
593
612
  * ETL bookmark to determine if new data is available. Note that exports run with a 20-minute lag buffer,
594
613
  * so `lastSyncAt` will always be at least 20 minutes behind real-time.
595
614
  */
596
- type BlobStorageSyncStatus = "idle" | "queued" | "up_to_date" | "disabled" | "error";
615
+ type BlobStorageSyncStatus = "idle" | "running" | "queued" | "up_to_date" | "disabled" | "error";
597
616
  declare const BlobStorageSyncStatus: {
598
617
  readonly Idle: "idle";
618
+ readonly Running: "running";
599
619
  readonly Queued: "queued";
600
620
  readonly UpToDate: "up_to_date";
601
621
  readonly Disabled: "disabled";
@@ -628,20 +648,21 @@ interface BlobStorageIntegrationDeletionResponse {
628
648
  message: string;
629
649
  }
630
650
 
631
- declare const index$y_BlobStorageExportFieldGroup: typeof BlobStorageExportFieldGroup;
632
- declare const index$y_BlobStorageExportFrequency: typeof BlobStorageExportFrequency;
633
- declare const index$y_BlobStorageExportMode: typeof BlobStorageExportMode;
634
- declare const index$y_BlobStorageExportSource: typeof BlobStorageExportSource;
635
- type index$y_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
636
- declare const index$y_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
637
- type index$y_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
638
- type index$y_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
639
- declare const index$y_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
640
- type index$y_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
641
- declare const index$y_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
642
- type index$y_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
643
- declare namespace index$y {
644
- export { index$y_BlobStorageExportFieldGroup as BlobStorageExportFieldGroup, index$y_BlobStorageExportFrequency as BlobStorageExportFrequency, index$y_BlobStorageExportMode as BlobStorageExportMode, index$y_BlobStorageExportSource as BlobStorageExportSource, type index$y_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$y_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, type index$y_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, type index$y_BlobStorageIntegrationStatusResponse as BlobStorageIntegrationStatusResponse, index$y_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$y_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, index$y_BlobStorageSyncStatus as BlobStorageSyncStatus, type index$y_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
651
+ declare const index$C_BlobStorageExportFieldGroup: typeof BlobStorageExportFieldGroup;
652
+ declare const index$C_BlobStorageExportFrequency: typeof BlobStorageExportFrequency;
653
+ declare const index$C_BlobStorageExportMode: typeof BlobStorageExportMode;
654
+ declare const index$C_BlobStorageExportSource: typeof BlobStorageExportSource;
655
+ type index$C_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
656
+ declare const index$C_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
657
+ declare const index$C_BlobStorageIntegrationFileTypeResponse: typeof BlobStorageIntegrationFileTypeResponse;
658
+ type index$C_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
659
+ type index$C_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
660
+ declare const index$C_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
661
+ type index$C_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
662
+ declare const index$C_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
663
+ type index$C_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
664
+ declare namespace index$C {
665
+ export { index$C_BlobStorageExportFieldGroup as BlobStorageExportFieldGroup, index$C_BlobStorageExportFrequency as BlobStorageExportFrequency, index$C_BlobStorageExportMode as BlobStorageExportMode, index$C_BlobStorageExportSource as BlobStorageExportSource, type index$C_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$C_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, index$C_BlobStorageIntegrationFileTypeResponse as BlobStorageIntegrationFileTypeResponse, type index$C_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, type index$C_BlobStorageIntegrationStatusResponse as BlobStorageIntegrationStatusResponse, index$C_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$C_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, index$C_BlobStorageSyncStatus as BlobStorageSyncStatus, type index$C_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
645
666
  }
646
667
 
647
668
  /**
@@ -656,7 +677,7 @@ interface CreateCommentRequest {
656
677
  objectId: string;
657
678
  /** The content of the comment. May include markdown. Currently limited to 5000 characters. */
658
679
  content: string;
659
- /** The id of the user who created the comment. */
680
+ /** The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown. */
660
681
  authorUserId?: string;
661
682
  }
662
683
 
@@ -697,12 +718,29 @@ interface GetCommentsRequest {
697
718
  authorUserId?: string;
698
719
  }
699
720
 
700
- type index$x_CreateCommentRequest = CreateCommentRequest;
701
- type index$x_CreateCommentResponse = CreateCommentResponse;
702
- type index$x_GetCommentsRequest = GetCommentsRequest;
703
- type index$x_GetCommentsResponse = GetCommentsResponse;
704
- declare namespace index$x {
705
- export type { index$x_CreateCommentRequest as CreateCommentRequest, index$x_CreateCommentResponse as CreateCommentResponse, index$x_GetCommentsRequest as GetCommentsRequest, index$x_GetCommentsResponse as GetCommentsResponse };
721
+ type index$B_CreateCommentRequest = CreateCommentRequest;
722
+ type index$B_CreateCommentResponse = CreateCommentResponse;
723
+ type index$B_GetCommentsRequest = GetCommentsRequest;
724
+ type index$B_GetCommentsResponse = GetCommentsResponse;
725
+ declare namespace index$B {
726
+ export type { index$B_CreateCommentRequest as CreateCommentRequest, index$B_CreateCommentResponse as CreateCommentResponse, index$B_GetCommentsRequest as GetCommentsRequest, index$B_GetCommentsResponse as GetCommentsResponse };
727
+ }
728
+
729
+ /**
730
+ * This file was auto-generated by Fern from our API Definition.
731
+ */
732
+ /**
733
+ * Migration signal returned by deprecated endpoints. Optional fields are omitted when they have no value.
734
+ */
735
+ interface Deprecation {
736
+ /** Human- and agent-readable summary of the deprecation and its replacement. */
737
+ message: string;
738
+ /** The replacement endpoint, e.g. "GET /api/public/v2/observations". Omitted when the endpoint is being removed without a direct replacement. */
739
+ replacement?: string;
740
+ /** Link to the migration documentation (markdown), when available. */
741
+ docsUrl?: string;
742
+ /** ISO date after which the endpoint may stop working, when a removal date is committed. */
743
+ sunsetAt?: string;
706
744
  }
707
745
 
708
746
  /**
@@ -769,6 +807,7 @@ interface TraceWithFullDetails extends Trace$1 {
769
807
  observations: ObservationsView[];
770
808
  /** List of scores */
771
809
  scores: ScoreV1$1[];
810
+ _deprecation?: Deprecation;
772
811
  }
773
812
 
774
813
  /**
@@ -788,6 +827,7 @@ interface Session {
788
827
 
789
828
  interface SessionWithTraces extends Session {
790
829
  traces: Trace$1[];
830
+ _deprecation?: Deprecation;
791
831
  }
792
832
 
793
833
  /**
@@ -868,6 +908,14 @@ interface ObservationsView extends Observation {
868
908
  timeToFirstToken: number | null;
869
909
  }
870
910
 
911
+ /**
912
+ * This file was auto-generated by Fern from our API Definition.
913
+ */
914
+
915
+ interface ObservationsViewSingle extends ObservationsView {
916
+ _deprecation?: Deprecation;
917
+ }
918
+
871
919
  /**
872
920
  * This file was auto-generated by Fern from our API Definition.
873
921
  */
@@ -887,10 +935,18 @@ interface ObservationV2 {
887
935
  endTime: string | null;
888
936
  /** The project ID this observation belongs to */
889
937
  projectId: string;
890
- /** The parent observation ID */
938
+ /**
939
+ * The physical parent observation ID, if present.
940
+ * Observations marked as app roots by the SDK may retain a non-null parent ID.
941
+ */
891
942
  parentObservationId: string | null;
892
943
  /** The type of the observation (e.g. GENERATION, SPAN, EVENT) */
893
944
  type: string;
945
+ /**
946
+ * Whether this observation is a logical root.
947
+ * This is true for observations without a physical parent and observations marked as app roots by the SDK.
948
+ */
949
+ isRootObservation?: boolean;
894
950
  /** The name of the observation */
895
951
  name?: string | null;
896
952
  /** The level of the observation */
@@ -1223,21 +1279,24 @@ Score.Numeric
1223
1279
  * Score with TEXT data type */
1224
1280
  | Score.Text;
1225
1281
  declare namespace Score {
1226
- interface Numeric extends NumericScore {
1282
+ interface Numeric extends NumericScore, _Base {
1227
1283
  dataType: "NUMERIC";
1228
1284
  }
1229
- interface Categorical extends CategoricalScore {
1285
+ interface Categorical extends CategoricalScore, _Base {
1230
1286
  dataType: "CATEGORICAL";
1231
1287
  }
1232
- interface Boolean extends BooleanScore {
1288
+ interface Boolean extends BooleanScore, _Base {
1233
1289
  dataType: "BOOLEAN";
1234
1290
  }
1235
- interface Correction extends CorrectionScore {
1291
+ interface Correction extends CorrectionScore, _Base {
1236
1292
  dataType: "CORRECTION";
1237
1293
  }
1238
- interface Text extends TextScore {
1294
+ interface Text extends TextScore, _Base {
1239
1295
  dataType: "TEXT";
1240
1296
  }
1297
+ interface _Base {
1298
+ _deprecation?: Deprecation;
1299
+ }
1241
1300
  }
1242
1301
 
1243
1302
  /**
@@ -1392,6 +1451,7 @@ interface DatasetRun {
1392
1451
 
1393
1452
  interface DatasetRunWithItems extends DatasetRun {
1394
1453
  datasetRunItems: DatasetRunItem[];
1454
+ _deprecation?: Deprecation;
1395
1455
  }
1396
1456
 
1397
1457
  /**
@@ -1880,54 +1940,56 @@ declare class MethodNotAllowedError$1 extends LangfuseAPIError {
1880
1940
  constructor(body?: unknown, rawResponse?: RawResponse);
1881
1941
  }
1882
1942
 
1883
- type index$w_BaseScore = BaseScore;
1884
- type index$w_BaseScoreV1 = BaseScoreV1;
1885
- type index$w_BooleanScore = BooleanScore;
1886
- type index$w_BooleanScoreV1 = BooleanScoreV1;
1887
- type index$w_CategoricalScore = CategoricalScore;
1888
- type index$w_CategoricalScoreV1 = CategoricalScoreV1;
1889
- type index$w_Comment = Comment;
1890
- declare const index$w_CommentObjectType: typeof CommentObjectType;
1891
- type index$w_ConfigCategory = ConfigCategory;
1892
- type index$w_CorrectionScore = CorrectionScore;
1893
- type index$w_CreateScoreValue = CreateScoreValue;
1894
- type index$w_Dataset = Dataset;
1895
- type index$w_DatasetItem = DatasetItem;
1896
- type index$w_DatasetItemMediaReference = DatasetItemMediaReference;
1897
- declare const index$w_DatasetItemMediaReferenceField: typeof DatasetItemMediaReferenceField;
1898
- type index$w_DatasetItemMediaReferenceMedia = DatasetItemMediaReferenceMedia;
1899
- type index$w_DatasetRun = DatasetRun;
1900
- type index$w_DatasetRunItem = DatasetRunItem;
1901
- type index$w_DatasetRunWithItems = DatasetRunWithItems;
1902
- declare const index$w_DatasetStatus: typeof DatasetStatus;
1903
- type index$w_MapValue = MapValue;
1904
- type index$w_Model = Model;
1905
- type index$w_ModelPrice = ModelPrice;
1906
- declare const index$w_ModelUsageUnit: typeof ModelUsageUnit;
1907
- type index$w_NumericScore = NumericScore;
1908
- type index$w_NumericScoreV1 = NumericScoreV1;
1909
- type index$w_Observation = Observation;
1910
- declare const index$w_ObservationLevel: typeof ObservationLevel;
1911
- type index$w_ObservationV2 = ObservationV2;
1912
- type index$w_ObservationsView = ObservationsView;
1913
- type index$w_PricingTier = PricingTier;
1914
- type index$w_PricingTierCondition = PricingTierCondition;
1915
- type index$w_PricingTierInput = PricingTierInput;
1916
- declare const index$w_PricingTierOperator: typeof PricingTierOperator;
1917
- declare const index$w_Score: typeof Score;
1918
- type index$w_ScoreConfig = ScoreConfig;
1919
- declare const index$w_ScoreConfigDataType: typeof ScoreConfigDataType;
1920
- declare const index$w_ScoreDataType: typeof ScoreDataType;
1921
- declare const index$w_ScoreSource: typeof ScoreSource;
1922
- type index$w_Session = Session;
1923
- type index$w_SessionWithTraces = SessionWithTraces;
1924
- type index$w_TextScore = TextScore;
1925
- type index$w_TextScoreV1 = TextScoreV1;
1926
- type index$w_TraceWithDetails = TraceWithDetails;
1927
- type index$w_TraceWithFullDetails = TraceWithFullDetails;
1928
- type index$w_Usage = Usage;
1929
- declare namespace index$w {
1930
- export { AccessDeniedError$1 as AccessDeniedError, type index$w_BaseScore as BaseScore, type index$w_BaseScoreV1 as BaseScoreV1, type index$w_BooleanScore as BooleanScore, type index$w_BooleanScoreV1 as BooleanScoreV1, type index$w_CategoricalScore as CategoricalScore, type index$w_CategoricalScoreV1 as CategoricalScoreV1, type index$w_Comment as Comment, index$w_CommentObjectType as CommentObjectType, type index$w_ConfigCategory as ConfigCategory, type index$w_CorrectionScore as CorrectionScore, type index$w_CreateScoreValue as CreateScoreValue, type index$w_Dataset as Dataset, type index$w_DatasetItem as DatasetItem, type index$w_DatasetItemMediaReference as DatasetItemMediaReference, index$w_DatasetItemMediaReferenceField as DatasetItemMediaReferenceField, type index$w_DatasetItemMediaReferenceMedia as DatasetItemMediaReferenceMedia, type index$w_DatasetRun as DatasetRun, type index$w_DatasetRunItem as DatasetRunItem, type index$w_DatasetRunWithItems as DatasetRunWithItems, index$w_DatasetStatus as DatasetStatus, Error$1 as Error, type index$w_MapValue as MapValue, MethodNotAllowedError$1 as MethodNotAllowedError, type index$w_Model as Model, type index$w_ModelPrice as ModelPrice, index$w_ModelUsageUnit as ModelUsageUnit, NotFoundError$1 as NotFoundError, type index$w_NumericScore as NumericScore, type index$w_NumericScoreV1 as NumericScoreV1, type index$w_Observation as Observation, index$w_ObservationLevel as ObservationLevel, type index$w_ObservationV2 as ObservationV2, type index$w_ObservationsView as ObservationsView, type index$w_PricingTier as PricingTier, type index$w_PricingTierCondition as PricingTierCondition, type index$w_PricingTierInput as PricingTierInput, index$w_PricingTierOperator as PricingTierOperator, index$w_Score as Score, type index$w_ScoreConfig as ScoreConfig, index$w_ScoreConfigDataType as ScoreConfigDataType, index$w_ScoreDataType as ScoreDataType, index$w_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$w_Session as Session, type index$w_SessionWithTraces as SessionWithTraces, type index$w_TextScore as TextScore, type index$w_TextScoreV1 as TextScoreV1, type Trace$1 as Trace, type index$w_TraceWithDetails as TraceWithDetails, type index$w_TraceWithFullDetails as TraceWithFullDetails, UnauthorizedError$1 as UnauthorizedError, type index$w_Usage as Usage };
1943
+ type index$A_BaseScore = BaseScore;
1944
+ type index$A_BaseScoreV1 = BaseScoreV1;
1945
+ type index$A_BooleanScore = BooleanScore;
1946
+ type index$A_BooleanScoreV1 = BooleanScoreV1;
1947
+ type index$A_CategoricalScore = CategoricalScore;
1948
+ type index$A_CategoricalScoreV1 = CategoricalScoreV1;
1949
+ type index$A_Comment = Comment;
1950
+ declare const index$A_CommentObjectType: typeof CommentObjectType;
1951
+ type index$A_ConfigCategory = ConfigCategory;
1952
+ type index$A_CorrectionScore = CorrectionScore;
1953
+ type index$A_CreateScoreValue = CreateScoreValue;
1954
+ type index$A_Dataset = Dataset;
1955
+ type index$A_DatasetItem = DatasetItem;
1956
+ type index$A_DatasetItemMediaReference = DatasetItemMediaReference;
1957
+ declare const index$A_DatasetItemMediaReferenceField: typeof DatasetItemMediaReferenceField;
1958
+ type index$A_DatasetItemMediaReferenceMedia = DatasetItemMediaReferenceMedia;
1959
+ type index$A_DatasetRun = DatasetRun;
1960
+ type index$A_DatasetRunItem = DatasetRunItem;
1961
+ type index$A_DatasetRunWithItems = DatasetRunWithItems;
1962
+ declare const index$A_DatasetStatus: typeof DatasetStatus;
1963
+ type index$A_Deprecation = Deprecation;
1964
+ type index$A_MapValue = MapValue;
1965
+ type index$A_Model = Model;
1966
+ type index$A_ModelPrice = ModelPrice;
1967
+ declare const index$A_ModelUsageUnit: typeof ModelUsageUnit;
1968
+ type index$A_NumericScore = NumericScore;
1969
+ type index$A_NumericScoreV1 = NumericScoreV1;
1970
+ type index$A_Observation = Observation;
1971
+ declare const index$A_ObservationLevel: typeof ObservationLevel;
1972
+ type index$A_ObservationV2 = ObservationV2;
1973
+ type index$A_ObservationsView = ObservationsView;
1974
+ type index$A_ObservationsViewSingle = ObservationsViewSingle;
1975
+ type index$A_PricingTier = PricingTier;
1976
+ type index$A_PricingTierCondition = PricingTierCondition;
1977
+ type index$A_PricingTierInput = PricingTierInput;
1978
+ declare const index$A_PricingTierOperator: typeof PricingTierOperator;
1979
+ declare const index$A_Score: typeof Score;
1980
+ type index$A_ScoreConfig = ScoreConfig;
1981
+ declare const index$A_ScoreConfigDataType: typeof ScoreConfigDataType;
1982
+ declare const index$A_ScoreDataType: typeof ScoreDataType;
1983
+ declare const index$A_ScoreSource: typeof ScoreSource;
1984
+ type index$A_Session = Session;
1985
+ type index$A_SessionWithTraces = SessionWithTraces;
1986
+ type index$A_TextScore = TextScore;
1987
+ type index$A_TextScoreV1 = TextScoreV1;
1988
+ type index$A_TraceWithDetails = TraceWithDetails;
1989
+ type index$A_TraceWithFullDetails = TraceWithFullDetails;
1990
+ type index$A_Usage = Usage;
1991
+ declare namespace index$A {
1992
+ export { AccessDeniedError$1 as AccessDeniedError, type index$A_BaseScore as BaseScore, type index$A_BaseScoreV1 as BaseScoreV1, type index$A_BooleanScore as BooleanScore, type index$A_BooleanScoreV1 as BooleanScoreV1, type index$A_CategoricalScore as CategoricalScore, type index$A_CategoricalScoreV1 as CategoricalScoreV1, type index$A_Comment as Comment, index$A_CommentObjectType as CommentObjectType, type index$A_ConfigCategory as ConfigCategory, type index$A_CorrectionScore as CorrectionScore, type index$A_CreateScoreValue as CreateScoreValue, type index$A_Dataset as Dataset, type index$A_DatasetItem as DatasetItem, type index$A_DatasetItemMediaReference as DatasetItemMediaReference, index$A_DatasetItemMediaReferenceField as DatasetItemMediaReferenceField, type index$A_DatasetItemMediaReferenceMedia as DatasetItemMediaReferenceMedia, type index$A_DatasetRun as DatasetRun, type index$A_DatasetRunItem as DatasetRunItem, type index$A_DatasetRunWithItems as DatasetRunWithItems, index$A_DatasetStatus as DatasetStatus, type index$A_Deprecation as Deprecation, Error$1 as Error, type index$A_MapValue as MapValue, MethodNotAllowedError$1 as MethodNotAllowedError, type index$A_Model as Model, type index$A_ModelPrice as ModelPrice, index$A_ModelUsageUnit as ModelUsageUnit, NotFoundError$1 as NotFoundError, type index$A_NumericScore as NumericScore, type index$A_NumericScoreV1 as NumericScoreV1, type index$A_Observation as Observation, index$A_ObservationLevel as ObservationLevel, type index$A_ObservationV2 as ObservationV2, type index$A_ObservationsView as ObservationsView, type index$A_ObservationsViewSingle as ObservationsViewSingle, type index$A_PricingTier as PricingTier, type index$A_PricingTierCondition as PricingTierCondition, type index$A_PricingTierInput as PricingTierInput, index$A_PricingTierOperator as PricingTierOperator, index$A_Score as Score, type index$A_ScoreConfig as ScoreConfig, index$A_ScoreConfigDataType as ScoreConfigDataType, index$A_ScoreDataType as ScoreDataType, index$A_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$A_Session as Session, type index$A_SessionWithTraces as SessionWithTraces, type index$A_TextScore as TextScore, type index$A_TextScoreV1 as TextScoreV1, type Trace$1 as Trace, type index$A_TraceWithDetails as TraceWithDetails, type index$A_TraceWithFullDetails as TraceWithFullDetails, UnauthorizedError$1 as UnauthorizedError, type index$A_Usage as Usage };
1931
1993
  }
1932
1994
 
1933
1995
  /**
@@ -1987,12 +2049,12 @@ interface GetDatasetItemsRequest {
1987
2049
  limit?: number;
1988
2050
  }
1989
2051
 
1990
- type index$v_CreateDatasetItemRequest = CreateDatasetItemRequest;
1991
- type index$v_DeleteDatasetItemResponse = DeleteDatasetItemResponse;
1992
- type index$v_GetDatasetItemsRequest = GetDatasetItemsRequest;
1993
- type index$v_PaginatedDatasetItems = PaginatedDatasetItems;
1994
- declare namespace index$v {
1995
- export type { index$v_CreateDatasetItemRequest as CreateDatasetItemRequest, index$v_DeleteDatasetItemResponse as DeleteDatasetItemResponse, index$v_GetDatasetItemsRequest as GetDatasetItemsRequest, index$v_PaginatedDatasetItems as PaginatedDatasetItems };
2052
+ type index$z_CreateDatasetItemRequest = CreateDatasetItemRequest;
2053
+ type index$z_DeleteDatasetItemResponse = DeleteDatasetItemResponse;
2054
+ type index$z_GetDatasetItemsRequest = GetDatasetItemsRequest;
2055
+ type index$z_PaginatedDatasetItems = PaginatedDatasetItems;
2056
+ declare namespace index$z {
2057
+ export type { index$z_CreateDatasetItemRequest as CreateDatasetItemRequest, index$z_DeleteDatasetItemResponse as DeleteDatasetItemResponse, index$z_GetDatasetItemsRequest as GetDatasetItemsRequest, index$z_PaginatedDatasetItems as PaginatedDatasetItems };
1996
2058
  }
1997
2059
 
1998
2060
  /**
@@ -2026,6 +2088,7 @@ interface CreateDatasetRunItemRequest {
2026
2088
  interface PaginatedDatasetRunItems {
2027
2089
  data: DatasetRunItem[];
2028
2090
  meta: MetaResponse;
2091
+ _deprecation?: Deprecation;
2029
2092
  }
2030
2093
 
2031
2094
  /**
@@ -2047,11 +2110,11 @@ interface ListDatasetRunItemsRequest {
2047
2110
  limit?: number;
2048
2111
  }
2049
2112
 
2050
- type index$u_CreateDatasetRunItemRequest = CreateDatasetRunItemRequest;
2051
- type index$u_ListDatasetRunItemsRequest = ListDatasetRunItemsRequest;
2052
- type index$u_PaginatedDatasetRunItems = PaginatedDatasetRunItems;
2053
- declare namespace index$u {
2054
- export type { index$u_CreateDatasetRunItemRequest as CreateDatasetRunItemRequest, index$u_ListDatasetRunItemsRequest as ListDatasetRunItemsRequest, index$u_PaginatedDatasetRunItems as PaginatedDatasetRunItems };
2113
+ type index$y_CreateDatasetRunItemRequest = CreateDatasetRunItemRequest;
2114
+ type index$y_ListDatasetRunItemsRequest = ListDatasetRunItemsRequest;
2115
+ type index$y_PaginatedDatasetRunItems = PaginatedDatasetRunItems;
2116
+ declare namespace index$y {
2117
+ export type { index$y_CreateDatasetRunItemRequest as CreateDatasetRunItemRequest, index$y_ListDatasetRunItemsRequest as ListDatasetRunItemsRequest, index$y_PaginatedDatasetRunItems as PaginatedDatasetRunItems };
2055
2118
  }
2056
2119
 
2057
2120
  /**
@@ -2083,6 +2146,7 @@ interface CreateDatasetRequest {
2083
2146
  interface PaginatedDatasetRuns {
2084
2147
  data: DatasetRun[];
2085
2148
  meta: MetaResponse;
2149
+ _deprecation?: Deprecation;
2086
2150
  }
2087
2151
 
2088
2152
  /**
@@ -2120,14 +2184,252 @@ interface GetDatasetRunsRequest {
2120
2184
  limit?: number;
2121
2185
  }
2122
2186
 
2123
- type index$t_CreateDatasetRequest = CreateDatasetRequest;
2124
- type index$t_DeleteDatasetRunResponse = DeleteDatasetRunResponse;
2125
- type index$t_GetDatasetRunsRequest = GetDatasetRunsRequest;
2126
- type index$t_GetDatasetsRequest = GetDatasetsRequest;
2127
- type index$t_PaginatedDatasetRuns = PaginatedDatasetRuns;
2128
- type index$t_PaginatedDatasets = PaginatedDatasets;
2129
- declare namespace index$t {
2130
- export type { index$t_CreateDatasetRequest as CreateDatasetRequest, index$t_DeleteDatasetRunResponse as DeleteDatasetRunResponse, index$t_GetDatasetRunsRequest as GetDatasetRunsRequest, index$t_GetDatasetsRequest as GetDatasetsRequest, index$t_PaginatedDatasetRuns as PaginatedDatasetRuns, index$t_PaginatedDatasets as PaginatedDatasets };
2187
+ type index$x_CreateDatasetRequest = CreateDatasetRequest;
2188
+ type index$x_DeleteDatasetRunResponse = DeleteDatasetRunResponse;
2189
+ type index$x_GetDatasetRunsRequest = GetDatasetRunsRequest;
2190
+ type index$x_GetDatasetsRequest = GetDatasetsRequest;
2191
+ type index$x_PaginatedDatasetRuns = PaginatedDatasetRuns;
2192
+ type index$x_PaginatedDatasets = PaginatedDatasets;
2193
+ declare namespace index$x {
2194
+ export type { index$x_CreateDatasetRequest as CreateDatasetRequest, index$x_DeleteDatasetRunResponse as DeleteDatasetRunResponse, index$x_GetDatasetRunsRequest as GetDatasetRunsRequest, index$x_GetDatasetsRequest as GetDatasetsRequest, index$x_PaginatedDatasetRuns as PaginatedDatasetRuns, index$x_PaginatedDatasets as PaginatedDatasets };
2195
+ }
2196
+
2197
+ /**
2198
+ * This file was auto-generated by Fern from our API Definition.
2199
+ */
2200
+
2201
+ interface ExperimentsResponse {
2202
+ data: Experiment[];
2203
+ meta: ExperimentsResponseMeta;
2204
+ }
2205
+
2206
+ /**
2207
+ * This file was auto-generated by Fern from our API Definition.
2208
+ */
2209
+ interface ExperimentsResponseMeta {
2210
+ /** Versioned base64url cursor for retrieving the next page. Absent when there are no more results. */
2211
+ cursor?: string;
2212
+ }
2213
+
2214
+ /**
2215
+ * This file was auto-generated by Fern from our API Definition.
2216
+ */
2217
+
2218
+ interface Experiment {
2219
+ id: string;
2220
+ name: string;
2221
+ description: string | null;
2222
+ /**
2223
+ * Start of the experiment, i.e. the earliest event within the
2224
+ * requested time range. Clipped to `fromStartTime` when the
2225
+ * experiment started before the requested range.
2226
+ */
2227
+ startTime: string;
2228
+ /**
2229
+ * End of the experiment, i.e. the latest event end within the
2230
+ * requested time range.
2231
+ */
2232
+ endTime: string;
2233
+ /** Number of experiment items within the requested time range. */
2234
+ itemCount: number;
2235
+ /** Null when the experiment is not associated with a dataset. */
2236
+ datasetId: string | null;
2237
+ /** Included only when `fields=metadata` is requested. */
2238
+ metadata?: Record<string, unknown> | null;
2239
+ /** Included only when `fields=scores` is requested. Contains scores directly attached to the experiment. */
2240
+ scores?: ScoreV3[];
2241
+ }
2242
+
2243
+ /**
2244
+ * This file was auto-generated by Fern from our API Definition.
2245
+ */
2246
+
2247
+ interface ExperimentItemsResponse {
2248
+ data: ExperimentItem[];
2249
+ meta: ExperimentsResponseMeta;
2250
+ }
2251
+
2252
+ /**
2253
+ * This file was auto-generated by Fern from our API Definition.
2254
+ */
2255
+
2256
+ interface ExperimentItem {
2257
+ id: string;
2258
+ traceId: string;
2259
+ startTime: string;
2260
+ endTime: string | null;
2261
+ level: ObservationLevel;
2262
+ environment: string;
2263
+ experimentId: string;
2264
+ experimentName: string;
2265
+ experimentItemId: string;
2266
+ /** Included when `fields=dataset` is requested. */
2267
+ experimentDatasetId?: string | null;
2268
+ /** Included when `fields=dataset` is requested. */
2269
+ experimentItemVersion?: string | null;
2270
+ /** Included when `fields=io` is requested. */
2271
+ input?: unknown;
2272
+ /** Included when `fields=io` is requested. */
2273
+ output?: unknown;
2274
+ /** Included when `fields=io` is requested. */
2275
+ expectedOutput?: unknown;
2276
+ /** Included when `fields=metadata` is requested. */
2277
+ metadata?: Record<string, unknown> | null;
2278
+ /** Included when `fields=itemMetadata` is requested. */
2279
+ experimentItemMetadata?: Record<string, unknown> | null;
2280
+ /** Included when `fields=experimentMetadata` is requested. */
2281
+ experimentMetadata?: Record<string, unknown> | null;
2282
+ /** Included when `fields=experimentMetadata` is requested. */
2283
+ experimentDescription?: string | null;
2284
+ /** Included only when `fields=scores` is requested. Contains item and trace scores only; experiment-level scores are returned by the experiments endpoint. */
2285
+ scores?: ScoreV3[];
2286
+ }
2287
+
2288
+ /**
2289
+ * This file was auto-generated by Fern from our API Definition.
2290
+ */
2291
+ /**
2292
+ * @example
2293
+ * {
2294
+ * fromStartTime: "2024-01-15T09:30:00Z"
2295
+ * }
2296
+ */
2297
+ interface ListExperimentsRequest {
2298
+ /**
2299
+ * Comma-separated list of field groups to include. Available groups:
2300
+ * `core`, `metadata`, `scores`. If omitted, `core` is returned.
2301
+ */
2302
+ fields?: string;
2303
+ /** Number of experiments to return per page. Maximum 100, default 50. */
2304
+ limit?: number;
2305
+ /** Number of scores to return per experiment when `fields=scores` is requested. Maximum 50, default 50. */
2306
+ scoreLimit?: number;
2307
+ /** Versioned base64url cursor from the previous response page. */
2308
+ cursor?: string;
2309
+ /** Retrieve only experiments on or after this datetime. */
2310
+ fromStartTime: string;
2311
+ /** Retrieve only experiments before this datetime. */
2312
+ toStartTime?: string;
2313
+ /** Comma-separated list of experiment IDs. */
2314
+ id?: string;
2315
+ /** Comma-separated list of experiment names. */
2316
+ name?: string;
2317
+ /** Comma-separated list of dataset IDs. */
2318
+ datasetId?: string;
2319
+ /**
2320
+ * JSON string containing an array of structured filter conditions.
2321
+ * Supported columns are `id`, `name`, and `datasetId`.
2322
+ */
2323
+ filter?: string;
2324
+ }
2325
+
2326
+ /**
2327
+ * This file was auto-generated by Fern from our API Definition.
2328
+ */
2329
+ /**
2330
+ * @example
2331
+ * {
2332
+ * fromStartTime: "2024-01-15T09:30:00Z"
2333
+ * }
2334
+ */
2335
+ interface ListExperimentItemsRequest {
2336
+ /**
2337
+ * Comma-separated list of field groups to include. Available groups:
2338
+ * `core`, `dataset`, `io`, `metadata`, `itemMetadata`,
2339
+ * `experimentMetadata`, `scores`. If omitted, `core,dataset` is
2340
+ * returned.
2341
+ */
2342
+ fields?: string;
2343
+ /** Number of experiment items to return per page. Maximum 100, default 50. */
2344
+ limit?: number;
2345
+ /** Number of scores to return per experiment item when `fields=scores` is requested. Maximum 50, default 50. */
2346
+ scoreLimit?: number;
2347
+ /** Versioned base64url cursor from the previous response page. */
2348
+ cursor?: string;
2349
+ /** Retrieve only experiment items started on or after this datetime. */
2350
+ fromStartTime: string;
2351
+ /** Retrieve only experiment items started before this datetime. */
2352
+ toStartTime?: string;
2353
+ /** Comma-separated list of experiment IDs. */
2354
+ experimentId?: string;
2355
+ /** Comma-separated list of experiment names. */
2356
+ experimentName?: string;
2357
+ /** Comma-separated list of experiment item IDs. */
2358
+ experimentItemId?: string;
2359
+ /** Comma-separated list of dataset IDs. */
2360
+ datasetId?: string;
2361
+ /**
2362
+ * JSON string containing an array of structured filter conditions.
2363
+ * Supported columns are `experimentId`, `experimentName`,
2364
+ * `experimentItemId`, and `datasetId`.
2365
+ */
2366
+ filter?: string;
2367
+ }
2368
+
2369
+ type index$w_Experiment = Experiment;
2370
+ type index$w_ExperimentItem = ExperimentItem;
2371
+ type index$w_ExperimentItemsResponse = ExperimentItemsResponse;
2372
+ type index$w_ExperimentsResponse = ExperimentsResponse;
2373
+ type index$w_ExperimentsResponseMeta = ExperimentsResponseMeta;
2374
+ type index$w_ListExperimentItemsRequest = ListExperimentItemsRequest;
2375
+ type index$w_ListExperimentsRequest = ListExperimentsRequest;
2376
+ declare namespace index$w {
2377
+ export type { index$w_Experiment as Experiment, index$w_ExperimentItem as ExperimentItem, index$w_ExperimentItemsResponse as ExperimentItemsResponse, index$w_ExperimentsResponse as ExperimentsResponse, index$w_ExperimentsResponseMeta as ExperimentsResponseMeta, index$w_ListExperimentItemsRequest as ListExperimentItemsRequest, index$w_ListExperimentsRequest as ListExperimentsRequest };
2378
+ }
2379
+
2380
+ /**
2381
+ * This file was auto-generated by Fern from our API Definition.
2382
+ */
2383
+ type FeedbackTargetType = "skill" | "mcp-tool" | "cli" | "docs" | "public-api" | "other";
2384
+ declare const FeedbackTargetType: {
2385
+ readonly Skill: "skill";
2386
+ readonly McpTool: "mcp-tool";
2387
+ readonly Cli: "cli";
2388
+ readonly Docs: "docs";
2389
+ readonly PublicApi: "public-api";
2390
+ readonly Other: "other";
2391
+ };
2392
+
2393
+ /**
2394
+ * This file was auto-generated by Fern from our API Definition.
2395
+ */
2396
+
2397
+ interface SubmitFeedbackRequest {
2398
+ /** Category of the thing the feedback is about. */
2399
+ targetType: FeedbackTargetType;
2400
+ /** The specific instance within targetType: the skill name, MCP tool name, CLI command, API endpoint path, or docs page path (e.g. 'queryMetrics', '/docs/mcp'). An identifier, not a sentence. Must be between 1 and 200 characters. */
2401
+ target: string;
2402
+ /** Concise feedback text approved by the user. Must be between 1 and 3000 characters. */
2403
+ feedback: string;
2404
+ /** Optional user-approved goal or use case they were trying to achieve. Must be between 1 and 1500 characters when provided. Do not include secrets, customer data, trace payloads, or broad unrelated context. */
2405
+ goal?: string;
2406
+ /** Optional HTTP(S) reference URL. Langfuse stores it as text for triage and does not fetch it. */
2407
+ referenceUrl?: string;
2408
+ }
2409
+
2410
+ /**
2411
+ * This file was auto-generated by Fern from our API Definition.
2412
+ */
2413
+ interface SubmitFeedbackResponse {
2414
+ /** Correlation ID for the submitted feedback. */
2415
+ id: string;
2416
+ }
2417
+
2418
+ /**
2419
+ * This file was auto-generated by Fern from our API Definition.
2420
+ */
2421
+
2422
+ declare class FeedbackNotConfiguredError extends LangfuseAPIError {
2423
+ constructor(rawResponse?: RawResponse);
2424
+ }
2425
+
2426
+ type index$v_FeedbackNotConfiguredError = FeedbackNotConfiguredError;
2427
+ declare const index$v_FeedbackNotConfiguredError: typeof FeedbackNotConfiguredError;
2428
+ declare const index$v_FeedbackTargetType: typeof FeedbackTargetType;
2429
+ type index$v_SubmitFeedbackRequest = SubmitFeedbackRequest;
2430
+ type index$v_SubmitFeedbackResponse = SubmitFeedbackResponse;
2431
+ declare namespace index$v {
2432
+ export { index$v_FeedbackNotConfiguredError as FeedbackNotConfiguredError, index$v_FeedbackTargetType as FeedbackTargetType, type index$v_SubmitFeedbackRequest as SubmitFeedbackRequest, type index$v_SubmitFeedbackResponse as SubmitFeedbackResponse };
2131
2433
  }
2132
2434
 
2133
2435
  /**
@@ -2154,11 +2456,11 @@ declare class ServiceUnavailableError extends LangfuseAPIError {
2154
2456
  constructor(rawResponse?: RawResponse);
2155
2457
  }
2156
2458
 
2157
- type index$s_HealthResponse = HealthResponse;
2158
- type index$s_ServiceUnavailableError = ServiceUnavailableError;
2159
- declare const index$s_ServiceUnavailableError: typeof ServiceUnavailableError;
2160
- declare namespace index$s {
2161
- export { type index$s_HealthResponse as HealthResponse, index$s_ServiceUnavailableError as ServiceUnavailableError };
2459
+ type index$u_HealthResponse = HealthResponse;
2460
+ type index$u_ServiceUnavailableError = ServiceUnavailableError;
2461
+ declare const index$u_ServiceUnavailableError: typeof ServiceUnavailableError;
2462
+ declare namespace index$u {
2463
+ export { type index$u_HealthResponse as HealthResponse, index$u_ServiceUnavailableError as ServiceUnavailableError };
2162
2464
  }
2163
2465
 
2164
2466
  /**
@@ -2713,46 +3015,47 @@ interface IngestionRequest {
2713
3015
  metadata?: unknown;
2714
3016
  }
2715
3017
 
2716
- type index$r_BaseEvent = BaseEvent;
2717
- type index$r_CreateEventBody = CreateEventBody;
2718
- type index$r_CreateEventEvent = CreateEventEvent;
2719
- type index$r_CreateGenerationBody = CreateGenerationBody;
2720
- type index$r_CreateGenerationEvent = CreateGenerationEvent;
2721
- type index$r_CreateObservationEvent = CreateObservationEvent;
2722
- type index$r_CreateSpanBody = CreateSpanBody;
2723
- type index$r_CreateSpanEvent = CreateSpanEvent;
2724
- type index$r_IngestionError = IngestionError;
2725
- declare const index$r_IngestionEvent: typeof IngestionEvent;
2726
- type index$r_IngestionRequest = IngestionRequest;
2727
- type index$r_IngestionResponse = IngestionResponse;
2728
- type index$r_IngestionSuccess = IngestionSuccess;
2729
- type index$r_IngestionUsage = IngestionUsage;
2730
- type index$r_ObservationBody = ObservationBody;
2731
- declare const index$r_ObservationType: typeof ObservationType;
2732
- type index$r_OpenAiCompletionUsageSchema = OpenAiCompletionUsageSchema;
2733
- type index$r_OpenAiResponseUsageSchema = OpenAiResponseUsageSchema;
2734
- type index$r_OpenAiUsage = OpenAiUsage;
2735
- type index$r_OptionalObservationBody = OptionalObservationBody;
2736
- type index$r_ScoreBody = ScoreBody;
2737
- type index$r_ScoreEvent = ScoreEvent;
2738
- type index$r_SdkLogBody = SdkLogBody;
2739
- type index$r_SdkLogEvent = SdkLogEvent;
2740
- type index$r_TraceBody = TraceBody;
2741
- type index$r_TraceEvent = TraceEvent;
2742
- type index$r_UpdateEventBody = UpdateEventBody;
2743
- type index$r_UpdateGenerationBody = UpdateGenerationBody;
2744
- type index$r_UpdateGenerationEvent = UpdateGenerationEvent;
2745
- type index$r_UpdateObservationEvent = UpdateObservationEvent;
2746
- type index$r_UpdateSpanBody = UpdateSpanBody;
2747
- type index$r_UpdateSpanEvent = UpdateSpanEvent;
2748
- type index$r_UsageDetails = UsageDetails;
2749
- declare namespace index$r {
2750
- export { type index$r_BaseEvent as BaseEvent, type index$r_CreateEventBody as CreateEventBody, type index$r_CreateEventEvent as CreateEventEvent, type index$r_CreateGenerationBody as CreateGenerationBody, type index$r_CreateGenerationEvent as CreateGenerationEvent, type index$r_CreateObservationEvent as CreateObservationEvent, type index$r_CreateSpanBody as CreateSpanBody, type index$r_CreateSpanEvent as CreateSpanEvent, type index$r_IngestionError as IngestionError, index$r_IngestionEvent as IngestionEvent, type index$r_IngestionRequest as IngestionRequest, type index$r_IngestionResponse as IngestionResponse, type index$r_IngestionSuccess as IngestionSuccess, type index$r_IngestionUsage as IngestionUsage, type index$r_ObservationBody as ObservationBody, index$r_ObservationType as ObservationType, type index$r_OpenAiCompletionUsageSchema as OpenAiCompletionUsageSchema, type index$r_OpenAiResponseUsageSchema as OpenAiResponseUsageSchema, type index$r_OpenAiUsage as OpenAiUsage, type index$r_OptionalObservationBody as OptionalObservationBody, type index$r_ScoreBody as ScoreBody, type index$r_ScoreEvent as ScoreEvent, type index$r_SdkLogBody as SdkLogBody, type index$r_SdkLogEvent as SdkLogEvent, type index$r_TraceBody as TraceBody, type index$r_TraceEvent as TraceEvent, type index$r_UpdateEventBody as UpdateEventBody, type index$r_UpdateGenerationBody as UpdateGenerationBody, type index$r_UpdateGenerationEvent as UpdateGenerationEvent, type index$r_UpdateObservationEvent as UpdateObservationEvent, type index$r_UpdateSpanBody as UpdateSpanBody, type index$r_UpdateSpanEvent as UpdateSpanEvent, type index$r_UsageDetails as UsageDetails };
3018
+ type index$t_BaseEvent = BaseEvent;
3019
+ type index$t_CreateEventBody = CreateEventBody;
3020
+ type index$t_CreateEventEvent = CreateEventEvent;
3021
+ type index$t_CreateGenerationBody = CreateGenerationBody;
3022
+ type index$t_CreateGenerationEvent = CreateGenerationEvent;
3023
+ type index$t_CreateObservationEvent = CreateObservationEvent;
3024
+ type index$t_CreateSpanBody = CreateSpanBody;
3025
+ type index$t_CreateSpanEvent = CreateSpanEvent;
3026
+ type index$t_IngestionError = IngestionError;
3027
+ declare const index$t_IngestionEvent: typeof IngestionEvent;
3028
+ type index$t_IngestionRequest = IngestionRequest;
3029
+ type index$t_IngestionResponse = IngestionResponse;
3030
+ type index$t_IngestionSuccess = IngestionSuccess;
3031
+ type index$t_IngestionUsage = IngestionUsage;
3032
+ type index$t_ObservationBody = ObservationBody;
3033
+ declare const index$t_ObservationType: typeof ObservationType;
3034
+ type index$t_OpenAiCompletionUsageSchema = OpenAiCompletionUsageSchema;
3035
+ type index$t_OpenAiResponseUsageSchema = OpenAiResponseUsageSchema;
3036
+ type index$t_OpenAiUsage = OpenAiUsage;
3037
+ type index$t_OptionalObservationBody = OptionalObservationBody;
3038
+ type index$t_ScoreBody = ScoreBody;
3039
+ type index$t_ScoreEvent = ScoreEvent;
3040
+ type index$t_SdkLogBody = SdkLogBody;
3041
+ type index$t_SdkLogEvent = SdkLogEvent;
3042
+ type index$t_TraceBody = TraceBody;
3043
+ type index$t_TraceEvent = TraceEvent;
3044
+ type index$t_UpdateEventBody = UpdateEventBody;
3045
+ type index$t_UpdateGenerationBody = UpdateGenerationBody;
3046
+ type index$t_UpdateGenerationEvent = UpdateGenerationEvent;
3047
+ type index$t_UpdateObservationEvent = UpdateObservationEvent;
3048
+ type index$t_UpdateSpanBody = UpdateSpanBody;
3049
+ type index$t_UpdateSpanEvent = UpdateSpanEvent;
3050
+ type index$t_UsageDetails = UsageDetails;
3051
+ declare namespace index$t {
3052
+ export { type index$t_BaseEvent as BaseEvent, type index$t_CreateEventBody as CreateEventBody, type index$t_CreateEventEvent as CreateEventEvent, type index$t_CreateGenerationBody as CreateGenerationBody, type index$t_CreateGenerationEvent as CreateGenerationEvent, type index$t_CreateObservationEvent as CreateObservationEvent, type index$t_CreateSpanBody as CreateSpanBody, type index$t_CreateSpanEvent as CreateSpanEvent, type index$t_IngestionError as IngestionError, index$t_IngestionEvent as IngestionEvent, type index$t_IngestionRequest as IngestionRequest, type index$t_IngestionResponse as IngestionResponse, type index$t_IngestionSuccess as IngestionSuccess, type index$t_IngestionUsage as IngestionUsage, type index$t_ObservationBody as ObservationBody, index$t_ObservationType as ObservationType, type index$t_OpenAiCompletionUsageSchema as OpenAiCompletionUsageSchema, type index$t_OpenAiResponseUsageSchema as OpenAiResponseUsageSchema, type index$t_OpenAiUsage as OpenAiUsage, type index$t_OptionalObservationBody as OptionalObservationBody, type index$t_ScoreBody as ScoreBody, type index$t_ScoreEvent as ScoreEvent, type index$t_SdkLogBody as SdkLogBody, type index$t_SdkLogEvent as SdkLogEvent, type index$t_TraceBody as TraceBody, type index$t_TraceEvent as TraceEvent, type index$t_UpdateEventBody as UpdateEventBody, type index$t_UpdateGenerationBody as UpdateGenerationBody, type index$t_UpdateGenerationEvent as UpdateGenerationEvent, type index$t_UpdateObservationEvent as UpdateObservationEvent, type index$t_UpdateSpanBody as UpdateSpanBody, type index$t_UpdateSpanEvent as UpdateSpanEvent, type index$t_UsageDetails as UsageDetails };
2751
3053
  }
2752
3054
 
2753
3055
  /**
2754
3056
  * This file was auto-generated by Fern from our API Definition.
2755
3057
  */
3058
+
2756
3059
  interface MetricsResponse {
2757
3060
  /**
2758
3061
  * The metrics data. Each item in the list contains the metric values and dimensions requested in the query.
@@ -2760,6 +3063,7 @@ interface MetricsResponse {
2760
3063
  * Histograms will return an array with [lower, upper, height] tuples.
2761
3064
  */
2762
3065
  data: Record<string, unknown>[];
3066
+ _deprecation?: Deprecation;
2763
3067
  }
2764
3068
 
2765
3069
  /**
@@ -2776,7 +3080,7 @@ interface GetMetricsRequest {
2776
3080
  * JSON string containing the query parameters with the following structure:
2777
3081
  * ```json
2778
3082
  * {
2779
- * "view": string, // Required. One of "traces", "observations", "scores-numeric", "scores-categorical"
3083
+ * "view": string, // Required. One of "traces", "observations", "scores-numeric", "scores-boolean", "scores-categorical"
2780
3084
  * "dimensions": [ // Optional. Default: []
2781
3085
  * {
2782
3086
  * "field": string // Field to group by, e.g. "name", "userId", "sessionId"
@@ -2818,10 +3122,10 @@ interface GetMetricsRequest {
2818
3122
  query: string;
2819
3123
  }
2820
3124
 
2821
- type index$q_GetMetricsRequest = GetMetricsRequest;
2822
- type index$q_MetricsResponse = MetricsResponse;
2823
- declare namespace index$q {
2824
- export type { index$q_GetMetricsRequest as GetMetricsRequest, index$q_MetricsResponse as MetricsResponse };
3125
+ type index$s_GetMetricsRequest = GetMetricsRequest;
3126
+ type index$s_MetricsResponse = MetricsResponse;
3127
+ declare namespace index$s {
3128
+ export type { index$s_GetMetricsRequest as GetMetricsRequest, index$s_MetricsResponse as MetricsResponse };
2825
3129
  }
2826
3130
 
2827
3131
  /**
@@ -2840,6 +3144,7 @@ interface Observations$1 {
2840
3144
  interface ObservationsViews {
2841
3145
  data: ObservationsView[];
2842
3146
  meta: MetaResponse;
3147
+ _deprecation?: Deprecation;
2843
3148
  }
2844
3149
 
2845
3150
  /**
@@ -2968,10 +3273,10 @@ interface GetObservationsRequest {
2968
3273
  filter?: string;
2969
3274
  }
2970
3275
 
2971
- type index$p_GetObservationsRequest = GetObservationsRequest;
2972
- type index$p_ObservationsViews = ObservationsViews;
2973
- declare namespace index$p {
2974
- export type { index$p_GetObservationsRequest as GetObservationsRequest, Observations$1 as Observations, index$p_ObservationsViews as ObservationsViews };
3276
+ type index$r_GetObservationsRequest = GetObservationsRequest;
3277
+ type index$r_ObservationsViews = ObservationsViews;
3278
+ declare namespace index$r {
3279
+ export type { index$r_GetObservationsRequest as GetObservationsRequest, Observations$1 as Observations, index$r_ObservationsViews as ObservationsViews };
2975
3280
  }
2976
3281
 
2977
3282
  /**
@@ -3053,7 +3358,7 @@ declare namespace index$p {
3053
3358
  * dataType: LangfuseAPI.ScoreDataType.Numeric,
3054
3359
  * configId: "9203-4567-89ab-cdef",
3055
3360
  * traceId: "cdef-1234-5678-90ab",
3056
- * source: LangfuseAPI.legacy.CreateScoreSource.Annotation,
3361
+ * source: LangfuseAPI.CreateScoreSource.Annotation,
3057
3362
  * queueId: "aq-1234-5678-90ab-cdef"
3058
3363
  * }
3059
3364
  */
@@ -3080,6 +3385,14 @@ interface CreateScoreRequest {
3080
3385
  source?: CreateScoreSource;
3081
3386
  }
3082
3387
 
3388
+ /**
3389
+ * This file was auto-generated by Fern from our API Definition.
3390
+ */
3391
+ interface CreateScoreResponse {
3392
+ /** The id of the created object in Langfuse */
3393
+ id: string;
3394
+ }
3395
+
3083
3396
  /**
3084
3397
  * This file was auto-generated by Fern from our API Definition.
3085
3398
  */
@@ -3094,30 +3407,22 @@ declare const CreateScoreSource: {
3094
3407
  readonly Annotation: "ANNOTATION";
3095
3408
  };
3096
3409
 
3097
- /**
3098
- * This file was auto-generated by Fern from our API Definition.
3099
- */
3100
- interface CreateScoreResponse {
3101
- /** The id of the created object in Langfuse */
3102
- id: string;
3103
- }
3104
-
3105
- type index$o_CreateScoreRequest = CreateScoreRequest;
3106
- type index$o_CreateScoreResponse = CreateScoreResponse;
3107
- declare const index$o_CreateScoreSource: typeof CreateScoreSource;
3108
- declare namespace index$o {
3109
- export { type index$o_CreateScoreRequest as CreateScoreRequest, type index$o_CreateScoreResponse as CreateScoreResponse, index$o_CreateScoreSource as CreateScoreSource };
3410
+ type index$q_CreateScoreRequest = CreateScoreRequest;
3411
+ type index$q_CreateScoreResponse = CreateScoreResponse;
3412
+ declare const index$q_CreateScoreSource: typeof CreateScoreSource;
3413
+ declare namespace index$q {
3414
+ export { type index$q_CreateScoreRequest as CreateScoreRequest, type index$q_CreateScoreResponse as CreateScoreResponse, index$q_CreateScoreSource as CreateScoreSource };
3110
3415
  }
3111
3416
 
3112
- type index$n_CreateScoreRequest = CreateScoreRequest;
3113
- type index$n_CreateScoreResponse = CreateScoreResponse;
3114
- declare const index$n_CreateScoreSource: typeof CreateScoreSource;
3115
- type index$n_GetMetricsRequest = GetMetricsRequest;
3116
- type index$n_GetObservationsRequest = GetObservationsRequest;
3117
- type index$n_MetricsResponse = MetricsResponse;
3118
- type index$n_ObservationsViews = ObservationsViews;
3119
- declare namespace index$n {
3120
- export { type index$n_CreateScoreRequest as CreateScoreRequest, type index$n_CreateScoreResponse as CreateScoreResponse, index$n_CreateScoreSource as CreateScoreSource, type index$n_GetMetricsRequest as GetMetricsRequest, type index$n_GetObservationsRequest as GetObservationsRequest, type index$n_MetricsResponse as MetricsResponse, type Observations$1 as Observations, type index$n_ObservationsViews as ObservationsViews, index$q as metricsV1, index$p as observationsV1, index$o as scoreV1 };
3417
+ type index$p_CreateScoreRequest = CreateScoreRequest;
3418
+ type index$p_CreateScoreResponse = CreateScoreResponse;
3419
+ declare const index$p_CreateScoreSource: typeof CreateScoreSource;
3420
+ type index$p_GetMetricsRequest = GetMetricsRequest;
3421
+ type index$p_GetObservationsRequest = GetObservationsRequest;
3422
+ type index$p_MetricsResponse = MetricsResponse;
3423
+ type index$p_ObservationsViews = ObservationsViews;
3424
+ declare namespace index$p {
3425
+ export { type index$p_CreateScoreRequest as CreateScoreRequest, type index$p_CreateScoreResponse as CreateScoreResponse, index$p_CreateScoreSource as CreateScoreSource, type index$p_GetMetricsRequest as GetMetricsRequest, type index$p_GetObservationsRequest as GetObservationsRequest, type index$p_MetricsResponse as MetricsResponse, type Observations$1 as Observations, type index$p_ObservationsViews as ObservationsViews, index$s as metricsV1, index$r as observationsV1, index$q as scoreV1 };
3121
3426
  }
3122
3427
 
3123
3428
  /**
@@ -3217,14 +3522,14 @@ interface GetLlmConnectionsRequest {
3217
3522
  limit?: number;
3218
3523
  }
3219
3524
 
3220
- type index$m_DeleteLlmConnectionResponse = DeleteLlmConnectionResponse;
3221
- type index$m_GetLlmConnectionsRequest = GetLlmConnectionsRequest;
3222
- declare const index$m_LlmAdapter: typeof LlmAdapter;
3223
- type index$m_LlmConnection = LlmConnection;
3224
- type index$m_PaginatedLlmConnections = PaginatedLlmConnections;
3225
- type index$m_UpsertLlmConnectionRequest = UpsertLlmConnectionRequest;
3226
- declare namespace index$m {
3227
- export { type index$m_DeleteLlmConnectionResponse as DeleteLlmConnectionResponse, type index$m_GetLlmConnectionsRequest as GetLlmConnectionsRequest, index$m_LlmAdapter as LlmAdapter, type index$m_LlmConnection as LlmConnection, type index$m_PaginatedLlmConnections as PaginatedLlmConnections, type index$m_UpsertLlmConnectionRequest as UpsertLlmConnectionRequest };
3525
+ type index$o_DeleteLlmConnectionResponse = DeleteLlmConnectionResponse;
3526
+ type index$o_GetLlmConnectionsRequest = GetLlmConnectionsRequest;
3527
+ declare const index$o_LlmAdapter: typeof LlmAdapter;
3528
+ type index$o_LlmConnection = LlmConnection;
3529
+ type index$o_PaginatedLlmConnections = PaginatedLlmConnections;
3530
+ type index$o_UpsertLlmConnectionRequest = UpsertLlmConnectionRequest;
3531
+ declare namespace index$o {
3532
+ export { type index$o_DeleteLlmConnectionResponse as DeleteLlmConnectionResponse, type index$o_GetLlmConnectionsRequest as GetLlmConnectionsRequest, index$o_LlmAdapter as LlmAdapter, type index$o_LlmConnection as LlmConnection, type index$o_PaginatedLlmConnections as PaginatedLlmConnections, type index$o_UpsertLlmConnectionRequest as UpsertLlmConnectionRequest };
3228
3533
  }
3229
3534
 
3230
3535
  /**
@@ -3356,13 +3661,13 @@ declare const MediaContentType: {
3356
3661
  readonly ApplicationX7ZCompressed: "application/x-7z-compressed";
3357
3662
  };
3358
3663
 
3359
- type index$l_GetMediaResponse = GetMediaResponse;
3360
- type index$l_GetMediaUploadUrlRequest = GetMediaUploadUrlRequest;
3361
- type index$l_GetMediaUploadUrlResponse = GetMediaUploadUrlResponse;
3362
- declare const index$l_MediaContentType: typeof MediaContentType;
3363
- type index$l_PatchMediaBody = PatchMediaBody;
3364
- declare namespace index$l {
3365
- export { type index$l_GetMediaResponse as GetMediaResponse, type index$l_GetMediaUploadUrlRequest as GetMediaUploadUrlRequest, type index$l_GetMediaUploadUrlResponse as GetMediaUploadUrlResponse, index$l_MediaContentType as MediaContentType, type index$l_PatchMediaBody as PatchMediaBody };
3664
+ type index$n_GetMediaResponse = GetMediaResponse;
3665
+ type index$n_GetMediaUploadUrlRequest = GetMediaUploadUrlRequest;
3666
+ type index$n_GetMediaUploadUrlResponse = GetMediaUploadUrlResponse;
3667
+ declare const index$n_MediaContentType: typeof MediaContentType;
3668
+ type index$n_PatchMediaBody = PatchMediaBody;
3669
+ declare namespace index$n {
3670
+ export { type index$n_GetMediaResponse as GetMediaResponse, type index$n_GetMediaUploadUrlRequest as GetMediaUploadUrlRequest, type index$n_GetMediaUploadUrlResponse as GetMediaUploadUrlResponse, index$n_MediaContentType as MediaContentType, type index$n_PatchMediaBody as PatchMediaBody };
3366
3671
  }
3367
3672
 
3368
3673
  /**
@@ -3391,7 +3696,7 @@ interface GetMetricsV2Request {
3391
3696
  * JSON string containing the query parameters with the following structure:
3392
3697
  * ```json
3393
3698
  * {
3394
- * "view": string, // Required. One of "observations", "scores-numeric", "scores-categorical"
3699
+ * "view": string, // Required. One of "observations", "scores-numeric", "scores-boolean", "scores-categorical"
3395
3700
  * "dimensions": [ // Optional. Default: []
3396
3701
  * {
3397
3702
  * "field": string // Field to group by (see available dimensions above)
@@ -3437,14 +3742,25 @@ interface GetMetricsV2Request {
3437
3742
  * }
3438
3743
  * }
3439
3744
  * ```
3745
+ *
3746
+ * For example, to count semantic roots (including app roots with a non-null external parent), use a boolean filter:
3747
+ * ```json
3748
+ * {
3749
+ * "view": "observations",
3750
+ * "metrics": [{"measure": "count", "aggregation": "count"}],
3751
+ * "filters": [{"column": "isRootObservation", "operator": "=", "value": true, "type": "boolean"}],
3752
+ * "fromTimestamp": "2025-01-01T00:00:00.000Z",
3753
+ * "toTimestamp": "2025-02-01T00:00:00.000Z"
3754
+ * }
3755
+ * ```
3440
3756
  */
3441
3757
  query: string;
3442
3758
  }
3443
3759
 
3444
- type index$k_GetMetricsV2Request = GetMetricsV2Request;
3445
- type index$k_MetricsV2Response = MetricsV2Response;
3446
- declare namespace index$k {
3447
- export type { index$k_GetMetricsV2Request as GetMetricsV2Request, index$k_MetricsV2Response as MetricsV2Response };
3760
+ type index$m_GetMetricsV2Request = GetMetricsV2Request;
3761
+ type index$m_MetricsV2Response = MetricsV2Response;
3762
+ declare namespace index$m {
3763
+ export type { index$m_GetMetricsV2Request as GetMetricsV2Request, index$m_MetricsV2Response as MetricsV2Response };
3448
3764
  }
3449
3765
 
3450
3766
  /**
@@ -3516,11 +3832,11 @@ interface GetModelsRequest {
3516
3832
  limit?: number;
3517
3833
  }
3518
3834
 
3519
- type index$j_CreateModelRequest = CreateModelRequest;
3520
- type index$j_GetModelsRequest = GetModelsRequest;
3521
- type index$j_PaginatedModels = PaginatedModels;
3522
- declare namespace index$j {
3523
- export type { index$j_CreateModelRequest as CreateModelRequest, index$j_GetModelsRequest as GetModelsRequest, index$j_PaginatedModels as PaginatedModels };
3835
+ type index$l_CreateModelRequest = CreateModelRequest;
3836
+ type index$l_GetModelsRequest = GetModelsRequest;
3837
+ type index$l_PaginatedModels = PaginatedModels;
3838
+ declare namespace index$l {
3839
+ export type { index$l_CreateModelRequest as CreateModelRequest, index$l_GetModelsRequest as GetModelsRequest, index$l_PaginatedModels as PaginatedModels };
3524
3840
  }
3525
3841
 
3526
3842
  /**
@@ -3585,12 +3901,24 @@ interface GetObservationsV2Request {
3585
3901
  parseIoAsJson?: boolean;
3586
3902
  name?: string;
3587
3903
  userId?: string;
3904
+ /** Filter by session ID. */
3905
+ sessionId?: string;
3588
3906
  /** Filter by observation type (e.g., "GENERATION", "SPAN", "EVENT", "AGENT", "TOOL", "CHAIN", "RETRIEVER", "EVALUATOR", "EMBEDDING", "GUARDRAIL") */
3589
3907
  type?: string;
3590
3908
  traceId?: string;
3591
3909
  /** Optional filter for observations with a specific level (e.g. "DEBUG", "DEFAULT", "WARNING", "ERROR"). */
3592
3910
  level?: ObservationLevel;
3911
+ /**
3912
+ * Filter by the physical parent observation ID.
3913
+ * An empty value matches only observations without a physical parent. Use `isRootObservation` to include observations marked as app roots by the SDK, which may retain a non-null `parentObservationId`.
3914
+ */
3593
3915
  parentObservationId?: string;
3916
+ /**
3917
+ * Filter by whether an observation is a logical root.
3918
+ * Root observations include observations without a physical parent and observations marked as app roots by the SDK.
3919
+ * An app-root observation may have `isRootObservation=true` and a non-null `parentObservationId`.
3920
+ */
3921
+ isRootObservation?: boolean;
3594
3922
  /** Optional filter for observations where the environment is one of the provided values. */
3595
3923
  environment?: string | string[];
3596
3924
  /** Retrieve only observations with a start_time on or after this datetime (ISO 8601). */
@@ -3641,6 +3969,7 @@ interface GetObservationsV2Request {
3641
3969
  * - `version` (string) - Version tag
3642
3970
  * - `userId` (string) - User ID
3643
3971
  * - `sessionId` (string) - Session ID
3972
+ * - `isRootObservation` (boolean) - Whether the observation is a logical root. Observations marked as app roots by the SDK may retain a non-null parentObservationId.
3644
3973
  *
3645
3974
  * ### Trace-Related Fields
3646
3975
  * - `traceName` (string) - Name of the parent trace
@@ -3701,6 +4030,12 @@ interface GetObservationsV2Request {
3701
4030
  * "column": "output",
3702
4031
  * "operator": "matches",
3703
4032
  * "value": "needle"
4033
+ * },
4034
+ * {
4035
+ * "type": "boolean",
4036
+ * "column": "isRootObservation",
4037
+ * "operator": "=",
4038
+ * "value": true
3704
4039
  * }
3705
4040
  * ]
3706
4041
  * ```
@@ -3708,11 +4043,11 @@ interface GetObservationsV2Request {
3708
4043
  filter?: string;
3709
4044
  }
3710
4045
 
3711
- type index$i_GetObservationsV2Request = GetObservationsV2Request;
3712
- type index$i_ObservationsV2Meta = ObservationsV2Meta;
3713
- type index$i_ObservationsV2Response = ObservationsV2Response;
3714
- declare namespace index$i {
3715
- export type { index$i_GetObservationsV2Request as GetObservationsV2Request, index$i_ObservationsV2Meta as ObservationsV2Meta, index$i_ObservationsV2Response as ObservationsV2Response };
4046
+ type index$k_GetObservationsV2Request = GetObservationsV2Request;
4047
+ type index$k_ObservationsV2Meta = ObservationsV2Meta;
4048
+ type index$k_ObservationsV2Response = ObservationsV2Response;
4049
+ declare namespace index$k {
4050
+ export type { index$k_GetObservationsV2Request as GetObservationsV2Request, index$k_ObservationsV2Meta as ObservationsV2Meta, index$k_ObservationsV2Response as ObservationsV2Response };
3716
4051
  }
3717
4052
 
3718
4053
  /**
@@ -3889,17 +4224,17 @@ interface OtelTraceRequest {
3889
4224
  resourceSpans: OtelResourceSpan[];
3890
4225
  }
3891
4226
 
3892
- type index$h_OtelAttribute = OtelAttribute;
3893
- type index$h_OtelAttributeValue = OtelAttributeValue;
3894
- type index$h_OtelResource = OtelResource;
3895
- type index$h_OtelResourceSpan = OtelResourceSpan;
3896
- type index$h_OtelScope = OtelScope;
3897
- type index$h_OtelScopeSpan = OtelScopeSpan;
3898
- type index$h_OtelSpan = OtelSpan;
3899
- type index$h_OtelTraceRequest = OtelTraceRequest;
3900
- type index$h_OtelTraceResponse = OtelTraceResponse;
3901
- declare namespace index$h {
3902
- export type { index$h_OtelAttribute as OtelAttribute, index$h_OtelAttributeValue as OtelAttributeValue, index$h_OtelResource as OtelResource, index$h_OtelResourceSpan as OtelResourceSpan, index$h_OtelScope as OtelScope, index$h_OtelScopeSpan as OtelScopeSpan, index$h_OtelSpan as OtelSpan, index$h_OtelTraceRequest as OtelTraceRequest, index$h_OtelTraceResponse as OtelTraceResponse };
4227
+ type index$j_OtelAttribute = OtelAttribute;
4228
+ type index$j_OtelAttributeValue = OtelAttributeValue;
4229
+ type index$j_OtelResource = OtelResource;
4230
+ type index$j_OtelResourceSpan = OtelResourceSpan;
4231
+ type index$j_OtelScope = OtelScope;
4232
+ type index$j_OtelScopeSpan = OtelScopeSpan;
4233
+ type index$j_OtelSpan = OtelSpan;
4234
+ type index$j_OtelTraceRequest = OtelTraceRequest;
4235
+ type index$j_OtelTraceResponse = OtelTraceResponse;
4236
+ declare namespace index$j {
4237
+ export type { index$j_OtelAttribute as OtelAttribute, index$j_OtelAttributeValue as OtelAttributeValue, index$j_OtelResource as OtelResource, index$j_OtelResourceSpan as OtelResourceSpan, index$j_OtelScope as OtelScope, index$j_OtelScopeSpan as OtelScopeSpan, index$j_OtelSpan as OtelSpan, index$j_OtelTraceRequest as OtelTraceRequest, index$j_OtelTraceResponse as OtelTraceResponse };
3903
4238
  }
3904
4239
 
3905
4240
  /**
@@ -3996,18 +4331,18 @@ interface OrganizationApiKeysResponse {
3996
4331
  apiKeys: OrganizationApiKey[];
3997
4332
  }
3998
4333
 
3999
- type index$g_DeleteMembershipRequest = DeleteMembershipRequest;
4000
- type index$g_MembershipDeletionResponse = MembershipDeletionResponse;
4001
- type index$g_MembershipRequest = MembershipRequest;
4002
- type index$g_MembershipResponse = MembershipResponse;
4003
- declare const index$g_MembershipRole: typeof MembershipRole;
4004
- type index$g_MembershipsResponse = MembershipsResponse;
4005
- type index$g_OrganizationApiKey = OrganizationApiKey;
4006
- type index$g_OrganizationApiKeysResponse = OrganizationApiKeysResponse;
4007
- type index$g_OrganizationProject = OrganizationProject;
4008
- type index$g_OrganizationProjectsResponse = OrganizationProjectsResponse;
4009
- declare namespace index$g {
4010
- export { type index$g_DeleteMembershipRequest as DeleteMembershipRequest, type index$g_MembershipDeletionResponse as MembershipDeletionResponse, type index$g_MembershipRequest as MembershipRequest, type index$g_MembershipResponse as MembershipResponse, index$g_MembershipRole as MembershipRole, type index$g_MembershipsResponse as MembershipsResponse, type index$g_OrganizationApiKey as OrganizationApiKey, type index$g_OrganizationApiKeysResponse as OrganizationApiKeysResponse, type index$g_OrganizationProject as OrganizationProject, type index$g_OrganizationProjectsResponse as OrganizationProjectsResponse };
4334
+ type index$i_DeleteMembershipRequest = DeleteMembershipRequest;
4335
+ type index$i_MembershipDeletionResponse = MembershipDeletionResponse;
4336
+ type index$i_MembershipRequest = MembershipRequest;
4337
+ type index$i_MembershipResponse = MembershipResponse;
4338
+ declare const index$i_MembershipRole: typeof MembershipRole;
4339
+ type index$i_MembershipsResponse = MembershipsResponse;
4340
+ type index$i_OrganizationApiKey = OrganizationApiKey;
4341
+ type index$i_OrganizationApiKeysResponse = OrganizationApiKeysResponse;
4342
+ type index$i_OrganizationProject = OrganizationProject;
4343
+ type index$i_OrganizationProjectsResponse = OrganizationProjectsResponse;
4344
+ declare namespace index$i {
4345
+ export { type index$i_DeleteMembershipRequest as DeleteMembershipRequest, type index$i_MembershipDeletionResponse as MembershipDeletionResponse, type index$i_MembershipRequest as MembershipRequest, type index$i_MembershipResponse as MembershipResponse, index$i_MembershipRole as MembershipRole, type index$i_MembershipsResponse as MembershipsResponse, type index$i_OrganizationApiKey as OrganizationApiKey, type index$i_OrganizationApiKeysResponse as OrganizationApiKeysResponse, type index$i_OrganizationProject as OrganizationProject, type index$i_OrganizationProjectsResponse as OrganizationProjectsResponse };
4011
4346
  }
4012
4347
 
4013
4348
  /**
@@ -4166,18 +4501,18 @@ interface CreateApiKeyRequest {
4166
4501
  secretKey?: string;
4167
4502
  }
4168
4503
 
4169
- type index$f_ApiKeyDeletionResponse = ApiKeyDeletionResponse;
4170
- type index$f_ApiKeyList = ApiKeyList;
4171
- type index$f_ApiKeyResponse = ApiKeyResponse;
4172
- type index$f_ApiKeySummary = ApiKeySummary;
4173
- type index$f_CreateApiKeyRequest = CreateApiKeyRequest;
4174
- type index$f_CreateProjectRequest = CreateProjectRequest;
4175
- type index$f_Organization = Organization;
4176
- type index$f_Project = Project;
4177
- type index$f_ProjectDeletionResponse = ProjectDeletionResponse;
4178
- type index$f_UpdateProjectRequest = UpdateProjectRequest;
4179
- declare namespace index$f {
4180
- export type { index$f_ApiKeyDeletionResponse as ApiKeyDeletionResponse, index$f_ApiKeyList as ApiKeyList, index$f_ApiKeyResponse as ApiKeyResponse, index$f_ApiKeySummary as ApiKeySummary, index$f_CreateApiKeyRequest as CreateApiKeyRequest, index$f_CreateProjectRequest as CreateProjectRequest, index$f_Organization as Organization, index$f_Project as Project, index$f_ProjectDeletionResponse as ProjectDeletionResponse, Projects$1 as Projects, index$f_UpdateProjectRequest as UpdateProjectRequest };
4504
+ type index$h_ApiKeyDeletionResponse = ApiKeyDeletionResponse;
4505
+ type index$h_ApiKeyList = ApiKeyList;
4506
+ type index$h_ApiKeyResponse = ApiKeyResponse;
4507
+ type index$h_ApiKeySummary = ApiKeySummary;
4508
+ type index$h_CreateApiKeyRequest = CreateApiKeyRequest;
4509
+ type index$h_CreateProjectRequest = CreateProjectRequest;
4510
+ type index$h_Organization = Organization;
4511
+ type index$h_Project = Project;
4512
+ type index$h_ProjectDeletionResponse = ProjectDeletionResponse;
4513
+ type index$h_UpdateProjectRequest = UpdateProjectRequest;
4514
+ declare namespace index$h {
4515
+ export type { index$h_ApiKeyDeletionResponse as ApiKeyDeletionResponse, index$h_ApiKeyList as ApiKeyList, index$h_ApiKeyResponse as ApiKeyResponse, index$h_ApiKeySummary as ApiKeySummary, index$h_CreateApiKeyRequest as CreateApiKeyRequest, index$h_CreateProjectRequest as CreateProjectRequest, index$h_Organization as Organization, index$h_Project as Project, index$h_ProjectDeletionResponse as ProjectDeletionResponse, Projects$1 as Projects, index$h_UpdateProjectRequest as UpdateProjectRequest };
4181
4516
  }
4182
4517
 
4183
4518
  /**
@@ -4409,28 +4744,28 @@ interface DeletePromptRequest {
4409
4744
  version?: number;
4410
4745
  }
4411
4746
 
4412
- type index$e_BasePrompt = BasePrompt;
4413
- type index$e_ChatMessage = ChatMessage;
4414
- declare const index$e_ChatMessageType: typeof ChatMessageType;
4415
- type index$e_ChatMessageWithPlaceholders = ChatMessageWithPlaceholders;
4416
- type index$e_ChatPrompt = ChatPrompt;
4417
- type index$e_CreateChatPromptRequest = CreateChatPromptRequest;
4418
- declare const index$e_CreateChatPromptType: typeof CreateChatPromptType;
4419
- type index$e_CreatePromptRequest = CreatePromptRequest;
4420
- type index$e_CreateTextPromptRequest = CreateTextPromptRequest;
4421
- declare const index$e_CreateTextPromptType: typeof CreateTextPromptType;
4422
- type index$e_DeletePromptRequest = DeletePromptRequest;
4423
- type index$e_GetPromptRequest = GetPromptRequest;
4424
- type index$e_ListPromptsMetaRequest = ListPromptsMetaRequest;
4425
- type index$e_PlaceholderMessage = PlaceholderMessage;
4426
- declare const index$e_PlaceholderMessageType: typeof PlaceholderMessageType;
4427
- declare const index$e_Prompt: typeof Prompt;
4428
- type index$e_PromptMeta = PromptMeta;
4429
- type index$e_PromptMetaListResponse = PromptMetaListResponse;
4430
- declare const index$e_PromptType: typeof PromptType;
4431
- type index$e_TextPrompt = TextPrompt;
4432
- declare namespace index$e {
4433
- export { type index$e_BasePrompt as BasePrompt, type index$e_ChatMessage as ChatMessage, index$e_ChatMessageType as ChatMessageType, type index$e_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$e_ChatPrompt as ChatPrompt, type index$e_CreateChatPromptRequest as CreateChatPromptRequest, index$e_CreateChatPromptType as CreateChatPromptType, type index$e_CreatePromptRequest as CreatePromptRequest, type index$e_CreateTextPromptRequest as CreateTextPromptRequest, index$e_CreateTextPromptType as CreateTextPromptType, type index$e_DeletePromptRequest as DeletePromptRequest, type index$e_GetPromptRequest as GetPromptRequest, type index$e_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$e_PlaceholderMessage as PlaceholderMessage, index$e_PlaceholderMessageType as PlaceholderMessageType, index$e_Prompt as Prompt, type index$e_PromptMeta as PromptMeta, type index$e_PromptMetaListResponse as PromptMetaListResponse, index$e_PromptType as PromptType, type index$e_TextPrompt as TextPrompt };
4747
+ type index$g_BasePrompt = BasePrompt;
4748
+ type index$g_ChatMessage = ChatMessage;
4749
+ declare const index$g_ChatMessageType: typeof ChatMessageType;
4750
+ type index$g_ChatMessageWithPlaceholders = ChatMessageWithPlaceholders;
4751
+ type index$g_ChatPrompt = ChatPrompt;
4752
+ type index$g_CreateChatPromptRequest = CreateChatPromptRequest;
4753
+ declare const index$g_CreateChatPromptType: typeof CreateChatPromptType;
4754
+ type index$g_CreatePromptRequest = CreatePromptRequest;
4755
+ type index$g_CreateTextPromptRequest = CreateTextPromptRequest;
4756
+ declare const index$g_CreateTextPromptType: typeof CreateTextPromptType;
4757
+ type index$g_DeletePromptRequest = DeletePromptRequest;
4758
+ type index$g_GetPromptRequest = GetPromptRequest;
4759
+ type index$g_ListPromptsMetaRequest = ListPromptsMetaRequest;
4760
+ type index$g_PlaceholderMessage = PlaceholderMessage;
4761
+ declare const index$g_PlaceholderMessageType: typeof PlaceholderMessageType;
4762
+ declare const index$g_Prompt: typeof Prompt;
4763
+ type index$g_PromptMeta = PromptMeta;
4764
+ type index$g_PromptMetaListResponse = PromptMetaListResponse;
4765
+ declare const index$g_PromptType: typeof PromptType;
4766
+ type index$g_TextPrompt = TextPrompt;
4767
+ declare namespace index$g {
4768
+ export { type index$g_BasePrompt as BasePrompt, type index$g_ChatMessage as ChatMessage, index$g_ChatMessageType as ChatMessageType, type index$g_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$g_ChatPrompt as ChatPrompt, type index$g_CreateChatPromptRequest as CreateChatPromptRequest, index$g_CreateChatPromptType as CreateChatPromptType, type index$g_CreatePromptRequest as CreatePromptRequest, type index$g_CreateTextPromptRequest as CreateTextPromptRequest, index$g_CreateTextPromptType as CreateTextPromptType, type index$g_DeletePromptRequest as DeletePromptRequest, type index$g_GetPromptRequest as GetPromptRequest, type index$g_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$g_PlaceholderMessage as PlaceholderMessage, index$g_PlaceholderMessageType as PlaceholderMessageType, index$g_Prompt as Prompt, type index$g_PromptMeta as PromptMeta, type index$g_PromptMetaListResponse as PromptMetaListResponse, index$g_PromptType as PromptType, type index$g_TextPrompt as TextPrompt };
4434
4769
  }
4435
4770
 
4436
4771
  /**
@@ -4648,31 +4983,31 @@ interface CreateUserRequest {
4648
4983
  emails?: ScimEmail[];
4649
4984
  /** Whether the user is active */
4650
4985
  active?: boolean;
4651
- /** Initial password for the user */
4986
+ /** Ignored. Accepted only for compatibility with identity providers that always send a password on user creation (Okta sends a placeholder value even when password sync is disabled). No credential is created for the user; provisioned users authenticate via SSO or set a password themselves through the password reset flow. */
4652
4987
  password?: string;
4653
4988
  }
4654
4989
 
4655
- type index$d_AuthenticationScheme = AuthenticationScheme;
4656
- type index$d_BulkConfig = BulkConfig;
4657
- type index$d_CreateUserRequest = CreateUserRequest;
4658
- type index$d_EmptyResponse = EmptyResponse;
4659
- type index$d_FilterConfig = FilterConfig;
4660
- type index$d_ListUsersRequest = ListUsersRequest;
4661
- type index$d_ResourceMeta = ResourceMeta;
4662
- type index$d_ResourceType = ResourceType;
4663
- type index$d_ResourceTypesResponse = ResourceTypesResponse;
4664
- type index$d_SchemaExtension = SchemaExtension;
4665
- type index$d_SchemaResource = SchemaResource;
4666
- type index$d_SchemasResponse = SchemasResponse;
4667
- type index$d_ScimEmail = ScimEmail;
4668
- type index$d_ScimFeatureSupport = ScimFeatureSupport;
4669
- type index$d_ScimName = ScimName;
4670
- type index$d_ScimUser = ScimUser;
4671
- type index$d_ScimUsersListResponse = ScimUsersListResponse;
4672
- type index$d_ServiceProviderConfig = ServiceProviderConfig;
4673
- type index$d_UserMeta = UserMeta;
4674
- declare namespace index$d {
4675
- export type { index$d_AuthenticationScheme as AuthenticationScheme, index$d_BulkConfig as BulkConfig, index$d_CreateUserRequest as CreateUserRequest, index$d_EmptyResponse as EmptyResponse, index$d_FilterConfig as FilterConfig, index$d_ListUsersRequest as ListUsersRequest, index$d_ResourceMeta as ResourceMeta, index$d_ResourceType as ResourceType, index$d_ResourceTypesResponse as ResourceTypesResponse, index$d_SchemaExtension as SchemaExtension, index$d_SchemaResource as SchemaResource, index$d_SchemasResponse as SchemasResponse, index$d_ScimEmail as ScimEmail, index$d_ScimFeatureSupport as ScimFeatureSupport, index$d_ScimName as ScimName, index$d_ScimUser as ScimUser, index$d_ScimUsersListResponse as ScimUsersListResponse, index$d_ServiceProviderConfig as ServiceProviderConfig, index$d_UserMeta as UserMeta };
4990
+ type index$f_AuthenticationScheme = AuthenticationScheme;
4991
+ type index$f_BulkConfig = BulkConfig;
4992
+ type index$f_CreateUserRequest = CreateUserRequest;
4993
+ type index$f_EmptyResponse = EmptyResponse;
4994
+ type index$f_FilterConfig = FilterConfig;
4995
+ type index$f_ListUsersRequest = ListUsersRequest;
4996
+ type index$f_ResourceMeta = ResourceMeta;
4997
+ type index$f_ResourceType = ResourceType;
4998
+ type index$f_ResourceTypesResponse = ResourceTypesResponse;
4999
+ type index$f_SchemaExtension = SchemaExtension;
5000
+ type index$f_SchemaResource = SchemaResource;
5001
+ type index$f_SchemasResponse = SchemasResponse;
5002
+ type index$f_ScimEmail = ScimEmail;
5003
+ type index$f_ScimFeatureSupport = ScimFeatureSupport;
5004
+ type index$f_ScimName = ScimName;
5005
+ type index$f_ScimUser = ScimUser;
5006
+ type index$f_ScimUsersListResponse = ScimUsersListResponse;
5007
+ type index$f_ServiceProviderConfig = ServiceProviderConfig;
5008
+ type index$f_UserMeta = UserMeta;
5009
+ declare namespace index$f {
5010
+ export type { index$f_AuthenticationScheme as AuthenticationScheme, index$f_BulkConfig as BulkConfig, index$f_CreateUserRequest as CreateUserRequest, index$f_EmptyResponse as EmptyResponse, index$f_FilterConfig as FilterConfig, index$f_ListUsersRequest as ListUsersRequest, index$f_ResourceMeta as ResourceMeta, index$f_ResourceType as ResourceType, index$f_ResourceTypesResponse as ResourceTypesResponse, index$f_SchemaExtension as SchemaExtension, index$f_SchemaResource as SchemaResource, index$f_SchemasResponse as SchemasResponse, index$f_ScimEmail as ScimEmail, index$f_ScimFeatureSupport as ScimFeatureSupport, index$f_ScimName as ScimName, index$f_ScimUser as ScimUser, index$f_ScimUsersListResponse as ScimUsersListResponse, index$f_ServiceProviderConfig as ServiceProviderConfig, index$f_UserMeta as UserMeta };
4676
5011
  }
4677
5012
 
4678
5013
  /**
@@ -4735,11 +5070,11 @@ interface GetScoreConfigsRequest {
4735
5070
  limit?: number;
4736
5071
  }
4737
5072
 
4738
- type index$c_CreateScoreConfigRequest = CreateScoreConfigRequest;
4739
- type index$c_GetScoreConfigsRequest = GetScoreConfigsRequest;
4740
- type index$c_UpdateScoreConfigRequest = UpdateScoreConfigRequest;
4741
- declare namespace index$c {
4742
- export type { index$c_CreateScoreConfigRequest as CreateScoreConfigRequest, index$c_GetScoreConfigsRequest as GetScoreConfigsRequest, ScoreConfigs$1 as ScoreConfigs, index$c_UpdateScoreConfigRequest as UpdateScoreConfigRequest };
5073
+ type index$e_CreateScoreConfigRequest = CreateScoreConfigRequest;
5074
+ type index$e_GetScoreConfigsRequest = GetScoreConfigsRequest;
5075
+ type index$e_UpdateScoreConfigRequest = UpdateScoreConfigRequest;
5076
+ declare namespace index$e {
5077
+ export type { index$e_CreateScoreConfigRequest as CreateScoreConfigRequest, index$e_GetScoreConfigsRequest as GetScoreConfigsRequest, ScoreConfigs$1 as ScoreConfigs, index$e_UpdateScoreConfigRequest as UpdateScoreConfigRequest };
4743
5078
  }
4744
5079
 
4745
5080
  /**
@@ -4990,23 +5325,23 @@ interface GetScoresV3Request {
4990
5325
  toTimestamp?: string;
4991
5326
  }
4992
5327
 
4993
- type index$b_BaseScoreV3 = BaseScoreV3;
4994
- type index$b_BooleanScoreV3 = BooleanScoreV3;
4995
- type index$b_CategoricalScoreV3 = CategoricalScoreV3;
4996
- type index$b_CorrectionScoreV3 = CorrectionScoreV3;
4997
- type index$b_GetScoresV3Meta = GetScoresV3Meta;
4998
- type index$b_GetScoresV3Request = GetScoresV3Request;
4999
- type index$b_GetScoresV3Response = GetScoresV3Response;
5000
- type index$b_NumericScoreV3 = NumericScoreV3;
5001
- type index$b_ScoreSubjectExperimentV3 = ScoreSubjectExperimentV3;
5002
- type index$b_ScoreSubjectObservationV3 = ScoreSubjectObservationV3;
5003
- type index$b_ScoreSubjectSessionV3 = ScoreSubjectSessionV3;
5004
- type index$b_ScoreSubjectTraceV3 = ScoreSubjectTraceV3;
5005
- declare const index$b_ScoreSubjectV3: typeof ScoreSubjectV3;
5006
- declare const index$b_ScoreV3: typeof ScoreV3;
5007
- type index$b_TextScoreV3 = TextScoreV3;
5008
- declare namespace index$b {
5009
- export { type index$b_BaseScoreV3 as BaseScoreV3, type index$b_BooleanScoreV3 as BooleanScoreV3, type index$b_CategoricalScoreV3 as CategoricalScoreV3, type index$b_CorrectionScoreV3 as CorrectionScoreV3, type index$b_GetScoresV3Meta as GetScoresV3Meta, type index$b_GetScoresV3Request as GetScoresV3Request, type index$b_GetScoresV3Response as GetScoresV3Response, type index$b_NumericScoreV3 as NumericScoreV3, type index$b_ScoreSubjectExperimentV3 as ScoreSubjectExperimentV3, type index$b_ScoreSubjectObservationV3 as ScoreSubjectObservationV3, type index$b_ScoreSubjectSessionV3 as ScoreSubjectSessionV3, type index$b_ScoreSubjectTraceV3 as ScoreSubjectTraceV3, index$b_ScoreSubjectV3 as ScoreSubjectV3, index$b_ScoreV3 as ScoreV3, type index$b_TextScoreV3 as TextScoreV3 };
5328
+ type index$d_BaseScoreV3 = BaseScoreV3;
5329
+ type index$d_BooleanScoreV3 = BooleanScoreV3;
5330
+ type index$d_CategoricalScoreV3 = CategoricalScoreV3;
5331
+ type index$d_CorrectionScoreV3 = CorrectionScoreV3;
5332
+ type index$d_GetScoresV3Meta = GetScoresV3Meta;
5333
+ type index$d_GetScoresV3Request = GetScoresV3Request;
5334
+ type index$d_GetScoresV3Response = GetScoresV3Response;
5335
+ type index$d_NumericScoreV3 = NumericScoreV3;
5336
+ type index$d_ScoreSubjectExperimentV3 = ScoreSubjectExperimentV3;
5337
+ type index$d_ScoreSubjectObservationV3 = ScoreSubjectObservationV3;
5338
+ type index$d_ScoreSubjectSessionV3 = ScoreSubjectSessionV3;
5339
+ type index$d_ScoreSubjectTraceV3 = ScoreSubjectTraceV3;
5340
+ declare const index$d_ScoreSubjectV3: typeof ScoreSubjectV3;
5341
+ declare const index$d_ScoreV3: typeof ScoreV3;
5342
+ type index$d_TextScoreV3 = TextScoreV3;
5343
+ declare namespace index$d {
5344
+ export { type index$d_BaseScoreV3 as BaseScoreV3, type index$d_BooleanScoreV3 as BooleanScoreV3, type index$d_CategoricalScoreV3 as CategoricalScoreV3, type index$d_CorrectionScoreV3 as CorrectionScoreV3, type index$d_GetScoresV3Meta as GetScoresV3Meta, type index$d_GetScoresV3Request as GetScoresV3Request, type index$d_GetScoresV3Response as GetScoresV3Response, type index$d_NumericScoreV3 as NumericScoreV3, type index$d_ScoreSubjectExperimentV3 as ScoreSubjectExperimentV3, type index$d_ScoreSubjectObservationV3 as ScoreSubjectObservationV3, type index$d_ScoreSubjectSessionV3 as ScoreSubjectSessionV3, type index$d_ScoreSubjectTraceV3 as ScoreSubjectTraceV3, index$d_ScoreSubjectV3 as ScoreSubjectV3, index$d_ScoreV3 as ScoreV3, type index$d_TextScoreV3 as TextScoreV3 };
5010
5345
  }
5011
5346
 
5012
5347
  /**
@@ -5093,6 +5428,7 @@ declare namespace GetScoresResponseData {
5093
5428
  interface GetScoresResponse {
5094
5429
  data: GetScoresResponseData[];
5095
5430
  meta: MetaResponse;
5431
+ _deprecation?: Deprecation;
5096
5432
  }
5097
5433
 
5098
5434
  /**
@@ -5148,17 +5484,20 @@ interface GetScoresRequest {
5148
5484
  filter?: string;
5149
5485
  }
5150
5486
 
5151
- type index$a_GetScoresRequest = GetScoresRequest;
5152
- type index$a_GetScoresResponse = GetScoresResponse;
5153
- declare const index$a_GetScoresResponseData: typeof GetScoresResponseData;
5154
- type index$a_GetScoresResponseDataBoolean = GetScoresResponseDataBoolean;
5155
- type index$a_GetScoresResponseDataCategorical = GetScoresResponseDataCategorical;
5156
- type index$a_GetScoresResponseDataCorrection = GetScoresResponseDataCorrection;
5157
- type index$a_GetScoresResponseDataNumeric = GetScoresResponseDataNumeric;
5158
- type index$a_GetScoresResponseDataText = GetScoresResponseDataText;
5159
- type index$a_GetScoresResponseTraceData = GetScoresResponseTraceData;
5160
- declare namespace index$a {
5161
- export { type index$a_GetScoresRequest as GetScoresRequest, type index$a_GetScoresResponse as GetScoresResponse, index$a_GetScoresResponseData as GetScoresResponseData, type index$a_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$a_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$a_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$a_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$a_GetScoresResponseDataText as GetScoresResponseDataText, type index$a_GetScoresResponseTraceData as GetScoresResponseTraceData };
5487
+ type index$c_CreateScoreRequest = CreateScoreRequest;
5488
+ type index$c_CreateScoreResponse = CreateScoreResponse;
5489
+ declare const index$c_CreateScoreSource: typeof CreateScoreSource;
5490
+ type index$c_GetScoresRequest = GetScoresRequest;
5491
+ type index$c_GetScoresResponse = GetScoresResponse;
5492
+ declare const index$c_GetScoresResponseData: typeof GetScoresResponseData;
5493
+ type index$c_GetScoresResponseDataBoolean = GetScoresResponseDataBoolean;
5494
+ type index$c_GetScoresResponseDataCategorical = GetScoresResponseDataCategorical;
5495
+ type index$c_GetScoresResponseDataCorrection = GetScoresResponseDataCorrection;
5496
+ type index$c_GetScoresResponseDataNumeric = GetScoresResponseDataNumeric;
5497
+ type index$c_GetScoresResponseDataText = GetScoresResponseDataText;
5498
+ type index$c_GetScoresResponseTraceData = GetScoresResponseTraceData;
5499
+ declare namespace index$c {
5500
+ export { type index$c_CreateScoreRequest as CreateScoreRequest, type index$c_CreateScoreResponse as CreateScoreResponse, index$c_CreateScoreSource as CreateScoreSource, type index$c_GetScoresRequest as GetScoresRequest, type index$c_GetScoresResponse as GetScoresResponse, index$c_GetScoresResponseData as GetScoresResponseData, type index$c_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$c_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$c_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$c_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$c_GetScoresResponseDataText as GetScoresResponseDataText, type index$c_GetScoresResponseTraceData as GetScoresResponseTraceData };
5162
5501
  }
5163
5502
 
5164
5503
  /**
@@ -5168,6 +5507,7 @@ declare namespace index$a {
5168
5507
  interface PaginatedSessions {
5169
5508
  data: Session[];
5170
5509
  meta: MetaResponse;
5510
+ _deprecation?: Deprecation;
5171
5511
  }
5172
5512
 
5173
5513
  /**
@@ -5190,10 +5530,10 @@ interface GetSessionsRequest {
5190
5530
  environment?: string | string[];
5191
5531
  }
5192
5532
 
5193
- type index$9_GetSessionsRequest = GetSessionsRequest;
5194
- type index$9_PaginatedSessions = PaginatedSessions;
5195
- declare namespace index$9 {
5196
- export type { index$9_GetSessionsRequest as GetSessionsRequest, index$9_PaginatedSessions as PaginatedSessions };
5533
+ type index$b_GetSessionsRequest = GetSessionsRequest;
5534
+ type index$b_PaginatedSessions = PaginatedSessions;
5535
+ declare namespace index$b {
5536
+ export type { index$b_GetSessionsRequest as GetSessionsRequest, index$b_PaginatedSessions as PaginatedSessions };
5197
5537
  }
5198
5538
 
5199
5539
  /**
@@ -5203,6 +5543,7 @@ declare namespace index$9 {
5203
5543
  interface Traces {
5204
5544
  data: TraceWithDetails[];
5205
5545
  meta: MetaResponse;
5546
+ _deprecation?: Deprecation;
5206
5547
  }
5207
5548
 
5208
5549
  /**
@@ -5270,7 +5611,7 @@ interface GetTracesRequest {
5270
5611
  * ```json
5271
5612
  * [
5272
5613
  * {
5273
- * "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "boolean", "null"
5614
+ * "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "booleanObject", "boolean", "null"
5274
5615
  * "column": string, // Required. Column to filter on (see available columns below)
5275
5616
  * "operator": string, // Required. Operator based on type:
5276
5617
  * // - datetime: ">", "<", ">=", "<="
@@ -5281,10 +5622,11 @@ interface GetTracesRequest {
5281
5622
  * // - number: "=", ">", "<", ">=", "<="
5282
5623
  * // - stringObject: "=", "contains", "does not contain", "starts with", "ends with"
5283
5624
  * // - numberObject: "=", ">", "<", ">=", "<="
5625
+ * // - booleanObject: "=", "<>"
5284
5626
  * // - boolean: "=", "<>"
5285
5627
  * // - null: "is null", "is not null"
5286
5628
  * "value": any, // Required (except for null type). Value to compare against. Type depends on filter type
5287
- * "key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata
5629
+ * "key": string // Required only for stringObject, numberObject, booleanObject, and categoryOptions types when filtering on nested fields like metadata or score names
5288
5630
  * }
5289
5631
  * ]
5290
5632
  * ```
@@ -5327,6 +5669,7 @@ interface GetTracesRequest {
5327
5669
  * ### Scores (requires join with scores table)
5328
5670
  * - `scores_avg` (number) - Average of numeric scores (alias: `scores`)
5329
5671
  * - `score_categories` (categoryOptions) - Categorical score values
5672
+ * - `score_booleans` (booleanObject) - Boolean score values. Use `key` for the score name and a boolean `value`, e.g. `{"type": "booleanObject", "column": "score_booleans", "key": "is_correct", "operator": "=", "value": true}`. The `<>` operator also matches traces without a score of that name.
5330
5673
  *
5331
5674
  * ## Filter Examples
5332
5675
  * ```json
@@ -5386,14 +5729,14 @@ interface DeleteTracesRequest {
5386
5729
  traceIds: string[];
5387
5730
  }
5388
5731
 
5389
- type index$8_DeleteTraceResponse = DeleteTraceResponse;
5390
- type index$8_DeleteTracesRequest = DeleteTracesRequest;
5391
- type index$8_GetTraceRequest = GetTraceRequest;
5392
- type index$8_GetTracesRequest = GetTracesRequest;
5393
- type index$8_Sort = Sort;
5394
- type index$8_Traces = Traces;
5395
- declare namespace index$8 {
5396
- export type { index$8_DeleteTraceResponse as DeleteTraceResponse, index$8_DeleteTracesRequest as DeleteTracesRequest, index$8_GetTraceRequest as GetTraceRequest, index$8_GetTracesRequest as GetTracesRequest, index$8_Sort as Sort, index$8_Traces as Traces };
5732
+ type index$a_DeleteTraceResponse = DeleteTraceResponse;
5733
+ type index$a_DeleteTracesRequest = DeleteTracesRequest;
5734
+ type index$a_GetTraceRequest = GetTraceRequest;
5735
+ type index$a_GetTracesRequest = GetTracesRequest;
5736
+ type index$a_Sort = Sort;
5737
+ type index$a_Traces = Traces;
5738
+ declare namespace index$a {
5739
+ export type { index$a_DeleteTraceResponse as DeleteTraceResponse, index$a_DeleteTracesRequest as DeleteTracesRequest, index$a_GetTraceRequest as GetTraceRequest, index$a_GetTracesRequest as GetTracesRequest, index$a_Sort as Sort, index$a_Traces as Traces };
5397
5740
  }
5398
5741
 
5399
5742
  /**
@@ -5445,7 +5788,7 @@ declare const EvaluatorScope: {
5445
5788
  *
5446
5789
  * Choose the target first, because it changes both the valid filter columns and the valid variable-mapping sources:
5447
5790
  * - `observation` evaluates live-ingested observations such as generations, spans, and events.
5448
- * It supports mapping from `input`, `output`, and `metadata`.
5791
+ * It supports mapping from `input`, `output`, `metadata`, and `tool_calls`.
5449
5792
  * - `experiment` evaluates live experiment executions and can additionally map `expected_output` and `experiment_item_metadata`.
5450
5793
  * It currently supports filtering by `datasetId`.
5451
5794
  * Discover valid dataset IDs with `GET /api/public/v2/datasets`, then use the returned dataset `id` values in your filter.
@@ -5482,21 +5825,23 @@ declare const EvaluationRuleStatus: {
5482
5825
  * Use these values when mapping evaluator prompt variables to live data.
5483
5826
  *
5484
5827
  * Target-specific rules:
5485
- * - `target=observation` supports `input`, `output`, and `metadata`
5486
- * - `target=experiment` supports `input`, `output`, `metadata`, `expected_output`, and `experiment_item_metadata`
5828
+ * - `target=observation` supports `input`, `output`, `metadata`, and `tool_calls`
5829
+ * - `target=experiment` supports `input`, `output`, `metadata`, `tool_calls`, `expected_output`, and `experiment_item_metadata`
5487
5830
  *
5488
5831
  * Source semantics:
5489
5832
  * - `input`: the observation or experiment input payload
5490
5833
  * - `output`: the observation or experiment output payload
5491
5834
  * - `metadata`: the metadata object for the target. Combine with `jsonPath` when you need one nested field instead of the whole object.
5835
+ * - `tool_calls`: the tool calls recorded on the observation, as an array of `{id, name, arguments, type, index}` objects in the order the model emitted them. Combine with `jsonPath` (for example `$[*].name`) to select parts of each call.
5492
5836
  * - `expected_output`: the experiment item's expected output. Only valid for `target=experiment`.
5493
5837
  * - `experiment_item_metadata`: the experiment item's metadata object. Only valid for `target=experiment`.
5494
5838
  */
5495
- type EvaluationRuleMappingSource = "input" | "output" | "metadata" | "expected_output" | "experiment_item_metadata";
5839
+ type EvaluationRuleMappingSource = "input" | "output" | "metadata" | "tool_calls" | "expected_output" | "experiment_item_metadata";
5496
5840
  declare const EvaluationRuleMappingSource: {
5497
5841
  readonly Input: "input";
5498
5842
  readonly Output: "output";
5499
5843
  readonly Metadata: "metadata";
5844
+ readonly ToolCalls: "tool_calls";
5500
5845
  readonly ExpectedOutput: "expected_output";
5501
5846
  readonly ExperimentItemMetadata: "experiment_item_metadata";
5502
5847
  };
@@ -5955,8 +6300,8 @@ interface EvaluationRuleMapping {
5955
6300
  * Source field that should populate the prompt variable.
5956
6301
  *
5957
6302
  * Quick reference:
5958
- * - `target=observation`: `input`, `output`, `metadata`
5959
- * - `target=experiment`: `input`, `output`, `metadata`, `expected_output`, `experiment_item_metadata`
6303
+ * - `target=observation`: `input`, `output`, `metadata`, `tool_calls`
6304
+ * - `target=experiment`: `input`, `output`, `metadata`, `tool_calls`, `expected_output`, `experiment_item_metadata`
5960
6305
  */
5961
6306
  source: EvaluationRuleMappingSource;
5962
6307
  /**
@@ -5992,6 +6337,7 @@ interface EvaluationRuleMapping {
5992
6337
  * - `stringOptions`: `any of`, `none of`
5993
6338
  * - `arrayOptions`: `any of`, `none of`, `all of`
5994
6339
  * - `stringObject`: same operators as `string`
6340
+ * - `boolean`: `"="`, `"<>"`
5995
6341
  * - `null`: `is null`, `is not null`
5996
6342
  *
5997
6343
  * Supported columns by target:
@@ -6006,6 +6352,7 @@ interface EvaluationRuleMapping {
6006
6352
  * - `sessionId`: `string`
6007
6353
  * - `tags`: `arrayOptions`, operators `any of` / `none of` / `all of`
6008
6354
  * - `metadata`: `stringObject` with `key`
6355
+ * - `isRootObservation`: `boolean`, operators `=` / `<>`; true when the observation has no parent or is explicitly marked as an application root
6009
6356
  * - `parentObservationId`: `null`, operators `is null` / `is not null`
6010
6357
  * - `calledToolNames`: `arrayOptions`, operators `any of` / `none of` / `all of`
6011
6358
  * - `toolCalls`: `number`
@@ -6044,6 +6391,14 @@ interface EvaluationRuleMapping {
6044
6391
  *
6045
6392
  * @example
6046
6393
  * {
6394
+ * type: "boolean",
6395
+ * column: "isRootObservation",
6396
+ * operator: LangfuseAPI.unstable.EvaluationRuleBooleanFilterOperator.Equals,
6397
+ * value: true
6398
+ * }
6399
+ *
6400
+ * @example
6401
+ * {
6047
6402
  * type: "arrayOptions",
6048
6403
  * column: "tags",
6049
6404
  * operator: LangfuseAPI.unstable.EvaluationRuleArrayOptionsFilterOperator.AnyOf,
@@ -6092,51 +6447,521 @@ declare namespace EvaluationRuleFilter {
6092
6447
  }
6093
6448
  }
6094
6449
 
6095
- type index$7_ArrayOptionsEvaluationRuleFilter = ArrayOptionsEvaluationRuleFilter;
6096
- type index$7_BooleanEvaluationRuleFilter = BooleanEvaluationRuleFilter;
6097
- type index$7_CategoryOptionsEvaluationRuleFilter = CategoryOptionsEvaluationRuleFilter;
6098
- declare const index$7_CodeEvaluatorSourceCodeLanguage: typeof CodeEvaluatorSourceCodeLanguage;
6099
- type index$7_DateTimeEvaluationRuleFilter = DateTimeEvaluationRuleFilter;
6100
- declare const index$7_EvaluationRuleArrayOptionsFilterOperator: typeof EvaluationRuleArrayOptionsFilterOperator;
6101
- declare const index$7_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
6102
- declare const index$7_EvaluationRuleFilter: typeof EvaluationRuleFilter;
6103
- type index$7_EvaluationRuleMapping = EvaluationRuleMapping;
6104
- declare const index$7_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
6105
- declare const index$7_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
6106
- declare const index$7_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
6107
- declare const index$7_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
6108
- declare const index$7_EvaluationRuleStatus: typeof EvaluationRuleStatus;
6109
- declare const index$7_EvaluationRuleStringFilterOperator: typeof EvaluationRuleStringFilterOperator;
6110
- declare const index$7_EvaluationRuleTarget: typeof EvaluationRuleTarget;
6111
- type index$7_EvaluatorModelConfig = EvaluatorModelConfig;
6112
- declare const index$7_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
6113
- declare const index$7_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
6114
- type index$7_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
6115
- declare const index$7_EvaluatorScope: typeof EvaluatorScope;
6116
- declare const index$7_EvaluatorType: typeof EvaluatorType;
6117
- type index$7_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
6118
- type index$7_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
6119
- type index$7_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
6120
- type index$7_PublicBooleanEvaluatorOutputDefinition = PublicBooleanEvaluatorOutputDefinition;
6121
- type index$7_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvaluatorOutputDefinition;
6122
- type index$7_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
6123
- declare const index$7_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
6124
- type index$7_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
6125
- type index$7_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
6126
- type index$7_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
6127
- type index$7_StringOptionsEvaluationRuleFilter = StringOptionsEvaluationRuleFilter;
6128
- declare namespace index$7 {
6129
- export { type index$7_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, type index$7_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$7_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, index$7_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, type index$7_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, index$7_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, index$7_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, index$7_EvaluationRuleFilter as EvaluationRuleFilter, type index$7_EvaluationRuleMapping as EvaluationRuleMapping, index$7_EvaluationRuleMappingSource as EvaluationRuleMappingSource, index$7_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$7_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$7_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$7_EvaluationRuleStatus as EvaluationRuleStatus, index$7_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$7_EvaluationRuleTarget as EvaluationRuleTarget, type index$7_EvaluatorModelConfig as EvaluatorModelConfig, index$7_EvaluatorOutputDataType as EvaluatorOutputDataType, index$7_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$7_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$7_EvaluatorScope as EvaluatorScope, index$7_EvaluatorType as EvaluatorType, type index$7_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$7_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$7_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$7_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$7_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$7_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$7_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$7_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$7_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$7_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$7_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter };
6450
+ type index$9_ArrayOptionsEvaluationRuleFilter = ArrayOptionsEvaluationRuleFilter;
6451
+ type index$9_BooleanEvaluationRuleFilter = BooleanEvaluationRuleFilter;
6452
+ type index$9_CategoryOptionsEvaluationRuleFilter = CategoryOptionsEvaluationRuleFilter;
6453
+ declare const index$9_CodeEvaluatorSourceCodeLanguage: typeof CodeEvaluatorSourceCodeLanguage;
6454
+ type index$9_DateTimeEvaluationRuleFilter = DateTimeEvaluationRuleFilter;
6455
+ declare const index$9_EvaluationRuleArrayOptionsFilterOperator: typeof EvaluationRuleArrayOptionsFilterOperator;
6456
+ declare const index$9_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
6457
+ declare const index$9_EvaluationRuleFilter: typeof EvaluationRuleFilter;
6458
+ type index$9_EvaluationRuleMapping = EvaluationRuleMapping;
6459
+ declare const index$9_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
6460
+ declare const index$9_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
6461
+ declare const index$9_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
6462
+ declare const index$9_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
6463
+ declare const index$9_EvaluationRuleStatus: typeof EvaluationRuleStatus;
6464
+ declare const index$9_EvaluationRuleStringFilterOperator: typeof EvaluationRuleStringFilterOperator;
6465
+ declare const index$9_EvaluationRuleTarget: typeof EvaluationRuleTarget;
6466
+ type index$9_EvaluatorModelConfig = EvaluatorModelConfig;
6467
+ declare const index$9_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
6468
+ declare const index$9_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
6469
+ type index$9_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
6470
+ declare const index$9_EvaluatorScope: typeof EvaluatorScope;
6471
+ declare const index$9_EvaluatorType: typeof EvaluatorType;
6472
+ type index$9_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
6473
+ type index$9_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
6474
+ type index$9_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
6475
+ type index$9_PublicBooleanEvaluatorOutputDefinition = PublicBooleanEvaluatorOutputDefinition;
6476
+ type index$9_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvaluatorOutputDefinition;
6477
+ type index$9_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
6478
+ declare const index$9_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
6479
+ type index$9_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
6480
+ type index$9_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
6481
+ type index$9_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
6482
+ type index$9_StringOptionsEvaluationRuleFilter = StringOptionsEvaluationRuleFilter;
6483
+ declare namespace index$9 {
6484
+ export { type index$9_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, type index$9_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$9_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, index$9_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, type index$9_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, index$9_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, index$9_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, index$9_EvaluationRuleFilter as EvaluationRuleFilter, type index$9_EvaluationRuleMapping as EvaluationRuleMapping, index$9_EvaluationRuleMappingSource as EvaluationRuleMappingSource, index$9_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$9_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$9_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$9_EvaluationRuleStatus as EvaluationRuleStatus, index$9_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$9_EvaluationRuleTarget as EvaluationRuleTarget, type index$9_EvaluatorModelConfig as EvaluatorModelConfig, index$9_EvaluatorOutputDataType as EvaluatorOutputDataType, index$9_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$9_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$9_EvaluatorScope as EvaluatorScope, index$9_EvaluatorType as EvaluatorType, type index$9_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$9_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$9_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$9_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$9_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$9_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$9_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$9_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$9_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$9_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$9_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter };
6130
6485
  }
6131
6486
 
6132
6487
  /**
6133
6488
  * This file was auto-generated by Fern from our API Definition.
6134
6489
  */
6490
+ type DashboardWidgetView = "observations" | "scores-numeric" | "scores-boolean" | "scores-categorical";
6491
+ declare const DashboardWidgetView: {
6492
+ readonly Observations: "observations";
6493
+ readonly ScoresNumeric: "scores-numeric";
6494
+ readonly ScoresBoolean: "scores-boolean";
6495
+ readonly ScoresCategorical: "scores-categorical";
6496
+ };
6497
+
6135
6498
  /**
6136
- * Machine-readable error code returned by the unstable evaluators API.
6137
- *
6138
- * SDKs, CLIs, and agents should branch on `code` rather than parsing the human-readable `message`.
6139
- * The HTTP status still indicates the broad error class, while `code` gives the specific failure reason.
6499
+ * This file was auto-generated by Fern from our API Definition.
6500
+ */
6501
+ /**
6502
+ * Widget data view. Responses may include the legacy `traces` value for
6503
+ * widgets created before this API existed.
6504
+ */
6505
+ type DashboardWidgetViewWithLegacy = "observations" | "scores-numeric" | "scores-boolean" | "scores-categorical" | "traces";
6506
+ declare const DashboardWidgetViewWithLegacy: {
6507
+ readonly Observations: "observations";
6508
+ readonly ScoresNumeric: "scores-numeric";
6509
+ readonly ScoresBoolean: "scores-boolean";
6510
+ readonly ScoresCategorical: "scores-categorical";
6511
+ readonly Traces: "traces";
6512
+ };
6513
+
6514
+ /**
6515
+ * This file was auto-generated by Fern from our API Definition.
6516
+ */
6517
+ type DashboardWidgetChartType = "LINE_TIME_SERIES" | "AREA_TIME_SERIES" | "BAR_TIME_SERIES" | "HORIZONTAL_BAR" | "VERTICAL_BAR" | "PIE" | "NUMBER" | "HISTOGRAM" | "PIVOT_TABLE";
6518
+ declare const DashboardWidgetChartType: {
6519
+ readonly LineTimeSeries: "LINE_TIME_SERIES";
6520
+ readonly AreaTimeSeries: "AREA_TIME_SERIES";
6521
+ readonly BarTimeSeries: "BAR_TIME_SERIES";
6522
+ readonly HorizontalBar: "HORIZONTAL_BAR";
6523
+ readonly VerticalBar: "VERTICAL_BAR";
6524
+ readonly Pie: "PIE";
6525
+ readonly Number: "NUMBER";
6526
+ readonly Histogram: "HISTOGRAM";
6527
+ readonly PivotTable: "PIVOT_TABLE";
6528
+ };
6529
+
6530
+ /**
6531
+ * This file was auto-generated by Fern from our API Definition.
6532
+ */
6533
+ type DashboardWidgetMetricAggregation = "sum" | "avg" | "count" | "max" | "min" | "p50" | "p75" | "p90" | "p95" | "p99" | "histogram" | "uniq";
6534
+ declare const DashboardWidgetMetricAggregation: {
6535
+ readonly Sum: "sum";
6536
+ readonly Avg: "avg";
6537
+ readonly Count: "count";
6538
+ readonly Max: "max";
6539
+ readonly Min: "min";
6540
+ readonly P50: "p50";
6541
+ readonly P75: "p75";
6542
+ readonly P90: "p90";
6543
+ readonly P95: "p95";
6544
+ readonly P99: "p99";
6545
+ readonly Histogram: "histogram";
6546
+ readonly Uniq: "uniq";
6547
+ };
6548
+
6549
+ /**
6550
+ * This file was auto-generated by Fern from our API Definition.
6551
+ */
6552
+ interface DashboardWidgetDimension {
6553
+ field: string;
6554
+ }
6555
+
6556
+ /**
6557
+ * This file was auto-generated by Fern from our API Definition.
6558
+ */
6559
+
6560
+ interface DashboardWidgetMetric {
6561
+ measure: string;
6562
+ agg: DashboardWidgetMetricAggregation;
6563
+ }
6564
+
6565
+ /**
6566
+ * This file was auto-generated by Fern from our API Definition.
6567
+ */
6568
+ /**
6569
+ * A filter in Langfuse filter-state shape. The `value` shape and the
6570
+ * allowed operators depend on `type`:
6571
+ *
6572
+ * | `type` | `value` | operators |
6573
+ * |---|---|---|
6574
+ * | `string` | string | `=`, `contains`, `does not contain`, `starts with`, `ends with` |
6575
+ * | `number` | number | `=`, `>`, `<`, `>=`, `<=` |
6576
+ * | `datetime` | ISO datetime string | `>`, `<`, `>=`, `<=` |
6577
+ * | `boolean` | boolean | `=`, `<>` |
6578
+ * | `null` | `""` | `is null`, `is not null` |
6579
+ * | `stringOptions` | list of strings | `any of`, `none of` |
6580
+ * | `arrayOptions` | list of strings | `any of`, `none of`, `all of` |
6581
+ * | `categoryOptions` | list of strings (requires `key`) | `any of`, `none of` |
6582
+ * | `stringObject` | string (requires `key`, e.g. a metadata key) | same as `string` |
6583
+ * | `numberObject` | number (requires `key`, e.g. a score name) | same as `number` |
6584
+ * | `booleanObject` | boolean (requires `key`) | `=`, `<>` |
6585
+ */
6586
+ interface DashboardWidgetFilter {
6587
+ column: string;
6588
+ operator: string;
6589
+ type: string;
6590
+ value?: unknown;
6591
+ key?: string;
6592
+ }
6593
+
6594
+ /**
6595
+ * This file was auto-generated by Fern from our API Definition.
6596
+ */
6597
+
6598
+ /**
6599
+ * Chart-specific widget configuration.
6600
+ *
6601
+ * `type` must match the top-level `chartType`.
6602
+ * `row_limit` applies to total-value charts and pivot tables.
6603
+ * `bins` applies to histograms.
6604
+ * `defaultSort` applies to pivot tables.
6605
+ */
6606
+ interface DashboardWidgetChartConfig {
6607
+ type: DashboardWidgetChartType;
6608
+ row_limit?: number;
6609
+ show_value_labels?: boolean;
6610
+ bins?: number;
6611
+ defaultSort?: DashboardWidgetDefaultSort;
6612
+ }
6613
+
6614
+ /**
6615
+ * This file was auto-generated by Fern from our API Definition.
6616
+ */
6617
+
6618
+ interface DashboardWidgetDefaultSort {
6619
+ column: string;
6620
+ order: DashboardWidgetSortOrder;
6621
+ }
6622
+
6623
+ /**
6624
+ * This file was auto-generated by Fern from our API Definition.
6625
+ */
6626
+ type DashboardWidgetSortOrder = "ASC" | "DESC";
6627
+ declare const DashboardWidgetSortOrder: {
6628
+ readonly Asc: "ASC";
6629
+ readonly Desc: "DESC";
6630
+ };
6631
+
6632
+ /**
6633
+ * This file was auto-generated by Fern from our API Definition.
6634
+ */
6635
+
6636
+ /**
6637
+ * Input-side chart config. `type` is optional and defaults to the
6638
+ * widget's `chartType`; when given it must match.
6639
+ */
6640
+ interface DashboardWidgetChartConfigInput {
6641
+ type?: DashboardWidgetChartType;
6642
+ row_limit?: number;
6643
+ show_value_labels?: boolean;
6644
+ bins?: number;
6645
+ defaultSort?: DashboardWidgetDefaultSort;
6646
+ }
6647
+
6648
+ /**
6649
+ * This file was auto-generated by Fern from our API Definition.
6650
+ */
6651
+
6652
+ interface CreateDashboardWidgetRequest {
6653
+ name: string;
6654
+ /** Defaults to an empty string. */
6655
+ description?: string;
6656
+ view: DashboardWidgetView;
6657
+ dimensions: DashboardWidgetDimension[];
6658
+ metrics: DashboardWidgetMetric[];
6659
+ filters: DashboardWidgetFilter[];
6660
+ chartType: DashboardWidgetChartType;
6661
+ /** Defaults to the plain config for `chartType`. */
6662
+ chartConfig?: DashboardWidgetChartConfigInput;
6663
+ }
6664
+
6665
+ /**
6666
+ * This file was auto-generated by Fern from our API Definition.
6667
+ */
6668
+
6669
+ interface UpdateDashboardWidgetRequest {
6670
+ name?: string;
6671
+ description?: string;
6672
+ view?: DashboardWidgetView;
6673
+ dimensions?: DashboardWidgetDimension[];
6674
+ metrics?: DashboardWidgetMetric[];
6675
+ filters?: DashboardWidgetFilter[];
6676
+ chartType?: DashboardWidgetChartType;
6677
+ chartConfig?: DashboardWidgetChartConfigInput;
6678
+ }
6679
+
6680
+ /**
6681
+ * This file was auto-generated by Fern from our API Definition.
6682
+ */
6683
+
6684
+ interface DashboardWidgetList {
6685
+ data: DashboardWidget[];
6686
+ meta: MetaResponse;
6687
+ }
6688
+
6689
+ /**
6690
+ * This file was auto-generated by Fern from our API Definition.
6691
+ */
6692
+ interface DeleteDashboardWidgetResponse {
6693
+ message: string;
6694
+ }
6695
+
6696
+ /**
6697
+ * This file was auto-generated by Fern from our API Definition.
6698
+ */
6699
+
6700
+ interface DashboardWidget {
6701
+ id: string;
6702
+ createdAt: string;
6703
+ updatedAt: string;
6704
+ name: string;
6705
+ description: string;
6706
+ view: DashboardWidgetViewWithLegacy;
6707
+ dimensions: DashboardWidgetDimension[];
6708
+ metrics: DashboardWidgetMetric[];
6709
+ filters: DashboardWidgetFilter[];
6710
+ chartType: DashboardWidgetChartType;
6711
+ chartConfig: DashboardWidgetChartConfig;
6712
+ }
6713
+
6714
+ /**
6715
+ * This file was auto-generated by Fern from our API Definition.
6716
+ */
6717
+ /**
6718
+ * @example
6719
+ * {}
6720
+ */
6721
+ interface ListDashboardWidgetsRequest {
6722
+ /** 1-based page number. Defaults to `1`. */
6723
+ page?: number;
6724
+ /** Maximum number of items per page. Defaults to `50`. */
6725
+ limit?: number;
6726
+ }
6727
+
6728
+ type index$8_CreateDashboardWidgetRequest = CreateDashboardWidgetRequest;
6729
+ type index$8_DashboardWidget = DashboardWidget;
6730
+ type index$8_DashboardWidgetChartConfig = DashboardWidgetChartConfig;
6731
+ type index$8_DashboardWidgetChartConfigInput = DashboardWidgetChartConfigInput;
6732
+ declare const index$8_DashboardWidgetChartType: typeof DashboardWidgetChartType;
6733
+ type index$8_DashboardWidgetDefaultSort = DashboardWidgetDefaultSort;
6734
+ type index$8_DashboardWidgetDimension = DashboardWidgetDimension;
6735
+ type index$8_DashboardWidgetFilter = DashboardWidgetFilter;
6736
+ type index$8_DashboardWidgetList = DashboardWidgetList;
6737
+ type index$8_DashboardWidgetMetric = DashboardWidgetMetric;
6738
+ declare const index$8_DashboardWidgetMetricAggregation: typeof DashboardWidgetMetricAggregation;
6739
+ declare const index$8_DashboardWidgetSortOrder: typeof DashboardWidgetSortOrder;
6740
+ declare const index$8_DashboardWidgetView: typeof DashboardWidgetView;
6741
+ declare const index$8_DashboardWidgetViewWithLegacy: typeof DashboardWidgetViewWithLegacy;
6742
+ type index$8_DeleteDashboardWidgetResponse = DeleteDashboardWidgetResponse;
6743
+ type index$8_ListDashboardWidgetsRequest = ListDashboardWidgetsRequest;
6744
+ type index$8_UpdateDashboardWidgetRequest = UpdateDashboardWidgetRequest;
6745
+ declare namespace index$8 {
6746
+ export { type index$8_CreateDashboardWidgetRequest as CreateDashboardWidgetRequest, type index$8_DashboardWidget as DashboardWidget, type index$8_DashboardWidgetChartConfig as DashboardWidgetChartConfig, type index$8_DashboardWidgetChartConfigInput as DashboardWidgetChartConfigInput, index$8_DashboardWidgetChartType as DashboardWidgetChartType, type index$8_DashboardWidgetDefaultSort as DashboardWidgetDefaultSort, type index$8_DashboardWidgetDimension as DashboardWidgetDimension, type index$8_DashboardWidgetFilter as DashboardWidgetFilter, type index$8_DashboardWidgetList as DashboardWidgetList, type index$8_DashboardWidgetMetric as DashboardWidgetMetric, index$8_DashboardWidgetMetricAggregation as DashboardWidgetMetricAggregation, index$8_DashboardWidgetSortOrder as DashboardWidgetSortOrder, index$8_DashboardWidgetView as DashboardWidgetView, index$8_DashboardWidgetViewWithLegacy as DashboardWidgetViewWithLegacy, type index$8_DeleteDashboardWidgetResponse as DeleteDashboardWidgetResponse, type index$8_ListDashboardWidgetsRequest as ListDashboardWidgetsRequest, type index$8_UpdateDashboardWidgetRequest as UpdateDashboardWidgetRequest };
6747
+ }
6748
+
6749
+ /**
6750
+ * This file was auto-generated by Fern from our API Definition.
6751
+ */
6752
+
6753
+ /**
6754
+ * A tile on the dashboard's 12-column grid. `x`/`y` are the tile's
6755
+ * top-left cell (0-based; `y` grows downward), `width`/`height` its size
6756
+ * in cells. The UI default tile is 6x6 (half width). Overlapping tiles
6757
+ * are not rejected; prefer appending below existing tiles (or omit the
6758
+ * position on create to let the server do it).
6759
+ */
6760
+ type DashboardPlacement = DashboardPlacement.Widget | DashboardPlacement.Preset;
6761
+ declare namespace DashboardPlacement {
6762
+ interface Widget extends WidgetPlacement {
6763
+ type: "widget";
6764
+ }
6765
+ interface Preset extends PresetPlacement {
6766
+ type: "preset";
6767
+ }
6768
+ }
6769
+
6770
+ /**
6771
+ * This file was auto-generated by Fern from our API Definition.
6772
+ */
6773
+ interface WidgetPlacement {
6774
+ id: string;
6775
+ widgetId: string;
6776
+ x: number;
6777
+ y: number;
6778
+ width: number;
6779
+ height: number;
6780
+ }
6781
+
6782
+ /**
6783
+ * This file was auto-generated by Fern from our API Definition.
6784
+ */
6785
+ interface PresetPlacement {
6786
+ id: string;
6787
+ presetId: string;
6788
+ x: number;
6789
+ y: number;
6790
+ width: number;
6791
+ height: number;
6792
+ }
6793
+
6794
+ /**
6795
+ * This file was auto-generated by Fern from our API Definition.
6796
+ */
6797
+
6798
+ type CreateDashboardPlacementRequest = CreateDashboardPlacementRequest.Widget | CreateDashboardPlacementRequest.Preset;
6799
+ declare namespace CreateDashboardPlacementRequest {
6800
+ interface Widget extends CreateWidgetPlacement {
6801
+ type: "widget";
6802
+ }
6803
+ interface Preset extends CreatePresetPlacement {
6804
+ type: "preset";
6805
+ }
6806
+ }
6807
+
6808
+ /**
6809
+ * This file was auto-generated by Fern from our API Definition.
6810
+ */
6811
+ interface CreateWidgetPlacement {
6812
+ /** Server-generated when omitted. */
6813
+ id?: string;
6814
+ widgetId: string;
6815
+ /** Grid column (12-column grid). Defaults to `0`. */
6816
+ x?: number;
6817
+ /** Grid row. Defaults to the first row below all existing tiles. */
6818
+ y?: number;
6819
+ /** Width in grid columns. Defaults to `6`. */
6820
+ width?: number;
6821
+ /** Height in grid rows. Defaults to `6`. */
6822
+ height?: number;
6823
+ }
6824
+
6825
+ /**
6826
+ * This file was auto-generated by Fern from our API Definition.
6827
+ */
6828
+ interface CreatePresetPlacement {
6829
+ /** Server-generated when omitted. */
6830
+ id?: string;
6831
+ presetId: string;
6832
+ /** Grid column (12-column grid). Defaults to `0`. */
6833
+ x?: number;
6834
+ /** Grid row. Defaults to the first row below all existing tiles. */
6835
+ y?: number;
6836
+ /** Width in grid columns. Defaults to `6`. */
6837
+ width?: number;
6838
+ /** Height in grid rows. Defaults to `6`. */
6839
+ height?: number;
6840
+ }
6841
+
6842
+ /**
6843
+ * This file was auto-generated by Fern from our API Definition.
6844
+ */
6845
+ interface UpdateDashboardPlacementRequest {
6846
+ /** Grid column (12-column grid). */
6847
+ x?: number;
6848
+ /** Grid row. */
6849
+ y?: number;
6850
+ /** Width in grid columns. */
6851
+ width?: number;
6852
+ /** Height in grid rows. */
6853
+ height?: number;
6854
+ }
6855
+
6856
+ /**
6857
+ * This file was auto-generated by Fern from our API Definition.
6858
+ */
6859
+ interface DeleteDashboardPlacementResponse {
6860
+ message: string;
6861
+ }
6862
+
6863
+ /**
6864
+ * This file was auto-generated by Fern from our API Definition.
6865
+ */
6866
+
6867
+ interface DashboardDefinition {
6868
+ widgets: DashboardPlacement[];
6869
+ }
6870
+
6871
+ /**
6872
+ * This file was auto-generated by Fern from our API Definition.
6873
+ */
6874
+
6875
+ interface Dashboard {
6876
+ id: string;
6877
+ createdAt: string;
6878
+ updatedAt: string;
6879
+ name: string;
6880
+ description: string;
6881
+ definition: DashboardDefinition;
6882
+ /** Dashboard-level filters applied to all widgets on the dashboard. */
6883
+ filters: DashboardWidgetFilter[];
6884
+ }
6885
+
6886
+ /**
6887
+ * This file was auto-generated by Fern from our API Definition.
6888
+ */
6889
+
6890
+ interface DashboardList {
6891
+ data: Dashboard[];
6892
+ meta: MetaResponse;
6893
+ }
6894
+
6895
+ /**
6896
+ * This file was auto-generated by Fern from our API Definition.
6897
+ */
6898
+
6899
+ interface CreateDashboardRequest {
6900
+ name: string;
6901
+ description?: string;
6902
+ definition?: DashboardDefinition;
6903
+ filters?: DashboardWidgetFilter[];
6904
+ }
6905
+
6906
+ /**
6907
+ * This file was auto-generated by Fern from our API Definition.
6908
+ */
6909
+
6910
+ interface UpdateDashboardRequest {
6911
+ name?: string;
6912
+ description?: string;
6913
+ definition?: DashboardDefinition;
6914
+ filters?: DashboardWidgetFilter[];
6915
+ }
6916
+
6917
+ /**
6918
+ * This file was auto-generated by Fern from our API Definition.
6919
+ */
6920
+ interface DeleteDashboardResponse {
6921
+ message: string;
6922
+ }
6923
+
6924
+ /**
6925
+ * This file was auto-generated by Fern from our API Definition.
6926
+ */
6927
+ /**
6928
+ * @example
6929
+ * {}
6930
+ */
6931
+ interface ListDashboardsRequest {
6932
+ /** 1-based page number. Defaults to `1`. */
6933
+ page?: number;
6934
+ /** Maximum number of items per page. Defaults to `50`. */
6935
+ limit?: number;
6936
+ }
6937
+
6938
+ declare const index$7_CreateDashboardPlacementRequest: typeof CreateDashboardPlacementRequest;
6939
+ type index$7_CreateDashboardRequest = CreateDashboardRequest;
6940
+ type index$7_CreatePresetPlacement = CreatePresetPlacement;
6941
+ type index$7_CreateWidgetPlacement = CreateWidgetPlacement;
6942
+ type index$7_Dashboard = Dashboard;
6943
+ type index$7_DashboardDefinition = DashboardDefinition;
6944
+ type index$7_DashboardList = DashboardList;
6945
+ declare const index$7_DashboardPlacement: typeof DashboardPlacement;
6946
+ type index$7_DeleteDashboardPlacementResponse = DeleteDashboardPlacementResponse;
6947
+ type index$7_DeleteDashboardResponse = DeleteDashboardResponse;
6948
+ type index$7_ListDashboardsRequest = ListDashboardsRequest;
6949
+ type index$7_PresetPlacement = PresetPlacement;
6950
+ type index$7_UpdateDashboardPlacementRequest = UpdateDashboardPlacementRequest;
6951
+ type index$7_UpdateDashboardRequest = UpdateDashboardRequest;
6952
+ type index$7_WidgetPlacement = WidgetPlacement;
6953
+ declare namespace index$7 {
6954
+ export { index$7_CreateDashboardPlacementRequest as CreateDashboardPlacementRequest, type index$7_CreateDashboardRequest as CreateDashboardRequest, type index$7_CreatePresetPlacement as CreatePresetPlacement, type index$7_CreateWidgetPlacement as CreateWidgetPlacement, type index$7_Dashboard as Dashboard, type index$7_DashboardDefinition as DashboardDefinition, type index$7_DashboardList as DashboardList, index$7_DashboardPlacement as DashboardPlacement, type index$7_DeleteDashboardPlacementResponse as DeleteDashboardPlacementResponse, type index$7_DeleteDashboardResponse as DeleteDashboardResponse, type index$7_ListDashboardsRequest as ListDashboardsRequest, type index$7_PresetPlacement as PresetPlacement, type index$7_UpdateDashboardPlacementRequest as UpdateDashboardPlacementRequest, type index$7_UpdateDashboardRequest as UpdateDashboardRequest, type index$7_WidgetPlacement as WidgetPlacement };
6955
+ }
6956
+
6957
+ /**
6958
+ * This file was auto-generated by Fern from our API Definition.
6959
+ */
6960
+ /**
6961
+ * Machine-readable error code returned by the unstable evaluators API.
6962
+ *
6963
+ * SDKs, CLIs, and agents should branch on `code` rather than parsing the human-readable `message`.
6964
+ * The HTTP status still indicates the broad error class, while `code` gives the specific failure reason.
6140
6965
  */
6141
6966
  type PublicApiErrorCode = "authentication_failed" | "access_denied" | "invalid_request" | "invalid_query" | "invalid_body" | "invalid_filter_value" | "invalid_json_path" | "invalid_variable_mapping" | "missing_variable_mapping" | "duplicate_variable_mapping" | "resource_not_found" | "name_conflict" | "evaluator_preflight_failed" | "conflict" | "unprocessable_content" | "rate_limited" | "method_not_allowed" | "internal_error";
6142
6967
  declare const PublicApiErrorCode: {
@@ -6449,41 +7274,8 @@ declare namespace index$6 {
6449
7274
  * - `enabled` is the desired on/off setting from the client
6450
7275
  * - `status` is the effective runtime state after Langfuse applies validation and blocking rules
6451
7276
  * - `enabled=true` with `status=paused` means the rule should run, but Langfuse has paused it until the underlying problem is fixed
6452
- *
6453
- * @example
6454
- * {
6455
- * id: "erule_123",
6456
- * name: "answer-correctness-live",
6457
- * evaluator: {
6458
- * id: "evaltmpl_123",
6459
- * name: "answer-correctness",
6460
- * scope: LangfuseAPI.unstable.EvaluatorScope.Project,
6461
- * type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
6462
- * },
6463
- * target: LangfuseAPI.unstable.EvaluationRuleTarget.Observation,
6464
- * enabled: true,
6465
- * status: LangfuseAPI.unstable.EvaluationRuleStatus.Active,
6466
- * pausedReason: null,
6467
- * pausedMessage: null,
6468
- * sampling: 1,
6469
- * filter: [{
6470
- * type: "stringOptions",
6471
- * column: "type",
6472
- * operator: LangfuseAPI.unstable.EvaluationRuleOptionsFilterOperator.AnyOf,
6473
- * value: ["GENERATION"]
6474
- * }],
6475
- * mapping: [{
6476
- * variable: "input",
6477
- * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Input
6478
- * }, {
6479
- * variable: "output",
6480
- * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Output
6481
- * }],
6482
- * createdAt: "2026-03-30T09:20:00.000Z",
6483
- * updatedAt: "2026-03-30T09:20:00.000Z"
6484
- * }
6485
7277
  */
6486
- interface EvaluationRule {
7278
+ interface EvaluationRuleBase {
6487
7279
  /** Stable evaluation rule identifier. */
6488
7280
  id: string;
6489
7281
  /** Human-readable deployment name. This is independent from the evaluator name. */
@@ -6496,8 +7288,6 @@ interface EvaluationRule {
6496
7288
  * If you create a newer project version with the same evaluator name later, existing evaluation rules are moved to it automatically.
6497
7289
  */
6498
7290
  evaluator: EvaluationRuleEvaluator;
6499
- /** Target object type that should trigger scoring. */
6500
- target: EvaluationRuleTarget;
6501
7291
  /** Desired enabled state configured by the client. */
6502
7292
  enabled: boolean;
6503
7293
  /** Effective runtime status after Langfuse applies validation and blocking rules. */
@@ -6514,16 +7304,89 @@ interface EvaluationRule {
6514
7304
  * - `0.25` means evaluate approximately 25% of matching targets.
6515
7305
  */
6516
7306
  sampling: number;
6517
- /** List of filter conditions used to decide whether a target should be evaluated. */
6518
- filter: EvaluationRuleFilter[];
6519
- /** Variable mappings used to populate evaluator runtime variables from the live target object. */
6520
- mapping: EvaluationRuleMapping[];
6521
7307
  /** Timestamp when the evaluation rule was created. */
6522
7308
  createdAt: string;
6523
7309
  /** Timestamp when the evaluation rule was last updated. */
6524
7310
  updatedAt: string;
6525
7311
  }
6526
7312
 
7313
+ /**
7314
+ * This file was auto-generated by Fern from our API Definition.
7315
+ */
7316
+
7317
+ /**
7318
+ * @example
7319
+ * {
7320
+ * id: "erule_123",
7321
+ * name: "answer-correctness-live",
7322
+ * evaluator: {
7323
+ * id: "evaltmpl_123",
7324
+ * name: "answer-correctness",
7325
+ * scope: LangfuseAPI.unstable.EvaluatorScope.Project,
7326
+ * type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
7327
+ * },
7328
+ * target: LangfuseAPI.unstable.EvaluationRuleTarget.Observation,
7329
+ * enabled: true,
7330
+ * status: LangfuseAPI.unstable.EvaluationRuleStatus.Active,
7331
+ * pausedReason: null,
7332
+ * pausedMessage: null,
7333
+ * sampling: 1,
7334
+ * filter: [{
7335
+ * type: "stringOptions",
7336
+ * column: "type",
7337
+ * operator: LangfuseAPI.unstable.EvaluationRuleOptionsFilterOperator.AnyOf,
7338
+ * value: ["GENERATION"]
7339
+ * }],
7340
+ * mapping: [{
7341
+ * variable: "input",
7342
+ * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Input
7343
+ * }, {
7344
+ * variable: "output",
7345
+ * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Output
7346
+ * }],
7347
+ * createdAt: "2026-03-30T09:20:00.000Z",
7348
+ * updatedAt: "2026-03-30T09:20:00.000Z"
7349
+ * }
7350
+ */
7351
+ interface EvaluationRule extends EvaluationRuleBase {
7352
+ /** Target object type that should trigger scoring. */
7353
+ target: EvaluationRuleTarget;
7354
+ /** List of filter conditions used to decide whether a target should be evaluated. */
7355
+ filter: EvaluationRuleFilter[];
7356
+ /** Variable mappings used to populate evaluator runtime variables from the live target object. */
7357
+ mapping: EvaluationRuleMapping[];
7358
+ }
7359
+
7360
+ /**
7361
+ * This file was auto-generated by Fern from our API Definition.
7362
+ */
7363
+
7364
+ /**
7365
+ * Legacy trace- or dataset-level evaluation rule returned by list and get for migration.
7366
+ *
7367
+ * This resource is read-only through the unstable public API. Its mapping preserves the trace, dataset item, or named observation that each evaluator variable previously read from. Its filters use the persisted legacy filter format so migration clients can read the configuration without losing information.
7368
+ */
7369
+ interface LegacyEvaluationRule extends EvaluationRuleBase {
7370
+ target: LegacyEvaluationRuleTarget;
7371
+ /** Delay in milliseconds before the legacy evaluation job runs. */
7372
+ delay: number;
7373
+ /** Whether the legacy rule evaluates newly ingested data, existing data, or both. */
7374
+ timeScope: EvaluationRuleTimeScope[];
7375
+ /** Stored filters used by the legacy trace or dataset rule. */
7376
+ filter: EvaluationRuleFilter[];
7377
+ /** Stored variable mappings, including the trace, dataset item, or named observation selected for each variable. */
7378
+ mapping: LegacyEvaluationRuleMapping[];
7379
+ }
7380
+
7381
+ /**
7382
+ * This file was auto-generated by Fern from our API Definition.
7383
+ */
7384
+
7385
+ /**
7386
+ * Evaluation rule returned by list and get, including read-only legacy trace and dataset rules.
7387
+ */
7388
+ type ReadableEvaluationRule = EvaluationRule | LegacyEvaluationRule;
7389
+
6527
7390
  /**
6528
7391
  * This file was auto-generated by Fern from our API Definition.
6529
7392
  */
@@ -6533,7 +7396,7 @@ interface EvaluationRule {
6533
7396
  */
6534
7397
  interface EvaluationRules$1 {
6535
7398
  /** Evaluation rules in the current page. */
6536
- data: EvaluationRule[];
7399
+ data: ReadableEvaluationRule[];
6537
7400
  /** Standard pagination metadata. */
6538
7401
  meta: MetaResponse;
6539
7402
  }
@@ -6738,6 +7601,63 @@ declare const LlmAsJudgeEvaluatorType: {
6738
7601
  readonly LlmAsJudge: "llm_as_judge";
6739
7602
  };
6740
7603
 
7604
+ /**
7605
+ * This file was auto-generated by Fern from our API Definition.
7606
+ */
7607
+ type EvaluationRuleTimeScope = "NEW" | "EXISTING";
7608
+ declare const EvaluationRuleTimeScope: {
7609
+ readonly New: "NEW";
7610
+ readonly Existing: "EXISTING";
7611
+ };
7612
+
7613
+ /**
7614
+ * This file was auto-generated by Fern from our API Definition.
7615
+ */
7616
+ type LegacyEvaluationRuleTarget = "trace" | "dataset";
7617
+ declare const LegacyEvaluationRuleTarget: {
7618
+ readonly Trace: "trace";
7619
+ readonly Dataset: "dataset";
7620
+ };
7621
+
7622
+ /**
7623
+ * This file was auto-generated by Fern from our API Definition.
7624
+ */
7625
+
7626
+ /**
7627
+ * Maps one evaluator variable to a trace, dataset item, or field on a named observation in a legacy rule.
7628
+ */
7629
+ interface LegacyEvaluationRuleMapping {
7630
+ /** Evaluator prompt variable populated by this mapping. */
7631
+ variable: string;
7632
+ /** Trace, dataset item, or observation type from which the value is read. */
7633
+ langfuseObject: LegacyEvaluationObject;
7634
+ /** Observation name to match, or `null` when `langfuseObject` is `trace` or `dataset_item`. */
7635
+ objectName: string | null;
7636
+ /** Stored field selected from the trace, dataset item, or observation. */
7637
+ source: string;
7638
+ /** Optional JSONPath selector applied to the selected field. */
7639
+ jsonPath?: string;
7640
+ }
7641
+
7642
+ /**
7643
+ * This file was auto-generated by Fern from our API Definition.
7644
+ */
7645
+ type LegacyEvaluationObject = "trace" | "span" | "generation" | "event" | "agent" | "tool" | "chain" | "retriever" | "evaluator" | "embedding" | "guardrail" | "dataset_item";
7646
+ declare const LegacyEvaluationObject: {
7647
+ readonly Trace: "trace";
7648
+ readonly Span: "span";
7649
+ readonly Generation: "generation";
7650
+ readonly Event: "event";
7651
+ readonly Agent: "agent";
7652
+ readonly Tool: "tool";
7653
+ readonly Chain: "chain";
7654
+ readonly Retriever: "retriever";
7655
+ readonly Evaluator: "evaluator";
7656
+ readonly Embedding: "embedding";
7657
+ readonly Guardrail: "guardrail";
7658
+ readonly DatasetItem: "dataset_item";
7659
+ };
7660
+
6741
7661
  /**
6742
7662
  * This file was auto-generated by Fern from our API Definition.
6743
7663
  */
@@ -6779,14 +7699,21 @@ type index$5_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
6779
7699
  type index$5_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
6780
7700
  type index$5_DeleteEvaluationRuleResponse = DeleteEvaluationRuleResponse;
6781
7701
  type index$5_EvaluationRule = EvaluationRule;
7702
+ type index$5_EvaluationRuleBase = EvaluationRuleBase;
6782
7703
  type index$5_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
6783
7704
  type index$5_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
7705
+ declare const index$5_EvaluationRuleTimeScope: typeof EvaluationRuleTimeScope;
7706
+ declare const index$5_LegacyEvaluationObject: typeof LegacyEvaluationObject;
7707
+ type index$5_LegacyEvaluationRule = LegacyEvaluationRule;
7708
+ type index$5_LegacyEvaluationRuleMapping = LegacyEvaluationRuleMapping;
7709
+ declare const index$5_LegacyEvaluationRuleTarget: typeof LegacyEvaluationRuleTarget;
6784
7710
  type index$5_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
6785
7711
  type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference = LlmAsJudgeEvaluationRuleEvaluatorReference;
6786
7712
  declare const index$5_LlmAsJudgeEvaluatorType: typeof LlmAsJudgeEvaluatorType;
7713
+ type index$5_ReadableEvaluationRule = ReadableEvaluationRule;
6787
7714
  type index$5_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
6788
7715
  declare namespace index$5 {
6789
- export { type index$5_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$5_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$5_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, type index$5_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$5_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$5_EvaluationRule as EvaluationRule, type index$5_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$5_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, type EvaluationRules$1 as EvaluationRules, type index$5_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, index$5_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, type index$5_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest };
7716
+ export { type index$5_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$5_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$5_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, type index$5_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$5_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$5_EvaluationRule as EvaluationRule, type index$5_EvaluationRuleBase as EvaluationRuleBase, type index$5_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$5_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, index$5_EvaluationRuleTimeScope as EvaluationRuleTimeScope, type EvaluationRules$1 as EvaluationRules, index$5_LegacyEvaluationObject as LegacyEvaluationObject, type index$5_LegacyEvaluationRule as LegacyEvaluationRule, type index$5_LegacyEvaluationRuleMapping as LegacyEvaluationRuleMapping, index$5_LegacyEvaluationRuleTarget as LegacyEvaluationRuleTarget, type index$5_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, index$5_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, type index$5_ReadableEvaluationRule as ReadableEvaluationRule, type index$5_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest };
6790
7717
  }
6791
7718
 
6792
7719
  /**
@@ -6990,15 +7917,41 @@ type index$3_ConflictError = ConflictError;
6990
7917
  declare const index$3_ConflictError: typeof ConflictError;
6991
7918
  type index$3_CreateCodeEvaluationRuleRequest = CreateCodeEvaluationRuleRequest;
6992
7919
  type index$3_CreateCodeEvaluatorRequest = CreateCodeEvaluatorRequest;
7920
+ declare const index$3_CreateDashboardPlacementRequest: typeof CreateDashboardPlacementRequest;
7921
+ type index$3_CreateDashboardRequest = CreateDashboardRequest;
7922
+ type index$3_CreateDashboardWidgetRequest = CreateDashboardWidgetRequest;
6993
7923
  type index$3_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
6994
7924
  declare const index$3_CreateEvaluatorRequest: typeof CreateEvaluatorRequest;
6995
7925
  type index$3_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
6996
7926
  type index$3_CreateLlmAsJudgeEvaluatorRequest = CreateLlmAsJudgeEvaluatorRequest;
7927
+ type index$3_CreatePresetPlacement = CreatePresetPlacement;
7928
+ type index$3_CreateWidgetPlacement = CreateWidgetPlacement;
7929
+ type index$3_Dashboard = Dashboard;
7930
+ type index$3_DashboardDefinition = DashboardDefinition;
7931
+ type index$3_DashboardList = DashboardList;
7932
+ declare const index$3_DashboardPlacement: typeof DashboardPlacement;
7933
+ type index$3_DashboardWidget = DashboardWidget;
7934
+ type index$3_DashboardWidgetChartConfig = DashboardWidgetChartConfig;
7935
+ type index$3_DashboardWidgetChartConfigInput = DashboardWidgetChartConfigInput;
7936
+ declare const index$3_DashboardWidgetChartType: typeof DashboardWidgetChartType;
7937
+ type index$3_DashboardWidgetDefaultSort = DashboardWidgetDefaultSort;
7938
+ type index$3_DashboardWidgetDimension = DashboardWidgetDimension;
7939
+ type index$3_DashboardWidgetFilter = DashboardWidgetFilter;
7940
+ type index$3_DashboardWidgetList = DashboardWidgetList;
7941
+ type index$3_DashboardWidgetMetric = DashboardWidgetMetric;
7942
+ declare const index$3_DashboardWidgetMetricAggregation: typeof DashboardWidgetMetricAggregation;
7943
+ declare const index$3_DashboardWidgetSortOrder: typeof DashboardWidgetSortOrder;
7944
+ declare const index$3_DashboardWidgetView: typeof DashboardWidgetView;
7945
+ declare const index$3_DashboardWidgetViewWithLegacy: typeof DashboardWidgetViewWithLegacy;
6997
7946
  type index$3_DateTimeEvaluationRuleFilter = DateTimeEvaluationRuleFilter;
7947
+ type index$3_DeleteDashboardPlacementResponse = DeleteDashboardPlacementResponse;
7948
+ type index$3_DeleteDashboardResponse = DeleteDashboardResponse;
7949
+ type index$3_DeleteDashboardWidgetResponse = DeleteDashboardWidgetResponse;
6998
7950
  type index$3_DeleteEvaluationRuleResponse = DeleteEvaluationRuleResponse;
6999
7951
  type index$3_DeleteEvaluatorResponse = DeleteEvaluatorResponse;
7000
7952
  type index$3_EvaluationRule = EvaluationRule;
7001
7953
  declare const index$3_EvaluationRuleArrayOptionsFilterOperator: typeof EvaluationRuleArrayOptionsFilterOperator;
7954
+ type index$3_EvaluationRuleBase = EvaluationRuleBase;
7002
7955
  declare const index$3_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
7003
7956
  type index$3_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
7004
7957
  type index$3_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
@@ -7011,6 +7964,7 @@ declare const index$3_EvaluationRuleOptionsFilterOperator: typeof EvaluationRule
7011
7964
  declare const index$3_EvaluationRuleStatus: typeof EvaluationRuleStatus;
7012
7965
  declare const index$3_EvaluationRuleStringFilterOperator: typeof EvaluationRuleStringFilterOperator;
7013
7966
  declare const index$3_EvaluationRuleTarget: typeof EvaluationRuleTarget;
7967
+ declare const index$3_EvaluationRuleTimeScope: typeof EvaluationRuleTimeScope;
7014
7968
  declare const index$3_Evaluator: typeof Evaluator;
7015
7969
  type index$3_EvaluatorBase = EvaluatorBase;
7016
7970
  type index$3_EvaluatorModelConfig = EvaluatorModelConfig;
@@ -7021,6 +7975,12 @@ declare const index$3_EvaluatorScope: typeof EvaluatorScope;
7021
7975
  declare const index$3_EvaluatorType: typeof EvaluatorType;
7022
7976
  type index$3_InternalServerError = InternalServerError;
7023
7977
  declare const index$3_InternalServerError: typeof InternalServerError;
7978
+ declare const index$3_LegacyEvaluationObject: typeof LegacyEvaluationObject;
7979
+ type index$3_LegacyEvaluationRule = LegacyEvaluationRule;
7980
+ type index$3_LegacyEvaluationRuleMapping = LegacyEvaluationRuleMapping;
7981
+ declare const index$3_LegacyEvaluationRuleTarget: typeof LegacyEvaluationRuleTarget;
7982
+ type index$3_ListDashboardWidgetsRequest = ListDashboardWidgetsRequest;
7983
+ type index$3_ListDashboardsRequest = ListDashboardsRequest;
7024
7984
  type index$3_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
7025
7985
  type index$3_ListEvaluatorsRequest = ListEvaluatorsRequest;
7026
7986
  type index$3_LlmAsJudgeEvaluationRuleEvaluatorReference = LlmAsJudgeEvaluationRuleEvaluatorReference;
@@ -7033,6 +7993,7 @@ declare const index$3_NotFoundError: typeof NotFoundError;
7033
7993
  type index$3_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
7034
7994
  type index$3_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
7035
7995
  type index$3_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
7996
+ type index$3_PresetPlacement = PresetPlacement;
7036
7997
  type index$3_PublicApiError = PublicApiError;
7037
7998
  declare const index$3_PublicApiErrorCode: typeof PublicApiErrorCode;
7038
7999
  type index$3_PublicApiErrorDetails = PublicApiErrorDetails;
@@ -7042,6 +8003,7 @@ type index$3_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvalu
7042
8003
  type index$3_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
7043
8004
  declare const index$3_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
7044
8005
  type index$3_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
8006
+ type index$3_ReadableEvaluationRule = ReadableEvaluationRule;
7045
8007
  type index$3_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
7046
8008
  type index$3_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
7047
8009
  type index$3_StringOptionsEvaluationRuleFilter = StringOptionsEvaluationRuleFilter;
@@ -7051,9 +8013,13 @@ type index$3_UnauthorizedError = UnauthorizedError;
7051
8013
  declare const index$3_UnauthorizedError: typeof UnauthorizedError;
7052
8014
  type index$3_UnprocessableContentError = UnprocessableContentError;
7053
8015
  declare const index$3_UnprocessableContentError: typeof UnprocessableContentError;
8016
+ type index$3_UpdateDashboardPlacementRequest = UpdateDashboardPlacementRequest;
8017
+ type index$3_UpdateDashboardRequest = UpdateDashboardRequest;
8018
+ type index$3_UpdateDashboardWidgetRequest = UpdateDashboardWidgetRequest;
7054
8019
  type index$3_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
8020
+ type index$3_WidgetPlacement = WidgetPlacement;
7055
8021
  declare namespace index$3 {
7056
- export { index$3_AccessDeniedError as AccessDeniedError, type index$3_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, index$3_BadRequestError as BadRequestError, type index$3_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$3_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, type index$3_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$3_CodeEvaluator as CodeEvaluator, index$3_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, index$3_ConflictError as ConflictError, type index$3_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$3_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, type index$3_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, index$3_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$3_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$3_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, type index$3_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, type index$3_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$3_DeleteEvaluatorResponse as DeleteEvaluatorResponse, type index$3_EvaluationRule as EvaluationRule, index$3_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, index$3_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, type index$3_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$3_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, index$3_EvaluationRuleFilter as EvaluationRuleFilter, type index$3_EvaluationRuleMapping as EvaluationRuleMapping, index$3_EvaluationRuleMappingSource as EvaluationRuleMappingSource, index$3_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$3_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$3_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$3_EvaluationRuleStatus as EvaluationRuleStatus, index$3_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$3_EvaluationRuleTarget as EvaluationRuleTarget, type EvaluationRules$1 as EvaluationRules, index$3_Evaluator as Evaluator, type index$3_EvaluatorBase as EvaluatorBase, type index$3_EvaluatorModelConfig as EvaluatorModelConfig, index$3_EvaluatorOutputDataType as EvaluatorOutputDataType, index$3_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$3_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$3_EvaluatorScope as EvaluatorScope, index$3_EvaluatorType as EvaluatorType, type Evaluators$1 as Evaluators, index$3_InternalServerError as InternalServerError, type index$3_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$3_ListEvaluatorsRequest as ListEvaluatorsRequest, type index$3_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, type index$3_LlmAsJudgeEvaluator as LlmAsJudgeEvaluator, index$3_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, index$3_MethodNotAllowedError as MethodNotAllowedError, index$3_NotFoundError as NotFoundError, type index$3_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$3_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$3_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$3_PublicApiError as PublicApiError, index$3_PublicApiErrorCode as PublicApiErrorCode, type index$3_PublicApiErrorDetails as PublicApiErrorDetails, type index$3_PublicApiValidationIssue as PublicApiValidationIssue, type index$3_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$3_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$3_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$3_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$3_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$3_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter, index$3_TooManyRequestsError as TooManyRequestsError, index$3_UnauthorizedError as UnauthorizedError, index$3_UnprocessableContentError as UnprocessableContentError, type index$3_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest, index$7 as commons, index$6 as errors, index$5 as evaluationRules, index$4 as evaluators };
8022
+ export { index$3_AccessDeniedError as AccessDeniedError, type index$3_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, index$3_BadRequestError as BadRequestError, type index$3_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$3_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, type index$3_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$3_CodeEvaluator as CodeEvaluator, index$3_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, index$3_ConflictError as ConflictError, type index$3_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$3_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, index$3_CreateDashboardPlacementRequest as CreateDashboardPlacementRequest, type index$3_CreateDashboardRequest as CreateDashboardRequest, type index$3_CreateDashboardWidgetRequest as CreateDashboardWidgetRequest, type index$3_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, index$3_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$3_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$3_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, type index$3_CreatePresetPlacement as CreatePresetPlacement, type index$3_CreateWidgetPlacement as CreateWidgetPlacement, type index$3_Dashboard as Dashboard, type index$3_DashboardDefinition as DashboardDefinition, type index$3_DashboardList as DashboardList, index$3_DashboardPlacement as DashboardPlacement, type index$3_DashboardWidget as DashboardWidget, type index$3_DashboardWidgetChartConfig as DashboardWidgetChartConfig, type index$3_DashboardWidgetChartConfigInput as DashboardWidgetChartConfigInput, index$3_DashboardWidgetChartType as DashboardWidgetChartType, type index$3_DashboardWidgetDefaultSort as DashboardWidgetDefaultSort, type index$3_DashboardWidgetDimension as DashboardWidgetDimension, type index$3_DashboardWidgetFilter as DashboardWidgetFilter, type index$3_DashboardWidgetList as DashboardWidgetList, type index$3_DashboardWidgetMetric as DashboardWidgetMetric, index$3_DashboardWidgetMetricAggregation as DashboardWidgetMetricAggregation, index$3_DashboardWidgetSortOrder as DashboardWidgetSortOrder, index$3_DashboardWidgetView as DashboardWidgetView, index$3_DashboardWidgetViewWithLegacy as DashboardWidgetViewWithLegacy, type index$3_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, type index$3_DeleteDashboardPlacementResponse as DeleteDashboardPlacementResponse, type index$3_DeleteDashboardResponse as DeleteDashboardResponse, type index$3_DeleteDashboardWidgetResponse as DeleteDashboardWidgetResponse, type index$3_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$3_DeleteEvaluatorResponse as DeleteEvaluatorResponse, type index$3_EvaluationRule as EvaluationRule, index$3_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, type index$3_EvaluationRuleBase as EvaluationRuleBase, index$3_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, type index$3_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$3_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, index$3_EvaluationRuleFilter as EvaluationRuleFilter, type index$3_EvaluationRuleMapping as EvaluationRuleMapping, index$3_EvaluationRuleMappingSource as EvaluationRuleMappingSource, index$3_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$3_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$3_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$3_EvaluationRuleStatus as EvaluationRuleStatus, index$3_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$3_EvaluationRuleTarget as EvaluationRuleTarget, index$3_EvaluationRuleTimeScope as EvaluationRuleTimeScope, type EvaluationRules$1 as EvaluationRules, index$3_Evaluator as Evaluator, type index$3_EvaluatorBase as EvaluatorBase, type index$3_EvaluatorModelConfig as EvaluatorModelConfig, index$3_EvaluatorOutputDataType as EvaluatorOutputDataType, index$3_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$3_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$3_EvaluatorScope as EvaluatorScope, index$3_EvaluatorType as EvaluatorType, type Evaluators$1 as Evaluators, index$3_InternalServerError as InternalServerError, index$3_LegacyEvaluationObject as LegacyEvaluationObject, type index$3_LegacyEvaluationRule as LegacyEvaluationRule, type index$3_LegacyEvaluationRuleMapping as LegacyEvaluationRuleMapping, index$3_LegacyEvaluationRuleTarget as LegacyEvaluationRuleTarget, type index$3_ListDashboardWidgetsRequest as ListDashboardWidgetsRequest, type index$3_ListDashboardsRequest as ListDashboardsRequest, type index$3_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$3_ListEvaluatorsRequest as ListEvaluatorsRequest, type index$3_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, type index$3_LlmAsJudgeEvaluator as LlmAsJudgeEvaluator, index$3_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, index$3_MethodNotAllowedError as MethodNotAllowedError, index$3_NotFoundError as NotFoundError, type index$3_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$3_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$3_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$3_PresetPlacement as PresetPlacement, type index$3_PublicApiError as PublicApiError, index$3_PublicApiErrorCode as PublicApiErrorCode, type index$3_PublicApiErrorDetails as PublicApiErrorDetails, type index$3_PublicApiValidationIssue as PublicApiValidationIssue, type index$3_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$3_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$3_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$3_ReadableEvaluationRule as ReadableEvaluationRule, type index$3_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$3_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$3_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter, index$3_TooManyRequestsError as TooManyRequestsError, index$3_UnauthorizedError as UnauthorizedError, index$3_UnprocessableContentError as UnprocessableContentError, type index$3_UpdateDashboardPlacementRequest as UpdateDashboardPlacementRequest, type index$3_UpdateDashboardRequest as UpdateDashboardRequest, type index$3_UpdateDashboardWidgetRequest as UpdateDashboardWidgetRequest, type index$3_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest, type index$3_WidgetPlacement as WidgetPlacement, index$9 as commons, index$8 as dashboardWidgets, index$7 as dashboards, index$6 as errors, index$5 as evaluationRules, index$4 as evaluators };
7057
8023
  }
7058
8024
 
7059
8025
  /**
@@ -7938,6 +8904,162 @@ declare class Datasets {
7938
8904
  protected _getAuthorizationHeader(): Promise<string | undefined>;
7939
8905
  }
7940
8906
 
8907
+ /**
8908
+ * This file was auto-generated by Fern from our API Definition.
8909
+ */
8910
+
8911
+ declare namespace Experiments {
8912
+ interface Options {
8913
+ environment: Supplier<string>;
8914
+ /** Specify a custom URL to connect the client to. */
8915
+ baseUrl?: Supplier<string>;
8916
+ username?: Supplier<string | undefined>;
8917
+ password?: Supplier<string | undefined>;
8918
+ /** Override the X-Langfuse-Sdk-Name header */
8919
+ xLangfuseSdkName?: Supplier<string | undefined>;
8920
+ /** Override the X-Langfuse-Sdk-Version header */
8921
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
8922
+ /** Override the X-Langfuse-Public-Key header */
8923
+ xLangfusePublicKey?: Supplier<string | undefined>;
8924
+ /** Additional headers to include in requests. */
8925
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
8926
+ }
8927
+ interface RequestOptions {
8928
+ /** The maximum time to wait for a response in seconds. */
8929
+ timeoutInSeconds?: number;
8930
+ /** The number of times to retry the request. Defaults to 2. */
8931
+ maxRetries?: number;
8932
+ /** A hook to abort the request. */
8933
+ abortSignal?: AbortSignal;
8934
+ /** Override the X-Langfuse-Sdk-Name header */
8935
+ xLangfuseSdkName?: string | undefined;
8936
+ /** Override the X-Langfuse-Sdk-Version header */
8937
+ xLangfuseSdkVersion?: string | undefined;
8938
+ /** Override the X-Langfuse-Public-Key header */
8939
+ xLangfusePublicKey?: string | undefined;
8940
+ /** Additional query string parameters to include in the request. */
8941
+ queryParams?: Record<string, unknown>;
8942
+ /** Additional headers to include in the request. */
8943
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
8944
+ }
8945
+ }
8946
+ declare class Experiments {
8947
+ protected readonly _options: Experiments.Options;
8948
+ constructor(_options: Experiments.Options);
8949
+ /**
8950
+ * List experiments with cursor-based pagination. Results are ordered by
8951
+ * latest experiment activity descending.
8952
+ *
8953
+ * @param {LangfuseAPI.ListExperimentsRequest} request
8954
+ * @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
8955
+ *
8956
+ * @throws {@link LangfuseAPI.Error}
8957
+ * @throws {@link LangfuseAPI.UnauthorizedError}
8958
+ * @throws {@link LangfuseAPI.AccessDeniedError}
8959
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
8960
+ * @throws {@link LangfuseAPI.NotFoundError}
8961
+ *
8962
+ * @example
8963
+ * await client.experiments.list({
8964
+ * fromStartTime: "2024-01-15T09:30:00Z"
8965
+ * })
8966
+ */
8967
+ list(request: ListExperimentsRequest, requestOptions?: Experiments.RequestOptions): HttpResponsePromise<ExperimentsResponse>;
8968
+ private __list;
8969
+ /**
8970
+ * List experiment items with cursor-based pagination. Use this endpoint
8971
+ * to export experiment item inputs, outputs, expected outputs, metadata,
8972
+ * and optionally item/trace scores. Results are ordered by time
8973
+ * descending.
8974
+ *
8975
+ * @param {LangfuseAPI.ListExperimentItemsRequest} request
8976
+ * @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
8977
+ *
8978
+ * @throws {@link LangfuseAPI.Error}
8979
+ * @throws {@link LangfuseAPI.UnauthorizedError}
8980
+ * @throws {@link LangfuseAPI.AccessDeniedError}
8981
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
8982
+ * @throws {@link LangfuseAPI.NotFoundError}
8983
+ *
8984
+ * @example
8985
+ * await client.experiments.listItems({
8986
+ * fromStartTime: "2024-01-15T09:30:00Z"
8987
+ * })
8988
+ */
8989
+ listItems(request: ListExperimentItemsRequest, requestOptions?: Experiments.RequestOptions): HttpResponsePromise<ExperimentItemsResponse>;
8990
+ private __listItems;
8991
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
8992
+ }
8993
+
8994
+ /**
8995
+ * This file was auto-generated by Fern from our API Definition.
8996
+ */
8997
+
8998
+ declare namespace Feedback {
8999
+ interface Options {
9000
+ environment: Supplier<string>;
9001
+ /** Specify a custom URL to connect the client to. */
9002
+ baseUrl?: Supplier<string>;
9003
+ username?: Supplier<string | undefined>;
9004
+ password?: Supplier<string | undefined>;
9005
+ /** Override the X-Langfuse-Sdk-Name header */
9006
+ xLangfuseSdkName?: Supplier<string | undefined>;
9007
+ /** Override the X-Langfuse-Sdk-Version header */
9008
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
9009
+ /** Override the X-Langfuse-Public-Key header */
9010
+ xLangfusePublicKey?: Supplier<string | undefined>;
9011
+ /** Additional headers to include in requests. */
9012
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
9013
+ }
9014
+ interface RequestOptions {
9015
+ /** The maximum time to wait for a response in seconds. */
9016
+ timeoutInSeconds?: number;
9017
+ /** The number of times to retry the request. Defaults to 2. */
9018
+ maxRetries?: number;
9019
+ /** A hook to abort the request. */
9020
+ abortSignal?: AbortSignal;
9021
+ /** Override the X-Langfuse-Sdk-Name header */
9022
+ xLangfuseSdkName?: string | undefined;
9023
+ /** Override the X-Langfuse-Sdk-Version header */
9024
+ xLangfuseSdkVersion?: string | undefined;
9025
+ /** Override the X-Langfuse-Public-Key header */
9026
+ xLangfusePublicKey?: string | undefined;
9027
+ /** Additional query string parameters to include in the request. */
9028
+ queryParams?: Record<string, unknown>;
9029
+ /** Additional headers to include in the request. */
9030
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
9031
+ }
9032
+ }
9033
+ declare class Feedback {
9034
+ protected readonly _options: Feedback.Options;
9035
+ constructor(_options: Feedback.Options);
9036
+ /**
9037
+ * Submit explicit user-approved feedback about Langfuse skills, MCP tools, CLI, docs, or public API. Do not include secrets, credentials, customer data, trace payloads, or unrelated use-case details.
9038
+ *
9039
+ * @param {LangfuseAPI.SubmitFeedbackRequest} request
9040
+ * @param {Feedback.RequestOptions} requestOptions - Request-specific configuration.
9041
+ *
9042
+ * @throws {@link LangfuseAPI.FeedbackNotConfiguredError}
9043
+ * @throws {@link LangfuseAPI.Error}
9044
+ * @throws {@link LangfuseAPI.UnauthorizedError}
9045
+ * @throws {@link LangfuseAPI.AccessDeniedError}
9046
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
9047
+ * @throws {@link LangfuseAPI.NotFoundError}
9048
+ *
9049
+ * @example
9050
+ * await client.feedback.submit({
9051
+ * targetType: "skill",
9052
+ * target: "target",
9053
+ * feedback: "feedback",
9054
+ * goal: undefined,
9055
+ * referenceUrl: undefined
9056
+ * })
9057
+ */
9058
+ submit(request: SubmitFeedbackRequest, requestOptions?: Feedback.RequestOptions): HttpResponsePromise<SubmitFeedbackResponse>;
9059
+ private __submit;
9060
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
9061
+ }
9062
+
7941
9063
  /**
7942
9064
  * This file was auto-generated by Fern from our API Definition.
7943
9065
  */
@@ -8253,7 +9375,7 @@ declare class ObservationsV1 {
8253
9375
  * @example
8254
9376
  * await client.legacy.observationsV1.get("observationId")
8255
9377
  */
8256
- get(observationId: string, requestOptions?: ObservationsV1.RequestOptions): HttpResponsePromise<ObservationsView>;
9378
+ get(observationId: string, requestOptions?: ObservationsV1.RequestOptions): HttpResponsePromise<ObservationsViewSingle>;
8257
9379
  private __get;
8258
9380
  /**
8259
9381
  * Get a list of observations.
@@ -8322,39 +9444,14 @@ declare class ScoreV1 {
8322
9444
  /**
8323
9445
  * Create a score (supports both trace and session scores)
8324
9446
  *
8325
- * @param {LangfuseAPI.legacy.CreateScoreRequest} request
8326
- * @param {ScoreV1.RequestOptions} requestOptions - Request-specific configuration.
8327
- *
8328
- * @throws {@link LangfuseAPI.Error}
8329
- * @throws {@link LangfuseAPI.UnauthorizedError}
8330
- * @throws {@link LangfuseAPI.AccessDeniedError}
8331
- * @throws {@link LangfuseAPI.MethodNotAllowedError}
8332
- * @throws {@link LangfuseAPI.NotFoundError}
8333
- *
8334
- * @example
8335
- * await client.legacy.scoreV1.create({
8336
- * id: undefined,
8337
- * traceId: undefined,
8338
- * sessionId: undefined,
8339
- * observationId: undefined,
8340
- * datasetRunId: undefined,
8341
- * name: "name",
8342
- * value: 1.1,
8343
- * comment: undefined,
8344
- * metadata: undefined,
8345
- * environment: undefined,
8346
- * queueId: undefined,
8347
- * dataType: undefined,
8348
- * configId: undefined,
8349
- * source: undefined
8350
- * })
8351
- */
8352
- create(request: CreateScoreRequest, requestOptions?: ScoreV1.RequestOptions): HttpResponsePromise<CreateScoreResponse>;
8353
- private __create;
8354
- /**
8355
- * Delete a score (supports both trace and session scores)
8356
- *
8357
- * @param {string} scoreId - The unique langfuse identifier of a score
9447
+ * @deprecated Use `client.scores.create()` instead.
9448
+ * Compatibility alias managed by scripts/patch-generated-score-create-alias.mjs
9449
+ */
9450
+ create(request: CreateScoreRequest, requestOptions?: ScoreV1.RequestOptions): HttpResponsePromise<CreateScoreResponse>;
9451
+ /**
9452
+ * Delete a score (supports both trace and session scores)
9453
+ *
9454
+ * @param {string} scoreId - The unique langfuse identifier of a score
8358
9455
  * @param {ScoreV1.RequestOptions} requestOptions - Request-specific configuration.
8359
9456
  *
8360
9457
  * @throws {@link LangfuseAPI.Error}
@@ -8665,8 +9762,9 @@ declare class Metrics {
8665
9762
  * Get metrics from the Langfuse project using a query object. V2 endpoint with optimized performance.
8666
9763
  *
8667
9764
  * ## V2 Differences
8668
- * - Supports `observations`, `scores-numeric`, and `scores-categorical` views only (traces view not supported)
9765
+ * - Supports `observations`, `scores-numeric`, `scores-boolean`, and `scores-categorical` views only (traces view not supported)
8669
9766
  * - Direct access to tags and release fields on observations
9767
+ * - Semantic-root filtering and grouping through the v2-only `isRootObservation` dimension
8670
9768
  * - Backwards-compatible: traceName, traceRelease, traceVersion dimensions are still available on observations view
8671
9769
  * - High cardinality dimensions are not supported and will return a 400 error (see below)
8672
9770
  *
@@ -8691,6 +9789,7 @@ declare class Metrics {
8691
9789
  * - `providedModelName` - Name of the model used
8692
9790
  * - `promptName` - Name of the prompt used
8693
9791
  * - `promptVersion` - Version of the prompt used
9792
+ * - `isRootObservation` - Boolean semantic-root status. `true` includes physical roots and app roots whose SDK parent is external (so `parentObservationId` may be non-null).
8694
9793
  * - `startTimeMonth` - Month of start_time in YYYY-MM format
8695
9794
  *
8696
9795
  * **Measures:**
@@ -8733,6 +9832,16 @@ declare class Metrics {
8733
9832
  * - `count` - Total number of scores
8734
9833
  * - `value` - Score value (for aggregations)
8735
9834
  *
9835
+ * ### scores-boolean
9836
+ * Query boolean score data. It has the same score and parent trace/observation dimensions as scores-numeric, plus:
9837
+ *
9838
+ * **Dimensions:**
9839
+ * - `booleanValue` - Boolean value for true/false grouping and filtering
9840
+ *
9841
+ * **Measures:**
9842
+ * - `count` - Total number of boolean scores
9843
+ * - `value` - Numeric 0/1 score value; `avg` returns the true-rate
9844
+ *
8736
9845
  * ### scores-categorical
8737
9846
  * Query categorical score data. Same dimensions as scores-numeric except uses `stringValue` instead of `value`.
8738
9847
  *
@@ -8750,7 +9859,7 @@ declare class Metrics {
8750
9859
  * - `sessionId` - Use sessionId filter instead
8751
9860
  * - `parentObservationId` - Use parentObservationId filter instead
8752
9861
  *
8753
- * **scores-numeric / scores-categorical views:**
9862
+ * **scores-numeric / scores-boolean / scores-categorical views:**
8754
9863
  * - `id` - Use specific filters to narrow down results
8755
9864
  * - `traceId` - Use traceId filter instead
8756
9865
  * - `userId` - Use userId filter instead
@@ -8960,7 +10069,7 @@ declare class Observations {
8960
10069
  * ## Field Selection
8961
10070
  * Use the `fields` parameter to control which observation fields are returned:
8962
10071
  * - `core` - Always included: id, traceId, startTime, endTime, projectId, parentObservationId, type
8963
- * - `basic` - name, level, statusMessage, version, environment, bookmarked, public, userId, sessionId
10072
+ * - `basic` - name, level, statusMessage, version, environment, bookmarked, public, userId, sessionId, isRootObservation
8964
10073
  * - `time` - completionStartTime, createdAt, updatedAt
8965
10074
  * - `io` - input, output
8966
10075
  * - `metadata` - metadata (truncated to 200 chars by default, use `expandMetadata` to get full values)
@@ -10043,10 +11152,548 @@ declare class ScoresV3 {
10043
11152
  * @throws {@link LangfuseAPI.NotFoundError}
10044
11153
  *
10045
11154
  * @example
10046
- * await client.scoresV3.getManyV3()
11155
+ * await client.scoresV3.getManyV3()
11156
+ */
11157
+ getManyV3(request?: GetScoresV3Request, requestOptions?: ScoresV3.RequestOptions): HttpResponsePromise<GetScoresV3Response>;
11158
+ private __getManyV3;
11159
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
11160
+ }
11161
+
11162
+ /**
11163
+ * This file was auto-generated by Fern from our API Definition.
11164
+ */
11165
+
11166
+ declare namespace Scores {
11167
+ interface Options {
11168
+ environment: Supplier<string>;
11169
+ /** Specify a custom URL to connect the client to. */
11170
+ baseUrl?: Supplier<string>;
11171
+ username?: Supplier<string | undefined>;
11172
+ password?: Supplier<string | undefined>;
11173
+ /** Override the X-Langfuse-Sdk-Name header */
11174
+ xLangfuseSdkName?: Supplier<string | undefined>;
11175
+ /** Override the X-Langfuse-Sdk-Version header */
11176
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
11177
+ /** Override the X-Langfuse-Public-Key header */
11178
+ xLangfusePublicKey?: Supplier<string | undefined>;
11179
+ /** Additional headers to include in requests. */
11180
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11181
+ }
11182
+ interface RequestOptions {
11183
+ /** The maximum time to wait for a response in seconds. */
11184
+ timeoutInSeconds?: number;
11185
+ /** The number of times to retry the request. Defaults to 2. */
11186
+ maxRetries?: number;
11187
+ /** A hook to abort the request. */
11188
+ abortSignal?: AbortSignal;
11189
+ /** Override the X-Langfuse-Sdk-Name header */
11190
+ xLangfuseSdkName?: string | undefined;
11191
+ /** Override the X-Langfuse-Sdk-Version header */
11192
+ xLangfuseSdkVersion?: string | undefined;
11193
+ /** Override the X-Langfuse-Public-Key header */
11194
+ xLangfusePublicKey?: string | undefined;
11195
+ /** Additional query string parameters to include in the request. */
11196
+ queryParams?: Record<string, unknown>;
11197
+ /** Additional headers to include in the request. */
11198
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11199
+ }
11200
+ }
11201
+ declare class Scores {
11202
+ protected readonly _options: Scores.Options;
11203
+ constructor(_options: Scores.Options);
11204
+ /**
11205
+ * Create a score (supports trace, observation, session, and dataset run scores)
11206
+ *
11207
+ * @param {LangfuseAPI.CreateScoreRequest} request
11208
+ * @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
11209
+ *
11210
+ * @throws {@link LangfuseAPI.Error}
11211
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11212
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11213
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11214
+ * @throws {@link LangfuseAPI.NotFoundError}
11215
+ *
11216
+ * @example
11217
+ * await client.scores.create({
11218
+ * id: undefined,
11219
+ * traceId: undefined,
11220
+ * sessionId: undefined,
11221
+ * observationId: undefined,
11222
+ * datasetRunId: undefined,
11223
+ * name: "name",
11224
+ * value: 1.1,
11225
+ * comment: undefined,
11226
+ * metadata: undefined,
11227
+ * environment: undefined,
11228
+ * queueId: undefined,
11229
+ * dataType: undefined,
11230
+ * configId: undefined,
11231
+ * source: undefined
11232
+ * })
11233
+ */
11234
+ create(request: CreateScoreRequest, requestOptions?: Scores.RequestOptions): HttpResponsePromise<CreateScoreResponse>;
11235
+ private __create;
11236
+ /**
11237
+ * Get a list of scores (supports both trace and session scores)
11238
+ *
11239
+ * @param {LangfuseAPI.GetScoresRequest} request
11240
+ * @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
11241
+ *
11242
+ * @throws {@link LangfuseAPI.Error}
11243
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11244
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11245
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11246
+ * @throws {@link LangfuseAPI.NotFoundError}
11247
+ *
11248
+ * @example
11249
+ * await client.scores.getMany()
11250
+ */
11251
+ getMany(request?: GetScoresRequest, requestOptions?: Scores.RequestOptions): HttpResponsePromise<GetScoresResponse>;
11252
+ private __getMany;
11253
+ /**
11254
+ * Get a score (supports both trace and session scores)
11255
+ *
11256
+ * @param {string} scoreId - The unique langfuse identifier of a score
11257
+ * @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
11258
+ *
11259
+ * @throws {@link LangfuseAPI.Error}
11260
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11261
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11262
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11263
+ * @throws {@link LangfuseAPI.NotFoundError}
11264
+ *
11265
+ * @example
11266
+ * await client.scores.getById("scoreId")
11267
+ */
11268
+ getById(scoreId: string, requestOptions?: Scores.RequestOptions): HttpResponsePromise<Score>;
11269
+ private __getById;
11270
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
11271
+ }
11272
+
11273
+ /**
11274
+ * This file was auto-generated by Fern from our API Definition.
11275
+ */
11276
+
11277
+ declare namespace Sessions {
11278
+ interface Options {
11279
+ environment: Supplier<string>;
11280
+ /** Specify a custom URL to connect the client to. */
11281
+ baseUrl?: Supplier<string>;
11282
+ username?: Supplier<string | undefined>;
11283
+ password?: Supplier<string | undefined>;
11284
+ /** Override the X-Langfuse-Sdk-Name header */
11285
+ xLangfuseSdkName?: Supplier<string | undefined>;
11286
+ /** Override the X-Langfuse-Sdk-Version header */
11287
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
11288
+ /** Override the X-Langfuse-Public-Key header */
11289
+ xLangfusePublicKey?: Supplier<string | undefined>;
11290
+ /** Additional headers to include in requests. */
11291
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11292
+ }
11293
+ interface RequestOptions {
11294
+ /** The maximum time to wait for a response in seconds. */
11295
+ timeoutInSeconds?: number;
11296
+ /** The number of times to retry the request. Defaults to 2. */
11297
+ maxRetries?: number;
11298
+ /** A hook to abort the request. */
11299
+ abortSignal?: AbortSignal;
11300
+ /** Override the X-Langfuse-Sdk-Name header */
11301
+ xLangfuseSdkName?: string | undefined;
11302
+ /** Override the X-Langfuse-Sdk-Version header */
11303
+ xLangfuseSdkVersion?: string | undefined;
11304
+ /** Override the X-Langfuse-Public-Key header */
11305
+ xLangfusePublicKey?: string | undefined;
11306
+ /** Additional query string parameters to include in the request. */
11307
+ queryParams?: Record<string, unknown>;
11308
+ /** Additional headers to include in the request. */
11309
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11310
+ }
11311
+ }
11312
+ declare class Sessions {
11313
+ protected readonly _options: Sessions.Options;
11314
+ constructor(_options: Sessions.Options);
11315
+ /**
11316
+ * Get sessions.
11317
+ *
11318
+ * This legacy endpoint is not recommended for new data extraction workflows.
11319
+ * Use the v2 observations endpoint with a bounded time range and group rows by
11320
+ * `sessionId` instead:
11321
+ * `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.
11322
+ *
11323
+ * @param {LangfuseAPI.GetSessionsRequest} request
11324
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
11325
+ *
11326
+ * @throws {@link LangfuseAPI.Error}
11327
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11328
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11329
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11330
+ * @throws {@link LangfuseAPI.NotFoundError}
11331
+ *
11332
+ * @example
11333
+ * await client.sessions.list()
11334
+ */
11335
+ list(request?: GetSessionsRequest, requestOptions?: Sessions.RequestOptions): HttpResponsePromise<PaginatedSessions>;
11336
+ private __list;
11337
+ /**
11338
+ * Get a session.
11339
+ *
11340
+ * Please note that `traces` on this endpoint are not paginated. For large
11341
+ * sessions or new data extraction workflows, use the v2 observations endpoint
11342
+ * with a URL-encoded `sessionId` filter and a bounded time range:
11343
+ * `GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.
11344
+ *
11345
+ * @param {string} sessionId - The unique id of a session
11346
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
11347
+ *
11348
+ * @throws {@link LangfuseAPI.Error}
11349
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11350
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11351
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11352
+ * @throws {@link LangfuseAPI.NotFoundError}
11353
+ *
11354
+ * @example
11355
+ * await client.sessions.get("sessionId")
11356
+ */
11357
+ get(sessionId: string, requestOptions?: Sessions.RequestOptions): HttpResponsePromise<SessionWithTraces>;
11358
+ private __get;
11359
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
11360
+ }
11361
+
11362
+ /**
11363
+ * This file was auto-generated by Fern from our API Definition.
11364
+ */
11365
+
11366
+ declare namespace Trace {
11367
+ interface Options {
11368
+ environment: Supplier<string>;
11369
+ /** Specify a custom URL to connect the client to. */
11370
+ baseUrl?: Supplier<string>;
11371
+ username?: Supplier<string | undefined>;
11372
+ password?: Supplier<string | undefined>;
11373
+ /** Override the X-Langfuse-Sdk-Name header */
11374
+ xLangfuseSdkName?: Supplier<string | undefined>;
11375
+ /** Override the X-Langfuse-Sdk-Version header */
11376
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
11377
+ /** Override the X-Langfuse-Public-Key header */
11378
+ xLangfusePublicKey?: Supplier<string | undefined>;
11379
+ /** Additional headers to include in requests. */
11380
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11381
+ }
11382
+ interface RequestOptions {
11383
+ /** The maximum time to wait for a response in seconds. */
11384
+ timeoutInSeconds?: number;
11385
+ /** The number of times to retry the request. Defaults to 2. */
11386
+ maxRetries?: number;
11387
+ /** A hook to abort the request. */
11388
+ abortSignal?: AbortSignal;
11389
+ /** Override the X-Langfuse-Sdk-Name header */
11390
+ xLangfuseSdkName?: string | undefined;
11391
+ /** Override the X-Langfuse-Sdk-Version header */
11392
+ xLangfuseSdkVersion?: string | undefined;
11393
+ /** Override the X-Langfuse-Public-Key header */
11394
+ xLangfusePublicKey?: string | undefined;
11395
+ /** Additional query string parameters to include in the request. */
11396
+ queryParams?: Record<string, unknown>;
11397
+ /** Additional headers to include in the request. */
11398
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11399
+ }
11400
+ }
11401
+ declare class Trace {
11402
+ protected readonly _options: Trace.Options;
11403
+ constructor(_options: Trace.Options);
11404
+ /**
11405
+ * Get a specific trace
11406
+ *
11407
+ * @param {string} traceId - The unique langfuse identifier of a trace
11408
+ * @param {LangfuseAPI.GetTraceRequest} request
11409
+ * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11410
+ *
11411
+ * @throws {@link LangfuseAPI.Error}
11412
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11413
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11414
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11415
+ * @throws {@link LangfuseAPI.NotFoundError}
11416
+ *
11417
+ * @example
11418
+ * await client.trace.get("traceId")
11419
+ */
11420
+ get(traceId: string, request?: GetTraceRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<TraceWithFullDetails>;
11421
+ private __get;
11422
+ /**
11423
+ * Delete a specific trace
11424
+ *
11425
+ * @param {string} traceId - The unique langfuse identifier of the trace to delete
11426
+ * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11427
+ *
11428
+ * @throws {@link LangfuseAPI.Error}
11429
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11430
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11431
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11432
+ * @throws {@link LangfuseAPI.NotFoundError}
11433
+ *
11434
+ * @example
11435
+ * await client.trace.delete("traceId")
11436
+ */
11437
+ delete(traceId: string, requestOptions?: Trace.RequestOptions): HttpResponsePromise<DeleteTraceResponse>;
11438
+ private __delete;
11439
+ /**
11440
+ * Get list of traces
11441
+ *
11442
+ * @param {LangfuseAPI.GetTracesRequest} request
11443
+ * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11444
+ *
11445
+ * @throws {@link LangfuseAPI.Error}
11446
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11447
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11448
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11449
+ * @throws {@link LangfuseAPI.NotFoundError}
11450
+ *
11451
+ * @example
11452
+ * await client.trace.list()
11453
+ */
11454
+ list(request?: GetTracesRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<Traces>;
11455
+ private __list;
11456
+ /**
11457
+ * Delete multiple traces
11458
+ *
11459
+ * @param {LangfuseAPI.DeleteTracesRequest} request
11460
+ * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11461
+ *
11462
+ * @throws {@link LangfuseAPI.Error}
11463
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11464
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11465
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11466
+ * @throws {@link LangfuseAPI.NotFoundError}
11467
+ *
11468
+ * @example
11469
+ * await client.trace.deleteMultiple({
11470
+ * traceIds: ["traceIds", "traceIds"]
11471
+ * })
11472
+ */
11473
+ deleteMultiple(request: DeleteTracesRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<DeleteTraceResponse>;
11474
+ private __deleteMultiple;
11475
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
11476
+ }
11477
+
11478
+ /**
11479
+ * This file was auto-generated by Fern from our API Definition.
11480
+ */
11481
+
11482
+ declare namespace DashboardWidgets {
11483
+ interface Options {
11484
+ environment: Supplier<string>;
11485
+ /** Specify a custom URL to connect the client to. */
11486
+ baseUrl?: Supplier<string>;
11487
+ username?: Supplier<string | undefined>;
11488
+ password?: Supplier<string | undefined>;
11489
+ /** Override the X-Langfuse-Sdk-Name header */
11490
+ xLangfuseSdkName?: Supplier<string | undefined>;
11491
+ /** Override the X-Langfuse-Sdk-Version header */
11492
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
11493
+ /** Override the X-Langfuse-Public-Key header */
11494
+ xLangfusePublicKey?: Supplier<string | undefined>;
11495
+ /** Additional headers to include in requests. */
11496
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11497
+ }
11498
+ interface RequestOptions {
11499
+ /** The maximum time to wait for a response in seconds. */
11500
+ timeoutInSeconds?: number;
11501
+ /** The number of times to retry the request. Defaults to 2. */
11502
+ maxRetries?: number;
11503
+ /** A hook to abort the request. */
11504
+ abortSignal?: AbortSignal;
11505
+ /** Override the X-Langfuse-Sdk-Name header */
11506
+ xLangfuseSdkName?: string | undefined;
11507
+ /** Override the X-Langfuse-Sdk-Version header */
11508
+ xLangfuseSdkVersion?: string | undefined;
11509
+ /** Override the X-Langfuse-Public-Key header */
11510
+ xLangfusePublicKey?: string | undefined;
11511
+ /** Additional query string parameters to include in the request. */
11512
+ queryParams?: Record<string, unknown>;
11513
+ /** Additional headers to include in the request. */
11514
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
11515
+ }
11516
+ }
11517
+ declare class DashboardWidgets {
11518
+ protected readonly _options: DashboardWidgets.Options;
11519
+ constructor(_options: DashboardWidgets.Options);
11520
+ /**
11521
+ * List dashboard widgets in the project, ordered by most recently
11522
+ * updated first.
11523
+ *
11524
+ * Responses may include legacy `traces` widgets created before this
11525
+ * API existed. New widgets cannot be created with `view: traces`.
11526
+ *
11527
+ * @param {LangfuseAPI.unstable.ListDashboardWidgetsRequest} request
11528
+ * @param {DashboardWidgets.RequestOptions} requestOptions - Request-specific configuration.
11529
+ *
11530
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11531
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11532
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11533
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11534
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11535
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
11536
+ * @throws {@link LangfuseAPI.Error}
11537
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11538
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11539
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11540
+ * @throws {@link LangfuseAPI.NotFoundError}
11541
+ *
11542
+ * @example
11543
+ * await client.unstable.dashboardWidgets.list()
11544
+ */
11545
+ list(request?: ListDashboardWidgetsRequest, requestOptions?: DashboardWidgets.RequestOptions): HttpResponsePromise<DashboardWidgetList>;
11546
+ private __list;
11547
+ /**
11548
+ * Create a dashboard widget (a standalone chart definition you place on
11549
+ * any dashboard).
11550
+ *
11551
+ * This endpoint creates the widget only; place it on a dashboard via
11552
+ * `POST /dashboards/{dashboardId}/placements`.
11553
+ *
11554
+ * Supported views are `observations`, `scores-numeric`, `scores-boolean`, and `scores-categorical`.
11555
+ * The legacy `traces` view is not supported by this unstable API.
11556
+ * Widgets are created as v2 internally.
11557
+ *
11558
+ * `chartConfig` is optional and defaults to the plain config for
11559
+ * `chartType`; when `chartConfig.type` is given it must match
11560
+ * `chartType`.
11561
+ *
11562
+ * Unstable API note:
11563
+ * - This surface may evolve while dashboard/widget APIs are being finalized.
11564
+ *
11565
+ * @param {LangfuseAPI.unstable.CreateDashboardWidgetRequest} request
11566
+ * @param {DashboardWidgets.RequestOptions} requestOptions - Request-specific configuration.
11567
+ *
11568
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11569
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11570
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11571
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11572
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11573
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
11574
+ * @throws {@link LangfuseAPI.Error}
11575
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11576
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11577
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11578
+ * @throws {@link LangfuseAPI.NotFoundError}
11579
+ *
11580
+ * @example
11581
+ * await client.unstable.dashboardWidgets.create({
11582
+ * name: "Total cost by model",
11583
+ * description: "Total model cost grouped by provided model name.",
11584
+ * view: "observations",
11585
+ * dimensions: [{
11586
+ * field: "providedModelName"
11587
+ * }],
11588
+ * metrics: [{
11589
+ * measure: "totalCost",
11590
+ * agg: "sum"
11591
+ * }],
11592
+ * filters: [],
11593
+ * chartType: "HORIZONTAL_BAR",
11594
+ * chartConfig: {
11595
+ * row_limit: 10
11596
+ * }
11597
+ * })
11598
+ */
11599
+ create(request: CreateDashboardWidgetRequest, requestOptions?: DashboardWidgets.RequestOptions): HttpResponsePromise<DashboardWidget>;
11600
+ private __create;
11601
+ /**
11602
+ * Get a dashboard widget by id.
11603
+ *
11604
+ * The response may use `view: traces` for legacy widgets.
11605
+ *
11606
+ * @param {string} widgetId
11607
+ * @param {DashboardWidgets.RequestOptions} requestOptions - Request-specific configuration.
11608
+ *
11609
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11610
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11611
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11612
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11613
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11614
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11615
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
11616
+ * @throws {@link LangfuseAPI.Error}
11617
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11618
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11619
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11620
+ * @throws {@link LangfuseAPI.NotFoundError}
11621
+ *
11622
+ * @example
11623
+ * await client.unstable.dashboardWidgets.get("widgetId")
11624
+ */
11625
+ get(widgetId: string, requestOptions?: DashboardWidgets.RequestOptions): HttpResponsePromise<DashboardWidget>;
11626
+ private __get;
11627
+ /**
11628
+ * Update a dashboard widget.
11629
+ *
11630
+ * All fields are optional; at least one field is required.
11631
+ * Changing `chartType` without sending `chartConfig` resets the config
11632
+ * to the new chart type's defaults. When `chartConfig.type` is given
11633
+ * it must match the widget's (possibly updated) `chartType`.
11634
+ *
11635
+ * `view` cannot be changed to the legacy `traces` value. Existing
11636
+ * `traces` widgets may be updated on other fields.
11637
+ *
11638
+ * @param {string} widgetId
11639
+ * @param {LangfuseAPI.unstable.UpdateDashboardWidgetRequest} request
11640
+ * @param {DashboardWidgets.RequestOptions} requestOptions - Request-specific configuration.
11641
+ *
11642
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11643
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11644
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11645
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11646
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11647
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11648
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
11649
+ * @throws {@link LangfuseAPI.Error}
11650
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11651
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11652
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11653
+ * @throws {@link LangfuseAPI.NotFoundError}
11654
+ *
11655
+ * @example
11656
+ * await client.unstable.dashboardWidgets.update("widgetId", {
11657
+ * name: undefined,
11658
+ * description: undefined,
11659
+ * view: undefined,
11660
+ * dimensions: undefined,
11661
+ * metrics: undefined,
11662
+ * filters: undefined,
11663
+ * chartType: undefined,
11664
+ * chartConfig: undefined
11665
+ * })
11666
+ */
11667
+ update(widgetId: string, request: UpdateDashboardWidgetRequest, requestOptions?: DashboardWidgets.RequestOptions): HttpResponsePromise<DashboardWidget>;
11668
+ private __update;
11669
+ /**
11670
+ * Delete a dashboard widget.
11671
+ *
11672
+ * The API returns `409` while the widget is still placed on a dashboard.
11673
+ * Remove those placements first.
11674
+ *
11675
+ * @param {string} widgetId
11676
+ * @param {DashboardWidgets.RequestOptions} requestOptions - Request-specific configuration.
11677
+ *
11678
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11679
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11680
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11681
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11682
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11683
+ * @throws {@link LangfuseAPI.unstable.ConflictError}
11684
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11685
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
11686
+ * @throws {@link LangfuseAPI.Error}
11687
+ * @throws {@link LangfuseAPI.UnauthorizedError}
11688
+ * @throws {@link LangfuseAPI.AccessDeniedError}
11689
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
11690
+ * @throws {@link LangfuseAPI.NotFoundError}
11691
+ *
11692
+ * @example
11693
+ * await client.unstable.dashboardWidgets.delete("widgetId")
10047
11694
  */
10048
- getManyV3(request?: GetScoresV3Request, requestOptions?: ScoresV3.RequestOptions): HttpResponsePromise<GetScoresV3Response>;
10049
- private __getManyV3;
11695
+ delete(widgetId: string, requestOptions?: DashboardWidgets.RequestOptions): HttpResponsePromise<DeleteDashboardWidgetResponse>;
11696
+ private __delete;
10050
11697
  protected _getAuthorizationHeader(): Promise<string | undefined>;
10051
11698
  }
10052
11699
 
@@ -10054,7 +11701,7 @@ declare class ScoresV3 {
10054
11701
  * This file was auto-generated by Fern from our API Definition.
10055
11702
  */
10056
11703
 
10057
- declare namespace Scores {
11704
+ declare namespace Dashboards {
10058
11705
  interface Options {
10059
11706
  environment: Supplier<string>;
10060
11707
  /** Specify a custom URL to connect the client to. */
@@ -10089,18 +11736,22 @@ declare namespace Scores {
10089
11736
  headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10090
11737
  }
10091
11738
  }
10092
- declare class Scores {
10093
- protected readonly _options: Scores.Options;
10094
- constructor(_options: Scores.Options);
11739
+ declare class Dashboards {
11740
+ protected readonly _options: Dashboards.Options;
11741
+ constructor(_options: Dashboards.Options);
10095
11742
  /**
10096
- * **Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint
10097
- * is no longer available on Langfuse v4 and later.
11743
+ * List dashboards in the project, ordered by most recently updated
11744
+ * first.
10098
11745
  *
10099
- * Get a list of scores (supports both trace and session scores)
10100
- *
10101
- * @param {LangfuseAPI.GetScoresRequest} request
10102
- * @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
11746
+ * @param {LangfuseAPI.unstable.ListDashboardsRequest} request
11747
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
10103
11748
  *
11749
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11750
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11751
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11752
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11753
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11754
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10104
11755
  * @throws {@link LangfuseAPI.Error}
10105
11756
  * @throws {@link LangfuseAPI.UnauthorizedError}
10106
11757
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10108,19 +11759,23 @@ declare class Scores {
10108
11759
  * @throws {@link LangfuseAPI.NotFoundError}
10109
11760
  *
10110
11761
  * @example
10111
- * await client.scores.getMany()
11762
+ * await client.unstable.dashboards.list()
10112
11763
  */
10113
- getMany(request?: GetScoresRequest, requestOptions?: Scores.RequestOptions): HttpResponsePromise<GetScoresResponse>;
10114
- private __getMany;
11764
+ list(request?: ListDashboardsRequest, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<DashboardList>;
11765
+ private __list;
10115
11766
  /**
10116
- * **Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter
10117
- * instead. This endpoint is no longer available on Langfuse v4 and later.
10118
- *
10119
- * Get a score (supports both trace and session scores)
11767
+ * Create a dashboard.
10120
11768
  *
10121
- * @param {string} scoreId - The unique langfuse identifier of a score
10122
- * @param {Scores.RequestOptions} requestOptions - Request-specific configuration.
11769
+ * @param {LangfuseAPI.unstable.CreateDashboardRequest} request
11770
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
10123
11771
  *
11772
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11773
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11774
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11775
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11776
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11777
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11778
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10124
11779
  * @throws {@link LangfuseAPI.Error}
10125
11780
  * @throws {@link LangfuseAPI.UnauthorizedError}
10126
11781
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10128,66 +11783,28 @@ declare class Scores {
10128
11783
  * @throws {@link LangfuseAPI.NotFoundError}
10129
11784
  *
10130
11785
  * @example
10131
- * await client.scores.getById("scoreId")
11786
+ * await client.unstable.dashboards.create({
11787
+ * name: "name",
11788
+ * description: undefined,
11789
+ * definition: undefined,
11790
+ * filters: undefined
11791
+ * })
10132
11792
  */
10133
- getById(scoreId: string, requestOptions?: Scores.RequestOptions): HttpResponsePromise<Score>;
10134
- private __getById;
10135
- protected _getAuthorizationHeader(): Promise<string | undefined>;
10136
- }
10137
-
10138
- /**
10139
- * This file was auto-generated by Fern from our API Definition.
10140
- */
10141
-
10142
- declare namespace Sessions {
10143
- interface Options {
10144
- environment: Supplier<string>;
10145
- /** Specify a custom URL to connect the client to. */
10146
- baseUrl?: Supplier<string>;
10147
- username?: Supplier<string | undefined>;
10148
- password?: Supplier<string | undefined>;
10149
- /** Override the X-Langfuse-Sdk-Name header */
10150
- xLangfuseSdkName?: Supplier<string | undefined>;
10151
- /** Override the X-Langfuse-Sdk-Version header */
10152
- xLangfuseSdkVersion?: Supplier<string | undefined>;
10153
- /** Override the X-Langfuse-Public-Key header */
10154
- xLangfusePublicKey?: Supplier<string | undefined>;
10155
- /** Additional headers to include in requests. */
10156
- headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10157
- }
10158
- interface RequestOptions {
10159
- /** The maximum time to wait for a response in seconds. */
10160
- timeoutInSeconds?: number;
10161
- /** The number of times to retry the request. Defaults to 2. */
10162
- maxRetries?: number;
10163
- /** A hook to abort the request. */
10164
- abortSignal?: AbortSignal;
10165
- /** Override the X-Langfuse-Sdk-Name header */
10166
- xLangfuseSdkName?: string | undefined;
10167
- /** Override the X-Langfuse-Sdk-Version header */
10168
- xLangfuseSdkVersion?: string | undefined;
10169
- /** Override the X-Langfuse-Public-Key header */
10170
- xLangfusePublicKey?: string | undefined;
10171
- /** Additional query string parameters to include in the request. */
10172
- queryParams?: Record<string, unknown>;
10173
- /** Additional headers to include in the request. */
10174
- headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10175
- }
10176
- }
10177
- declare class Sessions {
10178
- protected readonly _options: Sessions.Options;
10179
- constructor(_options: Sessions.Options);
11793
+ create(request: CreateDashboardRequest, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<Dashboard>;
11794
+ private __create;
10180
11795
  /**
10181
- * Get sessions.
10182
- *
10183
- * This legacy endpoint is not recommended for new data extraction workflows.
10184
- * Use the v2 observations endpoint with a bounded time range and group rows by
10185
- * `sessionId` instead:
10186
- * `GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.
11796
+ * Get a dashboard by id.
10187
11797
  *
10188
- * @param {LangfuseAPI.GetSessionsRequest} request
10189
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
11798
+ * @param {string} dashboardId
11799
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
10190
11800
  *
11801
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11802
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11803
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11804
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11805
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11806
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11807
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10191
11808
  * @throws {@link LangfuseAPI.Error}
10192
11809
  * @throws {@link LangfuseAPI.UnauthorizedError}
10193
11810
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10195,21 +11812,24 @@ declare class Sessions {
10195
11812
  * @throws {@link LangfuseAPI.NotFoundError}
10196
11813
  *
10197
11814
  * @example
10198
- * await client.sessions.list()
11815
+ * await client.unstable.dashboards.get("dashboardId")
10199
11816
  */
10200
- list(request?: GetSessionsRequest, requestOptions?: Sessions.RequestOptions): HttpResponsePromise<PaginatedSessions>;
10201
- private __list;
11817
+ get(dashboardId: string, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<Dashboard>;
11818
+ private __get;
10202
11819
  /**
10203
- * Get a session.
10204
- *
10205
- * Please note that `traces` on this endpoint are not paginated. For large
10206
- * sessions or new data extraction workflows, use the v2 observations endpoint
10207
- * with a URL-encoded `sessionId` filter and a bounded time range:
10208
- * `GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.
11820
+ * Update a dashboard's name, description, definition, or filters.
10209
11821
  *
10210
- * @param {string} sessionId - The unique id of a session
10211
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
11822
+ * @param {string} dashboardId
11823
+ * @param {LangfuseAPI.unstable.UpdateDashboardRequest} request
11824
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
10212
11825
  *
11826
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11827
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11828
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11829
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11830
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11831
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11832
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10213
11833
  * @throws {@link LangfuseAPI.Error}
10214
11834
  * @throws {@link LangfuseAPI.UnauthorizedError}
10215
11835
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10217,62 +11837,28 @@ declare class Sessions {
10217
11837
  * @throws {@link LangfuseAPI.NotFoundError}
10218
11838
  *
10219
11839
  * @example
10220
- * await client.sessions.get("sessionId")
11840
+ * await client.unstable.dashboards.update("dashboardId", {
11841
+ * name: undefined,
11842
+ * description: undefined,
11843
+ * definition: undefined,
11844
+ * filters: undefined
11845
+ * })
10221
11846
  */
10222
- get(sessionId: string, requestOptions?: Sessions.RequestOptions): HttpResponsePromise<SessionWithTraces>;
10223
- private __get;
10224
- protected _getAuthorizationHeader(): Promise<string | undefined>;
10225
- }
10226
-
10227
- /**
10228
- * This file was auto-generated by Fern from our API Definition.
10229
- */
10230
-
10231
- declare namespace Trace {
10232
- interface Options {
10233
- environment: Supplier<string>;
10234
- /** Specify a custom URL to connect the client to. */
10235
- baseUrl?: Supplier<string>;
10236
- username?: Supplier<string | undefined>;
10237
- password?: Supplier<string | undefined>;
10238
- /** Override the X-Langfuse-Sdk-Name header */
10239
- xLangfuseSdkName?: Supplier<string | undefined>;
10240
- /** Override the X-Langfuse-Sdk-Version header */
10241
- xLangfuseSdkVersion?: Supplier<string | undefined>;
10242
- /** Override the X-Langfuse-Public-Key header */
10243
- xLangfusePublicKey?: Supplier<string | undefined>;
10244
- /** Additional headers to include in requests. */
10245
- headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10246
- }
10247
- interface RequestOptions {
10248
- /** The maximum time to wait for a response in seconds. */
10249
- timeoutInSeconds?: number;
10250
- /** The number of times to retry the request. Defaults to 2. */
10251
- maxRetries?: number;
10252
- /** A hook to abort the request. */
10253
- abortSignal?: AbortSignal;
10254
- /** Override the X-Langfuse-Sdk-Name header */
10255
- xLangfuseSdkName?: string | undefined;
10256
- /** Override the X-Langfuse-Sdk-Version header */
10257
- xLangfuseSdkVersion?: string | undefined;
10258
- /** Override the X-Langfuse-Public-Key header */
10259
- xLangfusePublicKey?: string | undefined;
10260
- /** Additional query string parameters to include in the request. */
10261
- queryParams?: Record<string, unknown>;
10262
- /** Additional headers to include in the request. */
10263
- headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10264
- }
10265
- }
10266
- declare class Trace {
10267
- protected readonly _options: Trace.Options;
10268
- constructor(_options: Trace.Options);
11847
+ update(dashboardId: string, request: UpdateDashboardRequest, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<Dashboard>;
11848
+ private __update;
10269
11849
  /**
10270
- * Get a specific trace
11850
+ * Delete a dashboard.
10271
11851
  *
10272
- * @param {string} traceId - The unique langfuse identifier of a trace
10273
- * @param {LangfuseAPI.GetTraceRequest} request
10274
- * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11852
+ * @param {string} dashboardId
11853
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
10275
11854
  *
11855
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11856
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11857
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11858
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11859
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11860
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11861
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10276
11862
  * @throws {@link LangfuseAPI.Error}
10277
11863
  * @throws {@link LangfuseAPI.UnauthorizedError}
10278
11864
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10280,16 +11866,34 @@ declare class Trace {
10280
11866
  * @throws {@link LangfuseAPI.NotFoundError}
10281
11867
  *
10282
11868
  * @example
10283
- * await client.trace.get("traceId")
11869
+ * await client.unstable.dashboards.delete("dashboardId")
10284
11870
  */
10285
- get(traceId: string, request?: GetTraceRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<TraceWithFullDetails>;
10286
- private __get;
11871
+ delete(dashboardId: string, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<DeleteDashboardResponse>;
11872
+ private __delete;
10287
11873
  /**
10288
- * Delete a specific trace
11874
+ * Add a placement to a dashboard grid (see `DashboardPlacement` for
11875
+ * grid semantics).
10289
11876
  *
10290
- * @param {string} traceId - The unique langfuse identifier of the trace to delete
10291
- * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11877
+ * `id` and the position fields are optional: when omitted, the
11878
+ * placement gets a server-generated id and is appended below all
11879
+ * existing tiles as a 6x6 tile. Returns the created placement.
11880
+ *
11881
+ * The referenced widget must exist in the same project or be a
11882
+ * Langfuse-managed widget. The API returns `409` if a placement with
11883
+ * the same `id` already exists on the dashboard.
10292
11884
  *
11885
+ * @param {string} dashboardId
11886
+ * @param {LangfuseAPI.unstable.CreateDashboardPlacementRequest} request
11887
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
11888
+ *
11889
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11890
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11891
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11892
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11893
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11894
+ * @throws {@link LangfuseAPI.unstable.ConflictError}
11895
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11896
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10293
11897
  * @throws {@link LangfuseAPI.Error}
10294
11898
  * @throws {@link LangfuseAPI.UnauthorizedError}
10295
11899
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10297,16 +11901,36 @@ declare class Trace {
10297
11901
  * @throws {@link LangfuseAPI.NotFoundError}
10298
11902
  *
10299
11903
  * @example
10300
- * await client.trace.delete("traceId")
11904
+ * await client.unstable.dashboards.addPlacement("dashboardId", {
11905
+ * type: "widget",
11906
+ * id: undefined,
11907
+ * widgetId: "widgetId",
11908
+ * x: undefined,
11909
+ * y: undefined,
11910
+ * width: undefined,
11911
+ * height: undefined
11912
+ * })
10301
11913
  */
10302
- delete(traceId: string, requestOptions?: Trace.RequestOptions): HttpResponsePromise<DeleteTraceResponse>;
10303
- private __delete;
11914
+ addPlacement(dashboardId: string, request: CreateDashboardPlacementRequest, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<DashboardPlacement>;
11915
+ private __addPlacement;
10304
11916
  /**
10305
- * Get list of traces
11917
+ * Move or resize a placement. All fields are optional; at least one is
11918
+ * required. Omitted fields keep their current value. The placement's
11919
+ * content (widget/preset reference) and id cannot change — delete and
11920
+ * re-add the placement to swap content. Returns the updated placement.
10306
11921
  *
10307
- * @param {LangfuseAPI.GetTracesRequest} request
10308
- * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11922
+ * @param {string} dashboardId
11923
+ * @param {string} placementId
11924
+ * @param {LangfuseAPI.unstable.UpdateDashboardPlacementRequest} request
11925
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
10309
11926
  *
11927
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11928
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11929
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11930
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11931
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11932
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11933
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10310
11934
  * @throws {@link LangfuseAPI.Error}
10311
11935
  * @throws {@link LangfuseAPI.UnauthorizedError}
10312
11936
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10314,16 +11938,29 @@ declare class Trace {
10314
11938
  * @throws {@link LangfuseAPI.NotFoundError}
10315
11939
  *
10316
11940
  * @example
10317
- * await client.trace.list()
11941
+ * await client.unstable.dashboards.updatePlacement("dashboardId", "placementId", {
11942
+ * x: undefined,
11943
+ * y: undefined,
11944
+ * width: undefined,
11945
+ * height: undefined
11946
+ * })
10318
11947
  */
10319
- list(request?: GetTracesRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<Traces>;
10320
- private __list;
11948
+ updatePlacement(dashboardId: string, placementId: string, request: UpdateDashboardPlacementRequest, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<DashboardPlacement>;
11949
+ private __updatePlacement;
10321
11950
  /**
10322
- * Delete multiple traces
11951
+ * Remove a placement from a dashboard grid without deleting the referenced widget.
10323
11952
  *
10324
- * @param {LangfuseAPI.DeleteTracesRequest} request
10325
- * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
11953
+ * @param {string} dashboardId
11954
+ * @param {string} placementId
11955
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
10326
11956
  *
11957
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
11958
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
11959
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
11960
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
11961
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
11962
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
11963
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10327
11964
  * @throws {@link LangfuseAPI.Error}
10328
11965
  * @throws {@link LangfuseAPI.UnauthorizedError}
10329
11966
  * @throws {@link LangfuseAPI.AccessDeniedError}
@@ -10331,12 +11968,10 @@ declare class Trace {
10331
11968
  * @throws {@link LangfuseAPI.NotFoundError}
10332
11969
  *
10333
11970
  * @example
10334
- * await client.trace.deleteMultiple({
10335
- * traceIds: ["traceIds", "traceIds"]
10336
- * })
11971
+ * await client.unstable.dashboards.deletePlacement("dashboardId", "placementId")
10337
11972
  */
10338
- deleteMultiple(request: DeleteTracesRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<DeleteTraceResponse>;
10339
- private __deleteMultiple;
11973
+ deletePlacement(dashboardId: string, placementId: string, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<DeleteDashboardPlacementResponse>;
11974
+ private __deletePlacement;
10340
11975
  protected _getAuthorizationHeader(): Promise<string | undefined>;
10341
11976
  }
10342
11977
 
@@ -10514,7 +12149,7 @@ declare class EvaluationRules {
10514
12149
  /**
10515
12150
  * List evaluation rules in the authenticated project.
10516
12151
  *
10517
- * Each item describes one live evaluation rule and its effective runtime status.
12152
+ * This includes legacy `trace` and `dataset` rules so they can be inspected and migrated to v4 rules. Legacy rules are read-only through this API; create, update, and delete continue to support only `observation` and `experiment` rules.
10518
12153
  *
10519
12154
  * @param {LangfuseAPI.unstable.ListEvaluationRulesRequest} request
10520
12155
  * @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
@@ -10539,7 +12174,7 @@ declare class EvaluationRules {
10539
12174
  /**
10540
12175
  * Get one evaluation rule by its identifier.
10541
12176
  *
10542
- * Use this endpoint to inspect the current evaluator, target, mapping, filters, and effective runtime status.
12177
+ * Use this endpoint to inspect the current evaluator, target, mapping, filters, execution timing, and effective runtime status. Legacy `trace` and `dataset` rules are returned for migration and are read-only through this API.
10543
12178
  *
10544
12179
  * @param {string} evaluationRuleId - Evaluation rule identifier returned by the evaluation rule endpoints.
10545
12180
  * @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
@@ -10560,7 +12195,7 @@ declare class EvaluationRules {
10560
12195
  * @example
10561
12196
  * await client.unstable.evaluationRules.get("evaluationRuleId")
10562
12197
  */
10563
- get(evaluationRuleId: string, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRule>;
12198
+ get(evaluationRuleId: string, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<ReadableEvaluationRule>;
10564
12199
  private __get;
10565
12200
  /**
10566
12201
  * Update an evaluation rule.
@@ -10885,9 +12520,13 @@ declare namespace Unstable {
10885
12520
  }
10886
12521
  declare class Unstable {
10887
12522
  protected readonly _options: Unstable.Options;
12523
+ protected _dashboardWidgets: DashboardWidgets | undefined;
12524
+ protected _dashboards: Dashboards | undefined;
10888
12525
  protected _evaluationRules: EvaluationRules | undefined;
10889
12526
  protected _evaluators: Evaluators | undefined;
10890
12527
  constructor(_options: Unstable.Options);
12528
+ get dashboardWidgets(): DashboardWidgets;
12529
+ get dashboards(): Dashboards;
10891
12530
  get evaluationRules(): EvaluationRules;
10892
12531
  get evaluators(): Evaluators;
10893
12532
  }
@@ -10939,6 +12578,8 @@ declare class LangfuseAPIClient {
10939
12578
  protected _datasetItems: DatasetItems | undefined;
10940
12579
  protected _datasetRunItems: DatasetRunItems | undefined;
10941
12580
  protected _datasets: Datasets | undefined;
12581
+ protected _experiments: Experiments | undefined;
12582
+ protected _feedback: Feedback | undefined;
10942
12583
  protected _health: Health | undefined;
10943
12584
  protected _ingestion: Ingestion | undefined;
10944
12585
  protected _legacy: Legacy | undefined;
@@ -10966,6 +12607,8 @@ declare class LangfuseAPIClient {
10966
12607
  get datasetItems(): DatasetItems;
10967
12608
  get datasetRunItems(): DatasetRunItems;
10968
12609
  get datasets(): Datasets;
12610
+ get experiments(): Experiments;
12611
+ get feedback(): Feedback;
10969
12612
  get health(): Health;
10970
12613
  get ingestion(): Ingestion;
10971
12614
  get legacy(): Legacy;
@@ -11330,11 +12973,11 @@ declare function uploadMedia(params: UploadMediaParams): Promise<void>;
11330
12973
  * Attribute propagation utilities for Langfuse OpenTelemetry integration.
11331
12974
  *
11332
12975
  * This module provides the `propagateAttributes` function for setting trace-level
11333
- * attributes (userId, sessionId, metadata) that automatically propagate to all child spans
11334
- * within the context.
12976
+ * attributes (userId, sessionId, environment, metadata) that automatically propagate
12977
+ * to all child spans within the context.
11335
12978
  */
11336
12979
 
11337
- type CorrelatedKey = "userId" | "sessionId" | "metadata" | "version" | "tags" | "traceName";
12980
+ type CorrelatedKey = "userId" | "sessionId" | "metadata" | "version" | "tags" | "traceName" | "environment" | "promptName" | "promptVersion";
11338
12981
  declare const experimentKeys: readonly ["experimentId", "experimentName", "experimentMetadata", "experimentDatasetId", "experimentItemId", "experimentItemMetadata", "experimentItemRootObservationId"];
11339
12982
  type ExperimentKey = (typeof experimentKeys)[number];
11340
12983
  type PropagatedKey = CorrelatedKey | ExperimentKey;
@@ -11371,6 +13014,23 @@ declare function getLangfuseTraceIdFromBaggage(context: Context): string | undef
11371
13014
  * @internal
11372
13015
  */
11373
13016
  declare function setLangfuseTraceIdInBaggage(context: Context, traceId: string): Context;
13017
+ /**
13018
+ * Prompt-like input accepted by {@link propagateAttributes}.
13019
+ *
13020
+ * Satisfied by prompt clients returned from Langfuse prompt management
13021
+ * (e.g. `langfuse.prompt.get(...)`) as well as plain objects exposing
13022
+ * `name` and `version`.
13023
+ *
13024
+ * @public
13025
+ */
13026
+ type PropagatedPromptInput = {
13027
+ /** Name of the prompt. Must be a non-empty string. */
13028
+ name: string;
13029
+ /** Version of the prompt. Must be an integer; digit-only strings (e.g. "5") are coerced. */
13030
+ version: number | string;
13031
+ /** Whether this is a fallback prompt. Fallback prompts are never linked. */
13032
+ isFallback?: boolean;
13033
+ };
11374
13034
  /**
11375
13035
  * Parameters for propagateAttributes function.
11376
13036
  *
@@ -11410,6 +13070,33 @@ interface PropagateAttributesParams {
11410
13070
  * Must be a string ≤200 characters.
11411
13071
  */
11412
13072
  traceName?: string;
13073
+ /**
13074
+ * Langfuse environment to associate with all spans in this context.
13075
+ *
13076
+ * Must be a lowercase alphanumeric string with optional hyphens or underscores,
13077
+ * must be ≤40 characters, and must not start with `langfuse`. This maps to the
13078
+ * first-class `langfuse.environment` attribute, not to trace metadata.
13079
+ *
13080
+ * A propagated environment takes precedence over the default configured on
13081
+ * `LangfuseSpanProcessor` or via `LANGFUSE_TRACING_ENVIRONMENT` while this
13082
+ * propagation scope is active.
13083
+ */
13084
+ environment?: string;
13085
+ /**
13086
+ * Langfuse prompt to link to observations created within this context.
13087
+ *
13088
+ * Accepts a prompt client returned by `langfuse.prompt.get(...)` or any plain
13089
+ * object exposing `name` (non-empty string) and `version` (integer) — e.g.
13090
+ * `{ name: "my-prompt", version: 3 }`. This is the recommended way to link
13091
+ * prompts to generations emitted by auto-instrumentation libraries (e.g.
13092
+ * OpenInference, other OTel instrumentations) where you don't create the
13093
+ * generation via the Langfuse SDK yourself.
13094
+ *
13095
+ * The prompt link is only applied to generation-type observations by the
13096
+ * Langfuse backend. Fallback prompts are never linked. An explicit `prompt`
13097
+ * set directly on an observation takes precedence over the propagated one.
13098
+ */
13099
+ prompt?: PropagatedPromptInput;
11413
13100
  /**
11414
13101
  * If true, propagates attributes using OpenTelemetry baggage for
11415
13102
  * cross-process/service propagation.
@@ -11436,8 +13123,9 @@ interface PropagateAttributesParams {
11436
13123
  *
11437
13124
  * This function sets attributes on the currently active span AND automatically
11438
13125
  * propagates them to all new child spans created within the callback. This is the
11439
- * recommended way to set trace-level attributes like userId, sessionId, and metadata
11440
- * dimensions that should be consistently applied across all observations in a trace.
13126
+ * recommended way to set trace-level attributes like userId, sessionId, environment,
13127
+ * and metadata dimensions that should be consistently applied across all observations
13128
+ * in a trace.
11441
13129
  *
11442
13130
  * **IMPORTANT**: Call this as early as possible within your trace/workflow. Only the
11443
13131
  * currently active span and spans created after entering this context will have these
@@ -11463,11 +13151,12 @@ interface PropagateAttributesParams {
11463
13151
  * await propagateAttributes({
11464
13152
  * userId: 'user_123',
11465
13153
  * sessionId: 'session_abc',
11466
- * metadata: { experiment: 'variant_a', environment: 'production' }
13154
+ * environment: 'production',
13155
+ * metadata: { experiment: 'variant_a' }
11467
13156
  * }, async () => {
11468
- * // All spans created here will have userId, sessionId, and metadata
13157
+ * // All spans created here will have userId, sessionId, environment, and metadata
11469
13158
  * const llmSpan = startObservation('llm_call', { input: 'Hello' });
11470
- * // This span inherits: userId, sessionId, experiment, environment
13159
+ * // This span inherits userId, sessionId, environment, and experiment metadata
11471
13160
  * llmSpan.end();
11472
13161
  *
11473
13162
  * const gen = startObservation('completion', {}, { asType: 'generation' });
@@ -11478,6 +13167,27 @@ interface PropagateAttributesParams {
11478
13167
  * ```
11479
13168
  *
11480
13169
  * @example
13170
+ * Prompt linking with auto-instrumented libraries:
13171
+ *
13172
+ * ```typescript
13173
+ * import { LangfuseClient } from '@langfuse/client';
13174
+ * import { propagateAttributes } from '@langfuse/tracing';
13175
+ *
13176
+ * const langfuse = new LangfuseClient();
13177
+ * const prompt = await langfuse.prompt.get('my-prompt');
13178
+ *
13179
+ * await propagateAttributes({ prompt }, async () => {
13180
+ * // Generations emitted by auto-instrumentation (OpenInference,
13181
+ * // other OTel instrumentations, ...) within this context are
13182
+ * // linked to the prompt version.
13183
+ * const completion = await openai.chat.completions.create({
13184
+ * model: 'gpt-4o',
13185
+ * messages: [{ role: 'user', content: prompt.compile({ topic: 'chickens' }) }],
13186
+ * });
13187
+ * });
13188
+ * ```
13189
+ *
13190
+ * @example
11481
13191
  * Late propagation (anti-pattern):
11482
13192
  *
11483
13193
  * ```typescript
@@ -11508,11 +13218,12 @@ interface PropagateAttributesParams {
11508
13218
  * await propagateAttributes({
11509
13219
  * userId: 'user_123',
11510
13220
  * sessionId: 'session_abc',
13221
+ * environment: 'staging',
11511
13222
  * asBaggage: true // Propagate via HTTP headers
11512
13223
  * }, async () => {
11513
13224
  * // Make HTTP request to Service B
11514
13225
  * const response = await fetch('https://service-b.example.com/api');
11515
- * // userId and sessionId are now in HTTP headers
13226
+ * // userId, sessionId, and environment are now in HTTP headers
11516
13227
  * });
11517
13228
  * });
11518
13229
  *
@@ -11522,9 +13233,10 @@ interface PropagateAttributesParams {
11522
13233
  * ```
11523
13234
  *
11524
13235
  * @remarks
11525
- * - **Validation**: All attribute values (userId, sessionId, metadata values)
11526
- * must be strings ≤200 characters. Invalid values will be dropped with a
11527
- * warning logged. Ensure values meet constraints before calling.
13236
+ * - **Validation**: Attribute values (userId, sessionId, metadata values) must be
13237
+ * strings ≤200 characters. Environment must be a lowercase alphanumeric string
13238
+ * with optional hyphens or underscores, must be ≤40 characters, and must not start
13239
+ * with `langfuse`. Invalid values will be dropped with a warning logged.
11528
13240
  * - **OpenTelemetry**: This uses OpenTelemetry context propagation under the hood,
11529
13241
  * making it compatible with other OTel-instrumented libraries.
11530
13242
  * - **Baggage Security**: When `asBaggage=true`, attribute values are added to HTTP
@@ -11534,6 +13246,6 @@ interface PropagateAttributesParams {
11534
13246
  * @public
11535
13247
  */
11536
13248
  declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
11537
- declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
13249
+ declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[] | number>;
11538
13250
 
11539
- export { AccessDeniedError$1 as 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, type BaseScoreV3, BlobStorageExportFieldGroup, BlobStorageExportFrequency, BlobStorageExportMode, BlobStorageExportSource, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BooleanScoreV3, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type CategoricalScoreV3, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CorrectionScoreV3, 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 DatasetItemMediaReference, DatasetItemMediaReferenceField, type DatasetItemMediaReferenceMedia, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteLlmConnectionResponse, 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 GetScoresResponseDataText, type GetScoresResponseTraceData, type GetScoresV3Meta, type GetScoresV3Request, type GetScoresV3Response, type GetSessionsRequest, type GetTraceRequest, 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, LANGFUSE_TRACE_ID_BAGGAGE_KEY, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseMediaReference, type LangfuseMediaReferenceParams, 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$1 as MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError$1 as NotFoundError, type NumericScore, type NumericScoreV1, type NumericScoreV3, 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, type ScoreSubjectExperimentV3, type ScoreSubjectObservationV3, type ScoreSubjectSessionV3, type ScoreSubjectTraceV3, ScoreSubjectV3, ScoreV1$1 as ScoreV1, ScoreV3, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type TextScore, type TextScoreV1, type TextScoreV3, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError$1 as UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UploadMediaParams, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$z as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$y as blobStorageIntegrations, bytesToBase64, index$x as comments, index$w as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$v as datasetItems, index$u as datasetRunItems, index$t as datasets, generateUUID, getEnv, getGlobalLogger, getLangfuseTraceIdFromBaggage, getPropagatedAttributesFromContext, index$s as health, index$r as ingestion, index$n as legacy, index$m as llmConnections, LoggerSingleton as logger, index$l as media, index$k as metrics, index$j as models, index$i as observations, index$h as opentelemetry, index$g as organizations, index$f as projects, index as promptVersion, index$e as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$d as scim, index$c as scoreConfigs, index$a as scores, index$b as scoresV3, serializeValue, index$9 as sessions, setLangfuseTraceIdInBaggage, index$8 as trace, index$3 as unstable, uploadMedia, index$1 as utils };
13251
+ export { AccessDeniedError$1 as 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, type BaseScoreV3, BlobStorageExportFieldGroup, BlobStorageExportFrequency, BlobStorageExportMode, BlobStorageExportSource, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, BlobStorageIntegrationFileTypeResponse, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BooleanScoreV3, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type CategoricalScoreV3, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CorrectionScoreV3, 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 CreateScoreRequest, type CreateScoreResponse, CreateScoreSource, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetItemMediaReference, DatasetItemMediaReferenceField, type DatasetItemMediaReferenceMedia, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteLlmConnectionResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type Deprecation, type EmptyResponse, Error$1 as Error, type Experiment, type ExperimentItem, type ExperimentItemsResponse, type ExperimentsResponse, type ExperimentsResponseMeta, FeedbackNotConfiguredError, FeedbackTargetType, 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 GetScoresResponseDataText, type GetScoresResponseTraceData, type GetScoresV3Meta, type GetScoresV3Request, type GetScoresV3Response, type GetSessionsRequest, type GetTraceRequest, 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, LANGFUSE_TRACE_ID_BAGGAGE_KEY, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseMediaReference, type LangfuseMediaReferenceParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListExperimentItemsRequest, type ListExperimentsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError$1 as MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError$1 as NotFoundError, type NumericScore, type NumericScoreV1, type NumericScoreV3, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type ObservationsViewSingle, 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 PropagatedPromptInput, 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, type ScoreSubjectExperimentV3, type ScoreSubjectObservationV3, type ScoreSubjectSessionV3, type ScoreSubjectTraceV3, ScoreSubjectV3, ScoreV1$1 as ScoreV1, ScoreV3, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type TextPrompt, type TextScore, type TextScoreV1, type TextScoreV3, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError$1 as UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UploadMediaParams, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$D as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$C as blobStorageIntegrations, bytesToBase64, index$B as comments, index$A as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$z as datasetItems, index$y as datasetRunItems, index$x as datasets, index$w as experiments, index$v as feedback, generateUUID, getEnv, getGlobalLogger, getLangfuseTraceIdFromBaggage, getPropagatedAttributesFromContext, index$u as health, index$t as ingestion, index$p as legacy, index$o as llmConnections, LoggerSingleton as logger, index$n as media, index$m as metrics, index$l as models, index$k as observations, index$j as opentelemetry, index$i as organizations, index$h as projects, index as promptVersion, index$g as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$f as scim, index$e as scoreConfigs, index$c as scores, index$d as scoresV3, serializeValue, index$b as sessions, setLangfuseTraceIdInBaggage, index$a as trace, index$3 as unstable, uploadMedia, index$1 as utils };