langsmith 0.7.15 → 0.7.17

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 (61) hide show
  1. package/dist/_openapi_client/client.cjs +17 -9
  2. package/dist/_openapi_client/client.d.ts +9 -6
  3. package/dist/_openapi_client/client.js +17 -9
  4. package/dist/_openapi_client/resources/datasets/datasets.cjs +0 -130
  5. package/dist/_openapi_client/resources/datasets/datasets.d.ts +3 -271
  6. package/dist/_openapi_client/resources/datasets/datasets.js +0 -130
  7. package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
  8. package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +8 -8
  9. package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
  10. package/dist/_openapi_client/resources/index.cjs +6 -4
  11. package/dist/_openapi_client/resources/index.d.ts +4 -3
  12. package/dist/_openapi_client/resources/index.js +3 -2
  13. package/dist/_openapi_client/resources/runs.cjs +69 -15
  14. package/dist/_openapi_client/resources/runs.d.ts +815 -1
  15. package/dist/_openapi_client/resources/runs.js +67 -1
  16. package/dist/_openapi_client/resources/threads.cjs +65 -0
  17. package/dist/_openapi_client/resources/threads.d.ts +654 -0
  18. package/dist/_openapi_client/resources/threads.js +61 -0
  19. package/dist/_openapi_client/resources/traces.cjs +61 -0
  20. package/dist/_openapi_client/resources/traces.d.ts +162 -0
  21. package/dist/_openapi_client/resources/traces.js +57 -0
  22. package/dist/client.cjs +1 -5
  23. package/dist/client.d.ts +2 -5
  24. package/dist/client.js +1 -5
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/wrappers/anthropic.cjs +38 -25
  29. package/dist/wrappers/anthropic.d.ts +10 -1
  30. package/dist/wrappers/anthropic.js +38 -25
  31. package/dist/wrappers/utils/anthropic_managed.cjs +648 -0
  32. package/dist/wrappers/utils/anthropic_managed.d.ts +7 -0
  33. package/dist/wrappers/utils/anthropic_managed.js +645 -0
  34. package/package.json +1 -1
  35. package/dist/_openapi_client/resources/datasets/comparative.cjs +0 -22
  36. package/dist/_openapi_client/resources/datasets/comparative.d.ts +0 -55
  37. package/dist/_openapi_client/resources/datasets/comparative.js +0 -18
  38. package/dist/_openapi_client/resources/datasets/runs.cjs +0 -22
  39. package/dist/_openapi_client/resources/datasets/runs.d.ts +0 -175
  40. package/dist/_openapi_client/resources/datasets/runs.js +0 -18
  41. package/dist/_openapi_client/resources/datasets/share.cjs +0 -32
  42. package/dist/_openapi_client/resources/datasets/share.d.ts +0 -28
  43. package/dist/_openapi_client/resources/datasets/share.js +0 -28
  44. package/dist/_openapi_client/resources/datasets/splits.cjs +0 -22
  45. package/dist/_openapi_client/resources/datasets/splits.d.ts +0 -30
  46. package/dist/_openapi_client/resources/datasets/splits.js +0 -18
  47. package/dist/_openapi_client/resources/datasets/versions.cjs +0 -23
  48. package/dist/_openapi_client/resources/datasets/versions.d.ts +0 -36
  49. package/dist/_openapi_client/resources/datasets/versions.js +0 -19
  50. package/dist/_openapi_client/resources/runs/index.cjs +0 -9
  51. package/dist/_openapi_client/resources/runs/index.d.ts +0 -2
  52. package/dist/_openapi_client/resources/runs/index.js +0 -4
  53. package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
  54. package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
  55. package/dist/_openapi_client/resources/runs/rules.js +0 -5
  56. package/dist/_openapi_client/resources/runs/runs.cjs +0 -115
  57. package/dist/_openapi_client/resources/runs/runs.d.ts +0 -800
  58. package/dist/_openapi_client/resources/runs/runs.js +0 -78
  59. package/dist/_openapi_client/resources/sessions.cjs +0 -53
  60. package/dist/_openapi_client/resources/sessions.d.ts +0 -636
  61. package/dist/_openapi_client/resources/sessions.js +0 -49
@@ -1,147 +1,17 @@
1
1
  // @ts-nocheck
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  import { APIResource } from '../../core/resource.js';
4
- import * as ComparativeAPI from './comparative.js';
5
- import { Comparative, } from './comparative.js';
6
4
  import * as ExperimentRunsAPI from './experiment-runs.js';
7
5
  import { ExperimentRuns, } from './experiment-runs.js';
