opik 1.9.37 → 1.9.39

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
@@ -500,6 +500,20 @@ interface DatasetVersionCreatePublic {
500
500
  metadata?: Record<string, string>;
501
501
  }
502
502
 
503
+ /**
504
+ * This file was auto-generated by Fern from our API Definition.
505
+ */
506
+ /**
507
+ * @example
508
+ * {
509
+ * versionRef: "version_ref"
510
+ * }
511
+ */
512
+ interface DatasetVersionRestorePublic {
513
+ /** Version hash or tag to restore from */
514
+ versionRef: string;
515
+ }
516
+
503
517
  /**
504
518
  * This file was auto-generated by Fern from our API Definition.
505
519
  */
@@ -1000,6 +1014,30 @@ declare const PromptWriteType: {
1000
1014
  readonly Jinja2: "jinja2";
1001
1015
  };
1002
1016
 
1017
+ /**
1018
+ * This file was auto-generated by Fern from our API Definition.
1019
+ */
1020
+ /**
1021
+ * Template structure type: 'text' or 'chat'. Immutable after creation.
1022
+ */
1023
+ type PromptWriteTemplateStructure = "text" | "chat";
1024
+ declare const PromptWriteTemplateStructure: {
1025
+ readonly Text: "text";
1026
+ readonly Chat: "chat";
1027
+ };
1028
+
1029
+ /**
1030
+ * This file was auto-generated by Fern from our API Definition.
1031
+ */
1032
+ /**
1033
+ * Template structure for the prompt: 'text' or 'chat'. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt's template structure is used. Template structure is immutable after prompt creation.
1034
+ */
1035
+ type CreatePromptVersionDetailTemplateStructure = "text" | "chat";
1036
+ declare const CreatePromptVersionDetailTemplateStructure: {
1037
+ readonly Text: "text";
1038
+ readonly Chat: "chat";
1039
+ };
1040
+
1003
1041
  /**
1004
1042
  * This file was auto-generated by Fern from our API Definition.
1005
1043
  */
@@ -1033,6 +1071,8 @@ interface PromptWrite {
1033
1071
  metadata?: JsonNodeWrite;
1034
1072
  changeDescription?: string;
1035
1073
  type?: PromptWriteType;
1074
+ /** Template structure type: 'text' or 'chat'. Immutable after creation. */
1075
+ templateStructure?: PromptWriteTemplateStructure;
1036
1076
  tags?: string[];
1037
1077
  }
1038
1078
 
