langsmith 0.8.7 → 0.8.8

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 (71) hide show
  1. package/dist/_openapi_client/client.cjs +8 -0
  2. package/dist/_openapi_client/client.d.ts +3 -0
  3. package/dist/_openapi_client/client.js +8 -0
  4. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +147 -0
  5. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +372 -0
  6. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +110 -0
  7. package/dist/_openapi_client/resources/annotation-queues/items.cjs +84 -0
  8. package/dist/_openapi_client/resources/annotation-queues/items.d.ts +207 -0
  9. package/dist/_openapi_client/resources/annotation-queues/items.js +80 -0
  10. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +61 -0
  11. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +185 -0
  12. package/dist/_openapi_client/resources/annotation-queues/runs.js +57 -0
  13. package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
  14. package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
  15. package/dist/_openapi_client/resources/index.cjs +3 -1
  16. package/dist/_openapi_client/resources/index.d.ts +1 -0
  17. package/dist/_openapi_client/resources/index.js +1 -0
  18. package/dist/_openapi_client/resources/info.cjs +3 -1
  19. package/dist/_openapi_client/resources/info.d.ts +16 -22
  20. package/dist/_openapi_client/resources/info.js +3 -1
  21. package/dist/_openapi_client/resources/issues.cjs +2 -2
  22. package/dist/_openapi_client/resources/issues.js +2 -2
  23. package/dist/_openapi_client/resources/online-evaluators.cjs +7 -7
  24. package/dist/_openapi_client/resources/online-evaluators.d.ts +8 -0
  25. package/dist/_openapi_client/resources/online-evaluators.js +7 -7
  26. package/dist/_openapi_client/resources/public/runs.cjs +2 -2
  27. package/dist/_openapi_client/resources/public/runs.d.ts +1 -1
  28. package/dist/_openapi_client/resources/public/runs.js +2 -2
  29. package/dist/_openapi_client/resources/runs/runs.cjs +3 -3
  30. package/dist/_openapi_client/resources/runs/runs.d.ts +9 -4
  31. package/dist/_openapi_client/resources/runs/runs.js +3 -3
  32. package/dist/_openapi_client/resources/runs/share.cjs +2 -2
  33. package/dist/_openapi_client/resources/runs/share.js +2 -2
  34. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +10 -10
  35. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +40 -0
  36. package/dist/_openapi_client/resources/sandboxes/boxes.js +10 -10
  37. package/dist/_openapi_client/resources/sandboxes/registries.cjs +5 -5
  38. package/dist/_openapi_client/resources/sandboxes/registries.js +5 -5
  39. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +17 -0
  40. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +4 -4
  41. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +12 -0
  42. package/dist/_openapi_client/resources/sandboxes/snapshots.js +4 -4
  43. package/dist/_openapi_client/resources/threads.cjs +3 -3
  44. package/dist/_openapi_client/resources/threads.d.ts +2 -1
  45. package/dist/_openapi_client/resources/threads.js +3 -3
  46. package/dist/_openapi_client/resources/traces.cjs +2 -2
  47. package/dist/_openapi_client/resources/traces.d.ts +1 -1
  48. package/dist/_openapi_client/resources/traces.js +2 -2
  49. package/dist/client.cjs +57 -21
  50. package/dist/client.d.ts +58 -22
  51. package/dist/client.js +57 -21
  52. package/dist/index.cjs +1 -1
  53. package/dist/index.d.ts +1 -1
  54. package/dist/index.js +1 -1
  55. package/dist/sandbox/command_handle.cjs +4 -4
  56. package/dist/sandbox/command_handle.js +5 -5
  57. package/dist/sandbox/errors.cjs +16 -1
  58. package/dist/sandbox/errors.d.ts +11 -0
  59. package/dist/sandbox/errors.js +14 -0
  60. package/dist/sandbox/index.cjs +2 -1
  61. package/dist/sandbox/index.d.ts +1 -1
  62. package/dist/sandbox/index.js +1 -1
  63. package/dist/sandbox/sandbox.cjs +22 -4
  64. package/dist/sandbox/sandbox.js +24 -6
  65. package/dist/sandbox/ws_execute.cjs +75 -8
  66. package/dist/sandbox/ws_execute.d.ts +8 -0
  67. package/dist/sandbox/ws_execute.js +72 -8
  68. package/package.json +1 -1
  69. package/dist/utils/constants.cjs +0 -4
  70. package/dist/utils/constants.d.ts +0 -1
  71. package/dist/utils/constants.js +0 -1
@@ -67,6 +67,7 @@ const issues_js_1 = require("./resources/issues.cjs");
67
67
  const online_evaluators_js_1 = require("./resources/online-evaluators.cjs");
68
68
  const threads_js_1 = require("./resources/threads.cjs");
69
69
  const traces_js_1 = require("./resources/traces.cjs");