8
- import * as RunsAPI from './runs.js';
9
- import { Runs, } from './runs.js';
10
- import * as ShareAPI from './share.js';
11
- import { Share } from './share.js';
12
- import * as SplitsAPI from './splits.js';
13
- import { Splits, } from './splits.js';
14
- import * as VersionsAPI from './versions.js';
15
- import { Versions, } from './versions.js';
16
- import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
17
- import { multipartFormRequestOptions } from '../../internal/uploads.js';
18
- import { path } from '../../internal/utils/path.js';
19
6
  export class Datasets extends APIResource {
20
7
  constructor() {
21
8
  super(...arguments);
22
- Object.defineProperty(this, "versions", {
23
- enumerable: true,
24
- configurable: true,
25
- writable: true,
26
- value: new VersionsAPI.Versions(this._client)
27
- });
28
- Object.defineProperty(this, "runs", {
29
- enumerable: true,
30
- configurable: true,
31
- writable: true,
32
- value: new RunsAPI.Runs(this._client)
33
- });
34
9
  Object.defineProperty(this, "experimentRuns", {
35
10
  enumerable: true,
36
11
  configurable: true,
37
12
  writable: true,
38
13
  value: new ExperimentRunsAPI.ExperimentRuns(this._client)
39
14
  });
40
- Object.defineProperty(this, "share", {
41
- enumerable: true,
42
- configurable: true,
43
- writable: true,
44
- value: new ShareAPI.Share(this._client)
45
- });
46
- Object.defineProperty(this, "comparative", {
47
- enumerable: true,
48
- configurable: true,
49
- writable: true,
50
- value: new ComparativeAPI.Comparative(this._client)
51
- });
52
- Object.defineProperty(this, "splits", {
53
- enumerable: true,
54
- configurable: true,
55
- writable: true,
56
- value: new SplitsAPI.Splits(this._client)
57
- });
58
- }
59
- /**
60
- * Create a new dataset.
61
- */
62
- create(body, options) {
63
- return this._client.post('/api/v1/datasets', { body, ...options });
64
- }
65
- /**
66
- * Get a specific dataset.
67
- */
68
- retrieve(datasetID, options) {
69
- return this._client.get(path `/api/v1/datasets/${datasetID}`, options);
70
- }
71
- /**
72
- * Update a specific dataset.
73
- */
74
- update(datasetID, body, options) {
75
- return this._client.patch(path `/api/v1/datasets/${datasetID}`, { body, ...options });
76
- }
77
- /**
78
- * Get all datasets by query params and owner.
79
- */
80
- list(params = {}, options) {
81
- const { datatype, ...query } = params ?? {};
82
- return this._client.getAPIList('/api/v1/datasets', (OffsetPaginationTopLevelArray), {
83
- query: { data_type: datatype, ...query },
84
- ...options,
85
- });
86
- }
87
- /**
88
- * Delete a specific dataset.
89
- */
90
- delete(datasetID, options) {
91
- return this._client.delete(path `/api/v1/datasets/${datasetID}`, options);
92
- }
93
- /**
94
- * Clone a dataset.
95
- */
96
- clone(body, options) {
97
- return this._client.post('/api/v1/datasets/clone', { body, ...options });
98
- }
99
- /**
100
- * Download a dataset as CSV format.
101
- */
102
- retrieveCsv(datasetID, query = {}, options) {
103
- return this._client.get(path `/api/v1/datasets/${datasetID}/csv`, { query, ...options });
104
- }
105
- /**
106
- * Download a dataset as CSV format.
107
- */
108
- retrieveJSONL(datasetID, query = {}, options) {
109
- return this._client.get(path `/api/v1/datasets/${datasetID}/jsonl`, { query, ...options });
110
- }
111
- /**
112
- * Download a dataset as OpenAI Evals Jsonl format.
113
- */
114
- retrieveOpenAI(datasetID, query = {}, options) {
115
- return this._client.get(path `/api/v1/datasets/${datasetID}/openai`, { query, ...options });
116
- }
117
- /**
118
- * Download a dataset as OpenAI Jsonl format.
119
- */
120
- retrieveOpenAIFt(datasetID, query = {}, options) {
121
- return this._client.get(path `/api/v1/datasets/${datasetID}/openai_ft`, { query, ...options });
122
- }
123
- /**
124
- * Get dataset version by as_of or exact tag.
125
- */
126
- retrieveVersion(datasetID, query = {}, options) {
127
- return this._client.get(path `/api/v1/datasets/${datasetID}/version`, { query, ...options });
128
- }
129
- /**
130
- * Set a tag on a dataset version.
131
- */
132
- updateTags(datasetID, body, options) {
133
- return this._client.put(path `/api/v1/datasets/${datasetID}/tags`, { body, ...options });
134
- }
135
- /**
136
- * Create a new dataset from a CSV or JSONL file.
137
- */
138
- upload(body, options) {
139
- return this._client.post('/api/v1/datasets/upload', multipartFormRequestOptions({ body, ...options }, this._client));
140
15
  }
141
16
  }
