langsmith 0.7.15 → 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.
Files changed (46) hide show
  1. package/dist/_openapi_client/client.cjs +1 -1
  2. package/dist/_openapi_client/client.d.ts +3 -3
  3. package/dist/_openapi_client/client.js +1 -1
  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 +1 -1
  11. package/dist/_openapi_client/resources/index.d.ts +2 -2
  12. package/dist/_openapi_client/resources/index.js +1 -1
  13. package/dist/_openapi_client/resources/runs.cjs +69 -15
  14. package/dist/_openapi_client/resources/runs.d.ts +806 -1
  15. package/dist/_openapi_client/resources/runs.js +67 -1
  16. package/dist/client.cjs +1 -5
  17. package/dist/client.d.ts +2 -5
  18. package/dist/client.js +1 -5
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1 -1
  22. package/package.json +1 -1
  23. package/dist/_openapi_client/resources/datasets/comparative.cjs +0 -22
  24. package/dist/_openapi_client/resources/datasets/comparative.d.ts +0 -55
  25. package/dist/_openapi_client/resources/datasets/comparative.js +0 -18
  26. package/dist/_openapi_client/resources/datasets/runs.cjs +0 -22
  27. package/dist/_openapi_client/resources/datasets/runs.d.ts +0 -175
  28. package/dist/_openapi_client/resources/datasets/runs.js +0 -18
  29. package/dist/_openapi_client/resources/datasets/share.cjs +0 -32
  30. package/dist/_openapi_client/resources/datasets/share.d.ts +0 -28
  31. package/dist/_openapi_client/resources/datasets/share.js +0 -28
  32. package/dist/_openapi_client/resources/datasets/splits.cjs +0 -22
  33. package/dist/_openapi_client/resources/datasets/splits.d.ts +0 -30
  34. package/dist/_openapi_client/resources/datasets/splits.js +0 -18
  35. package/dist/_openapi_client/resources/datasets/versions.cjs +0 -23
  36. package/dist/_openapi_client/resources/datasets/versions.d.ts +0 -36
  37. package/dist/_openapi_client/resources/datasets/versions.js +0 -19
  38. package/dist/_openapi_client/resources/runs/index.cjs +0 -9
  39. package/dist/_openapi_client/resources/runs/index.d.ts +0 -2
  40. package/dist/_openapi_client/resources/runs/index.js +0 -4
  41. package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
  42. package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
  43. package/dist/_openapi_client/resources/runs/rules.js +0 -5
  44. package/dist/_openapi_client/resources/runs/runs.cjs +0 -115
  45. package/dist/_openapi_client/resources/runs/runs.d.ts +0 -800
  46. package/dist/_openapi_client/resources/runs/runs.js +0 -78
