langsmith 0.7.7 → 0.7.9
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/README.md +161 -15
- package/dist/_openapi_client/client.cjs +814 -0
- package/dist/_openapi_client/client.d.ts +247 -0
- package/dist/_openapi_client/client.js +777 -0
- package/dist/_openapi_client/core/api-promise.cjs +100 -0
- package/dist/_openapi_client/core/api-promise.d.ts +45 -0
- package/dist/_openapi_client/core/api-promise.js +96 -0
- package/dist/_openapi_client/core/error.cjs +134 -0
- package/dist/_openapi_client/core/error.d.ts +45 -0
- package/dist/_openapi_client/core/error.js +118 -0
- package/dist/_openapi_client/core/pagination.cjs +374 -0
- package/dist/_openapi_client/core/pagination.d.ts +157 -0
- package/dist/_openapi_client/core/pagination.js +361 -0
- package/dist/_openapi_client/core/resource.cjs +17 -0
- package/dist/_openapi_client/core/resource.d.ts +5 -0
- package/dist/_openapi_client/core/resource.js +13 -0
- package/dist/_openapi_client/core/uploads.cjs +5 -0
- package/dist/_openapi_client/core/uploads.d.ts +2 -0
- package/dist/_openapi_client/core/uploads.js +1 -0
- package/dist/_openapi_client/index.cjs +29 -0
- package/dist/_openapi_client/index.d.ts +6 -0
- package/dist/_openapi_client/index.js +8 -0
- package/dist/_openapi_client/internal/builtin-types.cjs +4 -0
- package/dist/_openapi_client/internal/builtin-types.d.ts +72 -0
- package/dist/_openapi_client/internal/builtin-types.js +3 -0
- package/dist/_openapi_client/internal/detect-platform.cjs +162 -0
- package/dist/_openapi_client/internal/detect-platform.d.ts +14 -0
- package/dist/_openapi_client/internal/detect-platform.js +157 -0
- package/dist/_openapi_client/internal/errors.cjs +41 -0
- package/dist/_openapi_client/internal/errors.d.ts +2 -0
- package/dist/_openapi_client/internal/errors.js +36 -0
- package/dist/_openapi_client/internal/headers.cjs +79 -0
- package/dist/_openapi_client/internal/headers.d.ts +5 -0
- package/dist/_openapi_client/internal/headers.js +74 -0
- package/dist/_openapi_client/internal/parse.cjs +40 -0
- package/dist/_openapi_client/internal/parse.d.ts +11 -0
- package/dist/_openapi_client/internal/parse.js +37 -0
- package/dist/_openapi_client/internal/qs/formats.cjs +12 -0
- package/dist/_openapi_client/internal/qs/formats.d.ts +6 -0
- package/dist/_openapi_client/internal/qs/formats.js +8 -0
- package/dist/_openapi_client/internal/qs/stringify.cjs +277 -0
- package/dist/_openapi_client/internal/qs/stringify.d.ts +2 -0
- package/dist/_openapi_client/internal/qs/stringify.js +274 -0
- package/dist/_openapi_client/internal/qs/types.cjs +2 -0
- package/dist/_openapi_client/internal/qs/types.d.ts +56 -0
- package/dist/_openapi_client/internal/qs/types.js +1 -0
- package/dist/_openapi_client/internal/qs/utils.cjs +230 -0
- package/dist/_openapi_client/internal/qs/utils.d.ts +14 -0
- package/dist/_openapi_client/internal/qs/utils.js +217 -0
- package/dist/_openapi_client/internal/request-options.cjs +14 -0
- package/dist/_openapi_client/internal/request-options.d.ts +74 -0
- package/dist/_openapi_client/internal/request-options.js +10 -0
- package/dist/_openapi_client/internal/shim-types.cjs +4 -0
- package/dist/_openapi_client/internal/shim-types.d.ts +16 -0
- package/dist/_openapi_client/internal/shim-types.js +3 -0
- package/dist/_openapi_client/internal/shims.cjs +92 -0
- package/dist/_openapi_client/internal/shims.d.ts +25 -0
- package/dist/_openapi_client/internal/shims.js +85 -0
- package/dist/_openapi_client/internal/to-file.cjs +91 -0
- package/dist/_openapi_client/internal/to-file.d.ts +44 -0
- package/dist/_openapi_client/internal/to-file.js +88 -0
- package/dist/_openapi_client/internal/types.cjs +4 -0
- package/dist/_openapi_client/internal/types.d.ts +62 -0
- package/dist/_openapi_client/internal/types.js +3 -0
- package/dist/_openapi_client/internal/uploads.cjs +140 -0
- package/dist/_openapi_client/internal/uploads.d.ts +41 -0
- package/dist/_openapi_client/internal/uploads.js +130 -0
- package/dist/_openapi_client/internal/utils/env.cjs +22 -0
- package/dist/_openapi_client/internal/utils/env.d.ts +8 -0
- package/dist/_openapi_client/internal/utils/env.js +18 -0
- package/dist/_openapi_client/internal/utils/log.cjs +88 -0
- package/dist/_openapi_client/internal/utils/log.d.ts +36 -0
- package/dist/_openapi_client/internal/utils/log.js +82 -0
- package/dist/_openapi_client/internal/utils/path.cjs +79 -0
- package/dist/_openapi_client/internal/utils/path.d.ts +14 -0
- package/dist/_openapi_client/internal/utils/path.js +74 -0
- package/dist/_openapi_client/internal/utils/query.cjs +42 -0
- package/dist/_openapi_client/internal/utils/query.d.ts +1 -0
- package/dist/_openapi_client/internal/utils/query.js +6 -0
- package/dist/_openapi_client/internal/utils/sleep.cjs +7 -0
- package/dist/_openapi_client/internal/utils/sleep.d.ts +1 -0
- package/dist/_openapi_client/internal/utils/sleep.js +3 -0
- package/dist/_openapi_client/internal/utils/uuid.cjs +19 -0
- package/dist/_openapi_client/internal/utils/uuid.d.ts +4 -0
- package/dist/_openapi_client/internal/utils/uuid.js +15 -0
- package/dist/_openapi_client/internal/utils/values.cjs +112 -0
- package/dist/_openapi_client/internal/utils/values.d.ts +17 -0
- package/dist/_openapi_client/internal/utils/values.js +94 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +138 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +367 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +101 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.cjs +46 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +128 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.js +42 -0
- package/dist/_openapi_client/resources/commits.cjs +44 -0
- package/dist/_openapi_client/resources/commits.d.ts +204 -0
- package/dist/_openapi_client/resources/commits.js +40 -0
- package/dist/_openapi_client/resources/datasets/comparative.cjs +22 -0
- package/dist/_openapi_client/resources/datasets/comparative.d.ts +55 -0
- package/dist/_openapi_client/resources/datasets/comparative.js +18 -0
- package/dist/_openapi_client/resources/datasets/datasets.cjs +193 -0
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +374 -0
- package/dist/_openapi_client/resources/datasets/datasets.js +156 -0
- package/dist/_openapi_client/resources/datasets/experiments.cjs +16 -0
- package/dist/_openapi_client/resources/datasets/experiments.d.ts +23 -0
- package/dist/_openapi_client/resources/datasets/experiments.js +12 -0
- package/dist/_openapi_client/resources/datasets/group.cjs +17 -0
- package/dist/_openapi_client/resources/datasets/group.d.ts +160 -0
- package/dist/_openapi_client/resources/datasets/group.js +13 -0
- package/dist/_openapi_client/resources/datasets/runs.cjs +29 -0
- package/dist/_openapi_client/resources/datasets/runs.d.ts +216 -0
- package/dist/_openapi_client/resources/datasets/runs.js +25 -0
- package/dist/_openapi_client/resources/datasets/share.cjs +32 -0
- package/dist/_openapi_client/resources/datasets/share.d.ts +28 -0
- package/dist/_openapi_client/resources/datasets/share.js +28 -0
- package/dist/_openapi_client/resources/datasets/splits.cjs +22 -0
- package/dist/_openapi_client/resources/datasets/splits.d.ts +30 -0
- package/dist/_openapi_client/resources/datasets/splits.js +18 -0
- package/dist/_openapi_client/resources/datasets/versions.cjs +23 -0
- package/dist/_openapi_client/resources/datasets/versions.d.ts +36 -0
- package/dist/_openapi_client/resources/datasets/versions.js +19 -0
- package/dist/_openapi_client/resources/evaluators.cjs +15 -0
- package/dist/_openapi_client/resources/evaluators.d.ts +125 -0
- package/dist/_openapi_client/resources/evaluators.js +11 -0
- package/dist/_openapi_client/resources/examples/bulk.cjs +24 -0
- package/dist/_openapi_client/resources/examples/bulk.d.ts +78 -0
- package/dist/_openapi_client/resources/examples/bulk.js +20 -0
- package/dist/_openapi_client/resources/examples/examples.cjs +124 -0
- package/dist/_openapi_client/resources/examples/examples.d.ts +182 -0
- package/dist/_openapi_client/resources/examples/examples.js +87 -0
- package/dist/_openapi_client/resources/examples/validate.cjs +21 -0
- package/dist/_openapi_client/resources/examples/validate.d.ts +38 -0
- package/dist/_openapi_client/resources/examples/validate.js +17 -0
- package/dist/_openapi_client/resources/feedback/configs.cjs +24 -0
- package/dist/_openapi_client/resources/feedback/configs.d.ts +18 -0
- package/dist/_openapi_client/resources/feedback/configs.js +20 -0
- package/dist/_openapi_client/resources/feedback/feedback.cjs +98 -0
- package/dist/_openapi_client/resources/feedback/feedback.d.ts +275 -0
- package/dist/_openapi_client/resources/feedback/feedback.js +61 -0
- package/dist/_openapi_client/resources/feedback/tokens.cjs +35 -0
- package/dist/_openapi_client/resources/feedback/tokens.d.ts +130 -0
- package/dist/_openapi_client/resources/feedback/tokens.js +31 -0
- package/dist/_openapi_client/resources/index.cjs +35 -0
- package/dist/_openapi_client/resources/index.d.ts +15 -0
- package/dist/_openapi_client/resources/index.js +17 -0
- package/dist/_openapi_client/resources/info.cjs +15 -0
- package/dist/_openapi_client/resources/info.d.ts +51 -0
- package/dist/_openapi_client/resources/info.js +11 -0
- package/dist/_openapi_client/resources/online-evaluators.cjs +70 -0
- package/dist/_openapi_client/resources/online-evaluators.d.ts +284 -0
- package/dist/_openapi_client/resources/online-evaluators.js +66 -0
- package/dist/_openapi_client/resources/public/datasets.cjs +47 -0
- package/dist/_openapi_client/resources/public/datasets.d.ts +152 -0
- package/dist/_openapi_client/resources/public/datasets.js +43 -0
- package/dist/_openapi_client/resources/public/public.cjs +62 -0
- package/dist/_openapi_client/resources/public/public.d.ts +32 -0
- package/dist/_openapi_client/resources/public/public.js +25 -0
- package/dist/_openapi_client/resources/repos/directories.cjs +40 -0
- package/dist/_openapi_client/resources/repos/directories.d.ts +72 -0
- package/dist/_openapi_client/resources/repos/directories.js +36 -0
- package/dist/_openapi_client/resources/repos/repos.cjs +93 -0
- package/dist/_openapi_client/resources/repos/repos.d.ts +188 -0
- package/dist/_openapi_client/resources/repos/repos.js +56 -0
- package/dist/_openapi_client/resources/runs/rules.cjs +9 -0
- package/dist/_openapi_client/resources/runs/rules.d.ts +3 -0
- package/dist/_openapi_client/resources/runs/rules.js +5 -0
- package/dist/_openapi_client/resources/runs/runs.cjs +102 -0
- package/dist/_openapi_client/resources/runs/runs.d.ts +542 -0
- package/dist/_openapi_client/resources/runs/runs.js +65 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +1121 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +63 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +13 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +26 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +130 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
- package/dist/_openapi_client/resources/sessions/insights.cjs +54 -0
- package/dist/_openapi_client/resources/sessions/insights.d.ts +246 -0
- package/dist/_openapi_client/resources/sessions/insights.js +50 -0
- package/dist/_openapi_client/resources/sessions/sessions.cjs +109 -0
- package/dist/_openapi_client/resources/sessions/sessions.d.ts +674 -0
- package/dist/_openapi_client/resources/sessions/sessions.js +72 -0
- package/dist/_openapi_client/resources/settings.cjs +15 -0
- package/dist/_openapi_client/resources/settings.d.ts +18 -0
- package/dist/_openapi_client/resources/settings.js +11 -0
- package/dist/_openapi_client/resources/workspaces.cjs +35 -0
- package/dist/_openapi_client/resources/workspaces.d.ts +84 -0
- package/dist/_openapi_client/resources/workspaces.js +31 -0
- package/dist/_openapi_client/version.cjs +5 -0
- package/dist/_openapi_client/version.d.ts +1 -0
- package/dist/_openapi_client/version.js +2 -0
- package/dist/client.cjs +48 -19
- package/dist/client.d.ts +5 -0
- package/dist/client.js +29 -0
- package/dist/env.cjs +3 -3
- package/dist/env.d.ts +1 -1
- package/dist/env.js +1 -1
- package/dist/evaluation/_runner.cjs +31 -3
- package/dist/evaluation/_runner.d.ts +2 -0
- package/dist/evaluation/_runner.js +30 -4
- package/dist/experimental/otel/exporter.cjs +1 -1
- package/dist/experimental/otel/exporter.js +2 -2
- package/dist/experimental/vercel/telemetry.cjs +1 -1
- package/dist/experimental/vercel/telemetry.js +2 -2
- package/dist/index.cjs +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/run_trees.cjs +1 -1
- package/dist/run_trees.js +2 -2
- package/dist/sandbox/client.cjs +11 -3
- package/dist/sandbox/client.js +11 -3
- package/dist/sandbox/errors.cjs +2 -1
- package/dist/sandbox/errors.d.ts +2 -1
- package/dist/sandbox/errors.js +2 -1
- package/dist/sandbox/index.cjs +8 -2
- package/dist/sandbox/index.d.ts +3 -2
- package/dist/sandbox/index.js +2 -1
- package/dist/sandbox/mounts.cjs +114 -0
- package/dist/sandbox/mounts.d.ts +24 -0
- package/dist/sandbox/mounts.js +109 -0
- package/dist/sandbox/proxy_config.cjs +90 -5
- package/dist/sandbox/proxy_config.d.ts +19 -4
- package/dist/sandbox/proxy_config.js +86 -4
- package/dist/sandbox/types.d.ts +92 -3
- package/dist/traceable.cjs +1 -1
- package/dist/traceable.js +2 -2
- package/dist/utils/guard.cjs +13 -0
- package/dist/utils/guard.d.ts +6 -0
- package/dist/utils/guard.js +10 -0
- package/dist/utils/jestlike/globals.cjs +1 -1
- package/dist/utils/jestlike/globals.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
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;
|
|
@@ -0,0 +1,21 @@
|
|
|
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;
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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.Feedback = void 0;
|
|
39
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
|
+
const ConfigsAPI = __importStar(require("./configs.cjs"));
|
|
41
|
+
const configs_js_1 = require("./configs.cjs");
|
|
42
|
+
const TokensAPI = __importStar(require("./tokens.cjs"));
|
|
43
|
+
const tokens_js_1 = require("./tokens.cjs");
|
|
44
|
+
const pagination_js_1 = require("../../core/pagination.cjs");
|
|
45
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
46
|
+
class Feedback extends resource_js_1.APIResource {
|
|
47
|
+
constructor() {
|
|
48
|
+
super(...arguments);
|
|
49
|
+
Object.defineProperty(this, "tokens", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: new TokensAPI.Tokens(this._client)
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(this, "configs", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
value: new ConfigsAPI.Configs(this._client)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Create a new feedback.
|
|
64
|
+
*/
|
|
65
|
+
create(body, options) {
|
|
66
|
+
return this._client.post('/api/v1/feedback', { body, ...options });
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get a specific feedback.
|
|
70
|
+
*/
|
|
71
|
+
retrieve(feedbackID, query = {}, options) {
|
|
72
|
+
return this._client.get((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, { query, ...options });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Replace an existing feedback entry with a new, modified entry.
|
|
76
|
+
*/
|
|
77
|
+
update(feedbackID, body, options) {
|
|
78
|
+
return this._client.patch((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, { body, ...options });
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* List all Feedback by query params.
|
|
82
|
+
*/
|
|
83
|
+
list(query = {}, options) {
|
|
84
|
+
return this._client.getAPIList('/api/v1/feedback', (pagination_js_1.OffsetPaginationTopLevelArray), {
|
|
85
|
+
query,
|
|
86
|
+
...options,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Delete a feedback.
|
|
91
|
+
*/
|
|
92
|
+
delete(feedbackID, options) {
|
|
93
|
+
return this._client.delete((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, options);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.Feedback = Feedback;
|
|
97
|
+
Feedback.Tokens = tokens_js_1.Tokens;
|
|
98
|
+
Feedback.Configs = configs_js_1.Configs;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as ConfigsAPI from './configs.js';
|
|
3
|
+
import { ConfigDeleteParams, Configs } from './configs.js';
|
|
4
|
+
import * as TokensAPI from './tokens.js';
|
|
5
|
+
import { FeedbackIngestTokenCreateSchema, FeedbackIngestTokenSchema, TokenCreateParams, TokenCreateResponse, TokenListParams, TokenListResponse, TokenRetrieveParams, TokenRetrieveResponse, TokenUpdateParams, TokenUpdateResponse, Tokens } from './tokens.js';
|
|
6
|
+
import { APIPromise } from '../../core/api-promise.js';
|
|
7
|
+
import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
|
|
8
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
9
|
+
export declare class Feedback extends APIResource {
|
|
10
|
+
tokens: TokensAPI.Tokens;
|
|
11
|
+
configs: ConfigsAPI.Configs;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new feedback.
|
|
14
|
+
*/
|
|
15
|
+
create(body: FeedbackCreateParams, options?: RequestOptions): APIPromise<FeedbackSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* Get a specific feedback.
|
|
18
|
+
*/
|
|
19
|
+
retrieve(feedbackID: string, query?: FeedbackRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<FeedbackSchema>;
|
|
20
|
+
/**
|
|
21
|
+
* Replace an existing feedback entry with a new, modified entry.
|
|
22
|
+
*/
|
|
23
|
+
update(feedbackID: string, body: FeedbackUpdateParams, options?: RequestOptions): APIPromise<FeedbackSchema>;
|
|
24
|
+
/**
|
|
25
|
+
* List all Feedback by query params.
|
|
26
|
+
*/
|
|
27
|
+
list(query?: FeedbackListParams | null | undefined, options?: RequestOptions): PagePromise<FeedbackSchemasOffsetPaginationTopLevelArray, FeedbackSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Delete a feedback.
|
|
30
|
+
*/
|
|
31
|
+
delete(feedbackID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
32
|
+
}
|
|
33
|
+
export type FeedbackSchemasOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<FeedbackSchema>;
|
|
34
|
+
/**
|
|
35
|
+
* API feedback source.
|
|
36
|
+
*/
|
|
37
|
+
export interface APIFeedbackSource {
|
|
38
|
+
metadata?: {
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
} | null;
|
|
41
|
+
type?: 'api';
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Feedback from the LangChainPlus App.
|
|
45
|
+
*/
|
|
46
|
+
export interface AppFeedbackSource {
|
|
47
|
+
metadata?: {
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
} | null;
|
|
50
|
+
type?: 'app';
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Auto eval feedback source.
|
|
54
|
+
*/
|
|
55
|
+
export interface AutoEvalFeedbackSource {
|
|
56
|
+
metadata?: {
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
} | null;
|
|
59
|
+
type?: 'auto_eval';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Schema used for creating feedback.
|
|
63
|
+
*/
|
|
64
|
+
export interface FeedbackCreateSchema {
|
|
65
|
+
key: string;
|
|
66
|
+
id?: string;
|
|
67
|
+
comment?: string | null;
|
|
68
|
+
comparative_experiment_id?: string | null;
|
|
69
|
+
correction?: {
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
} | string | null;
|
|
72
|
+
created_at?: string;
|
|
73
|
+
error?: boolean | null;
|
|
74
|
+
feedback_config?: FeedbackCreateSchema.FeedbackConfig | null;
|
|
75
|
+
feedback_group_id?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Feedback from the LangChainPlus App.
|
|
78
|
+
*/
|
|
79
|
+
feedback_source?: AppFeedbackSource | APIFeedbackSource | ModelFeedbackSource | AutoEvalFeedbackSource | null;
|
|
80
|
+
modified_at?: string;
|
|
81
|
+
run_id?: string | null;
|
|
82
|
+
score?: number | boolean | null;
|
|
83
|
+
session_id?: string | null;
|
|
84
|
+
start_time?: string | null;
|
|
85
|
+
trace_id?: string | null;
|
|
86
|
+
value?: number | boolean | string | {
|
|
87
|
+
[key: string]: unknown;
|
|
88
|
+
} | null;
|
|
89
|
+
}
|
|
90
|
+
export declare namespace FeedbackCreateSchema {
|
|
91
|
+
interface FeedbackConfig {
|
|
92
|
+
/**
|
|
93
|
+
* Enum for feedback types.
|
|
94
|
+
*/
|
|
95
|
+
type: 'continuous' | 'categorical' | 'freeform';
|
|
96
|
+
categories?: Array<FeedbackConfig.Category> | null;
|
|
97
|
+
max?: number | null;
|
|
98
|
+
min?: number | null;
|
|
99
|
+
}
|
|
100
|
+
namespace FeedbackConfig {
|
|
101
|
+
/**
|
|
102
|
+
* Specific value and label pair for feedback
|
|
103
|
+
*/
|
|
104
|
+
interface Category {
|
|
105
|
+
value: number;
|
|
106
|
+
label?: string | null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Enum for feedback levels.
|
|
112
|
+
*/
|
|
113
|
+
export type FeedbackLevel = 'run' | 'session';
|
|
114
|
+
/**
|
|
115
|
+
* Schema for getting feedback.
|
|
116
|
+
*/
|
|
117
|
+
export interface FeedbackSchema {
|
|
118
|
+
id: string;
|
|
119
|
+
key: string;
|
|
120
|
+
comment?: string | null;
|
|
121
|
+
comparative_experiment_id?: string | null;
|
|
122
|
+
correction?: {
|
|
123
|
+
[key: string]: unknown;
|
|
124
|
+
} | string | null;
|
|
125
|
+
created_at?: string;
|
|
126
|
+
extra?: {
|
|
127
|
+
[key: string]: unknown;
|
|
128
|
+
} | null;
|
|
129
|
+
feedback_group_id?: string | null;
|
|
130
|
+
/**
|
|
131
|
+
* The feedback source loaded from the database.
|
|
132
|
+
*/
|
|
133
|
+
feedback_source?: FeedbackSchema.FeedbackSource | null;
|
|
134
|
+
feedback_thread_id?: string | null;
|
|
135
|
+
is_root?: boolean;
|
|
136
|
+
modified_at?: string;
|
|
137
|
+
run_id?: string | null;
|
|
138
|
+
score?: number | boolean | null;
|
|
139
|
+
session_id?: string | null;
|
|
140
|
+
start_time?: string | null;
|
|
141
|
+
trace_id?: string | null;
|
|
142
|
+
value?: number | boolean | string | {
|
|
143
|
+
[key: string]: unknown;
|
|
144
|
+
} | null;
|
|
145
|
+
}
|
|
146
|
+
export declare namespace FeedbackSchema {
|
|
147
|
+
/**
|
|
148
|
+
* The feedback source loaded from the database.
|
|
149
|
+
*/
|
|
150
|
+
interface FeedbackSource {
|
|
151
|
+
ls_user_id?: string | null;
|
|
152
|
+
metadata?: {
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
} | null;
|
|
155
|
+
type?: string | null;
|
|
156
|
+
user_id?: string | null;
|
|
157
|
+
user_name?: string | null;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Model feedback source.
|
|
162
|
+
*/
|
|
163
|
+
export interface ModelFeedbackSource {
|
|
164
|
+
metadata?: {
|
|
165
|
+
[key: string]: unknown;
|
|
166
|
+
} | null;
|
|
167
|
+
type?: 'model';
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Enum for feedback source types.
|
|
171
|
+
*/
|
|
172
|
+
export type SourceType = 'api' | 'model' | 'app' | 'auto_eval';
|
|
173
|
+
export type FeedbackDeleteResponse = unknown;
|
|
174
|
+
export interface FeedbackCreateParams {
|
|
175
|
+
key: string;
|
|
176
|
+
id?: string;
|
|
177
|
+
comment?: string | null;
|
|
178
|
+
comparative_experiment_id?: string | null;
|
|
179
|
+
correction?: {
|
|
180
|
+
[key: string]: unknown;
|
|
181
|
+
} | string | null;
|
|
182
|
+
created_at?: string;
|
|
183
|
+
error?: boolean | null;
|
|
184
|
+
feedback_config?: FeedbackCreateParams.FeedbackConfig | null;
|
|
185
|
+
feedback_group_id?: string | null;
|
|
186
|
+
/**
|
|
187
|
+
* Feedback from the LangChainPlus App.
|
|
188
|
+
*/
|
|
189
|
+
feedback_source?: AppFeedbackSource | APIFeedbackSource | ModelFeedbackSource | AutoEvalFeedbackSource | null;
|
|
190
|
+
modified_at?: string;
|
|
191
|
+
run_id?: string | null;
|
|
192
|
+
score?: number | boolean | null;
|
|
193
|
+
session_id?: string | null;
|
|
194
|
+
start_time?: string | null;
|
|
195
|
+
trace_id?: string | null;
|
|
196
|
+
value?: number | boolean | string | {
|
|
197
|
+
[key: string]: unknown;
|
|
198
|
+
} | null;
|
|
199
|
+
}
|
|
200
|
+
export declare namespace FeedbackCreateParams {
|
|
201
|
+
interface FeedbackConfig {
|
|
202
|
+
/**
|
|
203
|
+
* Enum for feedback types.
|
|
204
|
+
*/
|
|
205
|
+
type: 'continuous' | 'categorical' | 'freeform';
|
|
206
|
+
categories?: Array<FeedbackConfig.Category> | null;
|
|
207
|
+
max?: number | null;
|
|
208
|
+
min?: number | null;
|
|
209
|
+
}
|
|
210
|
+
namespace FeedbackConfig {
|
|
211
|
+
/**
|
|
212
|
+
* Specific value and label pair for feedback
|
|
213
|
+
*/
|
|
214
|
+
interface Category {
|
|
215
|
+
value: number;
|
|
216
|
+
label?: string | null;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
export interface FeedbackRetrieveParams {
|
|
221
|
+
include_user_names?: boolean | null;
|
|
222
|
+
}
|
|
223
|
+
export interface FeedbackUpdateParams {
|
|
224
|
+
comment?: string | null;
|
|
225
|
+
correction?: {
|
|
226
|
+
[key: string]: unknown;
|
|
227
|
+
} | string | null;
|
|
228
|
+
feedback_config?: FeedbackUpdateParams.FeedbackConfig | null;
|
|
229
|
+
score?: number | boolean | null;
|
|
230
|
+
value?: number | boolean | string | {
|
|
231
|
+
[key: string]: unknown;
|
|
232
|
+
} | null;
|
|
233
|
+
}
|
|
234
|
+
export declare namespace FeedbackUpdateParams {
|
|
235
|
+
interface FeedbackConfig {
|
|
236
|
+
/**
|
|
237
|
+
* Enum for feedback types.
|
|
238
|
+
*/
|
|
239
|
+
type: 'continuous' | 'categorical' | 'freeform';
|
|
240
|
+
categories?: Array<FeedbackConfig.Category> | null;
|
|
241
|
+
max?: number | null;
|
|
242
|
+
min?: number | null;
|
|
243
|
+
}
|
|
244
|
+
namespace FeedbackConfig {
|
|
245
|
+
/**
|
|
246
|
+
* Specific value and label pair for feedback
|
|
247
|
+
*/
|
|
248
|
+
interface Category {
|
|
249
|
+
value: number;
|
|
250
|
+
label?: string | null;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export interface FeedbackListParams extends OffsetPaginationTopLevelArrayParams {
|
|
255
|
+
comparative_experiment_id?: string | null;
|
|
256
|
+
has_comment?: boolean | null;
|
|
257
|
+
has_score?: boolean | null;
|
|
258
|
+
include_user_names?: boolean | null;
|
|
259
|
+
key?: Array<string> | null;
|
|
260
|
+
/**
|
|
261
|
+
* Enum for feedback levels.
|
|
262
|
+
*/
|
|
263
|
+
level?: FeedbackLevel | null;
|
|
264
|
+
max_created_at?: string | null;
|
|
265
|
+
min_created_at?: string | null;
|
|
266
|
+
run?: Array<string> | string | null;
|
|
267
|
+
session?: Array<string> | string | null;
|
|
268
|
+
source?: Array<SourceType> | null;
|
|
269
|
+
user?: Array<string> | null;
|
|
270
|
+
}
|
|
271
|
+
export declare namespace Feedback {
|
|
272
|
+
export { type APIFeedbackSource as APIFeedbackSource, type AppFeedbackSource as AppFeedbackSource, type AutoEvalFeedbackSource as AutoEvalFeedbackSource, type FeedbackCreateSchema as FeedbackCreateSchema, type FeedbackLevel as FeedbackLevel, type FeedbackSchema as FeedbackSchema, type ModelFeedbackSource as ModelFeedbackSource, type SourceType as SourceType, type FeedbackDeleteResponse as FeedbackDeleteResponse, type FeedbackSchemasOffsetPaginationTopLevelArray as FeedbackSchemasOffsetPaginationTopLevelArray, type FeedbackCreateParams as FeedbackCreateParams, type FeedbackRetrieveParams as FeedbackRetrieveParams, type FeedbackUpdateParams as FeedbackUpdateParams, type FeedbackListParams as FeedbackListParams, };
|
|
273
|
+
export { Tokens as Tokens, type FeedbackIngestTokenCreateSchema as FeedbackIngestTokenCreateSchema, type FeedbackIngestTokenSchema as FeedbackIngestTokenSchema, type TokenCreateResponse as TokenCreateResponse, type TokenRetrieveResponse as TokenRetrieveResponse, type TokenUpdateResponse as TokenUpdateResponse, type TokenListResponse as TokenListResponse, type TokenCreateParams as TokenCreateParams, type TokenRetrieveParams as TokenRetrieveParams, type TokenUpdateParams as TokenUpdateParams, type TokenListParams as TokenListParams, };
|
|
274
|
+
export { Configs as Configs, type ConfigDeleteParams as ConfigDeleteParams };
|
|
275
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 ConfigsAPI from './configs.js';
|
|
5
|
+
import { Configs } from './configs.js';
|
|
6
|
+
import * as TokensAPI from './tokens.js';
|
|
7
|
+
import { Tokens, } from './tokens.js';
|
|
8
|
+
import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
|
|
9
|
+
import { path } from '../../internal/utils/path.js';
|
|
10
|
+
export class Feedback extends APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
Object.defineProperty(this, "tokens", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: new TokensAPI.Tokens(this._client)
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "configs", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: new ConfigsAPI.Configs(this._client)
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Create a new feedback.
|
|
28
|
+
*/
|
|
29
|
+
create(body, options) {
|
|
30
|
+
return this._client.post('/api/v1/feedback', { body, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get a specific feedback.
|
|
34
|
+
*/
|
|
35
|
+
retrieve(feedbackID, query = {}, options) {
|
|
36
|
+
return this._client.get(path `/api/v1/feedback/${feedbackID}`, { query, ...options });
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Replace an existing feedback entry with a new, modified entry.
|
|
40
|
+
*/
|
|
41
|
+
update(feedbackID, body, options) {
|
|
42
|
+
return this._client.patch(path `/api/v1/feedback/${feedbackID}`, { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* List all Feedback by query params.
|
|
46
|
+
*/
|
|
47
|
+
list(query = {}, options) {
|
|
48
|
+
return this._client.getAPIList('/api/v1/feedback', (OffsetPaginationTopLevelArray), {
|
|
49
|
+
query,
|
|
50
|
+
...options,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Delete a feedback.
|
|
55
|
+
*/
|
|
56
|
+
delete(feedbackID, options) {
|
|
57
|
+
return this._client.delete(path `/api/v1/feedback/${feedbackID}`, options);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
Feedback.Tokens = Tokens;
|
|
61
|
+
Feedback.Configs = Configs;
|