opik 1.8.64 → 1.8.66

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.
@@ -292,6 +292,20 @@ interface DatasetIdentifierPublic {
292
292
  datasetName: string;
293
293
  }
294
294
 
295
+ /**
296
+ * This file was auto-generated by Fern from our API Definition.
297
+ */
298
+ /**
299
+ * @example
300
+ * {
301
+ * experimentIds: "experiment_ids"
302
+ * }
303
+ */
304
+ interface GetDatasetExperimentItemsStatsRequest {
305
+ experimentIds: string;
306
+ filters?: string;
307
+ }
308
+
295
309
  /**
296
310
  * This file was auto-generated by Fern from our API Definition.
297
311
  */
@@ -987,6 +1001,17 @@ interface SpanBatchWrite {
987
1001
  spans: SpanWrite[];
988
1002
  }
989
1003
 
1004
+ /**
1005
+ * This file was auto-generated by Fern from our API Definition.
1006
+ */
1007
+ /**
1008
+ * @example
1009
+ * {}
1010
+ */
1011
+ interface GetSpanByIdRequest {
1012
+ truncate?: boolean;
1013
+ }
1014
+
990
1015
  /**
991
1016
  * This file was auto-generated by Fern from our API Definition.
992
1017
  */
@@ -1289,6 +1314,17 @@ interface TraceBatchWrite {
1289
1314
  traces: TraceWrite[];
1290
1315
  }
1291
1316
 
1317
+ /**
1318
+ * This file was auto-generated by Fern from our API Definition.
1319
+ */
1320
+ /**
1321
+ * @example
1322
+ * {}
1323
+ */
1324
+ interface GetTraceByIdRequest {
1325
+ truncate?: boolean;
1326
+ }
1327
+
1292
1328
  /**
1293
1329
  * This file was auto-generated by Fern from our API Definition.
1294
1330
  */
@@ -1640,7 +1676,7 @@ interface WebhookWrite {
1640
1676
  id?: string;
1641
1677
  name?: string;
1642
1678
  url: string;
1643
- secretToken: string;
1679
+ secretToken?: string;
1644
1680
  headers?: Record<string, string>;
1645
1681
  }
1646
1682
 
