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
@@ -0,0 +1,110 @@
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 ItemsAPI from './items.js';
5
+ import { Items, } from './items.js';
6
+ import * as RunsAPI from './runs.js';
7
+ import { Runs, } from './runs.js';
8
+ import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
9
+ import { path } from '../../internal/utils/path.js';
10
+ export class AnnotationQueues extends APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ Object.defineProperty(this, "runs", {
14
+ enumerable: true,
15
+ configurable: true,
16
+ writable: true,
17
+ value: new RunsAPI.Runs(this._client)
18
+ });
19
+ Object.defineProperty(this, "items", {
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true,
23
+ value: new ItemsAPI.Items(this._client)
24
+ });
25
+ }
26
+ /**
27
+ * Get Annotation Queue
28
+ */
29
+ retrieve(queueID, options) {
30
+ return this._client.get(path `/api/v1/annotation-queues/${queueID}`, options);
31
+ }
32
+ /**
33
+ * Update Annotation Queue
34
+ */
35
+ update(queueID, body, options) {
36
+ return this._client.patch(path `/api/v1/annotation-queues/${queueID}`, { body, ...options });
37
+ }
38
+ /**
39
+ * Delete Annotation Queue
40
+ */
41
+ delete(queueID, options) {
42
+ return this._client.delete(path `/api/v1/annotation-queues/${queueID}`, options);
43
+ }
44
+ /**
45
+ * Create Annotation Queue
46
+ */
47
+ annotationQueues(body, options) {
48
+ return this._client.post('/api/v1/annotation-queues', { body, ...options });
49
+ }
50
+ /**
51
+ * Create Identity Annotation Queue Run Status
52
+ */
53
+ createRunStatus(annotationQueueRunID, body, options) {
54
+ return this._client.post(path `/api/v1/annotation-queues/status/${annotationQueueRunID}`, {
55
+ body,
56
+ ...options,
57
+ });
58
+ }
59
+ /**
60
+ * Export Annotation Queue Archived Runs
61
+ */
62
+ export(queueID, body, options) {
63
+ return this._client.post(path `/api/v1/annotation-queues/${queueID}/export`, { body, ...options });
64
+ }
65
+ /**
66
+ * Populate annotation queue with runs from an experiment.
67
+ */
68
+ populate(body, options) {
69
+ return this._client.post('/api/v1/annotation-queues/populate', { body, ...options });
70
+ }
71
+ /**
72
+ * Get Annotation Queues
73
+ */
74
+ retrieveAnnotationQueues(query = {}, options) {
75
+ return this._client.getAPIList('/api/v1/annotation-queues', (OffsetPaginationTopLevelArray), { query, ...options });
76
+ }
77
+ /**
78
+ * Get Annotation Queues For Run
79
+ */
80
+ retrieveQueues(runID, options) {
81
+ return this._client.get(path `/api/v1/annotation-queues/${runID}/queues`, options);
82
+ }
83
+ /**
84
+ * Get a run from an annotation queue
85
+ */
86
+ retrieveRun(index, params, options) {
87
+ const { queue_id, ...query } = params;
88
+ return this._client.get(path `/api/v1/annotation-queues/${queue_id}/run/${index}`, { query, ...options });
89
+ }
90
+ /**
91
+ * Get Size From Annotation Queue
92
+ */
93
+ retrieveSize(queueID, query = {}, options) {
94
+ return this._client.get(path `/api/v1/annotation-queues/${queueID}/size`, { query, ...options });
95
+ }
96
+ /**
97
+ * Get Total Archived From Annotation Queue
98
+ */
99
+ retrieveTotalArchived(queueID, query = {}, options) {
100
+ return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_archived`, { query, ...options });
101
+ }
102
+ /**
103
+ * Get Total Size From Annotation Queue
104
+ */
105
+ retrieveTotalSize(queueID, options) {
106
+ return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_size`, options);
107
+ }
108
+ }
109
+ AnnotationQueues.Runs = Runs;
110
+ AnnotationQueues.Items = Items;
@@ -0,0 +1,84 @@
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.Items = void 0;
6
+ const resource_js_1 = require("../../core/resource.cjs");
7
+ const pagination_js_1 = require("../../core/pagination.cjs");
8
+ const path_js_1 = require("../../internal/utils/path.cjs");
9
+ class Items extends resource_js_1.APIResource {
10
+ /**
11
+ * Add RUN or THREAD items to a single annotation queue. RUN items require run_id
12
+ * unless they are created from a suggested example. THREAD items require thread_id
13
+ * and project_id.
14
+ */
15
+ create(queueID, params, options) {
16
+ const { extend_trace_retention, ...body } = params;
17
+ return this._client.post((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queueID}/items`, {
18
+ query: { extend_trace_retention },
19
+ body,
20
+ ...options,
21
+ });
22
+ }
23
+ /**
24
+ * Partially update mutable timestamps (added_at, last_reviewed_time) for a RUN or
25
+ * THREAD annotation queue item. Omit a field, or pass JSON null, to leave it
26
+ * unchanged.
27
+ */
28
+ update(itemID, params, options) {
29
+ const { queue_id, ...body } = params;
30
+ return this._client.patch((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queue_id}/items/${itemID}`, {
31
+ body,
32
+ ...options,
33
+ });
34
+ }
35
+ /**
36
+ * List RUN and THREAD items in a single annotation queue for one review status
37
+ * section, with opaque cursor pagination. Optional item_type=RUN|THREAD filters
38
+ * the page. direction=backward returns items before the supplied cursor. The
39
+ * response contains item metadata only, not expanded run or thread payloads.
40
+ * status=archived returns items whose queue review requirements have been
41
+ * satisfied, not merely items the caller personally marked completed.
42
+ */
43
+ list(queueID, query, options) {
44
+ return this._client.getAPIList((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queueID}/items`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
45
+ }
46
+ /**
47
+ * Log the caller's reviewer status for a RUN or THREAD annotation queue item. A
48
+ * null status re-shows the item for this reviewer.
49
+ */
50
+ createStatus(queueItemID, body, options) {
51
+ return this._client.post((0, path_js_1.path) `/api/v1/platform/annotation-queues/items/${queueItemID}/status`, {
52
+ body,
53
+ ...options,
54
+ });
55
+ }
56
+ /**
57
+ * Remove RUN or THREAD items from a single annotation queue by item ID.
58
+ */
59
+ deleteAll(queueID, body, options) {
60
+ return this._client.post((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queueID}/items/delete`, {
61
+ body,
62
+ ...options,
63
+ });
64
+ }
65
+ /**
66
+ * Returns the number of annotation queue items for the requested reviewer-specific
67
+ * or archived bucket.
68
+ */
69
+ retrieveCount(queueID, query, options) {
70
+ return this._client.get((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queueID}/items/count`, {
71
+ query,
72
+ ...options,
73
+ });
74
+ }
75
+ /**
76
+ * Resolve a RUN or THREAD item to its current review section and zero-based
77
+ * position for deep linking.
78
+ */
79
+ retrievePlacement(itemID, params, options) {
80
+ const { queue_id } = params;
81
+ return this._client.get((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queue_id}/items/${itemID}/placement`, options);
82
+ }
83
+ }
84
+ exports.Items = Items;
@@ -0,0 +1,207 @@
1
+ import { APIResource } from '../../core/resource.js';
2
+ import { APIPromise } from '../../core/api-promise.js';
3
+ import { ItemsCursorGetPagination, type ItemsCursorGetPaginationParams, PagePromise } from '../../core/pagination.js';
4
+ import { RequestOptions } from '../../internal/request-options.js';
5
+ export declare class Items extends APIResource {
6
+ /**
7
+ * Add RUN or THREAD items to a single annotation queue. RUN items require run_id
8
+ * unless they are created from a suggested example. THREAD items require thread_id
9
+ * and project_id.
10
+ */
11
+ create(queueID: string, params: ItemCreateParams, options?: RequestOptions): APIPromise<ItemCreateResponse>;
12
+ /**
13
+ * Partially update mutable timestamps (added_at, last_reviewed_time) for a RUN or
14
+ * THREAD annotation queue item. Omit a field, or pass JSON null, to leave it
15
+ * unchanged.
16
+ */
17
+ update(itemID: string, params: ItemUpdateParams, options?: RequestOptions): APIPromise<ItemUpdateResponse>;
18
+ /**
19
+ * List RUN and THREAD items in a single annotation queue for one review status
20
+ * section, with opaque cursor pagination. Optional item_type=RUN|THREAD filters
21
+ * the page. direction=backward returns items before the supplied cursor. The
22
+ * response contains item metadata only, not expanded run or thread payloads.
23
+ * status=archived returns items whose queue review requirements have been
24
+ * satisfied, not merely items the caller personally marked completed.
25
+ */
26
+ list(queueID: string, query: ItemListParams, options?: RequestOptions): PagePromise<ItemListResponsesItemsCursorGetPagination, ItemListResponse>;
27
+ /**
28
+ * Log the caller's reviewer status for a RUN or THREAD annotation queue item. A
29
+ * null status re-shows the item for this reviewer.
30
+ */
31
+ createStatus(queueItemID: string, body: ItemCreateStatusParams, options?: RequestOptions): APIPromise<ItemCreateStatusResponse>;
32
+ /**
33
+ * Remove RUN or THREAD items from a single annotation queue by item ID.
34
+ */
35
+ deleteAll(queueID: string, body: ItemDeleteAllParams, options?: RequestOptions): APIPromise<ItemDeleteAllResponse>;
36
+ /**
37
+ * Returns the number of annotation queue items for the requested reviewer-specific
38
+ * or archived bucket.
39
+ */
40
+ retrieveCount(queueID: string, query: ItemRetrieveCountParams, options?: RequestOptions): APIPromise<ItemRetrieveCountResponse>;
41
+ /**
42
+ * Resolve a RUN or THREAD item to its current review section and zero-based
43
+ * position for deep linking.
44
+ */
45
+ retrievePlacement(itemID: string, params: ItemRetrievePlacementParams, options?: RequestOptions): APIPromise<ItemRetrievePlacementResponse>;
46
+ }
47
+ export type ItemListResponsesItemsCursorGetPagination = ItemsCursorGetPagination<ItemListResponse>;
48
+ export interface ItemCreateResponse {
49
+ items?: Array<ItemCreateResponse.Item>;
50
+ }
51
+ export declare namespace ItemCreateResponse {
52
+ interface Item {
53
+ id?: string;
54
+ added_at?: string;
55
+ item_type?: 'RUN' | 'THREAD';
56
+ /**
57
+ * LastReviewedTime is always present on the wire (null until reviewed).
58
+ */
59
+ last_reviewed_time?: string;
60
+ project_id?: string;
61
+ queue_id?: string;
62
+ run_id?: string;
63
+ source_proposed_example_id?: string;
64
+ start_time?: string;
65
+ thread_id?: string;
66
+ }
67
+ }
68
+ export interface ItemUpdateResponse {
69
+ id?: string;
70
+ added_at?: string;
71
+ item_type?: 'RUN' | 'THREAD';
72
+ /**
73
+ * LastReviewedTime is always present on the wire (null until reviewed).
74
+ */
75
+ last_reviewed_time?: string;
76
+ project_id?: string;
77
+ queue_id?: string;
78
+ run_id?: string;
79
+ source_proposed_example_id?: string;
80
+ start_time?: string;
81
+ thread_id?: string;
82
+ }
83
+ export interface ItemListResponse {
84
+ id?: string;
85
+ added_at?: string;
86
+ completed_by?: Array<string>;
87
+ effective_added_at?: string;
88
+ item_type?: 'RUN' | 'THREAD';
89
+ /**
90
+ * LastReviewedTime is always present on the wire (null until reviewed).
91
+ */
92
+ last_reviewed_time?: string;
93
+ project_id?: string;
94
+ queue_id?: string;
95
+ reserved_by?: Array<string>;
96
+ run_id?: string;
97
+ source_proposed_example_id?: string;
98
+ start_time?: string;
99
+ thread_id?: string;
100
+ }
101
+ export interface ItemCreateStatusResponse {
102
+ is_archived?: boolean;
103
+ override_added_at?: string;
104
+ queue_item_id?: string;
105
+ status?: 'viewed' | 'completed';
106
+ }
107
+ export type ItemDeleteAllResponse = {
108
+ [key: string]: string;
109
+ };
110
+ export interface ItemRetrieveCountResponse {
111
+ count?: number;
112
+ }
113
+ export interface ItemRetrievePlacementResponse {
114
+ cursor?: string;
115
+ item_type?: 'RUN' | 'THREAD';
116
+ position?: number;
117
+ section?: 'needs_my_review' | 'needs_others_review' | 'archived';
118
+ }
119
+ export interface ItemCreateParams {
120
+ /**
121
+ * Query param: Extend trace retention for added run items
122
+ */
123
+ extend_trace_retention?: boolean;
124
+ /**
125
+ * Body param
126
+ */
127
+ items?: Array<ItemCreateParams.Item>;
128
+ }
129
+ export declare namespace ItemCreateParams {
130
+ interface Item {
131
+ item_type?: 'RUN' | 'THREAD';
132
+ project_id?: string;
133
+ /**
134
+ * RUN fields
135
+ */
136
+ run_id?: string;
137
+ /**
138
+ * SessionID is an alias for project_id.
139
+ */
140
+ session_id?: string;
141
+ /**
142
+ * SourceProposedExampleID links the queue item to the suggested example it was
143
+ * created from, when applicable.
144
+ */
145
+ source_proposed_example_id?: string;
146
+ start_time?: string;
147
+ thread_id?: string;
148
+ }
149
+ }
150
+ export interface ItemUpdateParams {
151
+ /**
152
+ * Path param: Annotation queue ID
153
+ */
154
+ queue_id: string;
155
+ /**
156
+ * Body param
157
+ */
158
+ added_at?: string;
159
+ /**
160
+ * Body param
161
+ */
162
+ last_reviewed_time?: string;
163
+ }
164
+ export interface ItemListParams extends ItemsCursorGetPaginationParams {
165
+ /**
166
+ * Review section: needs_my_review, needs_others_review, or archived
167
+ */
168
+ status: 'needs_my_review' | 'needs_others_review' | 'archived';
169
+ /**
170
+ * Pagination direction. backward requires cursor
171
+ */
172
+ direction?: 'forward' | 'backward';
173
+ /**
174
+ * Filter to RUN or THREAD
175
+ */
176
+ item_type?: 'RUN' | 'THREAD';
177
+ }
178
+ export interface ItemCreateStatusParams {
179
+ override_added_at?: string;
180
+ status?: 'viewed' | 'completed';
181
+ }
182
+ export interface ItemDeleteAllParams {
183
+ item_ids?: Array<string>;
184
+ }
185
+ export interface ItemRetrieveCountParams {
186
+ /**
187
+ * Count bucket: all, needs_my_review, needs_others_review, or archived.
188
+ */
189
+ status: string;
190
+ /**
191
+ * Exclusive upper bound for archived item timestamp
192
+ */
193
+ end_time?: string;
194
+ /**
195
+ * Exclusive lower bound for archived item timestamp
196
+ */
197
+ start_time?: string;
198
+ }
199
+ export interface ItemRetrievePlacementParams {
200
+ /**
201
+ * Annotation queue ID
202
+ */
203
+ queue_id: string;
204
+ }
205
+ export declare namespace Items {
206
+ export { 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, };
207
+ }
@@ -0,0 +1,80 @@
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 { ItemsCursorGetPagination, } from '../../core/pagination.js';
5
+ import { path } from '../../internal/utils/path.js';
6
+ export class Items extends APIResource {
7
+ /**
8
+ * Add RUN or THREAD items to a single annotation queue. RUN items require run_id
9
+ * unless they are created from a suggested example. THREAD items require thread_id
10
+ * and project_id.
11
+ */
12
+ create(queueID, params, options) {
13
+ const { extend_trace_retention, ...body } = params;
14
+ return this._client.post(path `/api/v1/platform/annotation-queues/${queueID}/items`, {
15
+ query: { extend_trace_retention },
16
+ body,
17
+ ...options,
18
+ });
19
+ }
20
+ /**
21
+ * Partially update mutable timestamps (added_at, last_reviewed_time) for a RUN or
22
+ * THREAD annotation queue item. Omit a field, or pass JSON null, to leave it
23
+ * unchanged.
24
+ */
25
+ update(itemID, params, options) {
26
+ const { queue_id, ...body } = params;
27
+ return this._client.patch(path `/api/v1/platform/annotation-queues/${queue_id}/items/${itemID}`, {
28
+ body,
29
+ ...options,
30
+ });
31
+ }
32
+ /**
33
+ * List RUN and THREAD items in a single annotation queue for one review status
34
+ * section, with opaque cursor pagination. Optional item_type=RUN|THREAD filters
35
+ * the page. direction=backward returns items before the supplied cursor. The
36
+ * response contains item metadata only, not expanded run or thread payloads.
37
+ * status=archived returns items whose queue review requirements have been
38
+ * satisfied, not merely items the caller personally marked completed.
39
+ */
40
+ list(queueID, query, options) {
41
+ return this._client.getAPIList(path `/api/v1/platform/annotation-queues/${queueID}/items`, (ItemsCursorGetPagination), { query, ...options });
42
+ }
43
+ /**
44
+ * Log the caller's reviewer status for a RUN or THREAD annotation queue item. A
45
+ * null status re-shows the item for this reviewer.
46
+ */
47
+ createStatus(queueItemID, body, options) {
48
+ return this._client.post(path `/api/v1/platform/annotation-queues/items/${queueItemID}/status`, {
49
+ body,
50
+ ...options,
51
+ });
52
+ }
53
+ /**
54
+ * Remove RUN or THREAD items from a single annotation queue by item ID.
55
+ */
56
+ deleteAll(queueID, body, options) {
57
+ return this._client.post(path `/api/v1/platform/annotation-queues/${queueID}/items/delete`, {
58
+ body,
59
+ ...options,
60
+ });
61
+ }
62
+ /**
63
+ * Returns the number of annotation queue items for the requested reviewer-specific
64
+ * or archived bucket.
65
+ */
66
+ retrieveCount(queueID, query, options) {
67
+ return this._client.get(path `/api/v1/platform/annotation-queues/${queueID}/items/count`, {
68
+ query,
69
+ ...options,
70
+ });
71
+ }
72
+ /**
73
+ * Resolve a RUN or THREAD item to its current review section and zero-based
74
+ * position for deep linking.
75
+ */
76
+ retrievePlacement(itemID, params, options) {
77
+ const { queue_id } = params;
78
+ return this._client.get(path `/api/v1/platform/annotation-queues/${queue_id}/items/${itemID}/placement`, options);
79
+ }
80
+ }
@@ -0,0 +1,61 @@
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, extend_trace_retention } = params;
14
+ return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, {
15
+ query: { extend_trace_retention },
16
+ body: body,
17
+ ...options,
18
+ });
19
+ }
20
+ /**
21
+ * Update Run In Annotation Queue
22
+ */
23
+ update(queueRunID, params, options) {
24
+ const { queue_id, ...body } = params;
25
+ return this._client.patch((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, {
26
+ body,
27
+ ...options,
28
+ });
29
+ }
30
+ /**
31
+ * Get Runs From Annotation Queue
32
+ */
33
+ list(queueID, query = {}, options) {
34
+ return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, { query, ...options });
35
+ }
36
+ /**
37
+ * Add Runs To Annotation Queue By Key
38
+ */
39
+ createByKey(queueID, params, options) {
40
+ const { body, extend_trace_retention } = params;
41
+ return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs/by-key`, {
42
+ query: { extend_trace_retention },
43
+ body: body,
44
+ ...options,
45
+ });
46
+ }
47
+ /**
48
+ * Delete Runs From Annotation Queue
49
+ */
50
+ deleteAll(queueID, body, options) {
51
+ return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs/delete`, { body, ...options });
52
+ }
53
+ /**
54
+ * Delete Run From Annotation Queue
55
+ */
56
+ deleteQueue(queueRunID, params, options) {
57
+ const { queue_id } = params;
58
+ return this._client.delete((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, options);
59
+ }
60
+ }
61
+ exports.Runs = Runs;