langwatch 1.17.0 → 1.19.0

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.
Files changed (32) hide show
  1. package/dist/agent/index.js +21 -2
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/agent/index.mjs +21 -2
  4. package/dist/agent/index.mjs.map +1 -1
  5. package/dist/{chunk-RY3NFLJU.js → chunk-CSV7B7B5.js} +2 -2
  6. package/dist/{chunk-RY3NFLJU.js.map → chunk-CSV7B7B5.js.map} +1 -1
  7. package/dist/{chunk-JW2EQIMC.mjs → chunk-PIYOJF6V.mjs} +2 -2
  8. package/dist/{chunk-XVFH6IXS.mjs → chunk-SY5HSL5G.mjs} +2 -2
  9. package/dist/{chunk-XVFH6IXS.mjs.map → chunk-SY5HSL5G.mjs.map} +1 -1
  10. package/dist/{chunk-DCUUYUIA.js → chunk-WGLVIV4J.js} +12 -12
  11. package/dist/{chunk-DCUUYUIA.js.map → chunk-WGLVIV4J.js.map} +1 -1
  12. package/dist/cli/bundle.js +264 -253
  13. package/dist/{implementation-C4KfYlhX.d.mts → implementation-CeTvnq6e.d.mts} +1 -1
  14. package/dist/{implementation-Cw7DHUnF.d.ts → implementation-CsQrexpY.d.ts} +1 -1
  15. package/dist/index.d.mts +2 -2
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.js +63 -52
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +32 -21
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/observability-sdk/index.d.mts +3 -3
  22. package/dist/observability-sdk/index.d.ts +3 -3
  23. package/dist/observability-sdk/index.js +2 -2
  24. package/dist/observability-sdk/index.mjs +1 -1
  25. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  26. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  27. package/dist/observability-sdk/setup/node/index.js +3 -3
  28. package/dist/observability-sdk/setup/node/index.mjs +2 -2
  29. package/dist/{types-BdF0MXO_.d.mts → types-ofe1fAYQ.d.mts} +1687 -70
  30. package/dist/{types-e6FbupXu.d.ts → types-wuYJPoFb.d.ts} +1687 -70
  31. package/package.json +1 -1
  32. /package/dist/{chunk-JW2EQIMC.mjs.map → chunk-PIYOJF6V.mjs.map} +0 -0
@@ -1616,6 +1616,23 @@ interface paths {
1616
1616
  patch?: never;
1617
1617
  trace?: never;
1618
1618
  };
