opik 1.8.84 → 1.8.86
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/{Client-CEIekgCZ.d.cts → Client-BMjFLeAt.d.cts} +182 -51
- package/dist/{Client-CEIekgCZ.d.ts → Client-BMjFLeAt.d.ts} +182 -51
- package/dist/chunk-K5L6K4RC.js +13 -0
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/vercel/index.cjs +9 -9
- package/dist/vercel/index.d.cts +1 -1
- package/dist/vercel/index.d.ts +1 -1
- package/dist/vercel/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-54RLVONR.js +0 -13
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
import * as stream from 'stream';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5
|
+
*/
|
|
6
|
+
type GetWebhookExamplesRequestAlertType = "general" | "slack" | "pagerduty";
|
|
7
|
+
declare const GetWebhookExamplesRequestAlertType: {
|
|
8
|
+
readonly General: "general";
|
|
9
|
+
readonly Slack: "slack";
|
|
10
|
+
readonly Pagerduty: "pagerduty";
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
* {}
|
|
19
|
+
*/
|
|
20
|
+
interface FindAlertsRequest {
|
|
21
|
+
page?: number;
|
|
22
|
+
size?: number;
|
|
23
|
+
sorting?: string;
|
|
24
|
+
filters?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @example
|
|
33
|
+
* {}
|
|
34
|
+
*/
|
|
35
|
+
interface GetWebhookExamplesRequest {
|
|
36
|
+
alertType?: GetWebhookExamplesRequestAlertType;
|
|
37
|
+
}
|
|
38
|
+
|
|
3
39
|
/**
|
|
4
40
|
* This file was auto-generated by Fern from our API Definition.
|
|
5
41
|
*/
|
|
@@ -1090,20 +1126,6 @@ interface SpanSearchStreamRequestPublic {
|
|
|
1090
1126
|
truncate?: boolean;
|
|
1091
1127
|
}
|
|
1092
1128
|
|
|
1093
|
-
/**
|
|
1094
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
1095
|
-
*/
|
|
1096
|
-
/**
|
|
1097
|
-
* @example
|
|
1098
|
-
* {}
|
|
1099
|
-
*/
|
|
1100
|
-
interface FindAlertsRequest {
|
|
1101
|
-
page?: number;
|
|
1102
|
-
size?: number;
|
|
1103
|
-
sorting?: string;
|
|
1104
|
-
filters?: string;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
1129
|
/**
|
|
1108
1130
|
* This file was auto-generated by Fern from our API Definition.
|
|
1109
1131
|
*/
|
|
@@ -1685,6 +1707,16 @@ interface AlertTriggerWrite {
|
|
|
1685
1707
|
triggerConfigs?: AlertTriggerConfigWrite[];
|
|
1686
1708
|
}
|
|
1687
1709
|
|
|
1710
|
+
/**
|
|
1711
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1712
|
+
*/
|
|
1713
|
+
type AlertWriteAlertType = "general" | "slack" | "pagerduty";
|
|
1714
|
+
declare const AlertWriteAlertType: {
|
|
1715
|
+
readonly General: "general";
|
|
1716
|
+
readonly Slack: "slack";
|
|
1717
|
+
readonly Pagerduty: "pagerduty";
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1688
1720
|
/**
|
|
1689
1721
|
* This file was auto-generated by Fern from our API Definition.
|
|
1690
1722
|
*/
|
|
@@ -1693,6 +1725,8 @@ interface AlertWrite {
|
|
|
1693
1725
|
id?: string;
|
|
1694
1726
|
name?: string;
|
|
1695
1727
|
enabled?: boolean;
|
|
1728
|
+
alertType?: AlertWriteAlertType;
|
|
1729
|
+
metadata?: Record<string, string>;
|
|
1696
1730
|
webhook: WebhookWrite;
|
|
1697
1731
|
triggers?: AlertTriggerWrite[];
|
|
1698
1732
|
}
|
|
@@ -1778,6 +1812,16 @@ interface AlertTriggerPublic {
|
|
|
1778
1812
|
createdBy?: string;
|
|
1779
1813
|
}
|
|
1780
1814
|
|
|
1815
|
+
/**
|
|
1816
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1817
|
+
*/
|
|
1818
|
+
type AlertPublicAlertType = "general" | "slack" | "pagerduty";
|
|
1819
|
+
declare const AlertPublicAlertType: {
|
|
1820
|
+
readonly General: "general";
|
|
1821
|
+
readonly Slack: "slack";
|
|
1822
|
+
readonly Pagerduty: "pagerduty";
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1781
1825
|
/**
|
|
1782
1826
|
* This file was auto-generated by Fern from our API Definition.
|
|
1783
1827
|
*/
|
|
@@ -1786,6 +1830,8 @@ interface AlertPublic {
|
|
|
1786
1830
|
id?: string;
|
|
1787
1831
|
name?: string;
|
|
1788
1832
|
enabled?: boolean;
|
|
1833
|
+
alertType?: AlertPublicAlertType;
|
|
1834
|
+
metadata?: Record<string, string>;
|
|
1789
1835
|
webhook: WebhookPublic;
|
|
1790
1836
|
triggers?: AlertTriggerPublic[];
|
|
1791
1837
|
createdAt?: Date;
|
|
@@ -1812,41 +1858,8 @@ interface WebhookPublic {
|
|
|
1812
1858
|
/**
|
|
1813
1859
|
* This file was auto-generated by Fern from our API Definition.
|
|
1814
1860
|
*/
|
|
1815
|
-
type WebhookEventObjectEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted";
|
|
1816
|
-
declare const WebhookEventObjectEventType: {
|
|
1817
|
-
readonly TraceErrors: "trace:errors";
|
|
1818
|
-
readonly TraceFeedbackScore: "trace:feedback_score";
|
|
1819
|
-
readonly TraceThreadFeedbackScore: "trace_thread:feedback_score";
|
|
1820
|
-
readonly PromptCreated: "prompt:created";
|
|
1821
|
-
readonly PromptCommitted: "prompt:committed";
|
|
1822
|
-
readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
|
|
1823
|
-
readonly PromptDeleted: "prompt:deleted";
|
|
1824
|
-
};
|
|
1825
|
-
|
|
1826
|
-
/**
|
|
1827
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
1828
|
-
*/
|
|
1829
|
-
|
|
1830
|
-
interface WebhookEventObject {
|
|
1831
|
-
id: string;
|
|
1832
|
-
eventType: WebhookEventObjectEventType;
|
|
1833
|
-
alertId: string;
|
|
1834
|
-
workspaceId: string;
|
|
1835
|
-
userName: string;
|
|
1836
|
-
payload: Record<string, unknown>;
|
|
1837
|
-
createdAt: Date;
|
|
1838
|
-
maxRetries?: number;
|
|
1839
|
-
url: string;
|
|
1840
|
-
secret?: string;
|
|
1841
|
-
headers?: Record<string, string>;
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
/**
|
|
1845
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
1846
|
-
*/
|
|
1847
|
-
|
|
1848
1861
|
interface WebhookExamples {
|
|
1849
|
-
responseExamples?: Record<string,
|
|
1862
|
+
responseExamples?: Record<string, Record<string, unknown>>;
|
|
1850
1863
|
}
|
|
1851
1864
|
|
|
1852
1865
|
/**
|
|
@@ -1865,7 +1878,7 @@ declare const WebhookTestResultStatus: {
|
|
|
1865
1878
|
interface WebhookTestResult {
|
|
1866
1879
|
status?: WebhookTestResultStatus;
|
|
1867
1880
|
statusCode?: number;
|
|
1868
|
-
requestBody?:
|
|
1881
|
+
requestBody?: string;
|
|
1869
1882
|
errorMessage?: string;
|
|
1870
1883
|
}
|
|
1871
1884
|
|
|
@@ -4105,6 +4118,43 @@ interface ProviderApiKeyPublic {
|
|
|
4105
4118
|
lastUpdatedBy?: string;
|
|
4106
4119
|
}
|
|
4107
4120
|
|
|
4121
|
+
/**
|
|
4122
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4123
|
+
*/
|
|
4124
|
+
interface ManualEvaluationResponse {
|
|
4125
|
+
/** Number of entities queued for evaluation */
|
|
4126
|
+
entitiesQueued?: number;
|
|
4127
|
+
/** Number of rules that will be applied */
|
|
4128
|
+
rulesApplied?: number;
|
|
4129
|
+
}
|
|
4130
|
+
|
|
4131
|
+
/**
|
|
4132
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4133
|
+
*/
|
|
4134
|
+
/**
|
|
4135
|
+
* Type of entity to evaluate (trace or thread)
|
|
4136
|
+
*/
|
|
4137
|
+
type ManualEvaluationRequestEntityType = "trace" | "thread";
|
|
4138
|
+
declare const ManualEvaluationRequestEntityType: {
|
|
4139
|
+
readonly Trace: "trace";
|
|
4140
|
+
readonly Thread: "thread";
|
|
4141
|
+
};
|
|
4142
|
+
|
|
4143
|
+
/**
|
|
4144
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4145
|
+
*/
|
|
4146
|
+
|
|
4147
|
+
interface ManualEvaluationRequest {
|
|
4148
|
+
/** Project ID */
|
|
4149
|
+
projectId: string;
|
|
4150
|
+
/** List of entity IDs (trace IDs or thread IDs) to evaluate */
|
|
4151
|
+
entityIds: string[];
|
|
4152
|
+
/** List of automation rule IDs to apply */
|
|
4153
|
+
ruleIds: string[];
|
|
4154
|
+
/** Type of entity to evaluate (trace or thread) */
|
|
4155
|
+
entityType: ManualEvaluationRequestEntityType;
|
|
4156
|
+
}
|
|
4157
|
+
|
|
4108
4158
|
/**
|
|
4109
4159
|
* This file was auto-generated by Fern from our API Definition.
|
|
4110
4160
|
*/
|
|
@@ -5338,14 +5388,15 @@ declare class Alerts {
|
|
|
5338
5388
|
updateAlert(id: string, request: AlertWrite, requestOptions?: Alerts.RequestOptions): HttpResponsePromise<void>;
|
|
5339
5389
|
private __updateAlert;
|
|
5340
5390
|
/**
|
|
5341
|
-
* Get webhook payload examples for all alert event types
|
|
5391
|
+
* Get webhook payload examples for all alert event types, optionally filtered by alert type
|
|
5342
5392
|
*
|
|
5393
|
+
* @param {OpikApi.GetWebhookExamplesRequest} request
|
|
5343
5394
|
* @param {Alerts.RequestOptions} requestOptions - Request-specific configuration.
|
|
5344
5395
|
*
|
|
5345
5396
|
* @example
|
|
5346
5397
|
* await client.alerts.getWebhookExamples()
|
|
5347
5398
|
*/
|
|
5348
|
-
getWebhookExamples(requestOptions?: Alerts.RequestOptions): HttpResponsePromise<WebhookExamples>;
|
|
5399
|
+
getWebhookExamples(request?: GetWebhookExamplesRequest, requestOptions?: Alerts.RequestOptions): HttpResponsePromise<WebhookExamples>;
|
|
5349
5400
|
private __getWebhookExamples;
|
|
5350
5401
|
/**
|
|
5351
5402
|
* Test alert webhook
|
|
@@ -6684,6 +6735,84 @@ declare class LlmProviderKey {
|
|
|
6684
6735
|
}>;
|
|
6685
6736
|
}
|
|
6686
6737
|
|
|
6738
|
+
/**
|
|
6739
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
6740
|
+
*/
|
|
6741
|
+
|
|
6742
|
+
declare namespace ManualEvaluation {
|
|
6743
|
+
interface Options {
|
|
6744
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
6745
|
+
/** Specify a custom URL to connect the client to. */
|
|
6746
|
+
baseUrl?: Supplier<string>;
|
|
6747
|
+
/** Override the Authorization header */
|
|
6748
|
+
apiKey?: Supplier<string | undefined>;
|
|
6749
|
+
/** Override the Comet-Workspace header */
|
|
6750
|
+
workspaceName?: Supplier<string | undefined>;
|
|
6751
|
+
}
|
|
6752
|
+
interface RequestOptions {
|
|
6753
|
+
/** The maximum time to wait for a response in seconds. */
|
|
6754
|
+
timeoutInSeconds?: number;
|
|
6755
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
6756
|
+
maxRetries?: number;
|
|
6757
|
+
/** A hook to abort the request. */
|
|
6758
|
+
abortSignal?: AbortSignal;
|
|
6759
|
+
/** Override the Authorization header */
|
|
6760
|
+
apiKey?: string | undefined;
|
|
6761
|
+
/** Override the Comet-Workspace header */
|
|
6762
|
+
workspaceName?: string | undefined;
|
|
6763
|
+
/** Additional headers to include in the request. */
|
|
6764
|
+
headers?: Record<string, string>;
|
|
6765
|
+
}
|
|
6766
|
+
}
|
|
6767
|
+
/**
|
|
6768
|
+
* Manual evaluation resources for traces and threads
|
|
6769
|
+
*/
|
|
6770
|
+
declare class ManualEvaluation {
|
|
6771
|
+
protected readonly _options: ManualEvaluation.Options;
|
|
6772
|
+
constructor(_options?: ManualEvaluation.Options);
|
|
6773
|
+
/**
|
|
6774
|
+
* Manually trigger evaluation rules on selected threads. Bypasses sampling and enqueues all specified threads for evaluation.
|
|
6775
|
+
*
|
|
6776
|
+
* @param {OpikApi.ManualEvaluationRequest} request
|
|
6777
|
+
* @param {ManualEvaluation.RequestOptions} requestOptions - Request-specific configuration.
|
|
6778
|
+
*
|
|
6779
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6780
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
6781
|
+
*
|
|
6782
|
+
* @example
|
|
6783
|
+
* await client.manualEvaluation.evaluateThreads({
|
|
6784
|
+
* projectId: "550e8400-e29b-41d4-a716-446655440000",
|
|
6785
|
+
* entityIds: ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"],
|
|
6786
|
+
* ruleIds: ["660e8400-e29b-41d4-a716-446655440000"],
|
|
6787
|
+
* entityType: "trace"
|
|
6788
|
+
* })
|
|
6789
|
+
*/
|
|
6790
|
+
evaluateThreads(request: ManualEvaluationRequest, requestOptions?: ManualEvaluation.RequestOptions): HttpResponsePromise<ManualEvaluationResponse>;
|
|
6791
|
+
private __evaluateThreads;
|
|
6792
|
+
/**
|
|
6793
|
+
* Manually trigger evaluation rules on selected traces. Bypasses sampling and enqueues all specified traces for evaluation.
|
|
6794
|
+
*
|
|
6795
|
+
* @param {OpikApi.ManualEvaluationRequest} request
|
|
6796
|
+
* @param {ManualEvaluation.RequestOptions} requestOptions - Request-specific configuration.
|
|
6797
|
+
*
|
|
6798
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6799
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
6800
|
+
*
|
|
6801
|
+
* @example
|
|
6802
|
+
* await client.manualEvaluation.evaluateTraces({
|
|
6803
|
+
* projectId: "550e8400-e29b-41d4-a716-446655440000",
|
|
6804
|
+
* entityIds: ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"],
|
|
6805
|
+
* ruleIds: ["660e8400-e29b-41d4-a716-446655440000"],
|
|
6806
|
+
* entityType: "trace"
|
|
6807
|
+
* })
|
|
6808
|
+
*/
|
|
6809
|
+
evaluateTraces(request: ManualEvaluationRequest, requestOptions?: ManualEvaluation.RequestOptions): HttpResponsePromise<ManualEvaluationResponse>;
|
|
6810
|
+
private __evaluateTraces;
|
|
6811
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
6812
|
+
Authorization: string | undefined;
|
|
6813
|
+
}>;
|
|
6814
|
+
}
|
|
6815
|
+
|
|
6687
6816
|
/**
|
|
6688
6817
|
* This file was auto-generated by Fern from our API Definition.
|
|
6689
6818
|
*/
|
|
@@ -8339,6 +8468,7 @@ declare class OpikApiClient {
|
|
|
8339
8468
|
protected _feedbackDefinitions: FeedbackDefinitions | undefined;
|
|
8340
8469
|
protected _guardrails: Guardrails | undefined;
|
|
8341
8470
|
protected _llmProviderKey: LlmProviderKey | undefined;
|
|
8471
|
+
protected _manualEvaluation: ManualEvaluation | undefined;
|
|
8342
8472
|
protected _openTelemetryIngestion: OpenTelemetryIngestion | undefined;
|
|
8343
8473
|
protected _optimizations: Optimizations | undefined;
|
|
8344
8474
|
protected _projects: Projects | undefined;
|
|
@@ -8362,6 +8492,7 @@ declare class OpikApiClient {
|
|
|
8362
8492
|
get feedbackDefinitions(): FeedbackDefinitions;
|
|
8363
8493
|
get guardrails(): Guardrails;
|
|
8364
8494
|
get llmProviderKey(): LlmProviderKey;
|
|
8495
|
+
get manualEvaluation(): ManualEvaluation;
|
|
8365
8496
|
get openTelemetryIngestion(): OpenTelemetryIngestion;
|
|
8366
8497
|
get optimizations(): Optimizations;
|
|
8367
8498
|
get projects(): Projects;
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
import * as stream from 'stream';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5
|
+
*/
|
|
6
|
+
type GetWebhookExamplesRequestAlertType = "general" | "slack" | "pagerduty";
|
|
7
|
+
declare const GetWebhookExamplesRequestAlertType: {
|
|
8
|
+
readonly General: "general";
|
|
9
|
+
readonly Slack: "slack";
|
|
10
|
+
readonly Pagerduty: "pagerduty";
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
* {}
|
|
19
|
+
*/
|
|
20
|
+
interface FindAlertsRequest {
|
|
21
|
+
page?: number;
|
|
22
|
+
size?: number;
|
|
23
|
+
sorting?: string;
|
|
24
|
+
filters?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @example
|
|
33
|
+
* {}
|
|
34
|
+
*/
|
|
35
|
+
interface GetWebhookExamplesRequest {
|
|
36
|
+
alertType?: GetWebhookExamplesRequestAlertType;
|
|
37
|
+
}
|
|
38
|
+
|
|
3
39
|
/**
|
|
4
40
|
* This file was auto-generated by Fern from our API Definition.
|
|
5
41
|
*/
|
|
@@ -1090,20 +1126,6 @@ interface SpanSearchStreamRequestPublic {
|
|
|
1090
1126
|
truncate?: boolean;
|
|
1091
1127
|
}
|
|
1092
1128
|
|
|
1093
|
-
/**
|
|
1094
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
1095
|
-
*/
|
|
1096
|
-
/**
|
|
1097
|
-
* @example
|
|
1098
|
-
* {}
|
|
1099
|
-
*/
|
|
1100
|
-
interface FindAlertsRequest {
|
|
1101
|
-
page?: number;
|
|
1102
|
-
size?: number;
|
|
1103
|
-
sorting?: string;
|
|
1104
|
-
filters?: string;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
1129
|
/**
|
|
1108
1130
|
* This file was auto-generated by Fern from our API Definition.
|
|
1109
1131
|
*/
|
|
@@ -1685,6 +1707,16 @@ interface AlertTriggerWrite {
|
|
|
1685
1707
|
triggerConfigs?: AlertTriggerConfigWrite[];
|
|
1686
1708
|
}
|
|
1687
1709
|
|
|
1710
|
+
/**
|
|
1711
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1712
|
+
*/
|
|
1713
|
+
type AlertWriteAlertType = "general" | "slack" | "pagerduty";
|
|
1714
|
+
declare const AlertWriteAlertType: {
|
|
1715
|
+
readonly General: "general";
|
|
1716
|
+
readonly Slack: "slack";
|
|
1717
|
+
readonly Pagerduty: "pagerduty";
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1688
1720
|
/**
|
|
1689
1721
|
* This file was auto-generated by Fern from our API Definition.
|
|
1690
1722
|
*/
|
|
@@ -1693,6 +1725,8 @@ interface AlertWrite {
|
|
|
1693
1725
|
id?: string;
|
|
1694
1726
|
name?: string;
|
|
1695
1727
|
enabled?: boolean;
|
|
1728
|
+
alertType?: AlertWriteAlertType;
|
|
1729
|
+
metadata?: Record<string, string>;
|
|
1696
1730
|
webhook: WebhookWrite;
|
|
1697
1731
|
triggers?: AlertTriggerWrite[];
|
|
1698
1732
|
}
|
|
@@ -1778,6 +1812,16 @@ interface AlertTriggerPublic {
|
|
|
1778
1812
|
createdBy?: string;
|
|
1779
1813
|
}
|
|
1780
1814
|
|
|
1815
|
+
/**
|
|
1816
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1817
|
+
*/
|
|
1818
|
+
type AlertPublicAlertType = "general" | "slack" | "pagerduty";
|
|
1819
|
+
declare const AlertPublicAlertType: {
|
|
1820
|
+
readonly General: "general";
|
|
1821
|
+
readonly Slack: "slack";
|
|
1822
|
+
readonly Pagerduty: "pagerduty";
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1781
1825
|
/**
|
|
1782
1826
|
* This file was auto-generated by Fern from our API Definition.
|
|
1783
1827
|
*/
|
|
@@ -1786,6 +1830,8 @@ interface AlertPublic {
|
|
|
1786
1830
|
id?: string;
|
|
1787
1831
|
name?: string;
|
|
1788
1832
|
enabled?: boolean;
|
|
1833
|
+
alertType?: AlertPublicAlertType;
|
|
1834
|
+
metadata?: Record<string, string>;
|
|
1789
1835
|
webhook: WebhookPublic;
|
|
1790
1836
|
triggers?: AlertTriggerPublic[];
|
|
1791
1837
|
createdAt?: Date;
|
|
@@ -1812,41 +1858,8 @@ interface WebhookPublic {
|
|
|
1812
1858
|
/**
|
|
1813
1859
|
* This file was auto-generated by Fern from our API Definition.
|
|
1814
1860
|
*/
|
|
1815
|
-
type WebhookEventObjectEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted";
|
|
1816
|
-
declare const WebhookEventObjectEventType: {
|
|
1817
|
-
readonly TraceErrors: "trace:errors";
|
|
1818
|
-
readonly TraceFeedbackScore: "trace:feedback_score";
|
|
1819
|
-
readonly TraceThreadFeedbackScore: "trace_thread:feedback_score";
|
|
1820
|
-
readonly PromptCreated: "prompt:created";
|
|
1821
|
-
readonly PromptCommitted: "prompt:committed";
|
|
1822
|
-
readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
|
|
1823
|
-
readonly PromptDeleted: "prompt:deleted";
|
|
1824
|
-
};
|
|
1825
|
-
|
|
1826
|
-
/**
|
|
1827
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
1828
|
-
*/
|
|
1829
|
-
|
|
1830
|
-
interface WebhookEventObject {
|
|
1831
|
-
id: string;
|
|
1832
|
-
eventType: WebhookEventObjectEventType;
|
|
1833
|
-
alertId: string;
|
|
1834
|
-
workspaceId: string;
|
|
1835
|
-
userName: string;
|
|
1836
|
-
payload: Record<string, unknown>;
|
|
1837
|
-
createdAt: Date;
|
|
1838
|
-
maxRetries?: number;
|
|
1839
|
-
url: string;
|
|
1840
|
-
secret?: string;
|
|
1841
|
-
headers?: Record<string, string>;
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
/**
|
|
1845
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
1846
|
-
*/
|
|
1847
|
-
|
|
1848
1861
|
interface WebhookExamples {
|
|
1849
|
-
responseExamples?: Record<string,
|
|
1862
|
+
responseExamples?: Record<string, Record<string, unknown>>;
|
|
1850
1863
|
}
|
|
1851
1864
|
|
|
1852
1865
|
/**
|
|
@@ -1865,7 +1878,7 @@ declare const WebhookTestResultStatus: {
|
|
|
1865
1878
|
interface WebhookTestResult {
|
|
1866
1879
|
status?: WebhookTestResultStatus;
|
|
1867
1880
|
statusCode?: number;
|
|
1868
|
-
requestBody?:
|
|
1881
|
+
requestBody?: string;
|
|
1869
1882
|
errorMessage?: string;
|
|
1870
1883
|
}
|
|
1871
1884
|
|
|
@@ -4105,6 +4118,43 @@ interface ProviderApiKeyPublic {
|
|
|
4105
4118
|
lastUpdatedBy?: string;
|
|
4106
4119
|
}
|
|
4107
4120
|
|
|
4121
|
+
/**
|
|
4122
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4123
|
+
*/
|
|
4124
|
+
interface ManualEvaluationResponse {
|
|
4125
|
+
/** Number of entities queued for evaluation */
|
|
4126
|
+
entitiesQueued?: number;
|
|
4127
|
+
/** Number of rules that will be applied */
|
|
4128
|
+
rulesApplied?: number;
|
|
4129
|
+
}
|
|
4130
|
+
|
|
4131
|
+
/**
|
|
4132
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4133
|
+
*/
|
|
4134
|
+
/**
|
|
4135
|
+
* Type of entity to evaluate (trace or thread)
|
|
4136
|
+
*/
|
|
4137
|
+
type ManualEvaluationRequestEntityType = "trace" | "thread";
|
|
4138
|
+
declare const ManualEvaluationRequestEntityType: {
|
|
4139
|
+
readonly Trace: "trace";
|
|
4140
|
+
readonly Thread: "thread";
|
|
4141
|
+
};
|
|
4142
|
+
|
|
4143
|
+
/**
|
|
4144
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4145
|
+
*/
|
|
4146
|
+
|
|
4147
|
+
interface ManualEvaluationRequest {
|
|
4148
|
+
/** Project ID */
|
|
4149
|
+
projectId: string;
|
|
4150
|
+
/** List of entity IDs (trace IDs or thread IDs) to evaluate */
|
|
4151
|
+
entityIds: string[];
|
|
4152
|
+
/** List of automation rule IDs to apply */
|
|
4153
|
+
ruleIds: string[];
|
|
4154
|
+
/** Type of entity to evaluate (trace or thread) */
|
|
4155
|
+
entityType: ManualEvaluationRequestEntityType;
|
|
4156
|
+
}
|
|
4157
|
+
|
|
4108
4158
|
/**
|
|
4109
4159
|
* This file was auto-generated by Fern from our API Definition.
|
|
4110
4160
|
*/
|
|
@@ -5338,14 +5388,15 @@ declare class Alerts {
|
|
|
5338
5388
|
updateAlert(id: string, request: AlertWrite, requestOptions?: Alerts.RequestOptions): HttpResponsePromise<void>;
|
|
5339
5389
|
private __updateAlert;
|
|
5340
5390
|
/**
|
|
5341
|
-
* Get webhook payload examples for all alert event types
|
|
5391
|
+
* Get webhook payload examples for all alert event types, optionally filtered by alert type
|
|
5342
5392
|
*
|
|
5393
|
+
* @param {OpikApi.GetWebhookExamplesRequest} request
|
|
5343
5394
|
* @param {Alerts.RequestOptions} requestOptions - Request-specific configuration.
|
|
5344
5395
|
*
|
|
5345
5396
|
* @example
|
|
5346
5397
|
* await client.alerts.getWebhookExamples()
|
|
5347
5398
|
*/
|
|
5348
|
-
getWebhookExamples(requestOptions?: Alerts.RequestOptions): HttpResponsePromise<WebhookExamples>;
|
|
5399
|
+
getWebhookExamples(request?: GetWebhookExamplesRequest, requestOptions?: Alerts.RequestOptions): HttpResponsePromise<WebhookExamples>;
|
|
5349
5400
|
private __getWebhookExamples;
|
|
5350
5401
|
/**
|
|
5351
5402
|
* Test alert webhook
|
|
@@ -6684,6 +6735,84 @@ declare class LlmProviderKey {
|
|
|
6684
6735
|
}>;
|
|
6685
6736
|
}
|
|
6686
6737
|
|
|
6738
|
+
/**
|
|
6739
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
6740
|
+
*/
|
|
6741
|
+
|
|
6742
|
+
declare namespace ManualEvaluation {
|
|
6743
|
+
interface Options {
|
|
6744
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
6745
|
+
/** Specify a custom URL to connect the client to. */
|
|
6746
|
+
baseUrl?: Supplier<string>;
|
|
6747
|
+
/** Override the Authorization header */
|
|
6748
|
+
apiKey?: Supplier<string | undefined>;
|
|
6749
|
+
/** Override the Comet-Workspace header */
|
|
6750
|
+
workspaceName?: Supplier<string | undefined>;
|
|
6751
|
+
}
|
|
6752
|
+
interface RequestOptions {
|
|
6753
|
+
/** The maximum time to wait for a response in seconds. */
|
|
6754
|
+
timeoutInSeconds?: number;
|
|
6755
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
6756
|
+
maxRetries?: number;
|
|
6757
|
+
/** A hook to abort the request. */
|
|
6758
|
+
abortSignal?: AbortSignal;
|
|
6759
|
+
/** Override the Authorization header */
|
|
6760
|
+
apiKey?: string | undefined;
|
|
6761
|
+
/** Override the Comet-Workspace header */
|
|
6762
|
+
workspaceName?: string | undefined;
|
|
6763
|
+
/** Additional headers to include in the request. */
|
|
6764
|
+
headers?: Record<string, string>;
|
|
6765
|
+
}
|
|
6766
|
+
}
|
|
6767
|
+
/**
|
|
6768
|
+
* Manual evaluation resources for traces and threads
|
|
6769
|
+
*/
|
|
6770
|
+
declare class ManualEvaluation {
|
|
6771
|
+
protected readonly _options: ManualEvaluation.Options;
|
|
6772
|
+
constructor(_options?: ManualEvaluation.Options);
|
|
6773
|
+
/**
|
|
6774
|
+
* Manually trigger evaluation rules on selected threads. Bypasses sampling and enqueues all specified threads for evaluation.
|
|
6775
|
+
*
|
|
6776
|
+
* @param {OpikApi.ManualEvaluationRequest} request
|
|
6777
|
+
* @param {ManualEvaluation.RequestOptions} requestOptions - Request-specific configuration.
|
|
6778
|
+
*
|
|
6779
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6780
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
6781
|
+
*
|
|
6782
|
+
* @example
|
|
6783
|
+
* await client.manualEvaluation.evaluateThreads({
|
|
6784
|
+
* projectId: "550e8400-e29b-41d4-a716-446655440000",
|
|
6785
|
+
* entityIds: ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"],
|
|
6786
|
+
* ruleIds: ["660e8400-e29b-41d4-a716-446655440000"],
|
|
6787
|
+
* entityType: "trace"
|
|
6788
|
+
* })
|
|
6789
|
+
*/
|
|
6790
|
+
evaluateThreads(request: ManualEvaluationRequest, requestOptions?: ManualEvaluation.RequestOptions): HttpResponsePromise<ManualEvaluationResponse>;
|
|
6791
|
+
private __evaluateThreads;
|
|
6792
|
+
/**
|
|
6793
|
+
* Manually trigger evaluation rules on selected traces. Bypasses sampling and enqueues all specified traces for evaluation.
|
|
6794
|
+
*
|
|
6795
|
+
* @param {OpikApi.ManualEvaluationRequest} request
|
|
6796
|
+
* @param {ManualEvaluation.RequestOptions} requestOptions - Request-specific configuration.
|
|
6797
|
+
*
|
|
6798
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6799
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
6800
|
+
*
|
|
6801
|
+
* @example
|
|
6802
|
+
* await client.manualEvaluation.evaluateTraces({
|
|
6803
|
+
* projectId: "550e8400-e29b-41d4-a716-446655440000",
|
|
6804
|
+
* entityIds: ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"],
|
|
6805
|
+
* ruleIds: ["660e8400-e29b-41d4-a716-446655440000"],
|
|
6806
|
+
* entityType: "trace"
|
|
6807
|
+
* })
|
|
6808
|
+
*/
|
|
6809
|
+
evaluateTraces(request: ManualEvaluationRequest, requestOptions?: ManualEvaluation.RequestOptions): HttpResponsePromise<ManualEvaluationResponse>;
|
|
6810
|
+
private __evaluateTraces;
|
|
6811
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
6812
|
+
Authorization: string | undefined;
|
|
6813
|
+
}>;
|
|
6814
|
+
}
|
|
6815
|
+
|
|
6687
6816
|
/**
|
|
6688
6817
|
* This file was auto-generated by Fern from our API Definition.
|
|
6689
6818
|
*/
|
|
@@ -8339,6 +8468,7 @@ declare class OpikApiClient {
|
|
|
8339
8468
|
protected _feedbackDefinitions: FeedbackDefinitions | undefined;
|
|
8340
8469
|
protected _guardrails: Guardrails | undefined;
|
|
8341
8470
|
protected _llmProviderKey: LlmProviderKey | undefined;
|
|
8471
|
+
protected _manualEvaluation: ManualEvaluation | undefined;
|
|
8342
8472
|
protected _openTelemetryIngestion: OpenTelemetryIngestion | undefined;
|
|
8343
8473
|
protected _optimizations: Optimizations | undefined;
|
|
8344
8474
|
protected _projects: Projects | undefined;
|
|
@@ -8362,6 +8492,7 @@ declare class OpikApiClient {
|
|
|
8362
8492
|
get feedbackDefinitions(): FeedbackDefinitions;
|
|
8363
8493
|
get guardrails(): Guardrails;
|
|
8364
8494
|
get llmProviderKey(): LlmProviderKey;
|
|
8495
|
+
get manualEvaluation(): ManualEvaluation;
|
|
8365
8496
|
get openTelemetryIngestion(): OpenTelemetryIngestion;
|
|
8366
8497
|
get optimizations(): Optimizations;
|
|
8367
8498
|
get projects(): Projects;
|