langsmith 0.7.10 → 0.7.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +46 -15
  2. package/dist/_openapi_client/client.cjs +0 -80
  3. package/dist/_openapi_client/client.d.ts +2 -32
  4. package/dist/_openapi_client/client.js +0 -80
  5. package/dist/_openapi_client/core/pagination.cjs +2 -2
  6. package/dist/_openapi_client/core/pagination.js +2 -2
  7. package/dist/_openapi_client/internal/utils/query.cjs +1 -1
  8. package/dist/_openapi_client/internal/utils/query.js +1 -1
  9. package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
  10. package/dist/_openapi_client/resources/index.cjs +1 -21
  11. package/dist/_openapi_client/resources/index.d.ts +1 -11
  12. package/dist/_openapi_client/resources/index.js +0 -10
  13. package/dist/_openapi_client/resources/runs/index.cjs +9 -0
  14. package/dist/_openapi_client/resources/runs/index.d.ts +2 -0
  15. package/dist/_openapi_client/resources/runs/index.js +4 -0
  16. package/dist/_openapi_client/resources/runs/runs.cjs +54 -41
  17. package/dist/_openapi_client/resources/runs/runs.d.ts +571 -313
  18. package/dist/_openapi_client/resources/runs/runs.js +54 -41
  19. package/dist/_openapi_client/resources/runs.cjs +19 -0
  20. package/dist/_openapi_client/resources/runs.d.ts +1 -0
  21. package/dist/_openapi_client/resources/runs.js +3 -0
  22. package/dist/anonymizer/index.cjs +142 -0
  23. package/dist/anonymizer/index.d.ts +45 -0
  24. package/dist/anonymizer/index.js +140 -0
  25. package/dist/client.cjs +29 -1
  26. package/dist/client.d.ts +6 -1
  27. package/dist/client.js +28 -1
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/sandbox/client.cjs +5 -8
  32. package/dist/sandbox/client.js +5 -8
  33. package/dist/sandbox/index.cjs +2 -1
  34. package/dist/sandbox/index.d.ts +2 -2
  35. package/dist/sandbox/index.js +1 -1
  36. package/dist/sandbox/mounts.cjs +157 -18
  37. package/dist/sandbox/mounts.d.ts +10 -2
  38. package/dist/sandbox/mounts.js +155 -18
  39. package/dist/sandbox/proxy_config.cjs +19 -44
  40. package/dist/sandbox/proxy_config.d.ts +2 -4
  41. package/dist/sandbox/proxy_config.js +19 -43
  42. package/dist/sandbox/types.d.ts +56 -15
  43. package/dist/utils/constants.cjs +4 -0
  44. package/dist/utils/constants.d.ts +1 -0
  45. package/dist/utils/constants.js +1 -0
  46. package/package.json +5 -5
  47. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
  48. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
  49. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
  50. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
  51. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
  52. package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
  53. package/dist/_openapi_client/resources/commits.cjs +0 -44
  54. package/dist/_openapi_client/resources/commits.d.ts +0 -204
  55. package/dist/_openapi_client/resources/commits.js +0 -40
  56. package/dist/_openapi_client/resources/evaluators.cjs +0 -15
  57. package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
  58. package/dist/_openapi_client/resources/evaluators.js +0 -11
  59. package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
  60. package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
  61. package/dist/_openapi_client/resources/examples/bulk.js +0 -20
  62. package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
  63. package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
  64. package/dist/_openapi_client/resources/examples/examples.js +0 -87
  65. package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
  66. package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
  67. package/dist/_openapi_client/resources/examples/validate.js +0 -17
  68. package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
  69. package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
  70. package/dist/_openapi_client/resources/feedback/configs.js +0 -20
  71. package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
  72. package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
  73. package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
  74. package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
  75. package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
  76. package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
  77. package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
  78. package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
  79. package/dist/_openapi_client/resources/public/datasets.js +0 -43
  80. package/dist/_openapi_client/resources/public/public.cjs +0 -62
  81. package/dist/_openapi_client/resources/public/public.d.ts +0 -32
  82. package/dist/_openapi_client/resources/public/public.js +0 -25
  83. package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
  84. package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
  85. package/dist/_openapi_client/resources/repos/directories.js +0 -36
  86. package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
  87. package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
  88. package/dist/_openapi_client/resources/repos/repos.js +0 -56
  89. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
  90. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
  91. package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
  92. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
  93. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
  94. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
  95. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
  96. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
  97. package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
  98. package/dist/_openapi_client/resources/settings.cjs +0 -15
  99. package/dist/_openapi_client/resources/settings.d.ts +0 -18
  100. package/dist/_openapi_client/resources/settings.js +0 -11
  101. package/dist/_openapi_client/resources/workspaces.cjs +0 -35
  102. package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
  103. package/dist/_openapi_client/resources/workspaces.js +0 -31
