langsmith 0.7.14 → 0.7.16
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.
- package/dist/_openapi_client/client.cjs +9 -1
- package/dist/_openapi_client/client.d.ts +10 -5
- package/dist/_openapi_client/client.js +9 -1
- package/dist/_openapi_client/core/pagination.cjs +29 -1
- package/dist/_openapi_client/core/pagination.d.ts +11 -0
- package/dist/_openapi_client/core/pagination.js +27 -0
- package/dist/_openapi_client/resources/datasets/datasets.cjs +0 -130
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +3 -271
- package/dist/_openapi_client/resources/datasets/datasets.js +0 -130
- package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
- package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +9 -9
- package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
- package/dist/_openapi_client/resources/index.cjs +4 -2
- package/dist/_openapi_client/resources/index.d.ts +3 -2
- package/dist/_openapi_client/resources/index.js +2 -1
- package/dist/_openapi_client/resources/issues.cjs +31 -0
- package/dist/_openapi_client/resources/issues.d.ts +78 -0
- package/dist/_openapi_client/resources/issues.js +27 -0
- package/dist/_openapi_client/resources/runs.cjs +69 -15
- package/dist/_openapi_client/resources/runs.d.ts +806 -1
- package/dist/_openapi_client/resources/runs.js +67 -1
- package/dist/_openapi_client/resources/sessions.d.ts +1 -1
- package/dist/client.cjs +1 -5
- package/dist/client.d.ts +2 -5
- package/dist/client.js +1 -5
- package/dist/experimental/anthropic/context.cjs +1 -0
- package/dist/experimental/anthropic/context.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/env.cjs +1 -1
- package/dist/utils/env.d.ts +0 -7
- package/dist/utils/env.js +1 -1
- package/package.json +10 -10
- package/dist/_openapi_client/resources/datasets/comparative.cjs +0 -22
- package/dist/_openapi_client/resources/datasets/comparative.d.ts +0 -55
- package/dist/_openapi_client/resources/datasets/comparative.js +0 -18
- package/dist/_openapi_client/resources/datasets/runs.cjs +0 -22
- package/dist/_openapi_client/resources/datasets/runs.d.ts +0 -172
- package/dist/_openapi_client/resources/datasets/runs.js +0 -18
- package/dist/_openapi_client/resources/datasets/share.cjs +0 -32
- package/dist/_openapi_client/resources/datasets/share.d.ts +0 -28
- package/dist/_openapi_client/resources/datasets/share.js +0 -28
- package/dist/_openapi_client/resources/datasets/splits.cjs +0 -22
- package/dist/_openapi_client/resources/datasets/splits.d.ts +0 -30
- package/dist/_openapi_client/resources/datasets/splits.js +0 -18
- package/dist/_openapi_client/resources/datasets/versions.cjs +0 -23
- package/dist/_openapi_client/resources/datasets/versions.d.ts +0 -36
- package/dist/_openapi_client/resources/datasets/versions.js +0 -19
- package/dist/_openapi_client/resources/runs/index.cjs +0 -9
- package/dist/_openapi_client/resources/runs/index.d.ts +0 -2
- package/dist/_openapi_client/resources/runs/index.js +0 -4
- package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
- package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
- package/dist/_openapi_client/resources/runs/rules.js +0 -5
- package/dist/_openapi_client/resources/runs/runs.cjs +0 -115
- package/dist/_openapi_client/resources/runs/runs.d.ts +0 -800
- package/dist/_openapi_client/resources/runs/runs.js +0 -78
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
10
|
+
query(datasetID: string, body: ExperimentRunQueryParams, options?: RequestOptions): PagePromise<ExperimentRunQueryResponsesItemsCursorPostPagination, ExperimentRunQueryResponse>;
|
|
11
11
|
}
|
|
12
|
-
export type
|
|
13
|
-
export interface
|
|
12
|
+
export type ExperimentRunQueryResponsesItemsCursorPostPagination = ItemsCursorPostPagination<ExperimentRunQueryResponse>;
|
|
13
|
+
export interface ExperimentRunQueryResponse {
|
|
14
14
|
/**
|
|
15
15
|
* `id` is the dataset example UUID.
|
|
16
16
|
*/
|
|
@@ -50,13 +50,13 @@ export interface ExperimentRunCreateResponse {
|
|
|
50
50
|
/**
|
|
51
51
|
* `runs` is the list of experiment runs produced for this example.
|
|
52
52
|
*/
|
|
53
|
-
runs?: Array<RunsAPI.
|
|
53
|
+
runs?: Array<RunsAPI.Run>;
|
|
54
54
|
/**
|
|
55
55
|
* `source_run_id` is the run UUID the example was created from, if any.
|
|
56
56
|
*/
|
|
57
57
|
source_run_id?: string;
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
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?:
|
|
89
|
+
sort?: ExperimentRunQueryParams.Sort;
|
|
90
90
|
}
|
|
91
|
-
export declare namespace
|
|
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
|
|
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
|
-
|
|
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,14 +2,16 @@
|
|
|
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.Info = exports.Datasets = void 0;
|
|
5
|
+
exports.Sessions = 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");
|
|
9
9
|
Object.defineProperty(exports, "Info", { enumerable: true, get: function () { return info_js_1.Info; } });
|
|
10
|
+
var issues_js_1 = require("./issues.cjs");
|
|
11
|
+
Object.defineProperty(exports, "Issues", { enumerable: true, get: function () { return issues_js_1.Issues; } });
|
|
10
12
|
var online_evaluators_js_1 = require("./online-evaluators.cjs");
|
|
11
13
|
Object.defineProperty(exports, "OnlineEvaluators", { enumerable: true, get: function () { return online_evaluators_js_1.OnlineEvaluators; } });
|
|
12
|
-
var runs_js_1 = require("./runs
|
|
14
|
+
var runs_js_1 = require("./runs.cjs");
|
|
13
15
|
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
|
|
14
16
|
var sandboxes_js_1 = require("./sandboxes/sandboxes.cjs");
|
|
15
17
|
Object.defineProperty(exports, "Sandboxes", { enumerable: true, get: function () { return sandboxes_js_1.Sandboxes; } });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { Datasets, type DataType, type Dataset, type DatasetTransformation, type DatasetVersion, type FeedbackCreateCoreSchema, type Missing, type SortByDatasetColumn,
|
|
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
|
+
export { Issues, type Issue, type IssueListParams, type IssuesOffsetPaginationIssues } from './issues.js';
|
|
3
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';
|
|
4
|
-
export { Runs, type
|
|
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';
|
|
5
6
|
export { Sandboxes, type SandboxListResponse, type SandboxResponse, type SandboxStatusResponse, type ServiceURLResponse, type SnapshotListResponse, type SnapshotResponse, } from './sandboxes/sandboxes.js';
|
|
6
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';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
export { Datasets, } from './datasets/datasets.js';
|
|
4
4
|
export { Info } from './info.js';
|
|
5
|
+
export { Issues } from './issues.js';
|
|
5
6
|
export { OnlineEvaluators, } from './online-evaluators.js';
|
|
6
|
-
export { Runs, } from './runs
|
|
7
|
+
export { Runs, } from './runs.js';
|
|
7
8
|
export { Sandboxes, } from './sandboxes/sandboxes.js';
|
|
8
9
|
export { Sessions, } from './sessions.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
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.Issues = 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 Issues extends resource_js_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
12
|
+
*
|
|
13
|
+
* Returns one issue for the authenticated tenant.
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id, options) {
|
|
16
|
+
return this._client.get((0, path_js_1.path) `/v1/platform/issues/${id}`, options);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
20
|
+
*
|
|
21
|
+
* Returns issues for the authenticated tenant, optionally filtered by session,
|
|
22
|
+
* status, severity, tag, or last modified time.
|
|
23
|
+
*/
|
|
24
|
+
list(query = {}, options) {
|
|
25
|
+
return this._client.getAPIList('/v1/platform/issues', (pagination_js_1.OffsetPaginationIssues), {
|
|
26
|
+
query,
|
|
27
|
+
...options,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Issues = Issues;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { APIResource } from '../core/resource.js';
|
|
2
|
+
import { APIPromise } from '../core/api-promise.js';
|
|
3
|
+
import { OffsetPaginationIssues, type OffsetPaginationIssuesParams, PagePromise } from '../core/pagination.js';
|
|
4
|
+
import { RequestOptions } from '../internal/request-options.js';
|
|
5
|
+
export declare class Issues extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
8
|
+
*
|
|
9
|
+
* Returns one issue for the authenticated tenant.
|
|
10
|
+
*/
|
|
11
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Issue>;
|
|
12
|
+
/**
|
|
13
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
14
|
+
*
|
|
15
|
+
* Returns issues for the authenticated tenant, optionally filtered by session,
|
|
16
|
+
* status, severity, tag, or last modified time.
|
|
17
|
+
*/
|
|
18
|
+
list(query?: IssueListParams | null | undefined, options?: RequestOptions): PagePromise<IssuesOffsetPaginationIssues, Issue>;
|
|
19
|
+
}
|
|
20
|
+
export type IssuesOffsetPaginationIssues = OffsetPaginationIssues<Issue>;
|
|
21
|
+
export interface Issue {
|
|
22
|
+
id?: string;
|
|
23
|
+
actions?: unknown;
|
|
24
|
+
created_at?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
first_seen_at?: string;
|
|
27
|
+
fix_branch?: string;
|
|
28
|
+
fix_dispatched_at?: string;
|
|
29
|
+
fix_pr_number?: number;
|
|
30
|
+
fix_prompt?: string;
|
|
31
|
+
fix_verification?: unknown;
|
|
32
|
+
last_seen_at?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
proposed_context_fixes?: Array<unknown>;
|
|
35
|
+
proposed_examples?: Array<unknown>;
|
|
36
|
+
proposed_fix?: string;
|
|
37
|
+
proposed_prompt_fixes?: Array<unknown>;
|
|
38
|
+
session_id?: string;
|
|
39
|
+
severity?: 0 | 1 | 2 | 3;
|
|
40
|
+
status?: 'open' | 'completed' | 'ignored';
|
|
41
|
+
tags?: Array<string>;
|
|
42
|
+
tenant_id?: string;
|
|
43
|
+
traces?: unknown;
|
|
44
|
+
updated_at?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface IssueListParams extends OffsetPaginationIssuesParams {
|
|
47
|
+
/**
|
|
48
|
+
* Filter by session ID (UUID)
|
|
49
|
+
*/
|
|
50
|
+
session_id?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Filter by session name (exact match)
|
|
53
|
+
*/
|
|
54
|
+
session_name?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Filter by severity
|
|
57
|
+
*/
|
|
58
|
+
severity?: 0 | 1 | 2 | 3;
|
|
59
|
+
/**
|
|
60
|
+
* Sort field
|
|
61
|
+
*/
|
|
62
|
+
sort_by?: 'created_at' | 'updated_at' | 'severity';
|
|
63
|
+
/**
|
|
64
|
+
* Filter by status
|
|
65
|
+
*/
|
|
66
|
+
status?: 'open' | 'completed' | 'ignored';
|
|
67
|
+
/**
|
|
68
|
+
* Filter by tag (exact match)
|
|
69
|
+
*/
|
|
70
|
+
tag?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Return only issues updated at or after this RFC3339 timestamp
|
|
73
|
+
*/
|
|
74
|
+
updated_at?: string;
|
|
75
|
+
}
|
|
76
|
+
export declare namespace Issues {
|
|
77
|
+
export { type Issue as Issue, type IssuesOffsetPaginationIssues as IssuesOffsetPaginationIssues, type IssueListParams as IssueListParams, };
|
|
78
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { OffsetPaginationIssues } from '../core/pagination.js';
|
|
5
|
+
import { path } from '../internal/utils/path.js';
|
|
6
|
+
export class Issues extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
9
|
+
*
|
|
10
|
+
* Returns one issue for the authenticated tenant.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id, options) {
|
|
13
|
+
return this._client.get(path `/v1/platform/issues/${id}`, options);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* **Beta:** This endpoint is in active development and may change without notice.
|
|
17
|
+
*
|
|
18
|
+
* Returns issues for the authenticated tenant, optionally filtered by session,
|
|
19
|
+
* status, severity, tag, or last modified time.
|
|
20
|
+
*/
|
|
21
|
+
list(query = {}, options) {
|
|
22
|
+
return this._client.getAPIList('/v1/platform/issues', (OffsetPaginationIssues), {
|
|
23
|
+
query,
|
|
24
|
+
...options,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -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
|
-
|
|
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;
|