1619
+ "/api/dataset/attachments": {
1620
+ parameters: {
1621
+ query?: never;
1622
+ header?: never;
1623
+ path?: never;
1624
+ cookie?: never;
1625
+ };
1626
+ get?: never;
1627
+ put?: never;
1628
+ /** @description Upload a file for an image or file column and get the reference a cell holds. The project is named by the `projectId` query parameter; the file goes in the `file` multipart field, with an optional `datasetId` field. */
1629
+ post: operations["postApiDatasetAttachments"];
1630
+ delete?: never;
1631
+ options?: never;
1632
+ head?: never;
1633
+ patch?: never;
1634
+ trace?: never;
1635
+ };
1619
1636
  "/api/dataset/direct-upload": {
1620
1637
  parameters: {
1621
1638
  query?: never;
@@ -1744,7 +1761,8 @@ interface paths {
1744
1761
  path?: never;
1745
1762
  cookie?: never;
1746
1763
  };
1747
- get?: never;
1764
+ /** @description List entries of a dataset (paginated). Same as GET /:slugOrId/records. */
1765
+ get: operations["getApiDatasetBySlugEntries"];
1748
1766
  put?: never;
1749
1767
  /** @description Add entries to a dataset */
1750
1768
  post: operations["postApiDatasetBySlugEntries"];
@@ -2279,7 +2297,7 @@ interface paths {
2279
2297
  put?: never;
2280
2298
  /**
2281
2299
  * Create a Slack alert trigger
2282
- * @description Create a trigger that posts to a Slack incoming webhook when traces match its filters. The `/api/triggers` family supersedes this narrower form, which stays for callers written against it.
2300
+ * @description Create a trigger that posts to Slack when traces match its filters, through a Slack connection (`slack_connection_id`, plus `slack_channel_id` for a bot) or an incoming webhook URL (`slack_webhook`), which is stored as a connection. The trigger stores no secret of its own. The `/api/triggers` family supersedes this narrower form, which stays for callers written against it.
2283
2301
  */
2284
2302
  post: operations["postApiTriggerSlack"];
2285
2303
  delete?: never;
@@ -4623,10 +4641,10 @@ interface paths {
4623
4641
  path?: never;
4624
4642
  cookie?: never;
4625
4643
  };
4626
- /** @description List all active triggers (automations) for the project */
4644
+ /** @description List the project's automations, newest first. Paused automations are included. */
4627
4645
  get: operations["getApiTriggers"];
4628
4646
  put?: never;
4629
- /** @description Create a new trigger (automation) */
4647
+ /** @description Create an automation. Send `customGraphId` + `graphAlert` for an alert on a metric, `report` for a scheduled report, or conditions for a trace automation. The delivery channel is fixed at creation. */
4630
4648
  post: operations["postApiTriggers"];
4631
4649
  delete?: never;
4632
4650
  options?: never;
@@ -4649,10 +4667,95 @@ interface paths {
4649
4667
  delete: operations["deleteApiTriggersById"];
4650
4668
  options?: never;
4651
4669
  head?: never;
4652
- /** @description Update a trigger (name, active state, message, filters) */
4670
+ /** @description Update an automation. Every field is optional and what is left out is left alone, except `actionParams`, which replaces the delivery configuration as a whole. The delivery channel cannot be changed. */
4653
4671
  patch: operations["patchApiTriggersById"];
4654
4672
  trace?: never;
4655
4673
  };
4674
+ "/api/triggers/{id}/fires": {
4675
+ parameters: {
4676
+ query?: never;
4677
+ header?: never;
4678
+ path?: never;
4679
+ cookie?: never;
4680
+ };
4681
+ /** @description What this automation has done: its fires, newest first. Metadata only — no trace ids and no trace content. Send `nextCursor` back as `cursor` to read the page after this one. */
4682
+ get: operations["getApiTriggersByIdFires"];
4683
+ put?: never;
4684
+ post?: never;
4685
+ delete?: never;
4686
+ options?: never;
4687
+ head?: never;
4688
+ patch?: never;
4689
+ trace?: never;
4690
+ };
4691
+ "/api/triggers/{id}/enable": {
4692
+ parameters: {
4693
+ query?: never;
4694
+ header?: never;
4695
+ path?: never;
4696
+ cookie?: never;
4697
+ };
4698
+ get?: never;
4699
+ put?: never;
4700
+ /** @description Resume an automation. A report's schedule is put back on the calendar. */
4701
+ post: operations["postApiTriggersByIdEnable"];
4702
+ delete?: never;
4703
+ options?: never;
4704
+ head?: never;
4705
+ patch?: never;
4706
+ trace?: never;
4707
+ };
4708
+ "/api/triggers/{id}/disable": {
4709
+ parameters: {
4710
+ query?: never;
4711
+ header?: never;
4712
+ path?: never;
4713
+ cookie?: never;
4714
+ };
4715
+ get?: never;
4716
+ put?: never;
4717
+ /** @description Pause an automation. A report stops claiming its schedule. */
4718
+ post: operations["postApiTriggersByIdDisable"];
4719
+ delete?: never;
4720
+ options?: never;
4721
+ head?: never;
4722
+ patch?: never;
4723
+ trace?: never;
4724
+ };
4725
+ "/api/triggers/{id}/test-fire": {
4726
+ parameters: {
4727
+ query?: never;
4728
+ header?: never;
4729
+ path?: never;
4730
+ cookie?: never;
4731
+ };
4732
+ get?: never;
4733
+ put?: never;
4734
+ /** @description Send this automation's message to the destination it is configured with, so you can confirm it arrives. Nothing is recorded as a fire. */
4735
+ post: operations["postApiTriggersByIdTestFire"];
4736
+ delete?: never;
4737
+ options?: never;
4738
+ head?: never;
4739
+ patch?: never;
4740
+ trace?: never;
4741
+ };
4742
+ "/api/slack-connections": {
4743
+ parameters: {
4744
+ query?: never;
4745
+ header?: never;
4746
+ path?: never;
4747
+ cookie?: never;
4748
+ };
4749
+ /** @description List the Slack connections this project can deliver through: its own and its organization's, by name. Never returns a token or webhook URL. */
4750
+ get: operations["getApiSlackConnections"];
4751
+ put?: never;
4752
+ post?: never;
4753
+ delete?: never;
4754
+ options?: never;
4755
+ head?: never;
4756
+ patch?: never;
4757
+ trace?: never;
4758
+ };
4656
4759
  "/api/webhooks/v1/endpoints": {
4657
4760
  parameters: {
4658
4761
  query?: never;
@@ -5852,6 +5955,17 @@ interface operations {
5852
5955
  id: string;
5853
5956
  url: string;
5854
5957
  parameterNotes: string[];
5958
+ scope: {
5959
+ /** @constant */
5960
+ kind: "shared";
5961
+ } | {
5962
+ /** @constant */
5963
+ kind: "owner";
5964
+ } | {
5965
+ /** @constant */
5966
+ kind: "host";
5967
+ hostLabel: string;
5968
+ };
5855
5969
  }[];
5856
5970
  heartbeatIntervalMs: number;
5857
5971
  instanceId: string;
@@ -10371,7 +10485,7 @@ interface operations {
10371
10485
  /** @default [] */
10372
10486
  columnTypes?: {
10373
10487
  name: string;
10374
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
10488
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
10375
10489
  }[];
10376
10490
  };
10377
10491
  };
@@ -10388,6 +10502,134 @@ interface operations {
10388
10502
  requestBody?: never;
10389
10503
  responses: never;
10390
10504
  };
10505
+ postApiDatasetAttachments: {
10506
+ parameters: {
10507
+ query: {
10508
+ /** @description The project the file is stored for. */
10509
+ projectId: string;
10510
+ };
10511
+ header?: never;
10512
+ path?: never;
10513
+ cookie?: never;
10514
+ };
10515
+ requestBody: {
10516
+ content: {
10517
+ "multipart/form-data": {
10518
+ /**
10519
+ * Format: binary
10520
+ * @description The file to store.
10521
+ */
10522
+ file: string;
10523
+ /** @description The dataset that owns the file. Omit it while the dataset is still a draft. */
10524
+ datasetId?: string;
10525
+ };
10526
+ };
10527
+ };
10528
+ responses: {
10529
+ /** @description The reference the cell holds, and the file's metadata. */
10530
+ 200: {
10531
+ headers: {
10532
+ [name: string]: unknown;
10533
+ };
10534
+ content: {
10535
+ "application/json": {
10536
+ /** @description The value to write into the cell, and the address the file is served from. */
10537
+ url: string;
10538
+ /** @description The file name the reference carries. */
10539
+ name: string;
10540
+ /** @description The media type the file is stored under. */
10541
+ mediaType: string;
10542
+ /** @description The size of the stored file, in bytes. */
10543
+ sizeBytes: number;
10544
+ };
10545
+ };
10546
+ };
10547
+ /** @description Bad Request */
10548
+ 400: {
10549
+ headers: {
10550
+ [name: string]: unknown;
10551
+ };
10552
+ content: {
10553
+ "application/json": {
10554
+ error: string;
10555
+ message?: string;
10556
+ };
10557
+ };
10558
+ };
10559
+ /** @description Unauthorized */
10560
+ 401: {
10561
+ headers: {
10562
+ [name: string]: unknown;
10563
+ };
10564
+ content: {
10565
+ "application/json": {
10566
+ error: string;
10567
+ message?: string;
10568
+ };
10569
+ };
10570
+ };
10571
+ /** @description The file is larger than the upload limit. */
10572
+ 413: {
10573
+ headers: {
10574
+ [name: string]: unknown;
10575
+ };
10576
+ content: {
10577
+ "application/json": {
10578
+ error: string;
10579
+ message?: string;
10580
+ };
10581
+ };
10582
+ };
10583
+ /** @description The media type is not accepted. */
10584
+ 415: {
10585
+ headers: {
10586
+ [name: string]: unknown;
10587
+ };
10588
+ content: {
10589
+ "application/json": {
10590
+ error: string;
10591
+ message?: string;
10592
+ };
10593
+ };
10594
+ };
10595
+ /** @description Unprocessable Entity */
10596
+ 422: {
10597
+ headers: {
10598
+ [name: string]: unknown;
10599
+ };
10600
+ content: {
10601
+ "application/json": {
10602
+ error: string;
10603
+ message?: string;
10604
+ };
10605
+ };
10606
+ };
10607
+ /** @description Too many uploads for this project in one minute. */
10608
+ 429: {
10609
+ headers: {
10610
+ [name: string]: unknown;
10611
+ };
10612
+ content: {
10613
+ "application/json": {
10614
+ error: string;
10615
+ message?: string;
10616
+ };
10617
+ };
10618
+ };
10619
+ /** @description Internal Server Error */
10620
+ 500: {
10621
+ headers: {
10622
+ [name: string]: unknown;
10623
+ };
10624
+ content: {
10625
+ "application/json": {
10626
+ error: string;
10627
+ message?: string;
10628
+ };
10629
+ };
10630
+ };
10631
+ };
10632
+ };
10391
10633
  postApiDatasetDirectUpload: {
10392
10634
  parameters: {
10393
10635
  query?: never;
@@ -10511,6 +10753,21 @@ interface operations {
10511
10753
  };
10512
10754
  responses: never;
10513
10755
  };
10756
+ getApiDatasetBySlugEntries: {
10757
+ parameters: {
10758
+ query?: {
10759
+ page?: number;
10760
+ limit?: number;
10761
+ };
10762
+ header?: never;
10763
+ path: {
10764
+ slug: string;
10765
+ };
10766
+ cookie?: never;
10767
+ };
10768
+ requestBody?: never;
10769
+ responses: never;
10770
+ };
10514
10771
  postApiDatasetBySlugEntries: {
10515
10772
  parameters: {
10516
10773
  query?: never;
@@ -10647,7 +10904,7 @@ interface operations {
10647
10904
  name?: string;
10648
10905
  columnTypes?: {
10649
10906
  name: string;
10650
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
10907
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
10651
10908
  }[];
10652
10909
  };
10653
10910
  };
@@ -14200,9 +14457,13 @@ interface operations {
14200
14457
  "application/json": {
14201
14458
  /**
14202
14459
  * Format: uri
14203
- * @description Incoming webhook URL the alert is posted to
14460
+ * @description Incoming webhook URL the alert is posted to. It is stored as a Slack connection this project can use (an existing one holding the same URL, else a new project connection). Send this or `slack_connection_id`, not both.
14204
14461
  */
14205
- slack_webhook: string;
14462
+ slack_webhook?: string;
14463
+ /** @description The Slack connection the alert posts through: an organization connection or one of this project's, as `GET /api/slack-connections` and `langwatch slack-connection list` list them. Send this or `slack_webhook`, not both. */
14464
+ slack_connection_id?: string;
14465
+ /** @description The channel a bot connection posts in; required with one. Invite the LangWatch app to it first. */
14466
+ slack_channel_id?: string;
14206
14467
  /** @description How the trigger is listed in the app */
14207
14468
  name: string;
14208
14469
  /** @description Extra line included with each alert */
@@ -14472,6 +14733,25 @@ interface operations {
14472
14733
  };
14473
14734
  };
14474
14735
  };
14736
+ /** @description The connection is not one this project can use (`slack_integration_missing`), or a bot connection was named without `slack_channel_id` (`invalid_action_params`) */
14737
+ 422: {
14738
+ headers: {
14739
+ [name: string]: unknown;
14740
+ };
14741
+ content: {
14742
+ "application/json": {
14743
+ /** @description Stable failure code; branch on this */
14744
+ error: string;
14745
+ message?: string;
14746
+ /** @description Who the failure is attributable to: customer, platform, provider */
14747
+ fault?: string;
14748
+ tips?: string[];
14749
+ docsUrl?: string;
14750
+ } & {
14751
+ [key: string]: unknown;
14752
+ };
14753
+ };
14754
+ };
14475
14755
  };
14476
14756
  };
14477
14757
  postApiWorkflowsByWorkflowIdRun: {
@@ -20395,7 +20675,7 @@ interface operations {
20395
20675
  inputs: {
20396
20676
  identifier: string;
20397
20677
  /** @enum {string} */
20398
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
20678
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
20399
20679
  }[];
20400
20680
  outputs: {
20401
20681
  identifier: string;
@@ -20420,7 +20700,7 @@ interface operations {
20420
20700
  columnTypes: {
20421
20701
  id?: string;
20422
20702
  name: string;
20423
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
20703
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
20424
20704
  }[];
20425
20705
  };
20426
20706
  };
@@ -20437,7 +20717,7 @@ interface operations {
20437
20717
  columnTypes: {
20438
20718
  id?: string;
20439
20719
  name: string;
20440
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
20720
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
20441
20721
  }[];
20442
20722
  };
20443
20723
  };
@@ -20544,7 +20824,7 @@ interface operations {
20544
20824
  inputs?: {
20545
20825
  identifier: string;
20546
20826
  /** @enum {string} */
20547
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
20827
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
20548
20828
  }[];
20549
20829
  outputs?: {
20550
20830
  identifier: string;
@@ -20598,7 +20878,7 @@ interface operations {
20598
20878
  inputs: {
20599
20879
  identifier: string;
20600
20880
  /** @enum {string} */
20601
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
20881
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
20602
20882
  }[];
20603
20883
  outputs: {
20604
20884
  identifier: string;
@@ -20623,7 +20903,7 @@ interface operations {
20623
20903
  columnTypes: {
20624
20904
  id?: string;
20625
20905
  name: string;
20626
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
20906
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
20627
20907
  }[];
20628
20908
  };
20629
20909
  };
@@ -20640,7 +20920,7 @@ interface operations {
20640
20920
  columnTypes: {
20641
20921
  id?: string;
20642
20922
  name: string;
20643
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
20923
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
20644
20924
  }[];
20645
20925
  };
20646
20926
  };
@@ -21164,7 +21444,7 @@ interface operations {
21164
21444
  inputs: {
21165
21445
  identifier: string;
21166
21446
  /** @enum {string} */
21167
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21447
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21168
21448
  }[];
21169
21449
  outputs: {
21170
21450
  identifier: string;
@@ -21189,7 +21469,7 @@ interface operations {
21189
21469
  columnTypes: {
21190
21470
  id?: string;
21191
21471
  name: string;
21192
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
21472
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21193
21473
  }[];
21194
21474
  };
21195
21475
  };
@@ -21206,7 +21486,7 @@ interface operations {
21206
21486
  columnTypes: {
21207
21487
  id?: string;
21208
21488
  name: string;
21209
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
21489
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21210
21490
  }[];
21211
21491
  };
21212
21492
  };
@@ -21338,7 +21618,7 @@ interface operations {
21338
21618
  inputs: {
21339
21619
  identifier: string;
21340
21620
  /** @enum {string} */
21341
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21621
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21342
21622
  }[];
21343
21623
  outputs: {
21344
21624
  identifier: string;
@@ -21363,7 +21643,7 @@ interface operations {
21363
21643
  columnTypes: {
21364
21644
  id?: string;
21365
21645
  name: string;
21366
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
21646
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21367
21647
  }[];
21368
21648
  };
21369
21649
  };
@@ -21380,7 +21660,7 @@ interface operations {
21380
21660
  columnTypes: {
21381
21661
  id?: string;
21382
21662
  name: string;
21383
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
21663
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21384
21664
  }[];
21385
21665
  };
21386
21666
  };
@@ -21517,7 +21797,7 @@ interface operations {
21517
21797
  inputs: {
21518
21798
  identifier: string;
21519
21799
  /** @enum {string} */
21520
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21800
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21521
21801
  }[];
21522
21802
  outputs: {
21523
21803
  identifier: string;
@@ -21542,7 +21822,7 @@ interface operations {
21542
21822
  columnTypes: {
21543
21823
  id?: string;
21544
21824
  name: string;
21545
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
21825
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21546
21826
  }[];
21547
21827
  };
21548
21828
  };
@@ -21559,7 +21839,7 @@ interface operations {
21559
21839
  columnTypes: {
21560
21840
  id?: string;
21561
21841
  name: string;
21562
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
21842
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21563
21843
  }[];
21564
21844
  };
21565
21845
  };
@@ -21674,7 +21954,7 @@ interface operations {
21674
21954
  inputs?: {
21675
21955
  identifier: string;
21676
21956
  /** @enum {string} */
21677
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21957
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21678
21958
  }[];
21679
21959
  outputs?: {
21680
21960
  identifier: string;
@@ -21731,7 +22011,7 @@ interface operations {
21731
22011
  inputs: {
21732
22012
  identifier: string;
21733
22013
  /** @enum {string} */
21734
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
22014
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21735
22015
  }[];
21736
22016
  outputs: {
21737
22017
  identifier: string;
@@ -21756,7 +22036,7 @@ interface operations {
21756
22036
  columnTypes: {
21757
22037
  id?: string;
21758
22038
  name: string;
21759
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22039
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21760
22040
  }[];
21761
22041
  };
21762
22042
  };
@@ -21773,7 +22053,7 @@ interface operations {
21773
22053
  columnTypes: {
21774
22054
  id?: string;
21775
22055
  name: string;
21776
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22056
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
21777
22057
  }[];
21778
22058
  };
21779
22059
  };
@@ -21982,7 +22262,7 @@ interface operations {
21982
22262
  inputs?: {
21983
22263
  identifier: string;
21984
22264
  /** @enum {string} */
21985
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
22265
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
21986
22266
  }[];
21987
22267
  outputs: {
21988
22268
  identifier: string;
@@ -22019,7 +22299,7 @@ interface operations {
22019
22299
  columnTypes: {
22020
22300
  id?: string;
22021
22301
  name: string;
22022
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22302
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
22023
22303
  }[];
22024
22304
  };
22025
22305
  };
@@ -22036,7 +22316,7 @@ interface operations {
22036
22316
  columnTypes: {
22037
22317
  id?: string;
22038
22318
  name: string;
22039
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22319
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
22040
22320
  }[];
22041
22321
  };
22042
22322
  };
@@ -22095,7 +22375,7 @@ interface operations {
22095
22375
  inputs: {
22096
22376
  identifier: string;
22097
22377
  /** @enum {string} */
22098
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
22378
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
22099
22379
  }[];
22100
22380
  outputs: {
22101
22381
  identifier: string;
@@ -22120,7 +22400,7 @@ interface operations {
22120
22400
  columnTypes: {
22121
22401
  id?: string;
22122
22402
  name: string;
22123
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22403
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
22124
22404
  }[];
22125
22405
  };
22126
22406
  };
@@ -22137,7 +22417,7 @@ interface operations {
22137
22417
  columnTypes: {
22138
22418
  id?: string;
22139
22419
  name: string;
22140
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22420
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
22141
22421
  }[];
22142
22422
  };
22143
22423
  };
@@ -22178,7 +22458,7 @@ interface operations {
22178
22458
  inputs: {
22179
22459
  identifier: string;
22180
22460
  /** @enum {string} */
22181
- type: "str" | "float" | "bool" | "image" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
22461
+ type: "str" | "float" | "bool" | "image" | "file" | "list" | "list[str]" | "list[float]" | "list[int]" | "list[bool]" | "dict" | "chat_messages";
22182
22462
  }[];
22183
22463
  outputs: {
22184
22464
  identifier: string;
@@ -22215,7 +22495,7 @@ interface operations {
22215
22495
  columnTypes: {
22216
22496
  id?: string;
22217
22497
  name: string;
22218
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22498
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
22219
22499
  }[];
22220
22500
  };
22221
22501
  };
@@ -22232,7 +22512,7 @@ interface operations {
22232
22512
  columnTypes: {
22233
22513
  id?: string;
22234
22514
  name: string;
22235
- type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image";
22515
+ type: "string" | "boolean" | "number" | "date" | "list" | "json" | "spans" | "rag_contexts" | "chat_messages" | "annotations" | "evaluations" | "image" | "file";
22236
22516
  }[];
22237
22517
  };
22238
22518
  };
@@ -25917,6 +26197,7 @@ interface operations {
25917
26197
  reasoning?: string;
25918
26198
  metCriteria: string[];
25919
26199
  unmetCriteria: string[];
26200
+ inconclusiveCriteria?: string[];
25920
26201
  error?: string;
25921
26202
  evaluations?: {
25922
26203
  evaluatorId: string;
@@ -32442,13 +32723,67 @@ interface operations {
32442
32723
  id: string;
32443
32724
  name: string;
32444
32725
  /** @enum {string} */
32445
- action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE";
32726
+ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE" | "SEND_WEBHOOK";
32727
+ /** @description Where this automation delivers, with every credential value replaced by the `[redacted]` placeholder. Which channel is configured, which destination is set and which header names are in play all survive; the values never leave; a Slack automation names its connection by `slackIntegrationId` and carries no secret. Sending the placeholder back on an update keeps the stored value. The rule this automation fires by is not here — it is stated in `graphAlert` or `report`, and sending it in this field is refused. */
32446
32728
  actionParams: {
32447
32729
  [key: string]: unknown;
32448
32730
  };
32731
+ /** @description The rule an alert fires by. Null for anything that is not one. */
32732
+ graphAlert: {
32733
+ threshold: number;
32734
+ /** @enum {string} */
32735
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
32736
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
32737
+ seriesName: string;
32738
+ } | null;
32739
+ /** @description What a report renders and when. Null for anything else. */
32740
+ report: {
32741
+ source: {
32742
+ /** @constant */
32743
+ kind: "dashboard";
32744
+ dashboardId: string;
32745
+ } | {
32746
+ /** @constant */
32747
+ kind: "customGraph";
32748
+ customGraphId: string;
32749
+ } | {
32750
+ /** @constant */
32751
+ kind: "traceQuery";
32752
+ /** @default {} */
32753
+ filters: {
32754
+ [key: string]: unknown;
32755
+ };
32756
+ metric?: string;
32757
+ /** @default 5 */
32758
+ topN: number;
32759
+ };
32760
+ schedule: {
32761
+ cron: string;
32762
+ timezone: string;
32763
+ };
32764
+ /** @default false */
32765
+ compareToPrevious: boolean;
32766
+ } | null;
32449
32767
  filters: {
32450
32768
  [key: string]: unknown;
32451
32769
  };
32770
+ filterQuery: string | null;
32771
+ /**
32772
+ * @description What this automation is about: matching traces, a metric crossing a threshold, or a schedule.
32773
+ * @enum {string}
32774
+ */
32775
+ kind: "AUTOMATION" | "ALERT" | "REPORT";
32776
+ customGraphId: string | null;
32777
+ notificationCadence: string | null;
32778
+ traceDebounceMs: number | null;
32779
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
32780
+ templates: {
32781
+ /** @enum {string|null} */
32782
+ slackTemplateType?: "string" | "block_kit" | null;
32783
+ slackTemplate?: string | null;
32784
+ emailSubjectTemplate?: string | null;
32785
+ emailBodyTemplate?: string | null;
32786
+ };
32452
32787
  active: boolean;
32453
32788
  message: string | null;
32454
32789
  /** @enum {string|null} */
@@ -32520,19 +32855,433 @@ interface operations {
32520
32855
  requestBody: {
32521
32856
  content: {
32522
32857
  "application/json": {
32523
- name: string;
32524
- /** @enum {string} */
32525
- action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE";
32526
- /** @default {} */
32527
- actionParams?: {
32858
+ /** @constant */
32859
+ action: "SEND_EMAIL";
32860
+ /** @description Email delivery. */
32861
+ actionParams: {
32862
+ /** @description Who receives the email. Any address, not only teammates. */
32863
+ members: string[];
32864
+ } & {
32528
32865
  [key: string]: unknown;
32529
32866
  };
32867
+ name: string;
32530
32868
  filters?: {
32531
- [key: string]: unknown;
32869
+ [key: string]: string[] | {
32870
+ [key: string]: string[];
32871
+ } | {
32872
+ [key: string]: {
32873
+ [key: string]: string[];
32874
+ };
32875
+ };
32876
+ };
32877
+ /** @description The trace query this automation is about, in the syntax the traces view uses. When set it supersedes `filters`. */
32878
+ filterQuery?: string | null;
32879
+ message?: string;
32880
+ /** @enum {string} */
32881
+ alertType?: "CRITICAL" | "WARNING" | "INFO";
32882
+ /** @description Set to make this an alert on that graph. `graphAlert` and `alertType` are then required. */
32883
+ customGraphId?: string;
32884
+ /** @description The rule an alert fires by: series, operator, threshold, window. */
32885
+ graphAlert?: {
32886
+ threshold: number;
32887
+ /** @enum {string} */
32888
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
32889
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
32890
+ seriesName: string;
32891
+ };
32892
+ /** @description What a scheduled report renders and when it sends. */
32893
+ report?: {
32894
+ source: {
32895
+ /** @constant */
32896
+ kind: "dashboard";
32897
+ dashboardId: string;
32898
+ } | {
32899
+ /** @constant */
32900
+ kind: "customGraph";
32901
+ customGraphId: string;
32902
+ } | {
32903
+ /** @constant */
32904
+ kind: "traceQuery";
32905
+ /** @default {} */
32906
+ filters?: {
32907
+ [key: string]: unknown;
32908
+ };
32909
+ metric?: string;
32910
+ /** @default 5 */
32911
+ topN?: number;
32912
+ };
32913
+ schedule: {
32914
+ cron: string;
32915
+ timezone: string;
32916
+ };
32917
+ /** @default false */
32918
+ compareToPrevious?: boolean;
32919
+ };
32920
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
32921
+ templates?: {
32922
+ /** @enum {string|null} */
32923
+ slackTemplateType?: "string" | "block_kit" | null;
32924
+ slackTemplate?: string | null;
32925
+ emailSubjectTemplate?: string | null;
32926
+ emailBodyTemplate?: string | null;
32927
+ };
32928
+ /**
32929
+ * @description How often a notification automation is allowed to send. A new one starts on a five-minute digest, which is what keeps a broad condition from sending a message per matching trace.
32930
+ * @enum {string}
32931
+ */
32932
+ notificationCadence?: "immediate" | "5min_digest" | "15min_digest" | "hourly_digest";
32933
+ /** @description How long to wait for a trace to settle before the conditions are read. */
32934
+ traceDebounceMs?: number;
32935
+ } | {
32936
+ /** @constant */
32937
+ action: "SEND_SLACK_MESSAGE";
32938
+ /** @description Slack delivery through a Slack connection (`slackIntegrationId`), plus `slackChannelId` when the connection is a bot. */
32939
+ actionParams: {
32940
+ /** @description The Slack connection this automation posts through: an organization connection or one of this project's, listed under Settings, Integrations, Slack. A bot connection also needs `slackChannelId`; a webhook connection needs nothing else. Preferred over `slackWebhook` and `slackBotToken`, and what a read returns in their place. */
32941
+ slackIntegrationId?: string;
32942
+ /**
32943
+ * @description How the message reaches Slack. `webhook` posts to an incoming webhook URL, `bot` posts as the LangWatch Slack app. With `slackIntegrationId` it follows the connection's kind. Absent without a connection means `webhook`.
32944
+ * @enum {string}
32945
+ */
32946
+ slackDelivery?: "webhook" | "bot";
32947
+ /** @description Legacy, accepted for one release: an incoming webhook URL, for `webhook` delivery. It is stored as a Slack connection (an existing one holding the same URL, else a new project connection) and the automation keeps only that connection's id. Send `slackIntegrationId` instead. */
32948
+ slackWebhook?: string;
32949
+ /** @description The channel the bot posts in, for a bot connection or `bot` delivery. Invite the LangWatch app to it first. */
32950
+ slackChannelId?: string;
32951
+ /** @description Legacy, accepted for one release: a bot token, for `bot` delivery. It is stored as a Slack connection (an existing one holding the same token, else a new project connection) and never reads back. Send `slackIntegrationId` instead. */
32952
+ slackBotToken?: string;
32953
+ /** @description Legacy and ignored: no read returns it. An update that retypes no secret moves an automation's own stored secret into a connection. */
32954
+ slackBotTokenSet?: boolean;
32955
+ } & {
32956
+ [key: string]: unknown;
32957
+ };
32958
+ name: string;
32959
+ filters?: {
32960
+ [key: string]: string[] | {
32961
+ [key: string]: string[];
32962
+ } | {
32963
+ [key: string]: {
32964
+ [key: string]: string[];
32965
+ };
32966
+ };
32967
+ };
32968
+ /** @description The trace query this automation is about, in the syntax the traces view uses. When set it supersedes `filters`. */
32969
+ filterQuery?: string | null;
32970
+ message?: string;
32971
+ /** @enum {string} */
32972
+ alertType?: "CRITICAL" | "WARNING" | "INFO";
32973
+ /** @description Set to make this an alert on that graph. `graphAlert` and `alertType` are then required. */
32974
+ customGraphId?: string;
32975
+ /** @description The rule an alert fires by: series, operator, threshold, window. */
32976
+ graphAlert?: {
32977
+ threshold: number;
32978
+ /** @enum {string} */
32979
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
32980
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
32981
+ seriesName: string;
32982
+ };
32983
+ /** @description What a scheduled report renders and when it sends. */
32984
+ report?: {
32985
+ source: {
32986
+ /** @constant */
32987
+ kind: "dashboard";
32988
+ dashboardId: string;
32989
+ } | {
32990
+ /** @constant */
32991
+ kind: "customGraph";
32992
+ customGraphId: string;
32993
+ } | {
32994
+ /** @constant */
32995
+ kind: "traceQuery";
32996
+ /** @default {} */
32997
+ filters?: {
32998
+ [key: string]: unknown;
32999
+ };
33000
+ metric?: string;
33001
+ /** @default 5 */
33002
+ topN?: number;
33003
+ };
33004
+ schedule: {
33005
+ cron: string;
33006
+ timezone: string;
33007
+ };
33008
+ /** @default false */
33009
+ compareToPrevious?: boolean;
33010
+ };
33011
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33012
+ templates?: {
33013
+ /** @enum {string|null} */
33014
+ slackTemplateType?: "string" | "block_kit" | null;
33015
+ slackTemplate?: string | null;
33016
+ emailSubjectTemplate?: string | null;
33017
+ emailBodyTemplate?: string | null;
33018
+ };
33019
+ /**
33020
+ * @description How often a notification automation is allowed to send. A new one starts on a five-minute digest, which is what keeps a broad condition from sending a message per matching trace.
33021
+ * @enum {string}
33022
+ */
33023
+ notificationCadence?: "immediate" | "5min_digest" | "15min_digest" | "hourly_digest";
33024
+ /** @description How long to wait for a trace to settle before the conditions are read. */
33025
+ traceDebounceMs?: number;
33026
+ } | {
33027
+ /** @constant */
33028
+ action: "SEND_WEBHOOK";
33029
+ /** @description Delivery to a customer endpoint over HTTP, with a body in any media type. */
33030
+ actionParams: {
33031
+ /** @description Where the request goes. https only, and not a private host. */
33032
+ url: string;
33033
+ /**
33034
+ * @description The HTTP method. Absent means POST.
33035
+ * @enum {string}
33036
+ */
33037
+ method?: "POST" | "PUT" | "PATCH";
33038
+ /** @description Static headers sent with every delivery. The values are credentials: they read back as the placeholder, and sending the placeholder back keeps the stored ones. Changing `url` means sending the values again in the same request. */
33039
+ headers?: {
33040
+ [key: string]: string;
33041
+ };
33042
+ /** @description A Liquid template for the body. Absent sends the standard LangWatch envelope for a JSON content type, and an empty body for any other. */
33043
+ bodyTemplate?: string | null;
33044
+ /** @description The `Content-Type` the delivery announces, which also decides how the body is treated: `application/json` (and any `+json` type) is checked and re-serialised; any other media type sends the rendered template verbatim. Absent means `application/json`. */
33045
+ contentType?: string;
33046
+ /** @description Signs every delivery so the receiver can verify it came from LangWatch. A credential: it reads back as the placeholder, and sending the placeholder back keeps the stored one. */
33047
+ signingSecret?: string | null;
33048
+ } & {
33049
+ [key: string]: unknown;
33050
+ };
33051
+ name: string;
33052
+ filters?: {
33053
+ [key: string]: string[] | {
33054
+ [key: string]: string[];
33055
+ } | {
33056
+ [key: string]: {
33057
+ [key: string]: string[];
33058
+ };
33059
+ };
33060
+ };
33061
+ /** @description The trace query this automation is about, in the syntax the traces view uses. When set it supersedes `filters`. */
33062
+ filterQuery?: string | null;
33063
+ message?: string;
33064
+ /** @enum {string} */
33065
+ alertType?: "CRITICAL" | "WARNING" | "INFO";
33066
+ /** @description Set to make this an alert on that graph. `graphAlert` and `alertType` are then required. */
33067
+ customGraphId?: string;
33068
+ /** @description The rule an alert fires by: series, operator, threshold, window. */
33069
+ graphAlert?: {
33070
+ threshold: number;
33071
+ /** @enum {string} */
33072
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
33073
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
33074
+ seriesName: string;
33075
+ };
33076
+ /** @description What a scheduled report renders and when it sends. */
33077
+ report?: {
33078
+ source: {
33079
+ /** @constant */
33080
+ kind: "dashboard";
33081
+ dashboardId: string;
33082
+ } | {
33083
+ /** @constant */
33084
+ kind: "customGraph";
33085
+ customGraphId: string;
33086
+ } | {
33087
+ /** @constant */
33088
+ kind: "traceQuery";
33089
+ /** @default {} */
33090
+ filters?: {
33091
+ [key: string]: unknown;
33092
+ };
33093
+ metric?: string;
33094
+ /** @default 5 */
33095
+ topN?: number;
33096
+ };
33097
+ schedule: {
33098
+ cron: string;
33099
+ timezone: string;
33100
+ };
33101
+ /** @default false */
33102
+ compareToPrevious?: boolean;
33103
+ };
33104
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33105
+ templates?: {
33106
+ /** @enum {string|null} */
33107
+ slackTemplateType?: "string" | "block_kit" | null;
33108
+ slackTemplate?: string | null;
33109
+ emailSubjectTemplate?: string | null;
33110
+ emailBodyTemplate?: string | null;
33111
+ };
33112
+ /**
33113
+ * @description How often a notification automation is allowed to send. A new one starts on a five-minute digest, which is what keeps a broad condition from sending a message per matching trace.
33114
+ * @enum {string}
33115
+ */
33116
+ notificationCadence?: "immediate" | "5min_digest" | "15min_digest" | "hourly_digest";
33117
+ /** @description How long to wait for a trace to settle before the conditions are read. */
33118
+ traceDebounceMs?: number;
33119
+ } | {
33120
+ /** @constant */
33121
+ action: "ADD_TO_DATASET";
33122
+ /** @description Append matched traces to a dataset. */
33123
+ actionParams: {
33124
+ /** @description The dataset matched traces are appended to. */
33125
+ datasetId: string;
33126
+ /** @description How a trace becomes a row in that dataset. */
33127
+ datasetMapping: {
33128
+ mapping: {
33129
+ [key: string]: unknown;
33130
+ };
33131
+ expansions?: string[];
33132
+ };
33133
+ } & {
33134
+ [key: string]: unknown;
33135
+ };
33136
+ name: string;
33137
+ filters?: {
33138
+ [key: string]: string[] | {
33139
+ [key: string]: string[];
33140
+ } | {
33141
+ [key: string]: {
33142
+ [key: string]: string[];
33143
+ };
33144
+ };
33145
+ };
33146
+ /** @description The trace query this automation is about, in the syntax the traces view uses. When set it supersedes `filters`. */
33147
+ filterQuery?: string | null;
33148
+ message?: string;
33149
+ /** @enum {string} */
33150
+ alertType?: "CRITICAL" | "WARNING" | "INFO";
33151
+ /** @description Set to make this an alert on that graph. `graphAlert` and `alertType` are then required. */
33152
+ customGraphId?: string;
33153
+ /** @description The rule an alert fires by: series, operator, threshold, window. */
33154
+ graphAlert?: {
33155
+ threshold: number;
33156
+ /** @enum {string} */
33157
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
33158
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
33159
+ seriesName: string;
32532
33160
  };
33161
+ /** @description What a scheduled report renders and when it sends. */
33162
+ report?: {
33163
+ source: {
33164
+ /** @constant */
33165
+ kind: "dashboard";
33166
+ dashboardId: string;
33167
+ } | {
33168
+ /** @constant */
33169
+ kind: "customGraph";
33170
+ customGraphId: string;
33171
+ } | {
33172
+ /** @constant */
33173
+ kind: "traceQuery";
33174
+ /** @default {} */
33175
+ filters?: {
33176
+ [key: string]: unknown;
33177
+ };
33178
+ metric?: string;
33179
+ /** @default 5 */
33180
+ topN?: number;
33181
+ };
33182
+ schedule: {
33183
+ cron: string;
33184
+ timezone: string;
33185
+ };
33186
+ /** @default false */
33187
+ compareToPrevious?: boolean;
33188
+ };
33189
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33190
+ templates?: {
33191
+ /** @enum {string|null} */
33192
+ slackTemplateType?: "string" | "block_kit" | null;
33193
+ slackTemplate?: string | null;
33194
+ emailSubjectTemplate?: string | null;
33195
+ emailBodyTemplate?: string | null;
33196
+ };
33197
+ /**
33198
+ * @description How often a notification automation is allowed to send. A new one starts on a five-minute digest, which is what keeps a broad condition from sending a message per matching trace.
33199
+ * @enum {string}
33200
+ */
33201
+ notificationCadence?: "immediate" | "5min_digest" | "15min_digest" | "hourly_digest";
33202
+ /** @description How long to wait for a trace to settle before the conditions are read. */
33203
+ traceDebounceMs?: number;
33204
+ } | {
33205
+ /** @constant */
33206
+ action: "ADD_TO_ANNOTATION_QUEUE";
33207
+ /** @description Queue matched traces for a person to label. */
33208
+ actionParams: {
33209
+ /** @description Who the queued items go to. */
33210
+ annotators: {
33211
+ id: string;
33212
+ name: string;
33213
+ }[];
33214
+ } & {
33215
+ [key: string]: unknown;
33216
+ };
33217
+ name: string;
33218
+ filters?: {
33219
+ [key: string]: string[] | {
33220
+ [key: string]: string[];
33221
+ } | {
33222
+ [key: string]: {
33223
+ [key: string]: string[];
33224
+ };
33225
+ };
33226
+ };
33227
+ /** @description The trace query this automation is about, in the syntax the traces view uses. When set it supersedes `filters`. */
33228
+ filterQuery?: string | null;
32533
33229
  message?: string;
32534
33230
  /** @enum {string} */
32535
33231
  alertType?: "CRITICAL" | "WARNING" | "INFO";
33232
+ /** @description Set to make this an alert on that graph. `graphAlert` and `alertType` are then required. */
33233
+ customGraphId?: string;
33234
+ /** @description The rule an alert fires by: series, operator, threshold, window. */
33235
+ graphAlert?: {
33236
+ threshold: number;
33237
+ /** @enum {string} */
33238
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
33239
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
33240
+ seriesName: string;
33241
+ };
33242
+ /** @description What a scheduled report renders and when it sends. */
33243
+ report?: {
33244
+ source: {
33245
+ /** @constant */
33246
+ kind: "dashboard";
33247
+ dashboardId: string;
33248
+ } | {
33249
+ /** @constant */
33250
+ kind: "customGraph";
33251
+ customGraphId: string;
33252
+ } | {
33253
+ /** @constant */
33254
+ kind: "traceQuery";
33255
+ /** @default {} */
33256
+ filters?: {
33257
+ [key: string]: unknown;
33258
+ };
33259
+ metric?: string;
33260
+ /** @default 5 */
33261
+ topN?: number;
33262
+ };
33263
+ schedule: {
33264
+ cron: string;
33265
+ timezone: string;
33266
+ };
33267
+ /** @default false */
33268
+ compareToPrevious?: boolean;
33269
+ };
33270
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33271
+ templates?: {
33272
+ /** @enum {string|null} */
33273
+ slackTemplateType?: "string" | "block_kit" | null;
33274
+ slackTemplate?: string | null;
33275
+ emailSubjectTemplate?: string | null;
33276
+ emailBodyTemplate?: string | null;
33277
+ };
33278
+ /**
33279
+ * @description How often a notification automation is allowed to send. A new one starts on a five-minute digest, which is what keeps a broad condition from sending a message per matching trace.
33280
+ * @enum {string}
33281
+ */
33282
+ notificationCadence?: "immediate" | "5min_digest" | "15min_digest" | "hourly_digest";
33283
+ /** @description How long to wait for a trace to settle before the conditions are read. */
33284
+ traceDebounceMs?: number;
32536
33285
  };
32537
33286
  };
32538
33287
  };
@@ -32547,13 +33296,67 @@ interface operations {
32547
33296
  id: string;
32548
33297
  name: string;
32549
33298
  /** @enum {string} */
32550
- action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE";
33299
+ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE" | "SEND_WEBHOOK";
33300
+ /** @description Where this automation delivers, with every credential value replaced by the `[redacted]` placeholder. Which channel is configured, which destination is set and which header names are in play all survive; the values never leave; a Slack automation names its connection by `slackIntegrationId` and carries no secret. Sending the placeholder back on an update keeps the stored value. The rule this automation fires by is not here — it is stated in `graphAlert` or `report`, and sending it in this field is refused. */
32551
33301
  actionParams: {
32552
33302
  [key: string]: unknown;
32553
33303
  };
33304
+ /** @description The rule an alert fires by. Null for anything that is not one. */
33305
+ graphAlert: {
33306
+ threshold: number;
33307
+ /** @enum {string} */
33308
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
33309
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
33310
+ seriesName: string;
33311
+ } | null;
33312
+ /** @description What a report renders and when. Null for anything else. */
33313
+ report: {
33314
+ source: {
33315
+ /** @constant */
33316
+ kind: "dashboard";
33317
+ dashboardId: string;
33318
+ } | {
33319
+ /** @constant */
33320
+ kind: "customGraph";
33321
+ customGraphId: string;
33322
+ } | {
33323
+ /** @constant */
33324
+ kind: "traceQuery";
33325
+ /** @default {} */
33326
+ filters: {
33327
+ [key: string]: unknown;
33328
+ };
33329
+ metric?: string;
33330
+ /** @default 5 */
33331
+ topN: number;
33332
+ };
33333
+ schedule: {
33334
+ cron: string;
33335
+ timezone: string;
33336
+ };
33337
+ /** @default false */
33338
+ compareToPrevious: boolean;
33339
+ } | null;
32554
33340
  filters: {
32555
33341
  [key: string]: unknown;
32556
33342
  };
33343
+ filterQuery: string | null;
33344
+ /**
33345
+ * @description What this automation is about: matching traces, a metric crossing a threshold, or a schedule.
33346
+ * @enum {string}
33347
+ */
33348
+ kind: "AUTOMATION" | "ALERT" | "REPORT";
33349
+ customGraphId: string | null;
33350
+ notificationCadence: string | null;
33351
+ traceDebounceMs: number | null;
33352
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33353
+ templates: {
33354
+ /** @enum {string|null} */
33355
+ slackTemplateType?: "string" | "block_kit" | null;
33356
+ slackTemplate?: string | null;
33357
+ emailSubjectTemplate?: string | null;
33358
+ emailBodyTemplate?: string | null;
33359
+ };
32557
33360
  active: boolean;
32558
33361
  message: string | null;
32559
33362
  /** @enum {string|null} */
@@ -32636,13 +33439,67 @@ interface operations {
32636
33439
  id: string;
32637
33440
  name: string;
32638
33441
  /** @enum {string} */
32639
- action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE";
33442
+ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE" | "SEND_WEBHOOK";
33443
+ /** @description Where this automation delivers, with every credential value replaced by the `[redacted]` placeholder. Which channel is configured, which destination is set and which header names are in play all survive; the values never leave; a Slack automation names its connection by `slackIntegrationId` and carries no secret. Sending the placeholder back on an update keeps the stored value. The rule this automation fires by is not here — it is stated in `graphAlert` or `report`, and sending it in this field is refused. */
32640
33444
  actionParams: {
32641
33445
  [key: string]: unknown;
32642
33446
  };
33447
+ /** @description The rule an alert fires by. Null for anything that is not one. */
33448
+ graphAlert: {
33449
+ threshold: number;
33450
+ /** @enum {string} */
33451
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
33452
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
33453
+ seriesName: string;
33454
+ } | null;
33455
+ /** @description What a report renders and when. Null for anything else. */
33456
+ report: {
33457
+ source: {
33458
+ /** @constant */
33459
+ kind: "dashboard";
33460
+ dashboardId: string;
33461
+ } | {
33462
+ /** @constant */
33463
+ kind: "customGraph";
33464
+ customGraphId: string;
33465
+ } | {
33466
+ /** @constant */
33467
+ kind: "traceQuery";
33468
+ /** @default {} */
33469
+ filters: {
33470
+ [key: string]: unknown;
33471
+ };
33472
+ metric?: string;
33473
+ /** @default 5 */
33474
+ topN: number;
33475
+ };
33476
+ schedule: {
33477
+ cron: string;
33478
+ timezone: string;
33479
+ };
33480
+ /** @default false */
33481
+ compareToPrevious: boolean;
33482
+ } | null;
32643
33483
  filters: {
32644
33484
  [key: string]: unknown;
32645
33485
  };
33486
+ filterQuery: string | null;
33487
+ /**
33488
+ * @description What this automation is about: matching traces, a metric crossing a threshold, or a schedule.
33489
+ * @enum {string}
33490
+ */
33491
+ kind: "AUTOMATION" | "ALERT" | "REPORT";
33492
+ customGraphId: string | null;
33493
+ notificationCadence: string | null;
33494
+ traceDebounceMs: number | null;
33495
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33496
+ templates: {
33497
+ /** @enum {string|null} */
33498
+ slackTemplateType?: "string" | "block_kit" | null;
33499
+ slackTemplate?: string | null;
33500
+ emailSubjectTemplate?: string | null;
33501
+ emailBodyTemplate?: string | null;
33502
+ };
32646
33503
  active: boolean;
32647
33504
  message: string | null;
32648
33505
  /** @enum {string|null} */
@@ -32819,33 +33676,617 @@ interface operations {
32819
33676
  /** @enum {string|null} */
32820
33677
  alertType?: "CRITICAL" | "WARNING" | "INFO" | null;
32821
33678
  filters?: {
32822
- [key: string]: unknown;
33679
+ [key: string]: string[] | {
33680
+ [key: string]: string[];
33681
+ } | {
33682
+ [key: string]: {
33683
+ [key: string]: string[];
33684
+ };
33685
+ };
32823
33686
  };
32824
- actionParams?: {
33687
+ /** @description The trace query this automation is about, in the syntax the traces view uses. When set it supersedes `filters`. */
33688
+ filterQuery?: string | null;
33689
+ /** @enum {string} */
33690
+ action?: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE" | "SEND_WEBHOOK";
33691
+ /** @description Replaces the delivery configuration as a whole rather than merging into it: send the fields this automation should have from now on, and anything left out is removed — omit `headers` and it delivers with none, omit `signingSecret` and its deliveries are no longer signed. The one exception is a credential the read hid: send back the `[redacted]` placeholder and the stored credential is kept (a Slack automation not yet on a connection has its stored secret moved into one), so reading an automation, changing one field and writing the whole object back is safe. Only this channel's fields are accepted; anything else is refused rather than dropped, and the rule this automation fires by belongs in `graphAlert` or `report`. */
33692
+ actionParams?: ({
33693
+ /** @description Who receives the email. Any address, not only teammates. */
33694
+ members: string[];
33695
+ } & {
32825
33696
  [key: string]: unknown;
32826
- };
32827
- };
32828
- };
32829
- };
32830
- responses: {
32831
- /** @description Trigger updated */
32832
- 200: {
32833
- headers: {
32834
- [name: string]: unknown;
32835
- };
32836
- content: {
32837
- "application/json": {
32838
- id: string;
32839
- name: string;
32840
- /** @enum {string} */
32841
- action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE";
32842
- actionParams: {
32843
- [key: string]: unknown;
33697
+ }) | ({
33698
+ /** @description The Slack connection this automation posts through: an organization connection or one of this project's, listed under Settings, Integrations, Slack. A bot connection also needs `slackChannelId`; a webhook connection needs nothing else. Preferred over `slackWebhook` and `slackBotToken`, and what a read returns in their place. */
33699
+ slackIntegrationId?: string;
33700
+ /**
33701
+ * @description How the message reaches Slack. `webhook` posts to an incoming webhook URL, `bot` posts as the LangWatch Slack app. With `slackIntegrationId` it follows the connection's kind. Absent without a connection means `webhook`.
33702
+ * @enum {string}
33703
+ */
33704
+ slackDelivery?: "webhook" | "bot";
33705
+ /** @description Legacy, accepted for one release: an incoming webhook URL, for `webhook` delivery. It is stored as a Slack connection (an existing one holding the same URL, else a new project connection) and the automation keeps only that connection's id. Send `slackIntegrationId` instead. */
33706
+ slackWebhook?: string;
33707
+ /** @description The channel the bot posts in, for a bot connection or `bot` delivery. Invite the LangWatch app to it first. */
33708
+ slackChannelId?: string;
33709
+ /** @description Legacy, accepted for one release: a bot token, for `bot` delivery. It is stored as a Slack connection (an existing one holding the same token, else a new project connection) and never reads back. Send `slackIntegrationId` instead. */
33710
+ slackBotToken?: string;
33711
+ /** @description Legacy and ignored: no read returns it. An update that retypes no secret moves an automation's own stored secret into a connection. */
33712
+ slackBotTokenSet?: boolean;
33713
+ } & {
33714
+ [key: string]: unknown;
33715
+ }) | ({
33716
+ /** @description Where the request goes. https only, and not a private host. */
33717
+ url: string;
33718
+ /**
33719
+ * @description The HTTP method. Absent means POST.
33720
+ * @enum {string}
33721
+ */
33722
+ method?: "POST" | "PUT" | "PATCH";
33723
+ /** @description Static headers sent with every delivery. The values are credentials: they read back as the placeholder, and sending the placeholder back keeps the stored ones. Changing `url` means sending the values again in the same request. */
33724
+ headers?: {
33725
+ [key: string]: string;
32844
33726
  };
32845
- filters: {
32846
- [key: string]: unknown;
33727
+ /** @description A Liquid template for the body. Absent sends the standard LangWatch envelope for a JSON content type, and an empty body for any other. */
33728
+ bodyTemplate?: string | null;
33729
+ /** @description The `Content-Type` the delivery announces, which also decides how the body is treated: `application/json` (and any `+json` type) is checked and re-serialised; any other media type sends the rendered template verbatim. Absent means `application/json`. */
33730
+ contentType?: string;
33731
+ /** @description Signs every delivery so the receiver can verify it came from LangWatch. A credential: it reads back as the placeholder, and sending the placeholder back keeps the stored one. */
33732
+ signingSecret?: string | null;
33733
+ } & {
33734
+ [key: string]: unknown;
33735
+ }) | ({
33736
+ /** @description The dataset matched traces are appended to. */
33737
+ datasetId: string;
33738
+ /** @description How a trace becomes a row in that dataset. */
33739
+ datasetMapping: {
33740
+ mapping: {
33741
+ [key: string]: unknown;
33742
+ };
33743
+ expansions?: string[];
32847
33744
  };
32848
- active: boolean;
33745
+ } & {
33746
+ [key: string]: unknown;
33747
+ }) | ({
33748
+ /** @description Who the queued items go to. */
33749
+ annotators: {
33750
+ id: string;
33751
+ name: string;
33752
+ }[];
33753
+ } & {
33754
+ [key: string]: unknown;
33755
+ });
33756
+ /** @description The rule this alert fires by. Only for an automation that is one. */
33757
+ graphAlert?: {
33758
+ threshold: number;
33759
+ /** @enum {string} */
33760
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
33761
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
33762
+ seriesName: string;
33763
+ };
33764
+ /** @description What this report renders and when. Only for one that is a report. */
33765
+ report?: {
33766
+ source: {
33767
+ /** @constant */
33768
+ kind: "dashboard";
33769
+ dashboardId: string;
33770
+ } | {
33771
+ /** @constant */
33772
+ kind: "customGraph";
33773
+ customGraphId: string;
33774
+ } | {
33775
+ /** @constant */
33776
+ kind: "traceQuery";
33777
+ /** @default {} */
33778
+ filters?: {
33779
+ [key: string]: unknown;
33780
+ };
33781
+ metric?: string;
33782
+ /** @default 5 */
33783
+ topN?: number;
33784
+ };
33785
+ schedule: {
33786
+ cron: string;
33787
+ timezone: string;
33788
+ };
33789
+ /** @default false */
33790
+ compareToPrevious?: boolean;
33791
+ };
33792
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33793
+ templates?: {
33794
+ /** @enum {string|null} */
33795
+ slackTemplateType?: "string" | "block_kit" | null;
33796
+ slackTemplate?: string | null;
33797
+ emailSubjectTemplate?: string | null;
33798
+ emailBodyTemplate?: string | null;
33799
+ };
33800
+ /**
33801
+ * @description How often a notification automation is allowed to send. A new one starts on a five-minute digest, which is what keeps a broad condition from sending a message per matching trace.
33802
+ * @enum {string}
33803
+ */
33804
+ notificationCadence?: "immediate" | "5min_digest" | "15min_digest" | "hourly_digest";
33805
+ /** @description How long to wait for a trace to settle before the conditions are read. */
33806
+ traceDebounceMs?: number;
33807
+ };
33808
+ };
33809
+ };
33810
+ responses: {
33811
+ /** @description Trigger updated */
33812
+ 200: {
33813
+ headers: {
33814
+ [name: string]: unknown;
33815
+ };
33816
+ content: {
33817
+ "application/json": {
33818
+ id: string;
33819
+ name: string;
33820
+ /** @enum {string} */
33821
+ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE" | "SEND_WEBHOOK";
33822
+ /** @description Where this automation delivers, with every credential value replaced by the `[redacted]` placeholder. Which channel is configured, which destination is set and which header names are in play all survive; the values never leave; a Slack automation names its connection by `slackIntegrationId` and carries no secret. Sending the placeholder back on an update keeps the stored value. The rule this automation fires by is not here — it is stated in `graphAlert` or `report`, and sending it in this field is refused. */
33823
+ actionParams: {
33824
+ [key: string]: unknown;
33825
+ };
33826
+ /** @description The rule an alert fires by. Null for anything that is not one. */
33827
+ graphAlert: {
33828
+ threshold: number;
33829
+ /** @enum {string} */
33830
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
33831
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
33832
+ seriesName: string;
33833
+ } | null;
33834
+ /** @description What a report renders and when. Null for anything else. */
33835
+ report: {
33836
+ source: {
33837
+ /** @constant */
33838
+ kind: "dashboard";
33839
+ dashboardId: string;
33840
+ } | {
33841
+ /** @constant */
33842
+ kind: "customGraph";
33843
+ customGraphId: string;
33844
+ } | {
33845
+ /** @constant */
33846
+ kind: "traceQuery";
33847
+ /** @default {} */
33848
+ filters: {
33849
+ [key: string]: unknown;
33850
+ };
33851
+ metric?: string;
33852
+ /** @default 5 */
33853
+ topN: number;
33854
+ };
33855
+ schedule: {
33856
+ cron: string;
33857
+ timezone: string;
33858
+ };
33859
+ /** @default false */
33860
+ compareToPrevious: boolean;
33861
+ } | null;
33862
+ filters: {
33863
+ [key: string]: unknown;
33864
+ };
33865
+ filterQuery: string | null;
33866
+ /**
33867
+ * @description What this automation is about: matching traces, a metric crossing a threshold, or a schedule.
33868
+ * @enum {string}
33869
+ */
33870
+ kind: "AUTOMATION" | "ALERT" | "REPORT";
33871
+ customGraphId: string | null;
33872
+ notificationCadence: string | null;
33873
+ traceDebounceMs: number | null;
33874
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
33875
+ templates: {
33876
+ /** @enum {string|null} */
33877
+ slackTemplateType?: "string" | "block_kit" | null;
33878
+ slackTemplate?: string | null;
33879
+ emailSubjectTemplate?: string | null;
33880
+ emailBodyTemplate?: string | null;
33881
+ };
33882
+ active: boolean;
33883
+ message: string | null;
33884
+ /** @enum {string|null} */
33885
+ alertType: "CRITICAL" | "WARNING" | "INFO" | null;
33886
+ createdAt: string;
33887
+ updatedAt: string;
33888
+ /** Format: uri */
33889
+ platformUrl: string;
33890
+ };
33891
+ };
33892
+ };
33893
+ /** @description Bad Request */
33894
+ 400: {
33895
+ headers: {
33896
+ [name: string]: unknown;
33897
+ };
33898
+ content: {
33899
+ "application/json": {
33900
+ error: string;
33901
+ message?: string;
33902
+ };
33903
+ };
33904
+ };
33905
+ /** @description Unauthorized */
33906
+ 401: {
33907
+ headers: {
33908
+ [name: string]: unknown;
33909
+ };
33910
+ content: {
33911
+ "application/json": {
33912
+ error: string;
33913
+ message?: string;
33914
+ };
33915
+ };
33916
+ };
33917
+ /** @description Trigger not found */
33918
+ 404: {
33919
+ headers: {
33920
+ [name: string]: unknown;
33921
+ };
33922
+ content: {
33923
+ "application/json": {
33924
+ error: string;
33925
+ message?: string;
33926
+ };
33927
+ };
33928
+ };
33929
+ /** @description Unprocessable Entity */
33930
+ 422: {
33931
+ headers: {
33932
+ [name: string]: unknown;
33933
+ };
33934
+ content: {
33935
+ "application/json": {
33936
+ error: string;
33937
+ message?: string;
33938
+ };
33939
+ };
33940
+ };
33941
+ /** @description Internal Server Error */
33942
+ 500: {
33943
+ headers: {
33944
+ [name: string]: unknown;
33945
+ };
33946
+ content: {
33947
+ "application/json": {
33948
+ error: string;
33949
+ message?: string;
33950
+ };
33951
+ };
33952
+ };
33953
+ };
33954
+ };
33955
+ getApiTriggersByIdFires: {
33956
+ parameters: {
33957
+ query?: {
33958
+ limit?: number;
33959
+ /** @description The `nextCursor` from the previous page. Omit for the newest fires. */
33960
+ cursor?: string;
33961
+ };
33962
+ header?: never;
33963
+ path: {
33964
+ id: string;
33965
+ };
33966
+ cookie?: never;
33967
+ };
33968
+ requestBody?: never;
33969
+ responses: {
33970
+ /** @description Success */
33971
+ 200: {
33972
+ headers: {
33973
+ [name: string]: unknown;
33974
+ };
33975
+ content: {
33976
+ "application/json": {
33977
+ /** @description One page of fires, newest first. */
33978
+ fires: {
33979
+ id: string;
33980
+ triggerId: string;
33981
+ customGraphId: string | null;
33982
+ firedAt: string;
33983
+ resolvedAt: string | null;
33984
+ }[];
33985
+ /** @description Pass as `cursor` to read the page after this one. Null on the last page. */
33986
+ nextCursor: string | null;
33987
+ };
33988
+ };
33989
+ };
33990
+ /** @description Bad Request */
33991
+ 400: {
33992
+ headers: {
33993
+ [name: string]: unknown;
33994
+ };
33995
+ content: {
33996
+ "application/json": {
33997
+ error: string;
33998
+ message?: string;
33999
+ };
34000
+ };
34001
+ };
34002
+ /** @description Unauthorized */
34003
+ 401: {
34004
+ headers: {
34005
+ [name: string]: unknown;
34006
+ };
34007
+ content: {
34008
+ "application/json": {
34009
+ error: string;
34010
+ message?: string;
34011
+ };
34012
+ };
34013
+ };
34014
+ /** @description Trigger not found */
34015
+ 404: {
34016
+ headers: {
34017
+ [name: string]: unknown;
34018
+ };
34019
+ content: {
34020
+ "application/json": {
34021
+ error: string;
34022
+ message?: string;
34023
+ };
34024
+ };
34025
+ };
34026
+ /** @description Unprocessable Entity */
34027
+ 422: {
34028
+ headers: {
34029
+ [name: string]: unknown;
34030
+ };
34031
+ content: {
34032
+ "application/json": {
34033
+ error: string;
34034
+ message?: string;
34035
+ };
34036
+ };
34037
+ };
34038
+ /** @description Internal Server Error */
34039
+ 500: {
34040
+ headers: {
34041
+ [name: string]: unknown;
34042
+ };
34043
+ content: {
34044
+ "application/json": {
34045
+ error: string;
34046
+ message?: string;
34047
+ };
34048
+ };
34049
+ };
34050
+ };
34051
+ };
34052
+ postApiTriggersByIdEnable: {
34053
+ parameters: {
34054
+ query?: never;
34055
+ header?: never;
34056
+ path: {
34057
+ id: string;
34058
+ };
34059
+ cookie?: never;
34060
+ };
34061
+ requestBody?: never;
34062
+ responses: {
34063
+ /** @description Trigger resumed */
34064
+ 200: {
34065
+ headers: {
34066
+ [name: string]: unknown;
34067
+ };
34068
+ content: {
34069
+ "application/json": {
34070
+ id: string;
34071
+ name: string;
34072
+ /** @enum {string} */
34073
+ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE" | "SEND_WEBHOOK";
34074
+ /** @description Where this automation delivers, with every credential value replaced by the `[redacted]` placeholder. Which channel is configured, which destination is set and which header names are in play all survive; the values never leave; a Slack automation names its connection by `slackIntegrationId` and carries no secret. Sending the placeholder back on an update keeps the stored value. The rule this automation fires by is not here — it is stated in `graphAlert` or `report`, and sending it in this field is refused. */
34075
+ actionParams: {
34076
+ [key: string]: unknown;
34077
+ };
34078
+ /** @description The rule an alert fires by. Null for anything that is not one. */
34079
+ graphAlert: {
34080
+ threshold: number;
34081
+ /** @enum {string} */
34082
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
34083
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
34084
+ seriesName: string;
34085
+ } | null;
34086
+ /** @description What a report renders and when. Null for anything else. */
34087
+ report: {
34088
+ source: {
34089
+ /** @constant */
34090
+ kind: "dashboard";
34091
+ dashboardId: string;
34092
+ } | {
34093
+ /** @constant */
34094
+ kind: "customGraph";
34095
+ customGraphId: string;
34096
+ } | {
34097
+ /** @constant */
34098
+ kind: "traceQuery";
34099
+ /** @default {} */
34100
+ filters: {
34101
+ [key: string]: unknown;
34102
+ };
34103
+ metric?: string;
34104
+ /** @default 5 */
34105
+ topN: number;
34106
+ };
34107
+ schedule: {
34108
+ cron: string;
34109
+ timezone: string;
34110
+ };
34111
+ /** @default false */
34112
+ compareToPrevious: boolean;
34113
+ } | null;
34114
+ filters: {
34115
+ [key: string]: unknown;
34116
+ };
34117
+ filterQuery: string | null;
34118
+ /**
34119
+ * @description What this automation is about: matching traces, a metric crossing a threshold, or a schedule.
34120
+ * @enum {string}
34121
+ */
34122
+ kind: "AUTOMATION" | "ALERT" | "REPORT";
34123
+ customGraphId: string | null;
34124
+ notificationCadence: string | null;
34125
+ traceDebounceMs: number | null;
34126
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
34127
+ templates: {
34128
+ /** @enum {string|null} */
34129
+ slackTemplateType?: "string" | "block_kit" | null;
34130
+ slackTemplate?: string | null;
34131
+ emailSubjectTemplate?: string | null;
34132
+ emailBodyTemplate?: string | null;
34133
+ };
34134
+ active: boolean;
34135
+ message: string | null;
34136
+ /** @enum {string|null} */
34137
+ alertType: "CRITICAL" | "WARNING" | "INFO" | null;
34138
+ createdAt: string;
34139
+ updatedAt: string;
34140
+ /** Format: uri */
34141
+ platformUrl: string;
34142
+ };
34143
+ };
34144
+ };
34145
+ /** @description Bad Request */
34146
+ 400: {
34147
+ headers: {
34148
+ [name: string]: unknown;
34149
+ };
34150
+ content: {
34151
+ "application/json": {
34152
+ error: string;
34153
+ message?: string;
34154
+ };
34155
+ };
34156
+ };
34157
+ /** @description Unauthorized */
34158
+ 401: {
34159
+ headers: {
34160
+ [name: string]: unknown;
34161
+ };
34162
+ content: {
34163
+ "application/json": {
34164
+ error: string;
34165
+ message?: string;
34166
+ };
34167
+ };
34168
+ };
34169
+ /** @description Trigger not found */
34170
+ 404: {
34171
+ headers: {
34172
+ [name: string]: unknown;
34173
+ };
34174
+ content: {
34175
+ "application/json": {
34176
+ error: string;
34177
+ message?: string;
34178
+ };
34179
+ };
34180
+ };
34181
+ /** @description Unprocessable Entity */
34182
+ 422: {
34183
+ headers: {
34184
+ [name: string]: unknown;
34185
+ };
34186
+ content: {
34187
+ "application/json": {
34188
+ error: string;
34189
+ message?: string;
34190
+ };
34191
+ };
34192
+ };
34193
+ /** @description Internal Server Error */
34194
+ 500: {
34195
+ headers: {
34196
+ [name: string]: unknown;
34197
+ };
34198
+ content: {
34199
+ "application/json": {
34200
+ error: string;
34201
+ message?: string;
34202
+ };
34203
+ };
34204
+ };
34205
+ };
34206
+ };
34207
+ postApiTriggersByIdDisable: {
34208
+ parameters: {
34209
+ query?: never;
34210
+ header?: never;
34211
+ path: {
34212
+ id: string;
34213
+ };
34214
+ cookie?: never;
34215
+ };
34216
+ requestBody?: never;
34217
+ responses: {
34218
+ /** @description Trigger paused */
34219
+ 200: {
34220
+ headers: {
34221
+ [name: string]: unknown;
34222
+ };
34223
+ content: {
34224
+ "application/json": {
34225
+ id: string;
34226
+ name: string;
34227
+ /** @enum {string} */
34228
+ action: "SEND_EMAIL" | "ADD_TO_DATASET" | "ADD_TO_ANNOTATION_QUEUE" | "SEND_SLACK_MESSAGE" | "SEND_WEBHOOK";
34229
+ /** @description Where this automation delivers, with every credential value replaced by the `[redacted]` placeholder. Which channel is configured, which destination is set and which header names are in play all survive; the values never leave; a Slack automation names its connection by `slackIntegrationId` and carries no secret. Sending the placeholder back on an update keeps the stored value. The rule this automation fires by is not here — it is stated in `graphAlert` or `report`, and sending it in this field is refused. */
34230
+ actionParams: {
34231
+ [key: string]: unknown;
34232
+ };
34233
+ /** @description The rule an alert fires by. Null for anything that is not one. */
34234
+ graphAlert: {
34235
+ threshold: number;
34236
+ /** @enum {string} */
34237
+ operator: "gt" | "lt" | "gte" | "lte" | "eq";
34238
+ timePeriod: 1 | 5 | 15 | 30 | 60 | 1440;
34239
+ seriesName: string;
34240
+ } | null;
34241
+ /** @description What a report renders and when. Null for anything else. */
34242
+ report: {
34243
+ source: {
34244
+ /** @constant */
34245
+ kind: "dashboard";
34246
+ dashboardId: string;
34247
+ } | {
34248
+ /** @constant */
34249
+ kind: "customGraph";
34250
+ customGraphId: string;
34251
+ } | {
34252
+ /** @constant */
34253
+ kind: "traceQuery";
34254
+ /** @default {} */
34255
+ filters: {
34256
+ [key: string]: unknown;
34257
+ };
34258
+ metric?: string;
34259
+ /** @default 5 */
34260
+ topN: number;
34261
+ };
34262
+ schedule: {
34263
+ cron: string;
34264
+ timezone: string;
34265
+ };
34266
+ /** @default false */
34267
+ compareToPrevious: boolean;
34268
+ } | null;
34269
+ filters: {
34270
+ [key: string]: unknown;
34271
+ };
34272
+ filterQuery: string | null;
34273
+ /**
34274
+ * @description What this automation is about: matching traces, a metric crossing a threshold, or a schedule.
34275
+ * @enum {string}
34276
+ */
34277
+ kind: "AUTOMATION" | "ALERT" | "REPORT";
34278
+ customGraphId: string | null;
34279
+ notificationCadence: string | null;
34280
+ traceDebounceMs: number | null;
34281
+ /** @description The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel. */
34282
+ templates: {
34283
+ /** @enum {string|null} */
34284
+ slackTemplateType?: "string" | "block_kit" | null;
34285
+ slackTemplate?: string | null;
34286
+ emailSubjectTemplate?: string | null;
34287
+ emailBodyTemplate?: string | null;
34288
+ };
34289
+ active: boolean;
32849
34290
  message: string | null;
32850
34291
  /** @enum {string|null} */
32851
34292
  alertType: "CRITICAL" | "WARNING" | "INFO" | null;
@@ -32918,6 +34359,182 @@ interface operations {
32918
34359
  };
32919
34360
  };
32920
34361
  };
34362
+ postApiTriggersByIdTestFire: {
34363
+ parameters: {
34364
+ query?: never;
34365
+ header?: never;
34366
+ path: {
34367
+ id: string;
34368
+ };
34369
+ cookie?: never;
34370
+ };
34371
+ requestBody?: never;
34372
+ responses: {
34373
+ /** @description Test fire sent */
34374
+ 200: {
34375
+ headers: {
34376
+ [name: string]: unknown;
34377
+ };
34378
+ content: {
34379
+ "application/json": {
34380
+ /** @enum {string} */
34381
+ channel: "email" | "slack" | "webhook";
34382
+ recipientCount: number;
34383
+ /** @description Whether the LangWatch default message was rendered because this automation states no template of its own. */
34384
+ usedDefault: boolean;
34385
+ missingVariables: string[];
34386
+ errors: string[];
34387
+ /** @description Webhook only: what the endpoint answered with. */
34388
+ httpStatus?: number;
34389
+ };
34390
+ };
34391
+ };
34392
+ /** @description Bad Request */
34393
+ 400: {
34394
+ headers: {
34395
+ [name: string]: unknown;
34396
+ };
34397
+ content: {
34398
+ "application/json": {
34399
+ error: string;
34400
+ message?: string;
34401
+ };
34402
+ };
34403
+ };
34404
+ /** @description Unauthorized */
34405
+ 401: {
34406
+ headers: {
34407
+ [name: string]: unknown;
34408
+ };
34409
+ content: {
34410
+ "application/json": {
34411
+ error: string;
34412
+ message?: string;
34413
+ };
34414
+ };
34415
+ };
34416
+ /** @description Trigger not found */
34417
+ 404: {
34418
+ headers: {
34419
+ [name: string]: unknown;
34420
+ };
34421
+ content: {
34422
+ "application/json": {
34423
+ error: string;
34424
+ message?: string;
34425
+ };
34426
+ };
34427
+ };
34428
+ /** @description Unprocessable Entity */
34429
+ 422: {
34430
+ headers: {
34431
+ [name: string]: unknown;
34432
+ };
34433
+ content: {
34434
+ "application/json": {
34435
+ error: string;
34436
+ message?: string;
34437
+ };
34438
+ };
34439
+ };
34440
+ /** @description Internal Server Error */
34441
+ 500: {
34442
+ headers: {
34443
+ [name: string]: unknown;
34444
+ };
34445
+ content: {
34446
+ "application/json": {
34447
+ error: string;
34448
+ message?: string;
34449
+ };
34450
+ };
34451
+ };
34452
+ };
34453
+ };
34454
+ getApiSlackConnections: {
34455
+ parameters: {
34456
+ query?: never;
34457
+ header?: never;
34458
+ path?: never;
34459
+ cookie?: never;
34460
+ };
34461
+ requestBody?: never;
34462
+ responses: {
34463
+ /** @description Success */
34464
+ 200: {
34465
+ headers: {
34466
+ [name: string]: unknown;
34467
+ };
34468
+ content: {
34469
+ "application/json": {
34470
+ /** @description What an automation's `slackIntegrationId` names to post through this connection. */
34471
+ id: string;
34472
+ name: string;
34473
+ /**
34474
+ * @description `bot` posts as the LangWatch Slack app and needs a `slackChannelId` on the automation; `webhook` posts to its incoming webhook's channel.
34475
+ * @enum {string}
34476
+ */
34477
+ kind: "bot" | "webhook";
34478
+ /** @enum {string} */
34479
+ scopeType: "ORGANIZATION" | "PROJECT";
34480
+ scopeId: string;
34481
+ scopeName: string;
34482
+ /** @description The Slack workspace a bot connection posts into. */
34483
+ slackTeamName: string | null;
34484
+ createdAt: string;
34485
+ }[];
34486
+ };
34487
+ };
34488
+ /** @description Bad Request */
34489
+ 400: {
34490
+ headers: {
34491
+ [name: string]: unknown;
34492
+ };
34493
+ content: {
34494
+ "application/json": {
34495
+ error: string;
34496
+ message?: string;
34497
+ };
34498
+ };
34499
+ };
34500
+ /** @description Unauthorized */
34501
+ 401: {
34502
+ headers: {
34503
+ [name: string]: unknown;
34504
+ };
34505
+ content: {
34506
+ "application/json": {
34507
+ error: string;
34508
+ message?: string;
34509
+ };
34510
+ };
34511
+ };
34512
+ /** @description Unprocessable Entity */
34513
+ 422: {
34514
+ headers: {
34515
+ [name: string]: unknown;
34516
+ };
34517
+ content: {
34518
+ "application/json": {
34519
+ error: string;
34520
+ message?: string;
34521
+ };
34522
+ };
34523
+ };
34524
+ /** @description Internal Server Error */
34525
+ 500: {
34526
+ headers: {
34527
+ [name: string]: unknown;
34528
+ };
34529
+ content: {
34530
+ "application/json": {
34531
+ error: string;
34532
+ message?: string;
34533
+ };
34534
+ };
34535
+ };
34536
+ };
34537
+ };
32921
34538
  getApiWebhooksV1Endpoints: {
32922
34539
  parameters: {
32923
34540
  query?: never;