142
- Datasets.Versions = Versions;
143
- Datasets.Runs = Runs;
144
17
  Datasets.ExperimentRuns = ExperimentRuns;
145
- Datasets.Share = Share;
146
- Datasets.Comparative = Comparative;
147
- Datasets.Splits = Splits;
@@ -11,7 +11,7 @@ class ExperimentRuns extends resource_js_1.APIResource {
11
11
  * Returns a paginated page of dataset examples with runs from the requested
12
12
  * experiments. Response uses the canonical `{items, next_cursor}` envelope.
13
13
  */
14
- create(datasetID, body, options) {
14
+ query(datasetID, body, options) {
15
15
  return this._client.getAPIList((0, path_js_1.path) `/v2/datasets/${datasetID}/experiment-runs`, (pagination_js_1.ItemsCursorPostPagination), { body, method: 'post', ...options });
16
16
  }
17
17
  }
@@ -1,5 +1,5 @@
1
1
  import { APIResource } from '../../core/resource.js';
2
- import * as RunsAPI from '../runs/runs.js';
2
+ import * as RunsAPI from '../runs.js';
3
3
  import { ItemsCursorPostPagination, type ItemsCursorPostPaginationParams, PagePromise } from '../../core/pagination.js';
4
4
  import { RequestOptions } from '../../internal/request-options.js';
5
5
  export declare class ExperimentRuns extends APIResource {
@@ -7,10 +7,10 @@ export declare class ExperimentRuns extends APIResource {
7
7
  * Returns a paginated page of dataset examples with runs from the requested
8
8
  * experiments. Response uses the canonical `{items, next_cursor}` envelope.
9
9
  */
10
- create(datasetID: string, body: ExperimentRunCreateParams, options?: RequestOptions): PagePromise<ExperimentRunCreateResponsesItemsCursorPostPagination, ExperimentRunCreateResponse>;
10
+ query(datasetID: string, body: ExperimentRunQueryParams, options?: RequestOptions): PagePromise<ExperimentRunQueryResponsesItemsCursorPostPagination, ExperimentRunQueryResponse>;
11
11
  }
12
- export type ExperimentRunCreateResponsesItemsCursorPostPagination = ItemsCursorPostPagination<ExperimentRunCreateResponse>;
13
- export interface ExperimentRunCreateResponse {
12
+ export type ExperimentRunQueryResponsesItemsCursorPostPagination = ItemsCursorPostPagination<ExperimentRunQueryResponse>;
13
+ export interface ExperimentRunQueryResponse {
14
14
  /**
15
15
  * `id` is the dataset example UUID.
16
16
  */
@@ -56,7 +56,7 @@ export interface ExperimentRunCreateResponse {
56
56
  */
57
57
  source_run_id?: string;
58
58
  }
59
- export interface ExperimentRunCreateParams extends ItemsCursorPostPaginationParams {
59
+ export interface ExperimentRunQueryParams extends ItemsCursorPostPaginationParams {
60
60
  /**
61
61
  * `comparative_experiment_id` scopes pairwise-annotation feedback (optional).
62
62
  */
@@ -86,9 +86,9 @@ export interface ExperimentRunCreateParams extends ItemsCursorPostPaginationPara
86
86
  /**
87
87
  * `sort` controls feedback-score sorting (single project only).
88
88
  */
89
- sort?: ExperimentRunCreateParams.Sort;
89
+ sort?: ExperimentRunQueryParams.Sort;
90
90
  }
91
- export declare namespace ExperimentRunCreateParams {
91
+ export declare namespace ExperimentRunQueryParams {
92
92
  /**
93
93
  * `sort` controls feedback-score sorting (single project only).
94
94
  */
@@ -105,5 +105,5 @@ export declare namespace ExperimentRunCreateParams {
105
105
  }
106
106
  }
107
107
  export declare namespace ExperimentRuns {
108
- export { type ExperimentRunCreateResponse as ExperimentRunCreateResponse, type ExperimentRunCreateResponsesItemsCursorPostPagination as ExperimentRunCreateResponsesItemsCursorPostPagination, type ExperimentRunCreateParams as ExperimentRunCreateParams, };
108
+ export { type ExperimentRunQueryResponse as ExperimentRunQueryResponse, type ExperimentRunQueryResponsesItemsCursorPostPagination as ExperimentRunQueryResponsesItemsCursorPostPagination, type ExperimentRunQueryParams as ExperimentRunQueryParams, };
109
109
  }
@@ -8,7 +8,7 @@ export class ExperimentRuns extends APIResource {
8
8
  * Returns a paginated page of dataset examples with runs from the requested
9
9
  * experiments. Response uses the canonical `{items, next_cursor}` envelope.
10
10
  */
11
- create(datasetID, body, options) {
11
+ query(datasetID, body, options) {
12
12
  return this._client.getAPIList(path `/v2/datasets/${datasetID}/experiment-runs`, (ItemsCursorPostPagination), { body, method: 'post', ...options });
13
13
  }
14
14
  }
@@ -2,7 +2,7 @@
2
2
  // @ts-nocheck
3
3
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Sessions = exports.Sandboxes = exports.Runs = exports.OnlineEvaluators = exports.Issues = exports.Info = exports.Datasets = void 0;
5
+ exports.Traces = exports.Threads = exports.Sandboxes = exports.Runs = exports.OnlineEvaluators = exports.Issues = exports.Info = exports.Datasets = void 0;
6
6
  var datasets_js_1 = require("./datasets/datasets.cjs");
7
7
  Object.defineProperty(exports, "Datasets", { enumerable: true, get: function () { return datasets_js_1.Datasets; } });
8
8
  var info_js_1 = require("./info.cjs");
@@ -11,9 +11,11 @@ var issues_js_1 = require("./issues.cjs");
11
11
  Object.defineProperty(exports, "Issues", { enumerable: true, get: function () { return issues_js_1.Issues; } });
12
12
  var online_evaluators_js_1 = require("./online-evaluators.cjs");
13
13
  Object.defineProperty(exports, "OnlineEvaluators", { enumerable: true, get: function () { return online_evaluators_js_1.OnlineEvaluators; } });
14
- var runs_js_1 = require("./runs/runs.cjs");
14
+ var runs_js_1 = require("./runs.cjs");
15
15
  Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
16
16
  var sandboxes_js_1 = require("./sandboxes/sandboxes.cjs");
17
17
  Object.defineProperty(exports, "Sandboxes", { enumerable: true, get: function () { return sandboxes_js_1.Sandboxes; } });
18
- var sessions_js_1 = require("./sessions.cjs");
19
- Object.defineProperty(exports, "Sessions", { enumerable: true, get: function () { return sessions_js_1.Sessions; } });
18
+ var threads_js_1 = require("./threads.cjs");
19
+ Object.defineProperty(exports, "Threads", { enumerable: true, get: function () { return threads_js_1.Threads; } });
20
+ var traces_js_1 = require("./traces.cjs");
21
+ Object.defineProperty(exports, "Traces", { enumerable: true, get: function () { return traces_js_1.Traces; } });
@@ -1,7 +1,8 @@
1
- export { Datasets, type DataType, type Dataset, type DatasetTransformation, type DatasetVersion, type FeedbackCreateCoreSchema, type Missing, type SortByDatasetColumn, type DatasetUpdateResponse, type DatasetDeleteResponse, type DatasetCloneResponse, type DatasetRetrieveCsvResponse, type DatasetRetrieveJSONLResponse, type DatasetRetrieveOpenAIResponse, type DatasetRetrieveOpenAIFtResponse, type DatasetCreateParams, type DatasetUpdateParams, type DatasetListParams, type DatasetCloneParams, type DatasetRetrieveCsvParams, type DatasetRetrieveJSONLParams, type DatasetRetrieveOpenAIParams, type DatasetRetrieveOpenAIFtParams, type DatasetRetrieveVersionParams, type DatasetUpdateTagsParams, type DatasetUploadParams, type DatasetVersionsOffsetPaginationTopLevelArray, type DatasetsOffsetPaginationTopLevelArray, } from './datasets/datasets.js';
1
+ export { Datasets, type DataType, type Dataset, type DatasetTransformation, type DatasetVersion, type FeedbackCreateCoreSchema, type Missing, type SortByDatasetColumn, } from './datasets/datasets.js';
2
2
  export { Info, type InfoListResponse } from './info.js';
3
3
  export { Issues, type Issue, type IssueListParams, type IssuesOffsetPaginationIssues } from './issues.js';
4
4
  export { OnlineEvaluators, type BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator, type OnlineEvaluator, type OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup, type OnlineEvaluatorType, type OnlineLlmEvaluator, type OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators, } from './online-evaluators.js';
5
- export { Runs, type ResponseBodyForRunsGenerateQuery, type Run, type RunIngest, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type RunsItemsCursorPostPagination, } from './runs/runs.js';
5
+ export { Runs, type ResponseBodyForRunsGenerateQuery, type Run, type RunIngest, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type RunsItemsCursorPostPagination, } from './runs.js';
6
6
  export { Sandboxes, type SandboxListResponse, type SandboxResponse, type SandboxStatusResponse, type ServiceURLResponse, type SnapshotListResponse, type SnapshotResponse, } from './sandboxes/sandboxes.js';
7
- export { Sessions, type CustomChartsSection, type CustomChartsSectionRequest, type RunStatsGroupBy, type SessionSortableColumns, type TimedeltaInput, type TracerSession, type TracerSessionWithoutVirtualFields, type SessionDeleteResponse, type SessionCreateParams, type SessionRetrieveParams, type SessionUpdateParams, type SessionListParams, type TracerSessionsOffsetPaginationTopLevelArray, } from './sessions.js';
7
+ export { Threads, type ThreadListItem, type ThreadTraceListItem, type ThreadStatsResponse, type ThreadListTracesParams, type ThreadQueryParams, type ThreadStatsParams, type ThreadTraceListItemsItemsCursorGetPagination, type ThreadListItemsItemsCursorPostPagination, } from './threads.js';
8
+ export { Traces, type Trace, type TraceAggregates, type TraceListRunsResponse, type TraceListRunsParams, type TraceQueryParams, type TracesItemsCursorPostPagination, } from './traces.js';
@@ -4,6 +4,7 @@ export { Datasets, } from './datasets/datasets.js';
4
4
  export { Info } from './info.js';
5
5
  export { Issues } from './issues.js';
6
6
  export { OnlineEvaluators, } from './online-evaluators.js';
7
- export { Runs, } from './runs/runs.js';
7
+ export { Runs, } from './runs.js';
8
8
  export { Sandboxes, } from './sandboxes/sandboxes.js';
9
- export { Sessions, } from './sessions.js';
9
+ export { Threads, } from './threads.js';
10
+ export { Traces, } from './traces.js';
@@ -1,19 +1,73 @@
1
1
  "use strict";
2
2
  // @ts-nocheck
3
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
16
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
- };
18
4
  Object.defineProperty(exports, "__esModule", { value: true });
19
- __exportStar(require("./runs/index.cjs"), exports);
5
+ exports.Runs = void 0;
6
+ const resource_js_1 = require("../core/resource.cjs");
7
+ const pagination_js_1 = require("../core/pagination.cjs");
8
+ const headers_js_1 = require("../internal/headers.cjs");
9
+ const path_js_1 = require("../internal/utils/path.cjs");
10
+ class Runs extends resource_js_1.APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ Object.defineProperty(this, "retrieve", {
14
+ enumerable: true,
15
+ configurable: true,
16
+ writable: true,
17
+ value: this.retrieveV2
18
+ });
19
+ Object.defineProperty(this, "query", {
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true,
23
+ value: this.queryV2
24
+ });
25
+ }
26
+ /**
27
+ * **Alpha:** The request and response contract may change; Returns a paginated
28
+ * list of runs for the given projects within min/max start_time. Supports filters,
29
+ * cursor pagination, and `selects` to select fields to return.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * // Automatically fetches more pages as needed.
34
+ * for await (const run of client.runs.queryV2()) {
35
+ * // ...
36
+ * }
37
+ * ```
38
+ */
39
+ queryV2(params, options) {
40
+ const { Accept, ...body } = params;
41
+ return this._client.getAPIList('/v2/runs/query', (pagination_js_1.ItemsCursorPostPagination), {
42
+ body,
43
+ method: 'post',
44
+ ...options,
45
+ headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
46
+ });
47
+ }
48
+ /**
49
+ * **Alpha:** The request and response contract may change; Returns one run by ID
50
+ * for the given session and start_time. Use the `selects` query parameter
51
+ * (repeatable) to select fields to return.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const run = await client.runs.retrieveV2(
56
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
57
+ * {
58
+ * project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
59
+ * start_time: '2019-12-27T18:11:19.117Z',
60
+ * },
61
+ * );
62
+ * ```
63
+ */
64
+ retrieveV2(runID, params, options) {
65
+ const { Accept, ...query } = params;
66
+ return this._client.get((0, path_js_1.path) `/v2/runs/${runID}`, {
67
+ query,
68
+ ...options,
69
+ headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
70
+ });
71
+ }
72
+ }
73
+ exports.Runs = Runs;