@@ -1,3 +1,69 @@
1
1
  // @ts-nocheck
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- export * from './runs/index.js';
3
+ import { APIResource } from '../core/resource.js';
4
+ import { ItemsCursorPostPagination, } from '../core/pagination.js';
5
+ import { buildHeaders } from '../internal/headers.js';
6
+ import { path } from '../internal/utils/path.js';
7
+ export class Runs extends APIResource {
8
+ constructor() {
9
+ super(...arguments);
10
+ Object.defineProperty(this, "retrieve", {
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true,
14
+ value: this.retrieveV2
15
+ });
16
+ Object.defineProperty(this, "query", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: this.queryV2
21
+ });
22
+ }
23
+ /**
24
+ * **Alpha:** The request and response contract may change; Returns a paginated
25
+ * list of runs for the given projects within min/max start_time. Supports filters,
26
+ * cursor pagination, and `selects` to select fields to return.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * // Automatically fetches more pages as needed.
31
+ * for await (const run of client.runs.queryV2()) {
32
+ * // ...
33
+ * }
34
+ * ```
35
+ */
36
+ queryV2(params, options) {
37
+ const { Accept, ...body } = params;
38
+ return this._client.getAPIList('/v2/runs/query', (ItemsCursorPostPagination), {
39
+ body,
40
+ method: 'post',
41
+ ...options,
42
+ headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
43
+ });
44
+ }
45
+ /**
46
+ * **Alpha:** The request and response contract may change; Returns one run by ID
47
+ * for the given session and start_time. Use the `selects` query parameter
48
+ * (repeatable) to select fields to return.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const run = await client.runs.retrieveV2(
53
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
54
+ * {
55
+ * project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
56
+ * start_time: '2019-12-27T18:11:19.117Z',
57
+ * },
58
+ * );
59
+ * ```
60
+ */
61
+ retrieveV2(runID, params, options) {
62
+ const { Accept, ...query } = params;
63
+ return this._client.get(path `/v2/runs/${runID}`, {
64
+ query,
65
+ ...options,
66
+ headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
67
+ });
68
+ }
69
+ }
package/dist/client.cjs CHANGED
@@ -972,7 +972,7 @@ class Client {
972
972
  const needsV1Prefix = this.apiUrl.slice(-3) !== "/v1" && this.apiUrl.slice(-4) !== "/v1/";
973
973
  return needsV1Prefix ? `/v1/platform/${path}` : `/platform/${path}`;
974
974
  }