@@ -1,78 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as ExamplesAPI from './examples.js';
3
- import { APIPromise } from '../../core/api-promise.js';
4
- import { RequestOptions } from '../../internal/request-options.js';
5
- export declare class Bulk extends APIResource {
6
- /**
7
- * Create bulk examples.
8
- */
9
- create(params: BulkCreateParams, options?: RequestOptions): APIPromise<BulkCreateResponse>;
10
- /**
11
- * Legacy update examples in bulk. For update involving attachments, use PATCH
12
- * /v1/platform/datasets/{dataset_id}/examples instead.
13
- */
14
- patchAll(params: BulkPatchAllParams, options?: RequestOptions): APIPromise<unknown>;
15
- }
16
- export type BulkCreateResponse = Array<ExamplesAPI.Example>;
17
- export type BulkPatchAllResponse = unknown;
18
- export interface BulkCreateParams {
19
- /**
20
- * Schema for a batch of examples to be created.
21
- */
22
- body: Array<BulkCreateParams.Body>;
23
- }
24
- export declare namespace BulkCreateParams {
25
- /**
26
- * Example with optional created_at to prevent duplicate versions in bulk
27
- * operations.
28
- */
29
- interface Body {
30
- dataset_id: string;
31
- id?: string | null;
32
- created_at?: string | null;
33
- inputs?: {
34
- [key: string]: unknown;
35
- } | null;
36
- metadata?: {
37
- [key: string]: unknown;
38
- } | null;
39
- outputs?: {
40
- [key: string]: unknown;
41
- } | null;
42
- source_run_id?: string | null;
43
- split?: Array<string> | string | null;
44
- /**
45
- * Use Legacy Message Format for LLM runs
46
- */
47
- use_legacy_message_format?: boolean;
48
- use_source_run_attachments?: Array<string>;
49
- use_source_run_io?: boolean;
50
- }
51
- }
52
- export interface BulkPatchAllParams {
53
- body: Array<BulkPatchAllParams.Body>;
54
- }
55
- export declare namespace BulkPatchAllParams {
56
- /**
57
- * Bulk update class for Example (includes example id).
58
- */
59
- interface Body {
60
- id: string;
61
- attachments_operations?: ExamplesAPI.AttachmentsOperations | null;
62
- dataset_id?: string | null;
63
- inputs?: {
64
- [key: string]: unknown;
65
- } | null;
66
- metadata?: {
67
- [key: string]: unknown;
68
- } | null;
69
- outputs?: {
70
- [key: string]: unknown;
71
- } | null;
72
- overwrite?: boolean;
73
- split?: Array<string> | string | null;
74
- }
75
- }
76
- export declare namespace Bulk {
77
- export { type BulkCreateResponse as BulkCreateResponse, type BulkPatchAllResponse as BulkPatchAllResponse, type BulkCreateParams as BulkCreateParams, type BulkPatchAllParams as BulkPatchAllParams, };
78
- }
@@ -1,20 +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
- export class Bulk extends APIResource {
5
- /**
6
- * Create bulk examples.
7
- */
8
- create(params, options) {
9
- const { body } = params;
10
- return this._client.post('/api/v1/examples/bulk', { body: body, ...options });
11
- }
12
- /**
13
- * Legacy update examples in bulk. For update involving attachments, use PATCH
14
- * /v1/platform/datasets/{dataset_id}/examples instead.
15
- */
16
- patchAll(params, options) {
17
- const { body } = params;
18
- return this._client.patch('/api/v1/examples/bulk', { body: body, ...options });
19
- }
20
- }
@@ -1,124 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- var desc = Object.getOwnPropertyDescriptor(m, k);
7
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
- desc = { enumerable: true, get: function() { return m[k]; } };
9
- }
10
- Object.defineProperty(o, k2, desc);
11
- }) : (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- o[k2] = m[k];
14
- }));
15
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
- Object.defineProperty(o, "default", { enumerable: true, value: v });
17
- }) : function(o, v) {
18
- o["default"] = v;
19
- });
20
- var __importStar = (this && this.__importStar) || (function () {
21
- var ownKeys = function(o) {
22
- ownKeys = Object.getOwnPropertyNames || function (o) {
23
- var ar = [];
24
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
- return ar;
26
- };
27
- return ownKeys(o);
28
- };
29
- return function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- })();
37
- Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.Examples = void 0;
39
- const resource_js_1 = require("../../core/resource.cjs");
40
- const BulkAPI = __importStar(require("./bulk.cjs"));
41
- const bulk_js_1 = require("./bulk.cjs");
42
- const ValidateAPI = __importStar(require("./validate.cjs"));
43
- const validate_js_1 = require("./validate.cjs");
44
- const pagination_js_1 = require("../../core/pagination.cjs");
45
- const uploads_js_1 = require("../../internal/uploads.cjs");
46
- const path_js_1 = require("../../internal/utils/path.cjs");
47
- class Examples extends resource_js_1.APIResource {
48
- constructor() {
49
- super(...arguments);
50
- Object.defineProperty(this, "bulk", {
51
- enumerable: true,
52
- configurable: true,
53
- writable: true,
54
- value: new BulkAPI.Bulk(this._client)
55
- });
56
- Object.defineProperty(this, "validate", {
57
- enumerable: true,
58
- configurable: true,
59
- writable: true,
60
- value: new ValidateAPI.Validate(this._client)
61
- });
62
- }
63
- /**
64
- * Create a new example.
65
- */
66
- create(body, options) {
67
- return this._client.post('/api/v1/examples', { body, ...options });
68
- }
69
- /**
70
- * Get a specific example.
71
- */
72
- retrieve(exampleID, query = {}, options) {
73
- return this._client.get((0, path_js_1.path) `/api/v1/examples/${exampleID}`, { query, ...options });
74
- }
75
- /**
76
- * Update a specific example.
77
- */
78
- update(exampleID, body, options) {
79
- return this._client.patch((0, path_js_1.path) `/api/v1/examples/${exampleID}`, { body, ...options });
80
- }
81
- /**
82
- * Get all examples by query params
83
- */
84
- list(query = {}, options) {
85
- return this._client.getAPIList('/api/v1/examples', (pagination_js_1.OffsetPaginationTopLevelArray), {
86
- query,
87
- ...options,
88
- });
89
- }
90
- /**
91
- * Soft delete an example. Only deletes the example in the 'latest' version of the
92
- * dataset.
93
- */
94
- delete(exampleID, options) {
95
- return this._client.delete((0, path_js_1.path) `/api/v1/examples/${exampleID}`, options);
96
- }
97
- /**
98
- * Soft delete examples. Only deletes the examples in the 'latest' version of the
99
- * dataset.
100
- */
101
- deleteAll(params, options) {
102
- const { example_ids } = params;
103
- return this._client.delete('/api/v1/examples', { query: { example_ids }, ...options });
104
- }
105
- /**
106
- * Count all examples by query params
107
- */
108
- retrieveCount(query = {}, options) {
109
- return this._client.get('/api/v1/examples/count', { query, ...options });
110
- }
111
- /**
112
- * Upload examples from a CSV file.
113
- *
114
- * Note: For non-csv upload, please use the POST
115
- * /v1/platform/datasets/{dataset_id}/examples endpoint which provides more
116
- * efficient upload.
117
- */
118
- uploadFromCsv(datasetID, body, options) {
119
- return this._client.post((0, path_js_1.path) `/api/v1/examples/upload/${datasetID}`, (0, uploads_js_1.multipartFormRequestOptions)({ body, ...options }, this._client));
120
- }
121
- }
122
- exports.Examples = Examples;
123
- Examples.Bulk = bulk_js_1.Bulk;
124
- Examples.Validate = validate_js_1.Validate;
@@ -1,182 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as BulkAPI from './bulk.js';
3
- import { Bulk, BulkCreateParams, BulkCreateResponse, BulkPatchAllParams, BulkPatchAllResponse } from './bulk.js';
4
- import * as ValidateAPI from './validate.js';
5
- import { ExampleValidationResult, Validate, ValidateBulkResponse } from './validate.js';
6
- import { APIPromise } from '../../core/api-promise.js';
7
- import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
8
- import { type Uploadable } from '../../core/uploads.js';
9
- import { RequestOptions } from '../../internal/request-options.js';
10
- export declare class Examples extends APIResource {
11
- bulk: BulkAPI.Bulk;
12
- validate: ValidateAPI.Validate;
13
- /**
14
- * Create a new example.
15
- */
16
- create(body: ExampleCreateParams, options?: RequestOptions): APIPromise<Example>;
17
- /**
18
- * Get a specific example.
19
- */
20
- retrieve(exampleID: string, query?: ExampleRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Example>;
21
- /**
22
- * Update a specific example.
23
- */
24
- update(exampleID: string, body: ExampleUpdateParams, options?: RequestOptions): APIPromise<unknown>;
25
- /**
26
- * Get all examples by query params
27
- */
28
- list(query?: ExampleListParams | null | undefined, options?: RequestOptions): PagePromise<ExamplesOffsetPaginationTopLevelArray, Example>;
29
- /**
30
- * Soft delete an example. Only deletes the example in the 'latest' version of the
31
- * dataset.
32
- */
33
- delete(exampleID: string, options?: RequestOptions): APIPromise<unknown>;
34
- /**
35
- * Soft delete examples. Only deletes the examples in the 'latest' version of the
36
- * dataset.
37
- */
38
- deleteAll(params: ExampleDeleteAllParams, options?: RequestOptions): APIPromise<unknown>;
39
- /**
40
- * Count all examples by query params
41
- */
42
- retrieveCount(query?: ExampleRetrieveCountParams | null | undefined, options?: RequestOptions): APIPromise<ExampleRetrieveCountResponse>;
43
- /**
44
- * Upload examples from a CSV file.
45
- *
46
- * Note: For non-csv upload, please use the POST
47
- * /v1/platform/datasets/{dataset_id}/examples endpoint which provides more
48
- * efficient upload.
49
- */
50
- uploadFromCsv(datasetID: string, body: ExampleUploadFromCsvParams, options?: RequestOptions): APIPromise<ExampleUploadFromCsvResponse>;
51
- }
52
- export type ExamplesOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<Example>;
53
- export interface AttachmentsOperations {
54
- /**
55
- * Mapping of old attachment names to new names
56
- */
57
- rename?: {
58
- [key: string]: string;
59
- };
60
- /**
61
- * List of attachment names to keep
62
- */
63
- retain?: Array<string>;
64
- }
65
- /**
66
- * Example schema.
67
- */
68
- export interface Example {
69
- id: string;
70
- dataset_id: string;
71
- inputs: {
72
- [key: string]: unknown;
73
- };
74
- name: string;
75
- attachment_urls?: {
76
- [key: string]: unknown;
77
- } | null;
78
- created_at?: string;
79
- metadata?: {
80
- [key: string]: unknown;
81
- } | null;
82
- modified_at?: string | null;
83
- outputs?: {
84
- [key: string]: unknown;
85
- } | null;
86
- source_run_id?: string | null;
87
- }
88
- export type ExampleSelect = 'id' | 'created_at' | 'modified_at' | 'name' | 'dataset_id' | 'source_run_id' | 'metadata' | 'inputs' | 'outputs' | 'attachment_urls';
89
- export type ExampleUpdateResponse = unknown;
90
- export type ExampleDeleteResponse = unknown;
91
- export type ExampleDeleteAllResponse = unknown;
92
- export type ExampleRetrieveCountResponse = number;
93
- export type ExampleUploadFromCsvResponse = Array<Example>;
94
- export interface ExampleCreateParams {
95
- dataset_id: string;
96
- id?: string | null;
97
- created_at?: string;
98
- inputs?: {
99
- [key: string]: unknown;
100
- } | null;
101
- metadata?: {
102
- [key: string]: unknown;
103
- } | null;
104
- outputs?: {
105
- [key: string]: unknown;
106
- } | null;
107
- source_run_id?: string | null;
108
- split?: Array<string> | string | null;
109
- /**
110
- * Use Legacy Message Format for LLM runs
111
- */
112
- use_legacy_message_format?: boolean;
113
- use_source_run_attachments?: Array<string>;
114
- use_source_run_io?: boolean;
115
- }
116
- export interface ExampleRetrieveParams {
117
- /**
118
- * Only modifications made on or before this time are included. If None, the latest
119
- * version of the dataset is used.
120
- */
121
- as_of?: (string & {}) | string;
122
- dataset?: string | null;
123
- }
124
- export interface ExampleUpdateParams {
125
- attachments_operations?: AttachmentsOperations | null;
126
- dataset_id?: string | null;
127
- inputs?: {
128
- [key: string]: unknown;
129
- } | null;
130
- metadata?: {
131
- [key: string]: unknown;
132
- } | null;
133
- outputs?: {
134
- [key: string]: unknown;
135
- } | null;
136
- overwrite?: boolean;
137
- split?: Array<string> | string | null;
138
- }
139
- export interface ExampleListParams extends OffsetPaginationTopLevelArrayParams {
140
- id?: Array<string> | null;
141
- /**
142
- * Only modifications made on or before this time are included. If None, the latest
143
- * version of the dataset is used.
144
- */
145
- as_of?: (string & {}) | string;
146
- dataset?: string | null;
147
- descending?: boolean | null;
148
- filter?: string | null;
149
- full_text_contains?: Array<string> | null;
150
- metadata?: string | null;
151
- order?: 'recent' | 'random' | 'recently_created' | 'id';
152
- random_seed?: number | null;
153
- select?: Array<ExampleSelect>;
154
- splits?: Array<string> | null;
155
- }
156
- export interface ExampleDeleteAllParams {
157
- example_ids: Array<string>;
158
- }
159
- export interface ExampleRetrieveCountParams {
160
- id?: Array<string> | null;
161
- /**
162
- * Only modifications made on or before this time are included. If None, the latest
163
- * version of the dataset is used.
164
- */
165
- as_of?: (string & {}) | string;
166
- dataset?: string | null;
167
- filter?: string | null;
168
- full_text_contains?: Array<string> | null;
169
- metadata?: string | null;
170
- splits?: Array<string> | null;
171
- }
172
- export interface ExampleUploadFromCsvParams {
173
- file: Uploadable;
174
- input_keys: Array<string>;
175
- metadata_keys?: Array<string>;
176
- output_keys?: Array<string>;
177
- }
178
- export declare namespace Examples {
179
- export { type AttachmentsOperations as AttachmentsOperations, type Example as Example, type ExampleSelect as ExampleSelect, type ExampleUpdateResponse as ExampleUpdateResponse, type ExampleDeleteResponse as ExampleDeleteResponse, type ExampleDeleteAllResponse as ExampleDeleteAllResponse, type ExampleRetrieveCountResponse as ExampleRetrieveCountResponse, type ExampleUploadFromCsvResponse as ExampleUploadFromCsvResponse, type ExamplesOffsetPaginationTopLevelArray as ExamplesOffsetPaginationTopLevelArray, type ExampleCreateParams as ExampleCreateParams, type ExampleRetrieveParams as ExampleRetrieveParams, type ExampleUpdateParams as ExampleUpdateParams, type ExampleListParams as ExampleListParams, type ExampleDeleteAllParams as ExampleDeleteAllParams, type ExampleRetrieveCountParams as ExampleRetrieveCountParams, type ExampleUploadFromCsvParams as ExampleUploadFromCsvParams, };
180
- export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkPatchAllResponse as BulkPatchAllResponse, type BulkCreateParams as BulkCreateParams, type BulkPatchAllParams as BulkPatchAllParams, };
181
- export { Validate as Validate, type ExampleValidationResult as ExampleValidationResult, type ValidateBulkResponse as ValidateBulkResponse, };
182
- }
@@ -1,87 +0,0 @@
1
- // @ts-nocheck
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- import { APIResource } from '../../core/resource.js';
4
- import * as BulkAPI from './bulk.js';
5
- import { Bulk } from './bulk.js';
6
- import * as ValidateAPI from './validate.js';
7
- import { Validate } from './validate.js';
8
- import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
9
- import { multipartFormRequestOptions } from '../../internal/uploads.js';
10
- import { path } from '../../internal/utils/path.js';
11
- export class Examples extends APIResource {
12
- constructor() {
13
- super(...arguments);
14
- Object.defineProperty(this, "bulk", {
15
- enumerable: true,
16
- configurable: true,
17
- writable: true,
18
- value: new BulkAPI.Bulk(this._client)
19
- });
20
- Object.defineProperty(this, "validate", {
21
- enumerable: true,
22
- configurable: true,
23
- writable: true,
24
- value: new ValidateAPI.Validate(this._client)
25
- });
26
- }
27
- /**
28
- * Create a new example.
29
- */
30
- create(body, options) {
31
- return this._client.post('/api/v1/examples', { body, ...options });
32
- }
33
- /**
34
- * Get a specific example.
35
- */
36
- retrieve(exampleID, query = {}, options) {
37
- return this._client.get(path `/api/v1/examples/${exampleID}`, { query, ...options });
38
- }
39
- /**
40
- * Update a specific example.
41
- */
42
- update(exampleID, body, options) {
43
- return this._client.patch(path `/api/v1/examples/${exampleID}`, { body, ...options });
44
- }
45
- /**
46
- * Get all examples by query params
47
- */
48
- list(query = {}, options) {
49
- return this._client.getAPIList('/api/v1/examples', (OffsetPaginationTopLevelArray), {
50
- query,
51
- ...options,
52
- });
53
- }
54
- /**
55
- * Soft delete an example. Only deletes the example in the 'latest' version of the
56
- * dataset.
57
- */
58
- delete(exampleID, options) {
59
- return this._client.delete(path `/api/v1/examples/${exampleID}`, options);
60
- }
61
- /**
62
- * Soft delete examples. Only deletes the examples in the 'latest' version of the
63
- * dataset.
64
- */
65
- deleteAll(params, options) {
66
- const { example_ids } = params;
67
- return this._client.delete('/api/v1/examples', { query: { example_ids }, ...options });
68
- }
69
- /**
70
- * Count all examples by query params
71
- */
72
- retrieveCount(query = {}, options) {
73
- return this._client.get('/api/v1/examples/count', { query, ...options });
74
- }
75
- /**
76
- * Upload examples from a CSV file.
77
- *
78
- * Note: For non-csv upload, please use the POST
79
- * /v1/platform/datasets/{dataset_id}/examples endpoint which provides more
80
- * efficient upload.
81
- */
82
- uploadFromCsv(datasetID, body, options) {
83
- return this._client.post(path `/api/v1/examples/upload/${datasetID}`, multipartFormRequestOptions({ body, ...options }, this._client));
84
- }
85
- }
86
- Examples.Bulk = Bulk;
87
- Examples.Validate = Validate;
@@ -1,21 +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.Validate = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- class Validate extends resource_js_1.APIResource {
8
- /**
9
- * Validate an example.
10
- */
11
- create(options) {
12
- return this._client.post('/api/v1/examples/validate', options);
13
- }
14
- /**
15
- * Validate examples in bulk.
16
- */
17
- bulk(options) {
18
- return this._client.post('/api/v1/examples/validate/bulk', options);
19
- }
20
- }
21
- exports.Validate = Validate;
@@ -1,38 +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 Validate extends APIResource {
5
- /**
6
- * Validate an example.
7
- */
8
- create(options?: RequestOptions): APIPromise<ExampleValidationResult>;
9
- /**
10
- * Validate examples in bulk.
11
- */
12
- bulk(options?: RequestOptions): APIPromise<ValidateBulkResponse>;
13
- }
14
- /**
15
- * Validation result for Example, combining fields from Create/Base/Update schemas.
16
- */
17
- export interface ExampleValidationResult {
18
- id?: string | null;
19
- created_at?: string | null;
20
- dataset_id?: string | null;
21
- inputs?: {
22
- [key: string]: unknown;
23
- } | null;
24
- metadata?: {
25
- [key: string]: unknown;
26
- } | null;
27
- outputs?: {
28
- [key: string]: unknown;
29
- } | null;
30
- overwrite?: boolean;
31
- source_run_id?: string | null;
32
- split?: Array<string> | string | null;
33
- use_source_run_io?: boolean;
34
- }
35
- export type ValidateBulkResponse = Array<ExampleValidationResult>;
36
- export declare namespace Validate {
37
- export { type ExampleValidationResult as ExampleValidationResult, type ValidateBulkResponse as ValidateBulkResponse, };
38
- }
@@ -1,17 +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
- export class Validate extends APIResource {
5
- /**
6
- * Validate an example.
7
- */
8
- create(options) {
9
- return this._client.post('/api/v1/examples/validate', options);
10
- }
11
- /**
12
- * Validate examples in bulk.
13
- */
14
- bulk(options) {
15
- return this._client.post('/api/v1/examples/validate/bulk', options);
16
- }
17
- }
@@ -1,24 +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.Configs = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const headers_js_1 = require("../../internal/headers.cjs");
8
- class Configs extends resource_js_1.APIResource {
9
- /**
10
- * Soft delete a feedback config by marking it as deleted.
11
- *
12
- * The config can be recreated later with the same key (simple reuse pattern).
13
- * Existing feedback records with this key will remain unchanged.
14
- */
15
- delete(params, options) {
16
- const { feedback_key } = params;
17
- return this._client.delete('/api/v1/feedback-configs', {
18
- query: { feedback_key },
19
- ...options,
20
- headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
21
- });
22
- }
23
- }
24
- exports.Configs = Configs;
@@ -1,18 +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 Configs extends APIResource {
5
- /**
6
- * Soft delete a feedback config by marking it as deleted.
7
- *
8
- * The config can be recreated later with the same key (simple reuse pattern).
9
- * Existing feedback records with this key will remain unchanged.
10
- */
11
- delete(params: ConfigDeleteParams, options?: RequestOptions): APIPromise<void>;
12
- }
13
- export interface ConfigDeleteParams {
14
- feedback_key: string;
15
- }
16
- export declare namespace Configs {
17
- export { type ConfigDeleteParams as ConfigDeleteParams };
18
- }
@@ -1,20 +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 { buildHeaders } from '../../internal/headers.js';
5
- export class Configs extends APIResource {
6
- /**
7
- * Soft delete a feedback config by marking it as deleted.
8
- *
9
- * The config can be recreated later with the same key (simple reuse pattern).
10
- * Existing feedback records with this key will remain unchanged.
11
- */
12
- delete(params, options) {
13
- const { feedback_key } = params;
14
- return this._client.delete('/api/v1/feedback-configs', {
15
- query: { feedback_key },
16
- ...options,
17
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
18
- });
19
- }
20
- }