@@ -1052,6 +1092,8 @@ interface PromptWrite {
1052
1092
  interface CreatePromptVersionDetail {
1053
1093
  name: string;
1054
1094
  version: PromptVersionDetail;
1095
+ /** Template structure for the prompt: 'text' or 'chat'. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt's template structure is used. Template structure is immutable after prompt creation. */
1096
+ templateStructure?: CreatePromptVersionDetailTemplateStructure;
1055
1097
  }
1056
1098
 
1057
1099
  /**
@@ -1415,6 +1457,7 @@ interface FindDashboardsRequest {
1415
1457
  page?: number;
1416
1458
  size?: number;
1417
1459
  name?: string;
1460
+ sorting?: string;
1418
1461
  }
1419
1462
 
1420
1463
  /**
@@ -3447,6 +3490,7 @@ interface DashboardPagePublic {
3447
3490
  page?: number;
3448
3491
  size?: number;
3449
3492
  total?: number;
3493
+ sortableBy?: string[];
3450
3494
  }
3451
3495
 
3452
3496
  /**
@@ -3744,6 +3788,7 @@ interface DatasetItemPageCompare {
3744
3788
  total?: number;
3745
3789
  columns?: ColumnCompare[];
3746
3790
  sortableBy?: string[];
3791
+ hasDraft?: boolean;
3747
3792
  }
3748
3793
 
3749
3794
  /**
@@ -4072,6 +4117,7 @@ interface DatasetItemPagePublic {
4072
4117
  total?: number;
4073
4118
  columns?: ColumnPublic[];
4074
4119
  sortableBy?: string[];
4120
+ hasDraft?: boolean;
4075
4121
  }
4076
4122
 
4077
4123
  /**
@@ -5452,6 +5498,15 @@ declare const PromptVersionDetailType: {
5452
5498
  readonly Jinja2: "jinja2";
5453
5499
  };
5454
5500
 
5501
+ /**
5502
+ * This file was auto-generated by Fern from our API Definition.
5503
+ */
5504
+ type PromptVersionDetailTemplateStructure = "text" | "chat";
5505
+ declare const PromptVersionDetailTemplateStructure: {
5506
+ readonly Text: "text";
5507
+ readonly Chat: "chat";
5508
+ };
5509
+
5455
5510
  /**
5456
5511
  * This file was auto-generated by Fern from our API Definition.
5457
5512
  */
@@ -5467,10 +5522,23 @@ interface PromptVersionDetail {
5467
5522
  type?: PromptVersionDetailType;
5468
5523
  changeDescription?: string;
5469
5524
  variables?: string[];
5525
+ templateStructure?: PromptVersionDetailTemplateStructure;
5470
5526
  createdAt?: Date;
5471
5527
  createdBy?: string;
5472
5528
  }
5473
5529
 
5530
+ /**
5531
+ * This file was auto-generated by Fern from our API Definition.
5532
+ */
5533
+ /**
5534
+ * Template structure type: 'text' or 'chat'. Immutable after creation.
5535
+ */
5536
+ type PromptDetailTemplateStructure = "text" | "chat";
5537
+ declare const PromptDetailTemplateStructure: {
5538
+ readonly Text: "text";
5539
+ readonly Chat: "chat";
5540
+ };
5541
+
5474
5542
  /**
5475
5543
  * This file was auto-generated by Fern from our API Definition.
5476
5544
  */
@@ -5479,6 +5547,8 @@ interface PromptDetail {
5479
5547
  id?: string;
5480
5548
  name: string;
5481
5549
  description?: string;
5550
+ /** Template structure type: 'text' or 'chat'. Immutable after creation. */
5551
+ templateStructure?: PromptDetailTemplateStructure;
5482
5552
  tags?: string[];
5483
5553
  createdAt?: Date;
5484
5554
  createdBy?: string;
@@ -5508,6 +5578,15 @@ declare const PromptVersionPublicType: {
5508
5578
  readonly Jinja2: "jinja2";
5509
5579
  };
5510
5580
 
5581
+ /**
5582
+ * This file was auto-generated by Fern from our API Definition.
5583
+ */
5584
+ type PromptVersionPublicTemplateStructure = "text" | "chat";
5585
+ declare const PromptVersionPublicTemplateStructure: {
5586
+ readonly Text: "text";
5587
+ readonly Chat: "chat";
5588
+ };
5589
+
5511
5590
  /**
5512
5591
  * This file was auto-generated by Fern from our API Definition.
5513
5592
  */
@@ -5522,6 +5601,7 @@ interface PromptVersionPublic {
5522
5601
  metadata?: JsonNodePublic;
5523
5602
  type?: PromptVersionPublicType;
5524
5603
  changeDescription?: string;
5604
+ templateStructure?: PromptVersionPublicTemplateStructure;
5525
5605
  createdAt?: Date;
5526
5606
  createdBy?: string;
5527
5607
  }
@@ -5541,10 +5621,25 @@ interface PromptPagePublic {
5541
5621
  /**
5542
5622
  * This file was auto-generated by Fern from our API Definition.
5543
5623
  */
5624
+ /**
5625
+ * Template structure type: 'text' or 'chat'. Immutable after creation.
5626
+ */
5627
+ type PromptPublicTemplateStructure = "text" | "chat";
5628
+ declare const PromptPublicTemplateStructure: {
5629
+ readonly Text: "text";
5630
+ readonly Chat: "chat";
5631
+ };
5632
+
5633
+ /**
5634
+ * This file was auto-generated by Fern from our API Definition.
5635
+ */
5636
+
5544
5637
  interface PromptPublic {
5545
5638
  id?: string;
5546
5639
  name: string;
5547
5640
  description?: string;
5641
+ /** Template structure type: 'text' or 'chat'. Immutable after creation. */
5642
+ templateStructure?: PromptPublicTemplateStructure;
5548
5643
  tags?: string[];
5549
5644
  createdAt?: Date;
5550
5645
  createdBy?: string;
@@ -5566,7 +5661,9 @@ interface ServiceTogglesConfig {
5566
5661
  welcomeWizardEnabled: boolean;
5567
5662
  csvUploadEnabled: boolean;
5568
5663
  exportEnabled: boolean;
5664
+ optimizationStudioEnabled: boolean;
5569
5665
  dashboardsEnabled: boolean;
5666
+ datasetVersioningEnabled: boolean;
5570
5667
  }
5571
5668
 
5572
5669
  /**
@@ -7081,6 +7178,19 @@ declare class Dashboards {
7081
7178
  */
7082
7179
  updateDashboard(dashboardId: string, request?: DashboardUpdatePublic, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<DashboardPublic>;
7083
7180
  private __updateDashboard;
7181
+ /**
7182
+ * Delete dashboards batch
7183
+ *
7184
+ * @param {OpikApi.BatchDelete} request
7185
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
7186
+ *
7187
+ * @example
7188
+ * await client.dashboards.deleteDashboardsBatch({
7189
+ * ids: ["ids"]
7190
+ * })
7191
+ */
7192
+ deleteDashboardsBatch(request: BatchDelete, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<void>;
7193
+ private __deleteDashboardsBatch;
7084
7194
  protected _getCustomAuthorizationHeaders(): Promise<{
7085
7195
  Authorization: string | undefined;
7086
7196
  }>;
@@ -7490,6 +7600,22 @@ declare class Datasets {
7490
7600
  */
7491
7601
  deleteVersionTag(versionHash: string, tag: string, id: string, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<void>;
7492
7602
  private __deleteVersionTag;
7603
+ /**
7604
+ * Restores the dataset to a previous version state. All draft items are replaced with items from the specified version. If the version is not the latest, a new version snapshot is created. If the version is the latest, only draft items are replaced (revert functionality).
7605
+ *
7606
+ * @param {string} id
7607
+ * @param {OpikApi.DatasetVersionRestorePublic} request
7608
+ * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
7609
+ *
7610
+ * @throws {@link OpikApi.NotFoundError}
7611
+ *
7612
+ * @example
7613
+ * await client.datasets.restoreDatasetVersion("id", {
7614
+ * versionRef: "version_ref"
7615
+ * })
7616
+ */
7617
+ restoreDatasetVersion(id: string, request: DatasetVersionRestorePublic, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetVersionPublic>;
7618
+ private __restoreDatasetVersion;
7493
7619
  protected _getCustomAuthorizationHeaders(): Promise<{
7494
7620
  Authorization: string | undefined;
7495
7621
  }>;
package/dist/index.d.ts CHANGED
@@ -500,6 +500,20 @@ interface DatasetVersionCreatePublic {
500
500
  metadata?: Record<string, string>;
501
501
  }
502
502
 
503
+ /**
504
+ * This file was auto-generated by Fern from our API Definition.
505
+ */
506
+ /**
507
+ * @example
508
+ * {
509
+ * versionRef: "version_ref"
510
+ * }
511
+ */
512
+ interface DatasetVersionRestorePublic {
513
+ /** Version hash or tag to restore from */
514
+ versionRef: string;
515
+ }
516
+
503
517
  /**
504
518
  * This file was auto-generated by Fern from our API Definition.
505
519
  */
@@ -1000,6 +1014,30 @@ declare const PromptWriteType: {
1000
1014
  readonly Jinja2: "jinja2";
1001
1015
  };
1002
1016
 
1017
+ /**
1018
+ * This file was auto-generated by Fern from our API Definition.
1019
+ */
1020
+ /**
1021
+ * Template structure type: 'text' or 'chat'. Immutable after creation.
1022
+ */
1023
+ type PromptWriteTemplateStructure = "text" | "chat";
1024
+ declare const PromptWriteTemplateStructure: {
1025
+ readonly Text: "text";
1026
+ readonly Chat: "chat";
1027
+ };
1028
+
1029
+ /**
1030
+ * This file was auto-generated by Fern from our API Definition.
1031
+ */
1032
+ /**
1033
+ * Template structure for the prompt: 'text' or 'chat'. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt's template structure is used. Template structure is immutable after prompt creation.
1034
+ */
1035
+ type CreatePromptVersionDetailTemplateStructure = "text" | "chat";
1036
+ declare const CreatePromptVersionDetailTemplateStructure: {
1037
+ readonly Text: "text";
1038
+ readonly Chat: "chat";
1039
+ };
1040
+
1003
1041
  /**
1004
1042
  * This file was auto-generated by Fern from our API Definition.
1005
1043
  */
@@ -1033,6 +1071,8 @@ interface PromptWrite {
1033
1071
  metadata?: JsonNodeWrite;
1034
1072
  changeDescription?: string;
1035
1073
  type?: PromptWriteType;
1074
+ /** Template structure type: 'text' or 'chat'. Immutable after creation. */
1075
+ templateStructure?: PromptWriteTemplateStructure;
1036
1076
  tags?: string[];
1037
1077
  }
1038
1078
 
@@ -1052,6 +1092,8 @@ interface PromptWrite {
1052
1092
  interface CreatePromptVersionDetail {
1053
1093
  name: string;
1054
1094
  version: PromptVersionDetail;
1095
+ /** Template structure for the prompt: 'text' or 'chat'. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt's template structure is used. Template structure is immutable after prompt creation. */
1096
+ templateStructure?: CreatePromptVersionDetailTemplateStructure;
1055
1097
  }
1056
1098
 
1057
1099
  /**
@@ -1415,6 +1457,7 @@ interface FindDashboardsRequest {
1415
1457
  page?: number;
1416
1458
  size?: number;
1417
1459
  name?: string;
1460
+ sorting?: string;
1418
1461
  }
1419
1462
 
1420
1463
  /**
@@ -3447,6 +3490,7 @@ interface DashboardPagePublic {
3447
3490
  page?: number;
3448
3491
  size?: number;
3449
3492
  total?: number;
3493
+ sortableBy?: string[];
3450
3494
  }
3451
3495
 
3452
3496
  /**
@@ -3744,6 +3788,7 @@ interface DatasetItemPageCompare {
3744
3788
  total?: number;
3745
3789
  columns?: ColumnCompare[];
3746
3790
  sortableBy?: string[];
3791
+ hasDraft?: boolean;
3747
3792
  }
3748
3793
 
3749
3794
  /**
@@ -4072,6 +4117,7 @@ interface DatasetItemPagePublic {
4072
4117
  total?: number;
4073
4118
  columns?: ColumnPublic[];
4074
4119
  sortableBy?: string[];
4120
+ hasDraft?: boolean;
4075
4121
  }
4076
4122
 
4077
4123
  /**
@@ -5452,6 +5498,15 @@ declare const PromptVersionDetailType: {
5452
5498
  readonly Jinja2: "jinja2";
5453
5499
  };
5454
5500
 
5501
+ /**
5502
+ * This file was auto-generated by Fern from our API Definition.
5503
+ */
5504
+ type PromptVersionDetailTemplateStructure = "text" | "chat";
5505
+ declare const PromptVersionDetailTemplateStructure: {
5506
+ readonly Text: "text";
5507
+ readonly Chat: "chat";
5508
+ };
5509
+
5455
5510
  /**
5456
5511
  * This file was auto-generated by Fern from our API Definition.
5457
5512
  */
@@ -5467,10 +5522,23 @@ interface PromptVersionDetail {
5467
5522
  type?: PromptVersionDetailType;
5468
5523
  changeDescription?: string;
5469
5524
  variables?: string[];
5525
+ templateStructure?: PromptVersionDetailTemplateStructure;
5470
5526
  createdAt?: Date;
5471
5527
  createdBy?: string;
5472
5528
  }
5473
5529
 
5530
+ /**
5531
+ * This file was auto-generated by Fern from our API Definition.
5532
+ */
5533
+ /**
5534
+ * Template structure type: 'text' or 'chat'. Immutable after creation.
5535
+ */
5536
+ type PromptDetailTemplateStructure = "text" | "chat";
5537
+ declare const PromptDetailTemplateStructure: {
5538
+ readonly Text: "text";
5539
+ readonly Chat: "chat";
5540
+ };
5541
+
5474
5542
  /**
5475
5543
  * This file was auto-generated by Fern from our API Definition.
5476
5544
  */
@@ -5479,6 +5547,8 @@ interface PromptDetail {
5479
5547
  id?: string;
5480
5548
  name: string;
5481
5549
  description?: string;
5550
+ /** Template structure type: 'text' or 'chat'. Immutable after creation. */
5551
+ templateStructure?: PromptDetailTemplateStructure;
5482
5552
  tags?: string[];
5483
5553
  createdAt?: Date;
5484
5554
  createdBy?: string;
@@ -5508,6 +5578,15 @@ declare const PromptVersionPublicType: {
5508
5578
  readonly Jinja2: "jinja2";
5509
5579
  };
5510
5580
 
5581
+ /**
5582
+ * This file was auto-generated by Fern from our API Definition.
5583
+ */
5584
+ type PromptVersionPublicTemplateStructure = "text" | "chat";
5585
+ declare const PromptVersionPublicTemplateStructure: {
5586
+ readonly Text: "text";
5587
+ readonly Chat: "chat";
5588
+ };
5589
+
5511
5590
  /**
5512
5591
  * This file was auto-generated by Fern from our API Definition.
5513
5592
  */
@@ -5522,6 +5601,7 @@ interface PromptVersionPublic {
5522
5601
  metadata?: JsonNodePublic;
5523
5602
  type?: PromptVersionPublicType;
5524
5603
  changeDescription?: string;
5604
+ templateStructure?: PromptVersionPublicTemplateStructure;
5525
5605
  createdAt?: Date;
5526
5606
  createdBy?: string;
5527
5607
  }
@@ -5541,10 +5621,25 @@ interface PromptPagePublic {
5541
5621
  /**
5542
5622
  * This file was auto-generated by Fern from our API Definition.
5543
5623
  */
5624
+ /**
5625
+ * Template structure type: 'text' or 'chat'. Immutable after creation.
5626
+ */
5627
+ type PromptPublicTemplateStructure = "text" | "chat";
5628
+ declare const PromptPublicTemplateStructure: {
5629
+ readonly Text: "text";
5630
+ readonly Chat: "chat";
5631
+ };
5632
+
5633
+ /**
5634
+ * This file was auto-generated by Fern from our API Definition.
5635
+ */
5636
+
5544
5637
  interface PromptPublic {
5545
5638
  id?: string;
5546
5639
  name: string;
5547
5640
  description?: string;
5641
+ /** Template structure type: 'text' or 'chat'. Immutable after creation. */
5642
+ templateStructure?: PromptPublicTemplateStructure;
5548
5643
  tags?: string[];
5549
5644
  createdAt?: Date;
5550
5645
  createdBy?: string;
@@ -5566,7 +5661,9 @@ interface ServiceTogglesConfig {
5566
5661
  welcomeWizardEnabled: boolean;
5567
5662
  csvUploadEnabled: boolean;
5568
5663
  exportEnabled: boolean;
5664
+ optimizationStudioEnabled: boolean;
5569
5665
  dashboardsEnabled: boolean;
5666
+ datasetVersioningEnabled: boolean;
5570
5667
  }
5571
5668
 
5572
5669
  /**
@@ -7081,6 +7178,19 @@ declare class Dashboards {
7081
7178
  */
7082
7179
  updateDashboard(dashboardId: string, request?: DashboardUpdatePublic, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<DashboardPublic>;
7083
7180
  private __updateDashboard;
7181
+ /**
7182
+ * Delete dashboards batch
7183
+ *
7184
+ * @param {OpikApi.BatchDelete} request
7185
+ * @param {Dashboards.RequestOptions} requestOptions - Request-specific configuration.
7186
+ *
7187
+ * @example
7188
+ * await client.dashboards.deleteDashboardsBatch({
7189
+ * ids: ["ids"]
7190
+ * })
7191
+ */
7192
+ deleteDashboardsBatch(request: BatchDelete, requestOptions?: Dashboards.RequestOptions): HttpResponsePromise<void>;
7193
+ private __deleteDashboardsBatch;
7084
7194
  protected _getCustomAuthorizationHeaders(): Promise<{
7085
7195
  Authorization: string | undefined;
7086
7196
  }>;
@@ -7490,6 +7600,22 @@ declare class Datasets {
7490
7600
  */
7491
7601
  deleteVersionTag(versionHash: string, tag: string, id: string, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<void>;
7492
7602
  private __deleteVersionTag;
7603
+ /**
7604
+ * Restores the dataset to a previous version state. All draft items are replaced with items from the specified version. If the version is not the latest, a new version snapshot is created. If the version is the latest, only draft items are replaced (revert functionality).
7605
+ *
7606
+ * @param {string} id
7607
+ * @param {OpikApi.DatasetVersionRestorePublic} request
7608
+ * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
7609
+ *
7610
+ * @throws {@link OpikApi.NotFoundError}
7611
+ *
7612
+ * @example
7613
+ * await client.datasets.restoreDatasetVersion("id", {
7614
+ * versionRef: "version_ref"
7615
+ * })
7616
+ */
7617
+ restoreDatasetVersion(id: string, request: DatasetVersionRestorePublic, requestOptions?: Datasets.RequestOptions): HttpResponsePromise<DatasetVersionPublic>;
7618
+ private __restoreDatasetVersion;
7493
7619
  protected _getCustomAuthorizationHeaders(): Promise<{
7494
7620
  Authorization: string | undefined;
7495
7621
  }>;