opik 1.8.77 → 1.8.78

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.
@@ -1806,6 +1806,46 @@ interface WebhookPublic {
1806
1806
  lastUpdatedBy?: string;
1807
1807
  }
1808
1808
 
1809
+ /**
1810
+ * This file was auto-generated by Fern from our API Definition.
1811
+ */
1812
+ type WebhookEventObjectEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted";
1813
+ declare const WebhookEventObjectEventType: {
1814
+ readonly TraceErrors: "trace:errors";
1815
+ readonly TraceFeedbackScore: "trace:feedback_score";
1816
+ readonly TraceThreadFeedbackScore: "trace_thread:feedback_score";
1817
+ readonly PromptCreated: "prompt:created";
1818
+ readonly PromptCommitted: "prompt:committed";
1819
+ readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
1820
+ readonly PromptDeleted: "prompt:deleted";
1821
+ };
1822
+
1823
+ /**
1824
+ * This file was auto-generated by Fern from our API Definition.
1825
+ */
1826
+
1827
+ interface WebhookEventObject {
1828
+ id: string;
1829
+ eventType: WebhookEventObjectEventType;
1830
+ alertId: string;
1831
+ workspaceId: string;
1832
+ userName: string;
1833
+ payload: Record<string, unknown>;
1834
+ createdAt: Date;
1835
+ maxRetries?: number;
1836
+ url: string;
1837
+ secret?: string;
1838
+ headers?: Record<string, string>;
1839
+ }
1840
+
1841
+ /**
1842
+ * This file was auto-generated by Fern from our API Definition.
1843
+ */
1844
+
1845
+ interface WebhookExamples {
1846
+ responseExamples?: Record<string, WebhookEventObject>;
1847
+ }
1848
+
1809
1849
  /**
1810
1850
  * This file was auto-generated by Fern from our API Definition.
1811
1851
  */
@@ -1822,7 +1862,7 @@ declare const WebhookTestResultStatus: {
1822
1862
  interface WebhookTestResult {
1823
1863
  status?: WebhookTestResultStatus;
1824
1864
  statusCode?: number;
1825
- requestBody?: string;
1865
+ requestBody?: WebhookEventObject;
1826
1866
  errorMessage?: string;
1827
1867
  }
1828
1868
 
@@ -5295,6 +5335,16 @@ declare class Alerts {
5295
5335
  */
5296
5336
  updateAlert(id: string, request: AlertWrite, requestOptions?: Alerts.RequestOptions): HttpResponsePromise<void>;
5297
5337
  private __updateAlert;
5338
+ /**
5339
+ * Get webhook payload examples for all alert event types
5340
+ *
5341
+ * @param {Alerts.RequestOptions} requestOptions - Request-specific configuration.
5342
+ *
5343
+ * @example
5344
+ * await client.alerts.getWebhookExamples()
5345
+ */
5346
+ getWebhookExamples(requestOptions?: Alerts.RequestOptions): HttpResponsePromise<WebhookExamples>;
5347
+ private __getWebhookExamples;
5298
5348
  /**
5299
5349
  * Test alert webhook
5300
5350
  *
@@ -1806,6 +1806,46 @@ interface WebhookPublic {
1806
1806
  lastUpdatedBy?: string;
1807
1807
  }
1808
1808
 
1809
+ /**
1810
+ * This file was auto-generated by Fern from our API Definition.
1811
+ */
1812
+ type WebhookEventObjectEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted";
1813
+ declare const WebhookEventObjectEventType: {
1814
+ readonly TraceErrors: "trace:errors";
1815
+ readonly TraceFeedbackScore: "trace:feedback_score";
1816
+ readonly TraceThreadFeedbackScore: "trace_thread:feedback_score";
1817
+ readonly PromptCreated: "prompt:created";
1818
+ readonly PromptCommitted: "prompt:committed";
1819
+ readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
1820
+ readonly PromptDeleted: "prompt:deleted";
1821
+ };
1822
+
1823
+ /**
1824
+ * This file was auto-generated by Fern from our API Definition.
1825
+ */
1826
+
1827
+ interface WebhookEventObject {
1828
+ id: string;
1829
+ eventType: WebhookEventObjectEventType;
1830
+ alertId: string;
1831
+ workspaceId: string;
1832
+ userName: string;
1833
+ payload: Record<string, unknown>;
1834
+ createdAt: Date;
1835
+ maxRetries?: number;
1836
+ url: string;
1837
+ secret?: string;
1838
+ headers?: Record<string, string>;
1839
+ }
1840
+
1841
+ /**
1842
+ * This file was auto-generated by Fern from our API Definition.
1843
+ */
1844
+
1845
+ interface WebhookExamples {
1846
+ responseExamples?: Record<string, WebhookEventObject>;
1847
+ }
1848
+
1809
1849
  /**
1810
1850
  * This file was auto-generated by Fern from our API Definition.
1811
1851
  */
@@ -1822,7 +1862,7 @@ declare const WebhookTestResultStatus: {
1822
1862
  interface WebhookTestResult {
1823
1863
  status?: WebhookTestResultStatus;
1824
1864
  statusCode?: number;
1825
- requestBody?: string;
1865
+ requestBody?: WebhookEventObject;
1826
1866
  errorMessage?: string;
1827
1867
  }
1828
1868
 
@@ -5295,6 +5335,16 @@ declare class Alerts {
5295
5335
  */
5296
5336
  updateAlert(id: string, request: AlertWrite, requestOptions?: Alerts.RequestOptions): HttpResponsePromise<void>;
5297
5337
  private __updateAlert;
5338
+ /**
5339
+ * Get webhook payload examples for all alert event types
5340
+ *
5341
+ * @param {Alerts.RequestOptions} requestOptions - Request-specific configuration.
5342
+ *
5343
+ * @example
5344
+ * await client.alerts.getWebhookExamples()
5345
+ */
5346
+ getWebhookExamples(requestOptions?: Alerts.RequestOptions): HttpResponsePromise<WebhookExamples>;
5347
+ private __getWebhookExamples;
5298
5348
  /**
5299
5349
  * Test alert webhook
5300
5350
  *