langsmith 0.7.10 → 0.7.12

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 (103) hide show
  1. package/README.md +46 -15
  2. package/dist/_openapi_client/client.cjs +0 -80
  3. package/dist/_openapi_client/client.d.ts +2 -32
  4. package/dist/_openapi_client/client.js +0 -80
  5. package/dist/_openapi_client/core/pagination.cjs +2 -2
  6. package/dist/_openapi_client/core/pagination.js +2 -2
  7. package/dist/_openapi_client/internal/utils/query.cjs +1 -1
  8. package/dist/_openapi_client/internal/utils/query.js +1 -1
  9. package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
  10. package/dist/_openapi_client/resources/index.cjs +1 -21
  11. package/dist/_openapi_client/resources/index.d.ts +1 -11
  12. package/dist/_openapi_client/resources/index.js +0 -10
  13. package/dist/_openapi_client/resources/runs/index.cjs +9 -0
  14. package/dist/_openapi_client/resources/runs/index.d.ts +2 -0
  15. package/dist/_openapi_client/resources/runs/index.js +4 -0
  16. package/dist/_openapi_client/resources/runs/runs.cjs +54 -41
  17. package/dist/_openapi_client/resources/runs/runs.d.ts +571 -313
  18. package/dist/_openapi_client/resources/runs/runs.js +54 -41
  19. package/dist/_openapi_client/resources/runs.cjs +19 -0
  20. package/dist/_openapi_client/resources/runs.d.ts +1 -0
  21. package/dist/_openapi_client/resources/runs.js +3 -0
  22. package/dist/anonymizer/index.cjs +142 -0
  23. package/dist/anonymizer/index.d.ts +45 -0
  24. package/dist/anonymizer/index.js +140 -0
  25. package/dist/client.cjs +29 -1
  26. package/dist/client.d.ts +6 -1
  27. package/dist/client.js +28 -1
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/sandbox/client.cjs +5 -8
  32. package/dist/sandbox/client.js +5 -8
  33. package/dist/sandbox/index.cjs +2 -1
  34. package/dist/sandbox/index.d.ts +2 -2
  35. package/dist/sandbox/index.js +1 -1
  36. package/dist/sandbox/mounts.cjs +157 -18
  37. package/dist/sandbox/mounts.d.ts +10 -2
  38. package/dist/sandbox/mounts.js +155 -18
  39. package/dist/sandbox/proxy_config.cjs +19 -44
  40. package/dist/sandbox/proxy_config.d.ts +2 -4
  41. package/dist/sandbox/proxy_config.js +19 -43
  42. package/dist/sandbox/types.d.ts +56 -15
  43. package/dist/utils/constants.cjs +4 -0
  44. package/dist/utils/constants.d.ts +1 -0
  45. package/dist/utils/constants.js +1 -0
  46. package/package.json +5 -5
  47. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
  48. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
  49. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
  50. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
  51. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
  52. package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
  53. package/dist/_openapi_client/resources/commits.cjs +0 -44
  54. package/dist/_openapi_client/resources/commits.d.ts +0 -204
  55. package/dist/_openapi_client/resources/commits.js +0 -40
  56. package/dist/_openapi_client/resources/evaluators.cjs +0 -15
  57. package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
  58. package/dist/_openapi_client/resources/evaluators.js +0 -11
  59. package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
  60. package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
  61. package/dist/_openapi_client/resources/examples/bulk.js +0 -20
  62. package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
  63. package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
  64. package/dist/_openapi_client/resources/examples/examples.js +0 -87
  65. package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
  66. package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
  67. package/dist/_openapi_client/resources/examples/validate.js +0 -17
  68. package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
  69. package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
  70. package/dist/_openapi_client/resources/feedback/configs.js +0 -20
  71. package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
  72. package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
  73. package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
  74. package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
  75. package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
  76. package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
  77. package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
  78. package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
  79. package/dist/_openapi_client/resources/public/datasets.js +0 -43
  80. package/dist/_openapi_client/resources/public/public.cjs +0 -62
  81. package/dist/_openapi_client/resources/public/public.d.ts +0 -32
  82. package/dist/_openapi_client/resources/public/public.js +0 -25
  83. package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
  84. package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
  85. package/dist/_openapi_client/resources/repos/directories.js +0 -36
  86. package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
  87. package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
  88. package/dist/_openapi_client/resources/repos/repos.js +0 -56
  89. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
  90. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
  91. package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
  92. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
  93. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
  94. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
  95. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
  96. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
  97. package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
  98. package/dist/_openapi_client/resources/settings.cjs +0 -15
  99. package/dist/_openapi_client/resources/settings.d.ts +0 -18
  100. package/dist/_openapi_client/resources/settings.js +0 -11
  101. package/dist/_openapi_client/resources/workspaces.cjs +0 -35
  102. package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
  103. package/dist/_openapi_client/resources/workspaces.js +0 -31