975
- get onlineEvaluators() {
975
+ get evaluators() {
976
976
  return this.openAPIClient.onlineEvaluators;
977
977
  }
978
978
  get runs() {
@@ -982,10 +982,6 @@ class Client {
982
982
  get sandboxes() {
983
983
  return this.openAPIClient.sandboxes;
984
984
  }
985
- /** Access the projects resource. */
986
- get projects() {
987
- return this.openAPIClient.sessions;
988
- }
989
985
  /** Access the v2 datasets resource (experimentRuns, etc.). */
990
986
  get datasets() {
991
987
  return this.openAPIClient.datasets;
package/dist/client.d.ts CHANGED
@@ -3,11 +3,10 @@ import { AsyncCallerParams } from "./utils/async_caller.js";
3
3
  import { ComparativeExperiment, DataType, Dataset, DatasetDiffInfo, DatasetShareSchema, Example, ExampleCreate, ExampleUpdate, ExampleUpdateWithoutId, Feedback, FeedbackConfig, FeedbackIngestToken, KVMap, LangChainBaseMessage, LangSmithSettings, LikePromptResponse, Prompt, PromptCommit, PromptSortField, Run, RunCreate, RunUpdate, ScoreType, TimeDelta, TracerSession, TracerSessionResult, ValueType, AnnotationQueue, RunWithAnnotationQueueInfo, Attachments, UploadExamplesResponse, UpdateExamplesResponse, DatasetVersion, AnnotationQueueWithDetails, AnnotationQueueRubricItem, FeedbackConfigSchema, AgentContext, SkillContext, Entry } from "./schemas.js";
4
4
  import { type TracingMode } from "./utils/env.js";
5
5
  import { EvaluationResult, EvaluationResults } from "./evaluation/evaluator.js";
6
- import { OnlineEvaluators } from "./_openapi_client/resources/online-evaluators.js";
6
+ import { OnlineEvaluators as Evaluators } from "./_openapi_client/resources/online-evaluators.js";
7
7
  import { Runs as OpenAPIRuns } from "./_openapi_client/resources/runs.js";
8
8
  import { Sandboxes } from "./_openapi_client/resources/sandboxes/sandboxes.js";
9
9
  import { Datasets } from "./_openapi_client/resources/datasets/datasets.js";
10
- import { Sessions } from "./_openapi_client/resources/sessions.js";
11
10
  import { PromptCache } from "./utils/prompt_cache/index.js";
12
11
  import { ProfileAuth } from "./utils/profiles.js";
13
12
  export interface ClientConfig {
@@ -514,12 +513,10 @@ export declare class Client implements LangSmithTracingClientInterface {
514
513
  private _getOpenAPIBaseUrl;
515
514
  private _newOpenAPIClient;
516
515
  private _getPlatformEndpointPath;
517
- get onlineEvaluators(): OnlineEvaluators;
516
+ get evaluators(): Evaluators;
518
517
  get runs(): OpenAPIRuns;
519
518
  /** Access the v2 sandboxes resource (registries, snapshots, boxes). */
520
519
  get sandboxes(): Sandboxes;
521
- /** Access the projects resource. */
522
- get projects(): Sessions;
523
520
  /** Access the v2 datasets resource (experimentRuns, etc.). */
524
521
  get datasets(): Datasets;
525
522
  private processInputs;
package/dist/client.js CHANGED
@@ -933,7 +933,7 @@ export class Client {
933
933
  const needsV1Prefix = this.apiUrl.slice(-3) !== "/v1" && this.apiUrl.slice(-4) !== "/v1/";
934
934
  return needsV1Prefix ? `/v1/platform/${path}` : `/platform/${path}`;
935
935
  }
936
- get onlineEvaluators() {
936
+ get evaluators() {
937
937
  return this.openAPIClient.onlineEvaluators;
938
938
  }
939
939
  get runs() {
@@ -943,10 +943,6 @@ export class Client {
943
943
  get sandboxes() {
944
944
  return this.openAPIClient.sandboxes;
945
945
  }
946
- /** Access the projects resource. */
947
- get projects() {
948
- return this.openAPIClient.sessions;
949
- }
950
946
  /** Access the v2 datasets resource (experimentRuns, etc.). */
951
947
  get datasets() {
952
948
  return this.openAPIClient.datasets;
package/dist/index.cjs CHANGED
@@ -20,6 +20,6 @@ Object.defineProperty(exports, "PromptCache", { enumerable: true, get: function
20
20
  Object.defineProperty(exports, "configureGlobalPromptCache", { enumerable: true, get: function () { return index_js_1.configureGlobalPromptCache; } });
21
21
  Object.defineProperty(exports, "promptCacheSingleton", { enumerable: true, get: function () { return index_js_1.promptCacheSingleton; } });
22
22
  // Update using pnpm bump-version
23
- exports.__version__ = "0.7.15";
23
+ exports.__version__ = "0.7.16";
24
24
  // Metadata key to hide a traced run from LangSmith's Messages View.
25
25
  exports.LS_MESSAGE_VIEW_EXCLUDE = "ls_message_view_exclude";
package/dist/index.d.ts CHANGED
@@ -6,5 +6,5 @@ export { getDefaultProjectName } from "./utils/project.js";
6
6
  export { uuid7, uuid7FromTime } from "./uuid.js";
7
7
  export { isTracingEnabled } from "./utils/guard.js";
8
8
  export { Cache, PromptCache, type CacheConfig, type CacheMetrics, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
9
- export declare const __version__ = "0.7.15";
9
+ export declare const __version__ = "0.7.16";
10
10
  export declare const LS_MESSAGE_VIEW_EXCLUDE: "ls_message_view_exclude";
package/dist/index.js CHANGED
@@ -6,6 +6,6 @@ export { uuid7, uuid7FromTime } from "./uuid.js";
6
6
  export { isTracingEnabled } from "./utils/guard.js";
7
7
  export { Cache, PromptCache, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
8
8
  // Update using pnpm bump-version
9
- export const __version__ = "0.7.15";
9
+ export const __version__ = "0.7.16";
10
10
  // Metadata key to hide a traced run from LangSmith's Messages View.
11
11
  export const LS_MESSAGE_VIEW_EXCLUDE = "ls_message_view_exclude";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.7.15",
3
+ "version": "0.7.16",
4
4
  "description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
5
5
  "packageManager": "pnpm@10.33.0",
6
6
  "files": [
@@ -1,22 +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.Comparative = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const path_js_1 = require("../../internal/utils/path.cjs");
8
- class Comparative extends resource_js_1.APIResource {
9
- /**
10
- * Create a comparative experiment.
11
- */
12
- create(body, options) {
13
- return this._client.post('/api/v1/datasets/comparative', { body, ...options });
14
- }
15
- /**
16
- * Delete a specific comparative experiment.
17
- */
18
- delete(comparativeExperimentID, options) {
19
- return this._client.delete((0, path_js_1.path) `/api/v1/datasets/comparative/${comparativeExperimentID}`, options);
20
- }
21
- }
22
- exports.Comparative = Comparative;
@@ -1,55 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import { APIPromise } from '../../core/api-promise.js';
3
- import { RequestOptions } from '../../internal/request-options.js';
4
- export declare class Comparative extends APIResource {
5
- /**
6
- * Create a comparative experiment.
7
- */
8
- create(body: ComparativeCreateParams, options?: RequestOptions): APIPromise<ComparativeCreateResponse>;
9
- /**
10
- * Delete a specific comparative experiment.
11
- */
12
- delete(comparativeExperimentID: string, options?: RequestOptions): APIPromise<unknown>;
13
- }
14
- /**
15
- * Simple experiment info schema for use with comparative experiments
16
- */
17
- export interface SimpleExperimentInfo {
18
- id: string;
19
- name: string;
20
- }
21
- /**
22
- * Enum for available comparative experiment columns to sort by.
23
- */
24
- export type SortByComparativeExperimentColumn = 'name' | 'created_at';
25
- /**
26
- * ComparativeExperiment schema.
27
- */
28
- export interface ComparativeCreateResponse {
29
- id: string;
30
- created_at: string;
31
- modified_at: string;
32
- reference_dataset_id: string;
33
- tenant_id: string;
34
- description?: string | null;
35
- extra?: {
36
- [key: string]: unknown;
37
- } | null;
38
- name?: string | null;
39
- }
40
- export type ComparativeDeleteResponse = unknown;
41
- export interface ComparativeCreateParams {
42
- experiment_ids: Array<string>;
43
- id?: string;
44
- created_at?: string;
45
- description?: string | null;
46
- extra?: {
47
- [key: string]: unknown;
48
- } | null;
49
- modified_at?: string;
50
- name?: string | null;
51
- reference_dataset_id?: string | null;
52
- }
53
- export declare namespace Comparative {
54
- export { type SimpleExperimentInfo as SimpleExperimentInfo, type SortByComparativeExperimentColumn as SortByComparativeExperimentColumn, type ComparativeCreateResponse as ComparativeCreateResponse, type ComparativeDeleteResponse as ComparativeDeleteResponse, type ComparativeCreateParams as ComparativeCreateParams, };
55
- }
@@ -1,18 +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 { path } from '../../internal/utils/path.js';
5
- export class Comparative extends APIResource {
6
- /**
7
- * Create a comparative experiment.
8
- */
9
- create(body, options) {
10
- return this._client.post('/api/v1/datasets/comparative', { body, ...options });
11
- }
12
- /**
13
- * Delete a specific comparative experiment.
14
- */
15
- delete(comparativeExperimentID, options) {
16
- return this._client.delete(path `/api/v1/datasets/comparative/${comparativeExperimentID}`, options);
17
- }
18
- }
@@ -1,22 +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
- * Fetch examples for a dataset, and fetch the runs for each example if they are
11
- * associated with the given session_ids.
12
- */
13
- create(datasetID, params, options) {
14
- const { format, ...body } = params;
15
- return this._client.post((0, path_js_1.path) `/api/v1/datasets/${datasetID}/runs`, {
16
- query: { format },
17
- body,
18
- ...options,
19
- });
20
- }
21
- }
22
- exports.Runs = Runs;
@@ -1,175 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as RunsAPI_ from '../runs/runs.js';
3
- import { APIPromise } from '../../core/api-promise.js';
4
- import { RequestOptions } from '../../internal/request-options.js';
5
- export declare class Runs extends APIResource {
6
- /**
7
- * Fetch examples for a dataset, and fetch the runs for each example if they are
8
- * associated with the given session_ids.
9
- */
10
- create(datasetID: string, params: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse | null>;
11
- }
12
- /**
13
- * Example schema with list of runs from ClickHouse.
14
- *
15
- * For non-grouped endpoint (/datasets/{dataset_id}/runs): runs from single
16
- * session. For grouped endpoint (/datasets/{dataset_id}/group/runs): flat array of
17
- * runs from all sessions, where each run has a session_id field for frontend to
18
- * determine column placement.
19
- */
20
- export interface ExampleWithRunsCh {
21
- id: string;
22
- dataset_id: string;
23
- inputs: {
24
- [key: string]: unknown;
25
- };
26
- name: string;
27
- runs: Array<ExampleWithRunsCh.Run>;
28
- attachment_urls?: {
29
- [key: string]: unknown;
30
- } | null;
31
- created_at?: string;
32
- metadata?: {
33
- [key: string]: unknown;
34
- } | null;
35
- modified_at?: string | null;
36
- outputs?: {
37
- [key: string]: unknown;
38
- } | null;
39
- source_run_id?: string | null;
40
- source_run_start_time?: string | null;
41
- source_session_id?: string | null;
42
- source_trace_id?: string | null;
43
- }
44
- export declare namespace ExampleWithRunsCh {
45
- /**
46
- * Run schema for comparison view.
47
- */
48
- interface Run {
49
- id: string;
50
- name: string;
51
- /**
52
- * Enum for run types.
53
- */
54
- run_type: RunsAPI_.RunTypeEnum;
55
- session_id: string;
56
- status: string;
57
- trace_id: string;
58
- app_path?: string | null;
59
- completion_cost?: string | null;
60
- completion_tokens?: number | null;
61
- dotted_order?: string | null;
62
- end_time?: string | null;
63
- error?: string | null;
64
- events?: Array<{
65
- [key: string]: unknown;
66
- }> | null;
67
- execution_order?: number;
68
- extra?: {
69
- [key: string]: unknown;
70
- } | null;
71
- feedback_stats?: {
72
- [key: string]: {
73
- [key: string]: unknown;
74
- };
75
- } | null;
76
- first_token_time?: string | null;
77
- inputs?: {
78
- [key: string]: unknown;
79
- } | null;
80
- inputs_preview?: string | null;
81
- inputs_s3_urls?: {
82
- [key: string]: unknown;
83
- } | null;
84
- manifest_id?: string | null;
85
- manifest_s3_id?: string | null;
86
- outputs?: {
87
- [key: string]: unknown;
88
- } | null;
89
- outputs_preview?: string | null;
90
- outputs_s3_urls?: {
91
- [key: string]: unknown;
92
- } | null;
93
- parent_run_id?: string | null;
94
- prompt_cost?: string | null;
95
- prompt_tokens?: number | null;
96
- reference_example_id?: string | null;
97
- s3_urls?: {
98
- [key: string]: unknown;
99
- } | null;
100
- serialized?: {
101
- [key: string]: unknown;
102
- } | null;
103
- start_time?: string;
104
- tags?: Array<string> | null;
105
- total_cost?: string | null;
106
- total_tokens?: number | null;
107
- trace_max_start_time?: string | null;
108
- trace_min_start_time?: string | null;
109
- }
110
- }
111
- export interface QueryExampleSchemaWithRuns {
112
- session_ids: Array<string>;
113
- comparative_experiment_id?: string | null;
114
- example_ids?: Array<string> | null;
115
- filters?: {
116
- [key: string]: Array<string>;
117
- } | null;
118
- include_annotator_detail?: boolean;
119
- limit?: number;
120
- offset?: number;
121
- preview?: boolean;
122
- sort_params?: SortParamsForRunsComparisonView | null;
123
- }
124
- export interface SortParamsForRunsComparisonView {
125
- sort_by: string;
126
- sort_order?: 'ASC' | 'DESC';
127
- }
128
- export type RunCreateResponse = Array<ExampleWithRunsCh>;
129
- export interface RunCreateParams {
130
- /**
131
- * Body param
132
- */
133
- session_ids: Array<string>;
134
- /**
135
- * Query param: Response format, e.g., 'csv'
136
- */
137
- format?: 'csv' | null;
138
- /**
139
- * Body param
140
- */
141
- comparative_experiment_id?: string | null;
142
- /**
143
- * Body param
144
- */
145
- example_ids?: Array<string> | null;
146
- /**
147
- * Body param
148
- */
149
- filters?: {
150
- [key: string]: Array<string>;
151
- } | null;
152
- /**
153
- * Body param
154
- */
155
- include_annotator_detail?: boolean;
156
- /**
157
- * Body param
158
- */
159
- limit?: number | null;
160
- /**
161
- * Body param
162
- */
163
- offset?: number;
164
- /**
165
- * Body param
166
- */
167
- preview?: boolean;
168
- /**
169
- * Body param
170
- */
171
- sort_params?: SortParamsForRunsComparisonView | null;
172
- }
173
- export declare namespace Runs {
174
- export { type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type SortParamsForRunsComparisonView as SortParamsForRunsComparisonView, type RunCreateResponse as RunCreateResponse, type RunCreateParams as RunCreateParams, };
175
- }
@@ -1,18 +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 { path } from '../../internal/utils/path.js';
5
- export class Runs extends APIResource {
6
- /**
7
- * Fetch examples for a dataset, and fetch the runs for each example if they are
8
- * associated with the given session_ids.
9
- */
10
- create(datasetID, params, options) {
11
- const { format, ...body } = params;
12
- return this._client.post(path `/api/v1/datasets/${datasetID}/runs`, {
13
- query: { format },
14
- body,
15
- ...options,
16
- });
17
- }
18
- }
@@ -1,32 +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.Share = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const path_js_1 = require("../../internal/utils/path.cjs");
8
- class Share extends resource_js_1.APIResource {
9
- /**
10
- * Share a dataset.
11
- */
12
- create(datasetID, params = {}, options) {
13
- const { share_projects } = params ?? {};
14
- return this._client.put((0, path_js_1.path) `/api/v1/datasets/${datasetID}/share`, {
15
- query: { share_projects },
16
- ...options,
17
- });
18
- }
19
- /**
20
- * Get the state of sharing a dataset
21
- */
22
- retrieve(datasetID, options) {
23
- return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/share`, options);
24
- }
25
- /**
26
- * Unshare a dataset.
27
- */
28
- deleteAll(datasetID, options) {
29
- return this._client.delete((0, path_js_1.path) `/api/v1/datasets/${datasetID}/share`, options);
30
- }
31
- }
32
- exports.Share = Share;
@@ -1,28 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import { APIPromise } from '../../core/api-promise.js';
3
- import { RequestOptions } from '../../internal/request-options.js';
4
- export declare class Share extends APIResource {
5
- /**
6
- * Share a dataset.
7
- */
8
- create(datasetID: string, params?: ShareCreateParams | null | undefined, options?: RequestOptions): APIPromise<DatasetShareSchema>;
9
- /**
10
- * Get the state of sharing a dataset
11
- */
12
- retrieve(datasetID: string, options?: RequestOptions): APIPromise<DatasetShareSchema | null>;
13
- /**
14
- * Unshare a dataset.
15
- */
16
- deleteAll(datasetID: string, options?: RequestOptions): APIPromise<unknown>;
17
- }
18
- export interface DatasetShareSchema {
19
- dataset_id: string;
20
- share_token: string;
21
- }
22
- export type ShareDeleteAllResponse = unknown;
23
- export interface ShareCreateParams {
24
- share_projects?: boolean;
25
- }
26
- export declare namespace Share {
27
- export { type DatasetShareSchema as DatasetShareSchema, type ShareDeleteAllResponse as ShareDeleteAllResponse, type ShareCreateParams as ShareCreateParams, };
28
- }
@@ -1,28 +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 { path } from '../../internal/utils/path.js';
5
- export class Share extends APIResource {
6
- /**
7
- * Share a dataset.
8
- */
9
- create(datasetID, params = {}, options) {
10
- const { share_projects } = params ?? {};
11
- return this._client.put(path `/api/v1/datasets/${datasetID}/share`, {
12
- query: { share_projects },
13
- ...options,
14
- });
15
- }
16
- /**
17
- * Get the state of sharing a dataset
18
- */
19
- retrieve(datasetID, options) {
20
- return this._client.get(path `/api/v1/datasets/${datasetID}/share`, options);
21
- }
22
- /**
23
- * Unshare a dataset.
24
- */
25
- deleteAll(datasetID, options) {
26
- return this._client.delete(path `/api/v1/datasets/${datasetID}/share`, options);
27
- }
28
- }
@@ -1,22 +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.Splits = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const path_js_1 = require("../../internal/utils/path.cjs");
8
- class Splits extends resource_js_1.APIResource {
9
- /**
10
- * Update Dataset Splits
11
- */
12
- create(datasetID, body, options) {
13
- return this._client.put((0, path_js_1.path) `/api/v1/datasets/${datasetID}/splits`, { body, ...options });
14
- }
15
- /**
16
- * Get Dataset Splits
17
- */
18
- retrieve(datasetID, query = {}, options) {
19
- return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/splits`, { query, ...options });
20
- }
21
- }
22
- exports.Splits = Splits;
@@ -1,30 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import { APIPromise } from '../../core/api-promise.js';
3
- import { RequestOptions } from '../../internal/request-options.js';
4
- export declare class Splits extends APIResource {
5
- /**
6
- * Update Dataset Splits
7
- */
8
- create(datasetID: string, body: SplitCreateParams, options?: RequestOptions): APIPromise<SplitCreateResponse>;
9
- /**
10
- * Get Dataset Splits
11
- */
12
- retrieve(datasetID: string, query?: SplitRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<SplitRetrieveResponse>;
13
- }
14
- export type SplitCreateResponse = Array<string>;
15
- export type SplitRetrieveResponse = Array<string>;
16
- export interface SplitCreateParams {
17
- examples: Array<string>;
18
- split_name: string;
19
- remove?: boolean;
20
- }
21
- export interface SplitRetrieveParams {
22
- /**
23
- * Only modifications made on or before this time are included. If None, the latest
24
- * version of the dataset is used.
25
- */
26
- as_of?: (string & {}) | string;
27
- }
28
- export declare namespace Splits {
29
- export { type SplitCreateResponse as SplitCreateResponse, type SplitRetrieveResponse as SplitRetrieveResponse, type SplitCreateParams as SplitCreateParams, type SplitRetrieveParams as SplitRetrieveParams, };
30
- }
@@ -1,18 +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 { path } from '../../internal/utils/path.js';
5
- export class Splits extends APIResource {
6
- /**
7
- * Update Dataset Splits
8
- */
9
- create(datasetID, body, options) {
10
- return this._client.put(path `/api/v1/datasets/${datasetID}/splits`, { body, ...options });
11
- }
12
- /**
13
- * Get Dataset Splits
14
- */
15
- retrieve(datasetID, query = {}, options) {
16
- return this._client.get(path `/api/v1/datasets/${datasetID}/splits`, { query, ...options });
17
- }
18
- }