@@ -1737,7 +1773,7 @@ interface WebhookPublic {
1737
1773
  id?: string;
1738
1774
  name?: string;
1739
1775
  url: string;
1740
- secretToken: string;
1776
+ secretToken?: string;
1741
1777
  headers?: Record<string, string>;
1742
1778
  createdAt?: Date;
1743
1779
  createdBy?: string;
@@ -3077,6 +3113,65 @@ interface DatasetPublic {
3077
3113
  lastCreatedOptimizationAt?: Date;
3078
3114
  }
3079
3115
 
3116
+ /**
3117
+ * This file was auto-generated by Fern from our API Definition.
3118
+ */
3119
+ interface AvgValueStatPublic {
3120
+ value?: number;
3121
+ }
3122
+
3123
+ /**
3124
+ * This file was auto-generated by Fern from our API Definition.
3125
+ */
3126
+ interface CountValueStatPublic {
3127
+ value?: number;
3128
+ }
3129
+
3130
+ /**
3131
+ * This file was auto-generated by Fern from our API Definition.
3132
+ */
3133
+
3134
+ interface PercentageValueStatPublic {
3135
+ value?: PercentageValuesPublic;
3136
+ }
3137
+
3138
+ /**
3139
+ * This file was auto-generated by Fern from our API Definition.
3140
+ */
3141
+ interface PercentageValuesPublic {
3142
+ p50?: number;
3143
+ p90?: number;
3144
+ p99?: number;
3145
+ }
3146
+
3147
+ /**
3148
+ * This file was auto-generated by Fern from our API Definition.
3149
+ */
3150
+
3151
+ type ProjectStatItemObjectPublic = ProjectStatItemObjectPublic.Percentage | ProjectStatItemObjectPublic.Count | ProjectStatItemObjectPublic.Avg;
3152
+ declare namespace ProjectStatItemObjectPublic {
3153
+ interface Percentage extends PercentageValueStatPublic, _Base {
3154
+ type: "PERCENTAGE";
3155
+ }
3156
+ interface Count extends CountValueStatPublic, _Base {
3157
+ type: "COUNT";
3158
+ }
3159
+ interface Avg extends AvgValueStatPublic, _Base {
3160
+ type: "AVG";
3161
+ }
3162
+ interface _Base {
3163
+ name?: string;
3164
+ }
3165
+ }
3166
+
3167
+ /**
3168
+ * This file was auto-generated by Fern from our API Definition.
3169
+ */
3170
+
3171
+ interface ProjectStatsPublic {
3172
+ stats?: ProjectStatItemObjectPublic[];
3173
+ }
3174
+
3080
3175
  /**
3081
3176
  * This file was auto-generated by Fern from our API Definition.
3082
3177
  */
@@ -3583,15 +3678,6 @@ interface ExperimentPublic {
3583
3678
  */
3584
3679
  type JsonListStringPublic = Record<string, unknown> | Record<string, unknown>[] | string;
3585
3680
 
3586
- /**
3587
- * This file was auto-generated by Fern from our API Definition.
3588
- */
3589
- interface PercentageValuesPublic {
3590
- p50?: number;
3591
- p90?: number;
3592
- p99?: number;
3593
- }
3594
-
3595
3681
  /**
3596
3682
  * This file was auto-generated by Fern from our API Definition.
3597
3683
  */
@@ -4352,6 +4438,7 @@ interface ServiceTogglesConfig {
4352
4438
  traceThreadPythonEvaluatorEnabled: boolean;
4353
4439
  guardrailsEnabled: boolean;
4354
4440
  opikAiEnabled: boolean;
4441
+ alertsEnabled: boolean;
4355
4442
  }
4356
4443
 
4357
4444
  /**
@@ -4525,56 +4612,6 @@ interface SpanPagePublic {
4525
4612
  sortableBy?: string[];
4526
4613
  }
4527
4614
 
4528
- /**
4529
- * This file was auto-generated by Fern from our API Definition.
4530
- */
4531
- interface AvgValueStatPublic {
4532
- value?: number;
4533
- }
4534
-
4535
- /**
4536
- * This file was auto-generated by Fern from our API Definition.
4537
- */
4538
- interface CountValueStatPublic {
4539
- value?: number;
4540
- }
4541
-
4542
- /**
4543
- * This file was auto-generated by Fern from our API Definition.
4544
- */
4545
-
4546
- interface PercentageValueStatPublic {
4547
- value?: PercentageValuesPublic;
4548
- }
4549
-
4550
- /**
4551
- * This file was auto-generated by Fern from our API Definition.
4552
- */
4553
-
4554
- type ProjectStatItemObjectPublic = ProjectStatItemObjectPublic.Percentage | ProjectStatItemObjectPublic.Count | ProjectStatItemObjectPublic.Avg;
4555
- declare namespace ProjectStatItemObjectPublic {
4556
- interface Percentage extends PercentageValueStatPublic, _Base {
4557
- type: "PERCENTAGE";
4558
- }
4559
- interface Count extends CountValueStatPublic, _Base {
4560
- type: "COUNT";
4561
- }
4562
- interface Avg extends AvgValueStatPublic, _Base {
4563
- type: "AVG";
4564
- }
4565
- interface _Base {
4566
- name?: string;
4567
- }
4568
- }
4569
-
4570
- /**
4571
- * This file was auto-generated by Fern from our API Definition.
4572
- */
4573
-
4574
- interface ProjectStatsPublic {
4575
- stats?: ProjectStatItemObjectPublic[];
4576
- }
4577
-
4578
4615
  /**
4579
4616
  * This file was auto-generated by Fern from our API Definition.
4580
4617
  */
@@ -5148,8 +5185,7 @@ declare class Alerts {
5148
5185
  * await client.alerts.createAlert({
5149
5186
  * name: "name",
5150
5187
  * webhook: {
5151
- * url: "url",
5152
- * secretToken: "secret_token"
5188
+ * url: "url"
5153
5189
  * }
5154
5190
  * })
5155
5191
  */
@@ -5198,8 +5234,7 @@ declare class Alerts {
5198
5234
  * await client.alerts.updateAlert("id", {
5199
5235
  * name: "name",
5200
5236
  * webhook: {
5201
- * url: "url",
5202
- * secretToken: "secret_token"
5237
+ * url: "url"
5203
5238
  * }
5204
5239
  * })
5205
5240
  */
@@ -5959,6 +5994,20 @@ declare class Datasets {
5959
5994
  */
5960
5995
  getDatasetByIdentifier(request: DatasetIdentifierPublic, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetPublic>;
5961
5996
  private __getDatasetByIdentifier;
5997
+ /**
5998
+ * Get experiment items stats for dataset
5999
+ *
6000
+ * @param {string} id
6001
+ * @param {OpikApi.GetDatasetExperimentItemsStatsRequest} request
6002
+ * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
6003
+ *
6004
+ * @example
6005
+ * await client.datasets.getDatasetExperimentItemsStats("id", {
6006
+ * experimentIds: "experiment_ids"
6007
+ * })
6008
+ */
6009
+ getDatasetExperimentItemsStats(id: string, request: GetDatasetExperimentItemsStatsRequest, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<ProjectStatsPublic>;
6010
+ private __getDatasetExperimentItemsStats;
5962
6011
  /**
5963
6012
  * Get dataset item by id
5964
6013
  *
@@ -7214,6 +7263,7 @@ declare class Spans {
7214
7263
  * Get span by id
7215
7264
  *
7216
7265
  * @param {string} id
7266
+ * @param {OpikApi.GetSpanByIdRequest} request
7217
7267
  * @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
7218
7268
  *
7219
7269
  * @throws {@link OpikApi.NotFoundError}
@@ -7221,7 +7271,7 @@ declare class Spans {
7221
7271
  * @example
7222
7272
  * await client.spans.getSpanById("id")
7223
7273
  */
7224
- getSpanById(id: string, requestOptions?: Spans.RequestOptions): HttpResponsePromise<SpanPublic>;
7274
+ getSpanById(id: string, request?: GetSpanByIdRequest, requestOptions?: Spans.RequestOptions): HttpResponsePromise<SpanPublic>;
7225
7275
  private __getSpanById;
7226
7276
  /**
7227
7277
  * Delete span by id
@@ -7495,12 +7545,13 @@ declare class Traces {
7495
7545
  * Get trace by id
7496
7546
  *
7497
7547
  * @param {string} id
7548
+ * @param {OpikApi.GetTraceByIdRequest} request
7498
7549
  * @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
7499
7550
  *
7500
7551
  * @example
7501
7552
  * await client.traces.getTraceById("id")
7502
7553
  */
7503
- getTraceById(id: string, requestOptions?: Traces.RequestOptions): HttpResponsePromise<TracePublic>;
7554
+ getTraceById(id: string, request?: GetTraceByIdRequest, requestOptions?: Traces.RequestOptions): HttpResponsePromise<TracePublic>;
7504
7555
  private __getTraceById;
7505
7556
  /**
7506
7557
  * Delete trace by id
@@ -292,6 +292,20 @@ interface DatasetIdentifierPublic {
292
292
  datasetName: string;
293
293
  }
294
294
 
295
+ /**
296
+ * This file was auto-generated by Fern from our API Definition.
297
+ */
298
+ /**
299
+ * @example
300
+ * {
301
+ * experimentIds: "experiment_ids"
302
+ * }
303
+ */
304
+ interface GetDatasetExperimentItemsStatsRequest {
305
+ experimentIds: string;
306
+ filters?: string;
307
+ }
308
+
295
309
  /**
296
310
  * This file was auto-generated by Fern from our API Definition.
297
311
  */
@@ -987,6 +1001,17 @@ interface SpanBatchWrite {
987
1001
  spans: SpanWrite[];
988
1002
  }
989
1003
 
1004
+ /**
1005
+ * This file was auto-generated by Fern from our API Definition.
1006
+ */
1007
+ /**
1008
+ * @example
1009
+ * {}
1010
+ */
1011
+ interface GetSpanByIdRequest {
1012
+ truncate?: boolean;
1013
+ }
1014
+
990
1015
  /**
991
1016
  * This file was auto-generated by Fern from our API Definition.
992
1017
  */
@@ -1289,6 +1314,17 @@ interface TraceBatchWrite {
1289
1314
  traces: TraceWrite[];
1290
1315
  }
1291
1316
 
1317
+ /**
1318
+ * This file was auto-generated by Fern from our API Definition.
1319
+ */
1320
+ /**
1321
+ * @example
1322
+ * {}
1323
+ */
1324
+ interface GetTraceByIdRequest {
1325
+ truncate?: boolean;
1326
+ }
1327
+
1292
1328
  /**
1293
1329
  * This file was auto-generated by Fern from our API Definition.
1294
1330
  */
@@ -1640,7 +1676,7 @@ interface WebhookWrite {
1640
1676
  id?: string;
1641
1677
  name?: string;
1642
1678
  url: string;
1643
- secretToken: string;
1679
+ secretToken?: string;
1644
1680
  headers?: Record<string, string>;
1645
1681
  }
1646
1682
 
@@ -1737,7 +1773,7 @@ interface WebhookPublic {
1737
1773
  id?: string;
1738
1774
  name?: string;
1739
1775
  url: string;
1740
- secretToken: string;
1776
+ secretToken?: string;
1741
1777
  headers?: Record<string, string>;
1742
1778
  createdAt?: Date;
1743
1779
  createdBy?: string;
@@ -3077,6 +3113,65 @@ interface DatasetPublic {
3077
3113
  lastCreatedOptimizationAt?: Date;
3078
3114
  }
3079
3115
 
3116
+ /**
3117
+ * This file was auto-generated by Fern from our API Definition.
3118
+ */
3119
+ interface AvgValueStatPublic {
3120
+ value?: number;
3121
+ }
3122
+
3123
+ /**
3124
+ * This file was auto-generated by Fern from our API Definition.
3125
+ */
3126
+ interface CountValueStatPublic {
3127
+ value?: number;
3128
+ }
3129
+
3130
+ /**
3131
+ * This file was auto-generated by Fern from our API Definition.
3132
+ */
3133
+
3134
+ interface PercentageValueStatPublic {
3135
+ value?: PercentageValuesPublic;
3136
+ }
3137
+
3138
+ /**
3139
+ * This file was auto-generated by Fern from our API Definition.
3140
+ */
3141
+ interface PercentageValuesPublic {
3142
+ p50?: number;
3143
+ p90?: number;
3144
+ p99?: number;
3145
+ }
3146
+
3147
+ /**
3148
+ * This file was auto-generated by Fern from our API Definition.
3149
+ */
3150
+
3151
+ type ProjectStatItemObjectPublic = ProjectStatItemObjectPublic.Percentage | ProjectStatItemObjectPublic.Count | ProjectStatItemObjectPublic.Avg;
3152
+ declare namespace ProjectStatItemObjectPublic {
3153
+ interface Percentage extends PercentageValueStatPublic, _Base {
3154
+ type: "PERCENTAGE";
3155
+ }
3156
+ interface Count extends CountValueStatPublic, _Base {
3157
+ type: "COUNT";
3158
+ }
3159
+ interface Avg extends AvgValueStatPublic, _Base {
3160
+ type: "AVG";
3161
+ }
3162
+ interface _Base {
3163
+ name?: string;
3164
+ }
3165
+ }
3166
+
3167
+ /**
3168
+ * This file was auto-generated by Fern from our API Definition.
3169
+ */
3170
+
3171
+ interface ProjectStatsPublic {
3172
+ stats?: ProjectStatItemObjectPublic[];
3173
+ }
3174
+
3080
3175
  /**
3081
3176
  * This file was auto-generated by Fern from our API Definition.
3082
3177
  */
@@ -3583,15 +3678,6 @@ interface ExperimentPublic {
3583
3678
  */
3584
3679
  type JsonListStringPublic = Record<string, unknown> | Record<string, unknown>[] | string;
3585
3680
 
3586
- /**
3587
- * This file was auto-generated by Fern from our API Definition.
3588
- */
3589
- interface PercentageValuesPublic {
3590
- p50?: number;
3591
- p90?: number;
3592
- p99?: number;
3593
- }
3594
-
3595
3681
  /**
3596
3682
  * This file was auto-generated by Fern from our API Definition.
3597
3683
  */
@@ -4352,6 +4438,7 @@ interface ServiceTogglesConfig {
4352
4438
  traceThreadPythonEvaluatorEnabled: boolean;
4353
4439
  guardrailsEnabled: boolean;
4354
4440
  opikAiEnabled: boolean;
4441
+ alertsEnabled: boolean;
4355
4442
  }
4356
4443
 
4357
4444
  /**
@@ -4525,56 +4612,6 @@ interface SpanPagePublic {
4525
4612
  sortableBy?: string[];
4526
4613
  }
4527
4614
 
4528
- /**
4529
- * This file was auto-generated by Fern from our API Definition.
4530
- */
4531
- interface AvgValueStatPublic {
4532
- value?: number;
4533
- }
4534
-
4535
- /**
4536
- * This file was auto-generated by Fern from our API Definition.
4537
- */
4538
- interface CountValueStatPublic {
4539
- value?: number;
4540
- }
4541
-
4542
- /**
4543
- * This file was auto-generated by Fern from our API Definition.
4544
- */
4545
-
4546
- interface PercentageValueStatPublic {
4547
- value?: PercentageValuesPublic;
4548
- }
4549
-
4550
- /**
4551
- * This file was auto-generated by Fern from our API Definition.
4552
- */
4553
-
4554
- type ProjectStatItemObjectPublic = ProjectStatItemObjectPublic.Percentage | ProjectStatItemObjectPublic.Count | ProjectStatItemObjectPublic.Avg;
4555
- declare namespace ProjectStatItemObjectPublic {
4556
- interface Percentage extends PercentageValueStatPublic, _Base {
4557
- type: "PERCENTAGE";
4558
- }
4559
- interface Count extends CountValueStatPublic, _Base {
4560
- type: "COUNT";
4561
- }
4562
- interface Avg extends AvgValueStatPublic, _Base {
4563
- type: "AVG";
4564
- }
4565
- interface _Base {
4566
- name?: string;
4567
- }
4568
- }
4569
-
4570
- /**
4571
- * This file was auto-generated by Fern from our API Definition.
4572
- */
4573
-
4574
- interface ProjectStatsPublic {
4575
- stats?: ProjectStatItemObjectPublic[];
4576
- }
4577
-
4578
4615
  /**
4579
4616
  * This file was auto-generated by Fern from our API Definition.
4580
4617
  */
@@ -5148,8 +5185,7 @@ declare class Alerts {
5148
5185
  * await client.alerts.createAlert({
5149
5186
  * name: "name",
5150
5187
  * webhook: {
5151
- * url: "url",
5152
- * secretToken: "secret_token"
5188
+ * url: "url"
5153
5189
  * }
5154
5190
  * })
5155
5191
  */
@@ -5198,8 +5234,7 @@ declare class Alerts {
5198
5234
  * await client.alerts.updateAlert("id", {
5199
5235
  * name: "name",
5200
5236
  * webhook: {
5201
- * url: "url",
5202
- * secretToken: "secret_token"
5237
+ * url: "url"
5203
5238
  * }
5204
5239
  * })
5205
5240
  */
@@ -5959,6 +5994,20 @@ declare class Datasets {
5959
5994
  */
5960
5995
  getDatasetByIdentifier(request: DatasetIdentifierPublic, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetPublic>;
5961
5996
  private __getDatasetByIdentifier;
5997
+ /**
5998
+ * Get experiment items stats for dataset
5999
+ *
6000
+ * @param {string} id
6001
+ * @param {OpikApi.GetDatasetExperimentItemsStatsRequest} request
6002
+ * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
6003
+ *
6004
+ * @example
6005
+ * await client.datasets.getDatasetExperimentItemsStats("id", {
6006
+ * experimentIds: "experiment_ids"
6007
+ * })
6008
+ */
6009
+ getDatasetExperimentItemsStats(id: string, request: GetDatasetExperimentItemsStatsRequest, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<ProjectStatsPublic>;
6010
+ private __getDatasetExperimentItemsStats;
5962
6011
  /**
5963
6012
  * Get dataset item by id
5964
6013
  *
@@ -7214,6 +7263,7 @@ declare class Spans {
7214
7263
  * Get span by id
7215
7264
  *
7216
7265
  * @param {string} id
7266
+ * @param {OpikApi.GetSpanByIdRequest} request
7217
7267
  * @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
7218
7268
  *
7219
7269
  * @throws {@link OpikApi.NotFoundError}
@@ -7221,7 +7271,7 @@ declare class Spans {
7221
7271
  * @example
7222
7272
  * await client.spans.getSpanById("id")
7223
7273
  */
7224
- getSpanById(id: string, requestOptions?: Spans.RequestOptions): HttpResponsePromise<SpanPublic>;
7274
+ getSpanById(id: string, request?: GetSpanByIdRequest, requestOptions?: Spans.RequestOptions): HttpResponsePromise<SpanPublic>;
7225
7275
  private __getSpanById;
7226
7276
  /**
7227
7277
  * Delete span by id
@@ -7495,12 +7545,13 @@ declare class Traces {
7495
7545
  * Get trace by id
7496
7546
  *
7497
7547
  * @param {string} id
7548
+ * @param {OpikApi.GetTraceByIdRequest} request
7498
7549
  * @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
7499
7550
  *
7500
7551
  * @example
7501
7552
  * await client.traces.getTraceById("id")
7502
7553
  */
7503
- getTraceById(id: string, requestOptions?: Traces.RequestOptions): HttpResponsePromise<TracePublic>;
7554
+ getTraceById(id: string, request?: GetTraceByIdRequest, requestOptions?: Traces.RequestOptions): HttpResponsePromise<TracePublic>;
7504
7555
  private __getTraceById;
7505
7556
  /**
7506
7557
  * Delete trace by id