@@ -1,138 +0,0 @@
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 RunsAPI = __importStar(require("./runs.cjs"));
41
- const runs_js_1 = require("./runs.cjs");
42
- const pagination_js_1 = require("../../core/pagination.cjs");
43
- const path_js_1 = require("../../internal/utils/path.cjs");
44
- class AnnotationQueues extends resource_js_1.APIResource {
45
- constructor() {
46
- super(...arguments);
47
- Object.defineProperty(this, "runs", {
48
- enumerable: true,
49
- configurable: true,
50
- writable: true,
51
- value: new RunsAPI.Runs(this._client)
52
- });
53
- }
54
- /**
55
- * Get Annotation Queue
56
- */
57
- retrieve(queueID, options) {
58
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, options);
59
- }
60
- /**
61
- * Update Annotation Queue
62
- */
63
- update(queueID, body, options) {
64
- return this._client.patch((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, { body, ...options });
65
- }
66
- /**
67
- * Delete Annotation Queue
68
- */
69
- delete(queueID, options) {
70
- return this._client.delete((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, options);
71
- }
72
- /**
73
- * Create Annotation Queue
74
- */
75
- annotationQueues(body, options) {
76
- return this._client.post('/api/v1/annotation-queues', { body, ...options });
77
- }
78
- /**
79
- * Create Identity Annotation Queue Run Status
80
- */
81
- createRunStatus(annotationQueueRunID, body, options) {
82
- return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/status/${annotationQueueRunID}`, {
83
- body,
84
- ...options,
85
- });
86
- }
87
- /**
88
- * Export Annotation Queue Archived Runs
89
- */
90
- export(queueID, body, options) {
91
- return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/export`, { body, ...options });
92
- }
93
- /**
94
- * Populate annotation queue with runs from an experiment.
95
- */
96
- populate(body, options) {
97
- return this._client.post('/api/v1/annotation-queues/populate', { body, ...options });
98
- }
99
- /**
100
- * Get Annotation Queues
101
- */
102
- retrieveAnnotationQueues(query = {}, options) {
103
- return this._client.getAPIList('/api/v1/annotation-queues', (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
104
- }
105
- /**
106
- * Get Annotation Queues For Run
107
- */
108
- retrieveQueues(runID, options) {
109
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${runID}/queues`, options);
110
- }
111
- /**
112
- * Get a run from an annotation queue
113
- */
114
- retrieveRun(index, params, options) {
115
- const { queue_id, ...query } = params;
116
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/run/${index}`, { query, ...options });
117
- }
118
- /**
119
- * Get Size From Annotation Queue
120
- */
121
- retrieveSize(queueID, query = {}, options) {
122
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/size`, { query, ...options });
123
- }
124
- /**
125
- * Get Total Archived From Annotation Queue
126
- */
127
- retrieveTotalArchived(queueID, query = {}, options) {
128
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/total_archived`, { query, ...options });
129
- }
130
- /**
131
- * Get Total Size From Annotation Queue
132
- */
133
- retrieveTotalSize(queueID, options) {
134
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/total_size`, options);
135
- }
136
- }
137
- exports.AnnotationQueues = AnnotationQueues;
138
- AnnotationQueues.Runs = runs_js_1.Runs;
@@ -1,367 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as RunsAPI from './runs.js';
3
- import { RunCreateParams, RunCreateResponse, RunDeleteAllParams, RunDeleteAllResponse, RunDeleteQueueParams, RunDeleteQueueResponse, RunListParams, RunListResponse, RunUpdateParams, RunUpdateResponse, Runs } from './runs.js';
4
- import * as DatasetsAPI from '../datasets/datasets.js';
5
- import { APIPromise } from '../../core/api-promise.js';
6
- import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
7
- import { RequestOptions } from '../../internal/request-options.js';
8
- import * as RunsAPI_ from '../runs/runs.js';
9
- export declare class AnnotationQueues extends APIResource {
10
- runs: RunsAPI.Runs;
11
- /**
12
- * Get Annotation Queue
13
- */
14
- retrieve(queueID: string, options?: RequestOptions): APIPromise<AnnotationQueueRetrieveResponse>;
15
- /**
16
- * Update Annotation Queue
17
- */
18
- update(queueID: string, body: AnnotationQueueUpdateParams, options?: RequestOptions): APIPromise<unknown>;
19
- /**
20
- * Delete Annotation Queue
21
- */
22
- delete(queueID: string, options?: RequestOptions): APIPromise<unknown>;
23
- /**
24
- * Create Annotation Queue
25
- */
26
- annotationQueues(body: AnnotationQueueAnnotationQueuesParams, options?: RequestOptions): APIPromise<AnnotationQueueSchema>;
27
- /**
28
- * Create Identity Annotation Queue Run Status
29
- */
30
- createRunStatus(annotationQueueRunID: string, body: AnnotationQueueCreateRunStatusParams, options?: RequestOptions): APIPromise<unknown>;
31
- /**
32
- * Export Annotation Queue Archived Runs
33
- */
34
- export(queueID: string, body: AnnotationQueueExportParams, options?: RequestOptions): APIPromise<unknown>;
35
- /**
36
- * Populate annotation queue with runs from an experiment.
37
- */
38
- populate(body: AnnotationQueuePopulateParams, options?: RequestOptions): APIPromise<unknown>;
39
- /**
40
- * Get Annotation Queues
41
- */
42
- retrieveAnnotationQueues(query?: AnnotationQueueRetrieveAnnotationQueuesParams | null | undefined, options?: RequestOptions): PagePromise<AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, AnnotationQueueRetrieveAnnotationQueuesResponse>;
43
- /**
44
- * Get Annotation Queues For Run
45
- */
46
- retrieveQueues(runID: string, options?: RequestOptions): APIPromise<AnnotationQueueRetrieveQueuesResponse>;
47
- /**
48
- * Get a run from an annotation queue
49
- */
50
- retrieveRun(index: number, params: AnnotationQueueRetrieveRunParams, options?: RequestOptions): APIPromise<RunSchemaWithAnnotationQueueInfo>;
51
- /**
52
- * Get Size From Annotation Queue
53
- */
54
- retrieveSize(queueID: string, query?: AnnotationQueueRetrieveSizeParams | null | undefined, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
55
- /**
56
- * Get Total Archived From Annotation Queue
57
- */
58
- retrieveTotalArchived(queueID: string, query?: AnnotationQueueRetrieveTotalArchivedParams | null | undefined, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
59
- /**
60
- * Get Total Size From Annotation Queue
61
- */
62
- retrieveTotalSize(queueID: string, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
63
- }
64
- export type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<AnnotationQueueRetrieveAnnotationQueuesResponse>;
65
- export interface AnnotationQueueRubricItemSchema {
66
- feedback_key: string;
67
- description?: string | null;
68
- is_assertion?: boolean | null;
69
- is_required?: boolean | null;
70
- score_descriptions?: {
71
- [key: string]: string;
72
- } | null;
73
- value_descriptions?: {
74
- [key: string]: string;
75
- } | null;
76
- }
77
- /**
78
- * AnnotationQueue schema.
79
- */
80
- export interface AnnotationQueueSchema {
81
- id: string;
82
- name: string;
83
- queue_type: 'single' | 'pairwise';
84
- tenant_id: string;
85
- assigned_reviewers?: Array<AnnotationQueueSchema.AssignedReviewer>;
86
- created_at?: string;
87
- default_dataset?: string | null;
88
- description?: string | null;
89
- enable_reservations?: boolean | null;
90
- metadata?: {
91
- [key: string]: unknown;
92
- } | null;
93
- num_reviewers_per_item?: number | null;
94
- reservation_minutes?: number | null;
95
- reviewer_access_mode?: string;
96
- run_rule_id?: string | null;
97
- source_rule_id?: string | null;
98
- updated_at?: string;
99
- }
100
- export declare namespace AnnotationQueueSchema {
101
- /**
102
- * Identity info for an assigned reviewer on an annotation queue.
103
- */
104
- interface AssignedReviewer {
105
- id: string;
106
- email?: string | null;
107
- name?: string | null;
108
- }
109
- }
110
- /**
111
- * Size of an Annotation Queue
112
- */
113
- export interface AnnotationQueueSizeSchema {
114
- size: number;
115
- }
116
- /**
117
- * Run schema with annotation queue info.
118
- */
119
- export interface RunSchemaWithAnnotationQueueInfo {
120
- id: string;
121
- app_path: string;
122
- dotted_order: string;
123
- name: string;
124
- queue_run_id: string;
125
- /**
126
- * Enum for run types.
127
- */
128
- run_type: RunsAPI_.RunTypeEnum;
129
- session_id: string;
130
- status: string;
131
- trace_id: string;
132
- added_at?: string | null;
133
- child_run_ids?: Array<string> | null;
134
- completed_by?: Array<string>;
135
- completion_cost?: string | null;
136
- completion_cost_details?: {
137
- [key: string]: string;
138
- } | null;
139
- completion_token_details?: {
140
- [key: string]: number;
141
- } | null;
142
- completion_tokens?: number;
143
- direct_child_run_ids?: Array<string> | null;
144
- effective_added_at?: string | null;
145
- end_time?: string | null;
146
- error?: string | null;
147
- events?: Array<{
148
- [key: string]: unknown;
149
- }> | null;
150
- execution_order?: number;
151
- extra?: {
152
- [key: string]: unknown;
153
- } | null;
154
- feedback_stats?: {
155
- [key: string]: {
156
- [key: string]: unknown;
157
- };
158
- } | null;
159
- first_token_time?: string | null;
160
- in_dataset?: boolean | null;
161
- inputs?: {
162
- [key: string]: unknown;
163
- } | null;
164
- inputs_preview?: string | null;
165
- inputs_s3_urls?: {
166
- [key: string]: unknown;
167
- } | null;
168
- last_queued_at?: string | null;
169
- last_reviewed_time?: string | null;
170
- manifest_id?: string | null;
171
- manifest_s3_id?: string | null;
172
- messages?: Array<{
173
- [key: string]: unknown;
174
- }> | null;
175
- outputs?: {
176
- [key: string]: unknown;
177
- } | null;
178
- outputs_preview?: string | null;
179
- outputs_s3_urls?: {
180
- [key: string]: unknown;
181
- } | null;
182
- parent_run_id?: string | null;
183
- parent_run_ids?: Array<string> | null;
184
- price_model_id?: string | null;
185
- prompt_cost?: string | null;
186
- prompt_cost_details?: {
187
- [key: string]: string;
188
- } | null;
189
- prompt_token_details?: {
190
- [key: string]: number;
191
- } | null;
192
- prompt_tokens?: number;
193
- reference_dataset_id?: string | null;
194
- reference_example_id?: string | null;
195
- reserved_by?: Array<string>;
196
- s3_urls?: {
197
- [key: string]: unknown;
198
- } | null;
199
- serialized?: {
200
- [key: string]: unknown;
201
- } | null;
202
- share_token?: string | null;
203
- source_proposed_example_id?: string | null;
204
- start_time?: string;
205
- tags?: Array<string> | null;
206
- thread_id?: string | null;
207
- total_cost?: string | null;
208
- total_tokens?: number;
209
- trace_first_received_at?: string | null;
210
- trace_max_start_time?: string | null;
211
- trace_min_start_time?: string | null;
212
- trace_tier?: 'longlived' | 'shortlived' | null;
213
- trace_upgrade?: boolean;
214
- ttl_seconds?: number | null;
215
- }
216
- /**
217
- * AnnotationQueue schema with rubric.
218
- */
219
- export interface AnnotationQueueRetrieveResponse {
220
- id: string;
221
- name: string;
222
- queue_type: 'single' | 'pairwise';
223
- tenant_id: string;
224
- assigned_reviewers?: Array<AnnotationQueueRetrieveResponse.AssignedReviewer>;
225
- created_at?: string;
226
- default_dataset?: string | null;
227
- description?: string | null;
228
- enable_reservations?: boolean | null;
229
- metadata?: {
230
- [key: string]: unknown;
231
- } | null;
232
- num_reviewers_per_item?: number | null;
233
- reservation_minutes?: number | null;
234
- reviewer_access_mode?: string;
235
- rubric_instructions?: string | null;
236
- rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
237
- run_rule_id?: string | null;
238
- source_rule_id?: string | null;
239
- updated_at?: string;
240
- }
241
- export declare namespace AnnotationQueueRetrieveResponse {
242
- /**
243
- * Identity info for an assigned reviewer on an annotation queue.
244
- */
245
- interface AssignedReviewer {
246
- id: string;
247
- email?: string | null;
248
- name?: string | null;
249
- }
250
- }
251
- export type AnnotationQueueUpdateResponse = unknown;
252
- export type AnnotationQueueDeleteResponse = unknown;
253
- export type AnnotationQueueCreateRunStatusResponse = unknown;
254
- export type AnnotationQueueExportResponse = unknown;
255
- export type AnnotationQueuePopulateResponse = unknown;
256
- /**
257
- * AnnotationQueue schema with size.
258
- */
259
- export interface AnnotationQueueRetrieveAnnotationQueuesResponse {
260
- id: string;
261
- name: string;
262
- queue_type: 'single' | 'pairwise';
263
- tenant_id: string;
264
- total_runs: number;
265
- assigned_reviewers?: Array<AnnotationQueueRetrieveAnnotationQueuesResponse.AssignedReviewer>;
266
- created_at?: string;
267
- default_dataset?: string | null;
268
- description?: string | null;
269
- enable_reservations?: boolean | null;
270
- metadata?: {
271
- [key: string]: unknown;
272
- } | null;
273
- num_reviewers_per_item?: number | null;
274
- reservation_minutes?: number | null;
275
- reviewer_access_mode?: string;
276
- run_rule_id?: string | null;
277
- source_rule_id?: string | null;
278
- updated_at?: string;
279
- }
280
- export declare namespace AnnotationQueueRetrieveAnnotationQueuesResponse {
281
- /**
282
- * Identity info for an assigned reviewer on an annotation queue.
283
- */
284
- interface AssignedReviewer {
285
- id: string;
286
- email?: string | null;
287
- name?: string | null;
288
- }
289
- }
290
- export type AnnotationQueueRetrieveQueuesResponse = Array<AnnotationQueueSchema>;
291
- export interface AnnotationQueueUpdateParams {
292
- default_dataset?: string | null;
293
- description?: string | null;
294
- enable_reservations?: boolean;
295
- metadata?: {
296
- [key: string]: unknown;
297
- } | DatasetsAPI.Missing | null;
298
- name?: string | null;
299
- num_reviewers_per_item?: number | DatasetsAPI.Missing | null;
300
- reservation_minutes?: number | null;
301
- reviewer_access_mode?: 'any' | 'assigned' | null;
302
- rubric_instructions?: string | null;
303
- rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
304
- }
305
- export interface AnnotationQueueAnnotationQueuesParams {
306
- name: string;
307
- id?: string;
308
- created_at?: string;
309
- default_dataset?: string | null;
310
- description?: string | null;
311
- enable_reservations?: boolean | null;
312
- metadata?: {
313
- [key: string]: unknown;
314
- } | null;
315
- num_reviewers_per_item?: number | null;
316
- reservation_minutes?: number | null;
317
- reviewer_access_mode?: string;
318
- rubric_instructions?: string | null;
319
- rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
320
- session_ids?: Array<string> | null;
321
- updated_at?: string;
322
- }
323
- export interface AnnotationQueueCreateRunStatusParams {
324
- override_added_at?: string | null;
325
- status?: string | null;
326
- }
327
- export interface AnnotationQueueExportParams {
328
- end_time?: string | null;
329
- include_annotator_detail?: boolean;
330
- start_time?: string | null;
331
- }
332
- export interface AnnotationQueuePopulateParams {
333
- queue_id: string;
334
- session_ids: Array<string>;
335
- }
336
- export interface AnnotationQueueRetrieveAnnotationQueuesParams extends OffsetPaginationTopLevelArrayParams {
337
- assigned_to_me?: boolean;
338
- dataset_id?: string | null;
339
- ids?: Array<string> | null;
340
- name?: string | null;
341
- name_contains?: string | null;
342
- queue_type?: 'single' | 'pairwise' | null;
343
- sort_by?: string | null;
344
- sort_by_desc?: boolean;
345
- tag_value_id?: Array<string> | null;
346
- }
347
- export interface AnnotationQueueRetrieveRunParams {
348
- /**
349
- * Path param
350
- */
351
- queue_id: string;
352
- /**
353
- * Query param
354
- */
355
- include_extra?: boolean;
356
- }
357
- export interface AnnotationQueueRetrieveSizeParams {
358
- status?: 'needs_my_review' | 'needs_others_review' | 'completed' | null;
359
- }
360
- export interface AnnotationQueueRetrieveTotalArchivedParams {
361
- end_time?: string | null;
362
- start_time?: string | null;
363
- }
364
- export declare namespace AnnotationQueues {
365
- 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, };
366
- export { Runs as Runs, type RunCreateResponse as RunCreateResponse, type RunUpdateResponse as RunUpdateResponse, type RunListResponse as RunListResponse, type RunDeleteAllResponse as RunDeleteAllResponse, type RunDeleteQueueResponse as RunDeleteQueueResponse, type RunCreateParams as RunCreateParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunDeleteAllParams as RunDeleteAllParams, type RunDeleteQueueParams as RunDeleteQueueParams, };
367
- }
@@ -1,101 +0,0 @@
1
- // @ts-nocheck
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- import { APIResource } from '../../core/resource.js';
4
- import * as RunsAPI from './runs.js';
5
- import { Runs, } from './runs.js';
6
- import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
7
- import { path } from '../../internal/utils/path.js';
8
- export class AnnotationQueues extends APIResource {
9
- constructor() {
10
- super(...arguments);
11
- Object.defineProperty(this, "runs", {
12
- enumerable: true,
13
- configurable: true,
14
- writable: true,
15
- value: new RunsAPI.Runs(this._client)
16
- });
17
- }
18
- /**
19
- * Get Annotation Queue
20
- */
21
- retrieve(queueID, options) {
22
- return this._client.get(path `/api/v1/annotation-queues/${queueID}`, options);
23
- }
24
- /**
25
- * Update Annotation Queue
26
- */
27
- update(queueID, body, options) {
28
- return this._client.patch(path `/api/v1/annotation-queues/${queueID}`, { body, ...options });
29
- }
30
- /**
31
- * Delete Annotation Queue
32
- */
33
- delete(queueID, options) {
34
- return this._client.delete(path `/api/v1/annotation-queues/${queueID}`, options);
35
- }
36
- /**
37
- * Create Annotation Queue
38
- */
39
- annotationQueues(body, options) {
40
- return this._client.post('/api/v1/annotation-queues', { body, ...options });
41
- }
42
- /**
43
- * Create Identity Annotation Queue Run Status
44
- */
45
- createRunStatus(annotationQueueRunID, body, options) {
46
- return this._client.post(path `/api/v1/annotation-queues/status/${annotationQueueRunID}`, {
47
- body,
48
- ...options,
49
- });
50
- }
51
- /**
52
- * Export Annotation Queue Archived Runs
53
- */
54
- export(queueID, body, options) {
55
- return this._client.post(path `/api/v1/annotation-queues/${queueID}/export`, { body, ...options });
56
- }
57
- /**
58
- * Populate annotation queue with runs from an experiment.
59
- */
60
- populate(body, options) {
61
- return this._client.post('/api/v1/annotation-queues/populate', { body, ...options });
62
- }
63
- /**
64
- * Get Annotation Queues
65
- */
66
- retrieveAnnotationQueues(query = {}, options) {
67
- return this._client.getAPIList('/api/v1/annotation-queues', (OffsetPaginationTopLevelArray), { query, ...options });
68
- }
69
- /**
70
- * Get Annotation Queues For Run
71
- */
72
- retrieveQueues(runID, options) {
73
- return this._client.get(path `/api/v1/annotation-queues/${runID}/queues`, options);
74
- }
75
- /**
76
- * Get a run from an annotation queue
77
- */
78
- retrieveRun(index, params, options) {
79
- const { queue_id, ...query } = params;
80
- return this._client.get(path `/api/v1/annotation-queues/${queue_id}/run/${index}`, { query, ...options });
81
- }
82
- /**
83
- * Get Size From Annotation Queue
84
- */
85
- retrieveSize(queueID, query = {}, options) {
86
- return this._client.get(path `/api/v1/annotation-queues/${queueID}/size`, { query, ...options });
87
- }
88
- /**
89
- * Get Total Archived From Annotation Queue
90
- */
91
- retrieveTotalArchived(queueID, query = {}, options) {
92
- return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_archived`, { query, ...options });
93
- }
94
- /**
95
- * Get Total Size From Annotation Queue
96
- */
97
- retrieveTotalSize(queueID, options) {
98
- return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_size`, options);
99
- }
100
- }
101
- AnnotationQueues.Runs = Runs;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Runs = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const path_js_1 = require("../../internal/utils/path.cjs");
8
- class Runs extends resource_js_1.APIResource {
9
- /**
10
- * Add Runs To Annotation Queue
11
- */
12
- create(queueID, params, options) {
13
- const { body } = params;
14
- return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, { body: body, ...options });
15
- }
16
- /**
17
- * Update Run In Annotation Queue
18
- */
19
- update(queueRunID, params, options) {
20
- const { queue_id, ...body } = params;
21
- return this._client.patch((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, {
22
- body,
23
- ...options,
24
- });
25
- }
26
- /**
27
- * Get Runs From Annotation Queue
28
- */
29
- list(queueID, query = {}, options) {
30
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, { query, ...options });
31
- }
32
- /**
33
- * Delete Runs From Annotation Queue
34
- */
35
- deleteAll(queueID, body, options) {
36
- return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs/delete`, { body, ...options });
37
- }
38
- /**
39
- * Delete Run From Annotation Queue
40
- */
41
- deleteQueue(queueRunID, params, options) {
42
- const { queue_id } = params;
43
- return this._client.delete((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, options);
44
- }
45
- }
46
- exports.Runs = Runs;