70
+ const annotation_queues_js_1 = require("./resources/annotation-queues/annotation-queues.cjs");
70
71
  const datasets_js_1 = require("./resources/datasets/datasets.cjs");
71
72
  const public_js_1 = require("./resources/public/public.cjs");
72
73
  const runs_js_1 = require("./resources/runs/runs.cjs");
@@ -197,6 +198,12 @@ class Langsmith {
197
198
  writable: true,
198
199
  value: new API.Public(this)
199
200
  });
201
+ Object.defineProperty(this, "annotationQueues", {
202
+ enumerable: true,
203
+ configurable: true,
204
+ writable: true,
205
+ value: new API.AnnotationQueues(this)
206
+ });
200
207
  Object.defineProperty(this, "info", {
201
208
  enumerable: true,
202
209
  configurable: true,
@@ -761,6 +768,7 @@ Langsmith.Threads = threads_js_1.Threads;
761
768
  Langsmith.Traces = traces_js_1.Traces;
762
769
  Langsmith.OnlineEvaluators = online_evaluators_js_1.OnlineEvaluators;
763
770
  Langsmith.Public = public_js_1.Public;
771
+ Langsmith.AnnotationQueues = annotation_queues_js_1.AnnotationQueues;
764
772
  Langsmith.Info = info_js_1.Info;
765
773
  Langsmith.Issues = issues_js_1.Issues;
766
774
  Langsmith.Sandboxes = sandboxes_js_1.Sandboxes;
@@ -13,6 +13,7 @@ import { Issue, IssueListParams, Issues, IssuesOffsetPaginationIssues } from './
13
13
  import { BulkDeleteEvaluatorFailedItem, BulkDeleteEvaluatorsResponse, CreateOnlineCodeEvaluatorRequest, CreateOnlineEvaluatorRequest, CreateOnlineEvaluatorResponse, CreateOnlineLlmEvaluatorRequest, GetOnlineEvaluatorSpendResponse, OnlineCodeEvaluator, OnlineEvaluator, OnlineEvaluatorBulkDeleteParams, OnlineEvaluatorCreateParams, OnlineEvaluatorDeleteParams, OnlineEvaluatorListParams, OnlineEvaluatorRunRule, OnlineEvaluatorSpendDay, OnlineEvaluatorSpendGroup, OnlineEvaluatorSpendParams, OnlineEvaluatorType, OnlineEvaluatorUpdateParams, OnlineEvaluators, OnlineEvaluatorsOffsetPaginationOnlineEvaluators, OnlineLlmEvaluator, OnlineSpendLimit, UpdateOnlineCodeEvaluatorRequest, UpdateOnlineEvaluatorRequest, UpdateOnlineEvaluatorResponse, UpdateOnlineLlmEvaluatorRequest } from './resources/online-evaluators.js';
14
14
  import { Thread, ThreadListTracesParams, ThreadQueryParams, ThreadStats, ThreadStatsParams, ThreadTrace, ThreadTracesItemsCursorGetPagination, Threads, ThreadsItemsCursorPostPagination } from './resources/threads.js';
15
15
  import { Trace, TraceAggregates, TraceListRunsParams, TraceListRunsResponse, TraceQueryParams, Traces, TracesItemsCursorPostPagination } from './resources/traces.js';
16
+ import { AnnotationQueueAnnotationQueuesParams, AnnotationQueueCreateRunStatusParams, AnnotationQueueCreateRunStatusResponse, AnnotationQueueDeleteResponse, AnnotationQueueExportParams, AnnotationQueueExportResponse, AnnotationQueuePopulateParams, AnnotationQueuePopulateResponse, AnnotationQueueRetrieveAnnotationQueuesParams, AnnotationQueueRetrieveAnnotationQueuesResponse, AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, AnnotationQueueRetrieveQueuesResponse, AnnotationQueueRetrieveResponse, AnnotationQueueRetrieveRunParams, AnnotationQueueRetrieveSizeParams, AnnotationQueueRetrieveTotalArchivedParams, AnnotationQueueRubricItemSchema, AnnotationQueueSchema, AnnotationQueueSizeSchema, AnnotationQueueUpdateParams, AnnotationQueueUpdateResponse, AnnotationQueues, RunSchemaWithAnnotationQueueInfo } from './resources/annotation-queues/annotation-queues.js';
16
17
  import { DataType, Dataset, DatasetTransformation, DatasetVersion, Datasets, FeedbackCreateCoreSchema, Missing, SortByDatasetColumn } from './resources/datasets/datasets.js';
17
18
  import { Public } from './resources/public/public.js';
18
19
  import { ResponseBodyForRunsGenerateQuery, Run, RunGetURLParams, RunGetURLResponse, RunIngest, RunQueryParams, RunQueryV2Params, RunRetrieveParams, RunRetrieveV2Params, RunSchema, RunSelectField, RunStatsQueryParams, RunType, RunTypeEnum, Runs, RunsFilterDataSourceTypeEnum, RunsItemsCursorPostPagination } from './resources/runs/runs.js';
@@ -195,6 +196,7 @@ export declare class Langsmith {
195
196
  traces: API.Traces;
196
197
  onlineEvaluators: API.OnlineEvaluators;
197
198
  public: API.Public;
199
+ annotationQueues: API.AnnotationQueues;
198
200
  info: API.Info;
199
201
  issues: API.Issues;
200
202
  sandboxes: API.Sandboxes;
@@ -225,6 +227,7 @@ export declare namespace Langsmith {
225
227
  export { Traces as Traces, type Trace as Trace, type TraceAggregates as TraceAggregates, type TraceListRunsResponse as TraceListRunsResponse, type TracesItemsCursorPostPagination as TracesItemsCursorPostPagination, type TraceListRunsParams as TraceListRunsParams, type TraceQueryParams as TraceQueryParams, };
226
228
  export { OnlineEvaluators as OnlineEvaluators, type BulkDeleteEvaluatorFailedItem as BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse as BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest as CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest as CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse as CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest as CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse as GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator as OnlineCodeEvaluator, type OnlineEvaluator as OnlineEvaluator, type OnlineEvaluatorRunRule as OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay as OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup as OnlineEvaluatorSpendGroup, type OnlineEvaluatorType as OnlineEvaluatorType, type OnlineLlmEvaluator as OnlineLlmEvaluator, type OnlineSpendLimit as OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest as UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest as UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse as UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest as UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators as OnlineEvaluatorsOffsetPaginationOnlineEvaluators, type OnlineEvaluatorCreateParams as OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams as OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams as OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams as OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams as OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams as OnlineEvaluatorSpendParams, };
227
229
  export { Public as Public };
230
+ export { AnnotationQueues as AnnotationQueues, type AnnotationQueueRubricItemSchema as AnnotationQueueRubricItemSchema, type AnnotationQueueSchema as AnnotationQueueSchema, type AnnotationQueueSizeSchema as AnnotationQueueSizeSchema, type RunSchemaWithAnnotationQueueInfo as RunSchemaWithAnnotationQueueInfo, type AnnotationQueueRetrieveResponse as AnnotationQueueRetrieveResponse, type AnnotationQueueUpdateResponse as AnnotationQueueUpdateResponse, type AnnotationQueueDeleteResponse as AnnotationQueueDeleteResponse, type AnnotationQueueCreateRunStatusResponse as AnnotationQueueCreateRunStatusResponse, type AnnotationQueueExportResponse as AnnotationQueueExportResponse, type AnnotationQueuePopulateResponse as AnnotationQueuePopulateResponse, type AnnotationQueueRetrieveAnnotationQueuesResponse as AnnotationQueueRetrieveAnnotationQueuesResponse, type AnnotationQueueRetrieveQueuesResponse as AnnotationQueueRetrieveQueuesResponse, type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray as AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, type AnnotationQueueUpdateParams as AnnotationQueueUpdateParams, type AnnotationQueueAnnotationQueuesParams as AnnotationQueueAnnotationQueuesParams, type AnnotationQueueCreateRunStatusParams as AnnotationQueueCreateRunStatusParams, type AnnotationQueueExportParams as AnnotationQueueExportParams, type AnnotationQueuePopulateParams as AnnotationQueuePopulateParams, type AnnotationQueueRetrieveAnnotationQueuesParams as AnnotationQueueRetrieveAnnotationQueuesParams, type AnnotationQueueRetrieveRunParams as AnnotationQueueRetrieveRunParams, type AnnotationQueueRetrieveSizeParams as AnnotationQueueRetrieveSizeParams, type AnnotationQueueRetrieveTotalArchivedParams as AnnotationQueueRetrieveTotalArchivedParams, };
228
231
  export { Info as Info, type InfoListResponse as InfoListResponse };
229
232
  export { Issues as Issues, type Issue as Issue, type IssuesOffsetPaginationIssues as IssuesOffsetPaginationIssues, type IssueListParams as IssueListParams, };
230
233
  export { Sandboxes as Sandboxes, type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, };
@@ -31,6 +31,7 @@ import { Issues } from './resources/issues.js';
31
31
  import { OnlineEvaluators, } from './resources/online-evaluators.js';
32
32
  import { Threads, } from './resources/threads.js';
33
33
  import { Traces, } from './resources/traces.js';
34
+ import { AnnotationQueues, } from './resources/annotation-queues/annotation-queues.js';
34
35
  import { Datasets, } from './resources/datasets/datasets.js';
35
36
  import { Public } from './resources/public/public.js';
36
37
  import { Runs, } from './resources/runs/runs.js';
@@ -161,6 +162,12 @@ export class Langsmith {
161
162
  writable: true,
162
163
  value: new API.Public(this)
163
164
  });
165
+ Object.defineProperty(this, "annotationQueues", {
166
+ enumerable: true,
167
+ configurable: true,
168
+ writable: true,
169
+ value: new API.AnnotationQueues(this)
170
+ });
164
171
  Object.defineProperty(this, "info", {
165
172
  enumerable: true,
166
173
  configurable: true,
@@ -724,6 +731,7 @@ Langsmith.Threads = Threads;
724
731
  Langsmith.Traces = Traces;
725
732
  Langsmith.OnlineEvaluators = OnlineEvaluators;
726
733
  Langsmith.Public = Public;
734
+ Langsmith.AnnotationQueues = AnnotationQueues;
727
735
  Langsmith.Info = Info;
728
736
  Langsmith.Issues = Issues;
729
737
  Langsmith.Sandboxes = Sandboxes;
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || (function () {
21
+ var ownKeys = function(o) {
22
+ ownKeys = Object.getOwnPropertyNames || function (o) {
23
+ var ar = [];
24
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
+ return ar;
26
+ };
27
+ return ownKeys(o);
28
+ };
29
+ return function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ })();
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.AnnotationQueues = void 0;
39
+ const resource_js_1 = require("../../core/resource.cjs");
40
+ const ItemsAPI = __importStar(require("./items.cjs"));
41
+ const items_js_1 = require("./items.cjs");
42
+ const RunsAPI = __importStar(require("./runs.cjs"));
43
+ const runs_js_1 = require("./runs.cjs");
44
+ const pagination_js_1 = require("../../core/pagination.cjs");
45
+ const path_js_1 = require("../../internal/utils/path.cjs");
46
+ class AnnotationQueues extends resource_js_1.APIResource {
47
+ constructor() {
48
+ super(...arguments);
49
+ Object.defineProperty(this, "runs", {
50
+ enumerable: true,
51
+ configurable: true,
52
+ writable: true,
53
+ value: new RunsAPI.Runs(this._client)
54
+ });
55
+ Object.defineProperty(this, "items", {
56
+ enumerable: true,
57
+ configurable: true,
58
+ writable: true,
59
+ value: new ItemsAPI.Items(this._client)
60
+ });
61
+ }
62
+ /**
63
+ * Get Annotation Queue
64
+ */
65
+ retrieve(queueID, options) {
66
+ return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, options);
67
+ }
68
+ /**
69
+ * Update Annotation Queue
70
+ */
71
+ update(queueID, body, options) {
72
+ return this._client.patch((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, { body, ...options });
73
+ }
74
+ /**
75
+ * Delete Annotation Queue
76
+ */
77
+ delete(queueID, options) {
78
+ return this._client.delete((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, options);
79
+ }
80
+ /**
81
+ * Create Annotation Queue
82
+ */
83
+ annotationQueues(body, options) {
84
+ return this._client.post('/api/v1/annotation-queues', { body, ...options });
85
+ }
86
+ /**
87
+ * Create Identity Annotation Queue Run Status
88
+ */
89
+ createRunStatus(annotationQueueRunID, body, options) {
90
+ return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/status/${annotationQueueRunID}`, {
91
+ body,
92
+ ...options,
93
+ });
94
+ }
95
+ /**
96
+ * Export Annotation Queue Archived Runs
97
+ */
98
+ export(queueID, body, options) {
99
+ return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/export`, { body, ...options });
100
+ }
101
+ /**
102
+ * Populate annotation queue with runs from an experiment.
103
+ */
104
+ populate(body, options) {
105
+ return this._client.post('/api/v1/annotation-queues/populate', { body, ...options });
106
+ }
107
+ /**
108
+ * Get Annotation Queues
109
+ */
110
+ retrieveAnnotationQueues(query = {}, options) {
111
+ return this._client.getAPIList('/api/v1/annotation-queues', (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
112
+ }
113
+ /**
114
+ * Get Annotation Queues For Run
115
+ */
116
+ retrieveQueues(runID, options) {
117
+ return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${runID}/queues`, options);
118
+ }
119
+ /**
120
+ * Get a run from an annotation queue
121
+ */
122
+ retrieveRun(index, params, options) {
123
+ const { queue_id, ...query } = params;
124
+ return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/run/${index}`, { query, ...options });
125
+ }
126
+ /**
127
+ * Get Size From Annotation Queue
128
+ */
129
+ retrieveSize(queueID, query = {}, options) {
130
+ return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/size`, { query, ...options });
131
+ }
132
+ /**
133
+ * Get Total Archived From Annotation Queue
134
+ */
135
+ retrieveTotalArchived(queueID, query = {}, options) {
136
+ return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/total_archived`, { query, ...options });
137
+ }
138
+ /**
139
+ * Get Total Size From Annotation Queue
140
+ */
141
+ retrieveTotalSize(queueID, options) {
142
+ return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/total_size`, options);
143
+ }
144
+ }
145
+ exports.AnnotationQueues = AnnotationQueues;
146
+ AnnotationQueues.Runs = runs_js_1.Runs;
147
+ AnnotationQueues.Items = items_js_1.Items;
@@ -0,0 +1,372 @@
1
+ import { APIResource } from '../../core/resource.js';
2
+ import * as ItemsAPI from './items.js';
3
+ import { ItemCreateParams, ItemCreateResponse, ItemCreateStatusParams, ItemCreateStatusResponse, ItemDeleteAllParams, ItemDeleteAllResponse, ItemListParams, ItemListResponse, ItemListResponsesItemsCursorGetPagination, ItemRetrieveCountParams, ItemRetrieveCountResponse, ItemRetrievePlacementParams, ItemRetrievePlacementResponse, ItemUpdateParams, ItemUpdateResponse, Items } from './items.js';
4
+ import * as RunsAPI from './runs.js';
5
+ import { RunCreateByKeyParams, RunCreateByKeyResponse, RunCreateParams, RunCreateResponse, RunDeleteAllParams, RunDeleteAllResponse, RunDeleteQueueParams, RunDeleteQueueResponse, RunListParams, RunListResponse, RunUpdateParams, RunUpdateResponse, Runs } from './runs.js';
6
+ import * as DatasetsAPI from '../datasets/datasets.js';
7
+ import { APIPromise } from '../../core/api-promise.js';
8
+ import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
9
+ import { RequestOptions } from '../../internal/request-options.js';
10
+ import * as RunsAPI_ from '../runs/runs.js';
11
+ export declare class AnnotationQueues extends APIResource {
12
+ runs: RunsAPI.Runs;
13
+ items: ItemsAPI.Items;
14
+ /**
15
+ * Get Annotation Queue
16
+ */
17
+ retrieve(queueID: string, options?: RequestOptions): APIPromise<AnnotationQueueRetrieveResponse>;
18
+ /**
19
+ * Update Annotation Queue
20
+ */
21
+ update(queueID: string, body: AnnotationQueueUpdateParams, options?: RequestOptions): APIPromise<unknown>;
22
+ /**
23
+ * Delete Annotation Queue
24
+ */
25
+ delete(queueID: string, options?: RequestOptions): APIPromise<unknown>;
26
+ /**
27
+ * Create Annotation Queue
28
+ */
29
+ annotationQueues(body: AnnotationQueueAnnotationQueuesParams, options?: RequestOptions): APIPromise<AnnotationQueueSchema>;
30
+ /**
31
+ * Create Identity Annotation Queue Run Status
32
+ */
33
+ createRunStatus(annotationQueueRunID: string, body: AnnotationQueueCreateRunStatusParams, options?: RequestOptions): APIPromise<unknown>;
34
+ /**
35
+ * Export Annotation Queue Archived Runs
36
+ */
37
+ export(queueID: string, body: AnnotationQueueExportParams, options?: RequestOptions): APIPromise<unknown>;
38
+ /**
39
+ * Populate annotation queue with runs from an experiment.
40
+ */
41
+ populate(body: AnnotationQueuePopulateParams, options?: RequestOptions): APIPromise<unknown>;
42
+ /**
43
+ * Get Annotation Queues
44
+ */
45
+ retrieveAnnotationQueues(query?: AnnotationQueueRetrieveAnnotationQueuesParams | null | undefined, options?: RequestOptions): PagePromise<AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, AnnotationQueueRetrieveAnnotationQueuesResponse>;
46
+ /**
47
+ * Get Annotation Queues For Run
48
+ */
49
+ retrieveQueues(runID: string, options?: RequestOptions): APIPromise<AnnotationQueueRetrieveQueuesResponse>;
50
+ /**
51
+ * Get a run from an annotation queue
52
+ */
53
+ retrieveRun(index: number, params: AnnotationQueueRetrieveRunParams, options?: RequestOptions): APIPromise<RunSchemaWithAnnotationQueueInfo>;
54
+ /**
55
+ * Get Size From Annotation Queue
56
+ */
57
+ retrieveSize(queueID: string, query?: AnnotationQueueRetrieveSizeParams | null | undefined, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
58
+ /**
59
+ * Get Total Archived From Annotation Queue
60
+ */
61
+ retrieveTotalArchived(queueID: string, query?: AnnotationQueueRetrieveTotalArchivedParams | null | undefined, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
62
+ /**
63
+ * Get Total Size From Annotation Queue
64
+ */
65
+ retrieveTotalSize(queueID: string, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
66
+ }
67
+ export type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<AnnotationQueueRetrieveAnnotationQueuesResponse>;
68
+ export interface AnnotationQueueRubricItemSchema {
69
+ feedback_key: string;
70
+ description?: string | null;
71
+ is_assertion?: boolean | null;
72
+ is_required?: boolean | null;
73
+ score_descriptions?: {
74
+ [key: string]: string;
75
+ } | null;
76
+ value_descriptions?: {
77
+ [key: string]: string;
78
+ } | null;
79
+ }
80
+ /**
81
+ * AnnotationQueue schema.
82
+ */
83
+ export interface AnnotationQueueSchema {
84
+ id: string;
85
+ name: string;
86
+ queue_type: 'single' | 'pairwise';
87
+ tenant_id: string;
88
+ assigned_reviewers?: Array<AnnotationQueueSchema.AssignedReviewer>;
89
+ created_at?: string;
90
+ default_dataset?: string | null;
91
+ description?: string | null;
92
+ enable_reservations?: boolean | null;
93
+ metadata?: {
94
+ [key: string]: unknown;
95
+ } | null;
96
+ num_reviewers_per_item?: number | null;
97
+ reservation_minutes?: number | null;
98
+ reviewer_access_mode?: string;
99
+ run_rule_id?: string | null;
100
+ source_rule_id?: string | null;
101
+ updated_at?: string;
102
+ }
103
+ export declare namespace AnnotationQueueSchema {
104
+ /**
105
+ * Identity info for an assigned reviewer on an annotation queue.
106
+ */
107
+ interface AssignedReviewer {
108
+ id: string;
109
+ email?: string | null;
110
+ name?: string | null;
111
+ }
112
+ }
113
+ /**
114
+ * Size of an Annotation Queue
115
+ */
116
+ export interface AnnotationQueueSizeSchema {
117
+ size: number;
118
+ }
119
+ /**
120
+ * Run schema with annotation queue info.
121
+ */
122
+ export interface RunSchemaWithAnnotationQueueInfo {
123
+ id: string;
124
+ app_path: string;
125
+ dotted_order: string;
126
+ name: string;
127
+ queue_run_id: string;
128
+ /**
129
+ * Enum for run types.
130
+ */
131
+ run_type: RunsAPI_.RunTypeEnum;
132
+ session_id: string;
133
+ status: string;
134
+ trace_id: string;
135
+ added_at?: string | null;
136
+ child_run_ids?: Array<string> | null;
137
+ completed_by?: Array<string>;
138
+ completion_cost?: string | null;
139
+ completion_cost_details?: {
140
+ [key: string]: string;
141
+ } | null;
142
+ completion_token_details?: {
143
+ [key: string]: number;
144
+ } | null;
145
+ completion_tokens?: number;
146
+ direct_child_run_ids?: Array<string> | null;
147
+ effective_added_at?: string | null;
148
+ end_time?: string | null;
149
+ error?: string | null;
150
+ events?: Array<{
151
+ [key: string]: unknown;
152
+ }> | null;
153
+ execution_order?: number;
154
+ extra?: {
155
+ [key: string]: unknown;
156
+ } | null;
157
+ feedback_stats?: {
158
+ [key: string]: {
159
+ [key: string]: unknown;
160
+ };
161
+ } | null;
162
+ first_token_time?: string | null;
163
+ in_dataset?: boolean | null;
164
+ inputs?: {
165
+ [key: string]: unknown;
166
+ } | null;
167
+ inputs_preview?: string | null;
168
+ inputs_s3_urls?: {
169
+ [key: string]: unknown;
170
+ } | null;
171
+ last_queued_at?: string | null;
172
+ last_reviewed_time?: string | null;
173
+ manifest_id?: string | null;
174
+ manifest_s3_id?: string | null;
175
+ messages?: Array<{
176
+ [key: string]: unknown;
177
+ }> | null;
178
+ outputs?: {
179
+ [key: string]: unknown;
180
+ } | null;
181
+ outputs_preview?: string | null;
182
+ outputs_s3_urls?: {
183
+ [key: string]: unknown;
184
+ } | null;
185
+ parent_run_id?: string | null;
186
+ parent_run_ids?: Array<string> | null;
187
+ price_model_id?: string | null;
188
+ prompt_cost?: string | null;
189
+ prompt_cost_details?: {
190
+ [key: string]: string;
191
+ } | null;
192
+ prompt_token_details?: {
193
+ [key: string]: number;
194
+ } | null;
195
+ prompt_tokens?: number;
196
+ reference_dataset_id?: string | null;
197
+ reference_example_id?: string | null;
198
+ reserved_by?: Array<string>;
199
+ s3_urls?: {
200
+ [key: string]: unknown;
201
+ } | null;
202
+ serialized?: {
203
+ [key: string]: unknown;
204
+ } | null;
205
+ share_token?: string | null;
206
+ source_proposed_example_id?: string | null;
207
+ start_time?: string;
208
+ tags?: Array<string> | null;
209
+ thread_id?: string | null;
210
+ total_cost?: string | null;
211
+ total_tokens?: number;
212
+ trace_first_received_at?: string | null;
213
+ trace_max_start_time?: string | null;
214
+ trace_min_start_time?: string | null;
215
+ trace_tier?: 'longlived' | 'shortlived' | null;
216
+ trace_upgrade?: boolean;
217
+ ttl_seconds?: number | null;
218
+ }
219
+ /**
220
+ * AnnotationQueue schema with rubric.
221
+ */
222
+ export interface AnnotationQueueRetrieveResponse {
223
+ id: string;
224
+ name: string;
225
+ queue_type: 'single' | 'pairwise';
226
+ tenant_id: string;
227
+ assigned_reviewers?: Array<AnnotationQueueRetrieveResponse.AssignedReviewer>;
228
+ created_at?: string;
229
+ default_dataset?: string | null;
230
+ description?: string | null;
231
+ enable_reservations?: boolean | null;
232
+ metadata?: {
233
+ [key: string]: unknown;
234
+ } | null;
235
+ num_reviewers_per_item?: number | null;
236
+ reservation_minutes?: number | null;
237
+ reviewer_access_mode?: string;
238
+ rubric_instructions?: string | null;
239
+ rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
240
+ run_rule_id?: string | null;
241
+ source_rule_id?: string | null;
242
+ updated_at?: string;
243
+ }
244
+ export declare namespace AnnotationQueueRetrieveResponse {
245
+ /**
246
+ * Identity info for an assigned reviewer on an annotation queue.
247
+ */
248
+ interface AssignedReviewer {
249
+ id: string;
250
+ email?: string | null;
251
+ name?: string | null;
252
+ }
253
+ }
254
+ export type AnnotationQueueUpdateResponse = unknown;
255
+ export type AnnotationQueueDeleteResponse = unknown;
256
+ export type AnnotationQueueCreateRunStatusResponse = unknown;
257
+ export type AnnotationQueueExportResponse = unknown;
258
+ export type AnnotationQueuePopulateResponse = unknown;
259
+ /**
260
+ * AnnotationQueue schema with size.
261
+ */
262
+ export interface AnnotationQueueRetrieveAnnotationQueuesResponse {
263
+ id: string;
264
+ name: string;
265
+ queue_type: 'single' | 'pairwise';
266
+ tenant_id: string;
267
+ total_runs: number;
268
+ assigned_reviewers?: Array<AnnotationQueueRetrieveAnnotationQueuesResponse.AssignedReviewer>;
269
+ created_at?: string;
270
+ default_dataset?: string | null;
271
+ description?: string | null;
272
+ enable_reservations?: boolean | null;
273
+ metadata?: {
274
+ [key: string]: unknown;
275
+ } | null;
276
+ num_reviewers_per_item?: number | null;
277
+ reservation_minutes?: number | null;
278
+ reviewer_access_mode?: string;
279
+ run_rule_id?: string | null;
280
+ source_rule_id?: string | null;
281
+ updated_at?: string;
282
+ }
283
+ export declare namespace AnnotationQueueRetrieveAnnotationQueuesResponse {
284
+ /**
285
+ * Identity info for an assigned reviewer on an annotation queue.
286
+ */
287
+ interface AssignedReviewer {
288
+ id: string;
289
+ email?: string | null;
290
+ name?: string | null;
291
+ }
292
+ }
293
+ export type AnnotationQueueRetrieveQueuesResponse = Array<AnnotationQueueSchema>;
294
+ export interface AnnotationQueueUpdateParams {
295
+ default_dataset?: string | null;
296
+ description?: string | null;
297
+ enable_reservations?: boolean;
298
+ metadata?: {
299
+ [key: string]: unknown;
300
+ } | DatasetsAPI.Missing | null;
301
+ name?: string | null;
302
+ num_reviewers_per_item?: number | DatasetsAPI.Missing | null;
303
+ reservation_minutes?: number | null;
304
+ reviewer_access_mode?: 'any' | 'assigned' | null;
305
+ rubric_instructions?: string | null;
306
+ rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
307
+ }
308
+ export interface AnnotationQueueAnnotationQueuesParams {
309
+ name: string;
310
+ id?: string;
311
+ created_at?: string;
312
+ default_dataset?: string | null;
313
+ description?: string | null;
314
+ enable_reservations?: boolean | null;
315
+ metadata?: {
316
+ [key: string]: unknown;
317
+ } | null;
318
+ num_reviewers_per_item?: number | null;
319
+ reservation_minutes?: number | null;
320
+ reviewer_access_mode?: string;
321
+ rubric_instructions?: string | null;
322
+ rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
323
+ session_ids?: Array<string> | null;
324
+ updated_at?: string;
325
+ }
326
+ export interface AnnotationQueueCreateRunStatusParams {
327
+ override_added_at?: string | null;
328
+ status?: string | null;
329
+ }
330
+ export interface AnnotationQueueExportParams {
331
+ end_time?: string | null;
332
+ include_annotator_detail?: boolean;
333
+ start_time?: string | null;
334
+ }
335
+ export interface AnnotationQueuePopulateParams {
336
+ queue_id: string;
337
+ session_ids: Array<string>;
338
+ extend_trace_retention?: boolean;
339
+ }
340
+ export interface AnnotationQueueRetrieveAnnotationQueuesParams extends OffsetPaginationTopLevelArrayParams {
341
+ assigned_to_me?: boolean;
342
+ dataset_id?: string | null;
343
+ ids?: Array<string> | null;
344
+ name?: string | null;
345
+ name_contains?: string | null;
346
+ queue_type?: 'single' | 'pairwise' | null;
347
+ sort_by?: string | null;
348
+ sort_by_desc?: boolean;
349
+ tag_value_id?: Array<string> | null;
350
+ }
351
+ export interface AnnotationQueueRetrieveRunParams {
352
+ /**
353
+ * Path param
354
+ */
355
+ queue_id: string;
356
+ /**
357
+ * Query param
358
+ */
359
+ include_extra?: boolean;
360
+ }
361
+ export interface AnnotationQueueRetrieveSizeParams {
362
+ status?: 'needs_my_review' | 'needs_others_review' | 'completed' | null;
363
+ }
364
+ export interface AnnotationQueueRetrieveTotalArchivedParams {
365
+ end_time?: string | null;
366
+ start_time?: string | null;
367
+ }
368
+ export declare namespace AnnotationQueues {
369
+ export { type AnnotationQueueRubricItemSchema as AnnotationQueueRubricItemSchema, type AnnotationQueueSchema as AnnotationQueueSchema, type AnnotationQueueSizeSchema as AnnotationQueueSizeSchema, type RunSchemaWithAnnotationQueueInfo as RunSchemaWithAnnotationQueueInfo, type AnnotationQueueRetrieveResponse as AnnotationQueueRetrieveResponse, type AnnotationQueueUpdateResponse as AnnotationQueueUpdateResponse, type AnnotationQueueDeleteResponse as AnnotationQueueDeleteResponse, type AnnotationQueueCreateRunStatusResponse as AnnotationQueueCreateRunStatusResponse, type AnnotationQueueExportResponse as AnnotationQueueExportResponse, type AnnotationQueuePopulateResponse as AnnotationQueuePopulateResponse, type AnnotationQueueRetrieveAnnotationQueuesResponse as AnnotationQueueRetrieveAnnotationQueuesResponse, type AnnotationQueueRetrieveQueuesResponse as AnnotationQueueRetrieveQueuesResponse, type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray as AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, type AnnotationQueueUpdateParams as AnnotationQueueUpdateParams, type AnnotationQueueAnnotationQueuesParams as AnnotationQueueAnnotationQueuesParams, type AnnotationQueueCreateRunStatusParams as AnnotationQueueCreateRunStatusParams, type AnnotationQueueExportParams as AnnotationQueueExportParams, type AnnotationQueuePopulateParams as AnnotationQueuePopulateParams, type AnnotationQueueRetrieveAnnotationQueuesParams as AnnotationQueueRetrieveAnnotationQueuesParams, type AnnotationQueueRetrieveRunParams as AnnotationQueueRetrieveRunParams, type AnnotationQueueRetrieveSizeParams as AnnotationQueueRetrieveSizeParams, type AnnotationQueueRetrieveTotalArchivedParams as AnnotationQueueRetrieveTotalArchivedParams, };
370
+ export { Runs as Runs, type RunCreateResponse as RunCreateResponse, type RunUpdateResponse as RunUpdateResponse, type RunListResponse as RunListResponse, type RunCreateByKeyResponse as RunCreateByKeyResponse, type RunDeleteAllResponse as RunDeleteAllResponse, type RunDeleteQueueResponse as RunDeleteQueueResponse, type RunCreateParams as RunCreateParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunCreateByKeyParams as RunCreateByKeyParams, type RunDeleteAllParams as RunDeleteAllParams, type RunDeleteQueueParams as RunDeleteQueueParams, };
371
+ export { Items as Items, type ItemCreateResponse as ItemCreateResponse, type ItemUpdateResponse as ItemUpdateResponse, type ItemListResponse as ItemListResponse, type ItemCreateStatusResponse as ItemCreateStatusResponse, type ItemDeleteAllResponse as ItemDeleteAllResponse, type ItemRetrieveCountResponse as ItemRetrieveCountResponse, type ItemRetrievePlacementResponse as ItemRetrievePlacementResponse, type ItemListResponsesItemsCursorGetPagination as ItemListResponsesItemsCursorGetPagination, type ItemCreateParams as ItemCreateParams, type ItemUpdateParams as ItemUpdateParams, type ItemListParams as ItemListParams, type ItemCreateStatusParams as ItemCreateStatusParams, type ItemDeleteAllParams as ItemDeleteAllParams, type ItemRetrieveCountParams as ItemRetrieveCountParams, type ItemRetrievePlacementParams as ItemRetrievePlacementParams, };
372
+ }