langsmith 0.7.10 → 0.7.11

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 (97) hide show
  1. package/README.md +46 -15
  2. package/dist/_openapi_client/client.cjs +0 -88
  3. package/dist/_openapi_client/client.d.ts +0 -33
  4. package/dist/_openapi_client/client.js +0 -88
  5. package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
  6. package/dist/_openapi_client/resources/datasets/runs.d.ts +1 -2
  7. package/dist/_openapi_client/resources/index.cjs +1 -23
  8. package/dist/_openapi_client/resources/index.d.ts +0 -11
  9. package/dist/_openapi_client/resources/index.js +0 -11
  10. package/dist/anonymizer/index.cjs +142 -0
  11. package/dist/anonymizer/index.d.ts +45 -0
  12. package/dist/anonymizer/index.js +140 -0
  13. package/dist/client.cjs +26 -1
  14. package/dist/client.d.ts +4 -1
  15. package/dist/client.js +25 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/sandbox/client.cjs +5 -8
  20. package/dist/sandbox/client.js +5 -8
  21. package/dist/sandbox/index.cjs +2 -1
  22. package/dist/sandbox/index.d.ts +2 -2
  23. package/dist/sandbox/index.js +1 -1
  24. package/dist/sandbox/mounts.cjs +157 -18
  25. package/dist/sandbox/mounts.d.ts +10 -2
  26. package/dist/sandbox/mounts.js +155 -18
  27. package/dist/sandbox/proxy_config.cjs +19 -44
  28. package/dist/sandbox/proxy_config.d.ts +2 -4
  29. package/dist/sandbox/proxy_config.js +19 -43
  30. package/dist/sandbox/types.d.ts +56 -15
  31. package/dist/utils/constants.cjs +4 -0
  32. package/dist/utils/constants.d.ts +1 -0
  33. package/dist/utils/constants.js +1 -0
  34. package/package.json +1 -1
  35. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
  36. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
  37. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
  38. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
  39. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
  40. package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
  41. package/dist/_openapi_client/resources/commits.cjs +0 -44
  42. package/dist/_openapi_client/resources/commits.d.ts +0 -204
  43. package/dist/_openapi_client/resources/commits.js +0 -40
  44. package/dist/_openapi_client/resources/evaluators.cjs +0 -15
  45. package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
  46. package/dist/_openapi_client/resources/evaluators.js +0 -11
  47. package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
  48. package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
  49. package/dist/_openapi_client/resources/examples/bulk.js +0 -20
  50. package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
  51. package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
  52. package/dist/_openapi_client/resources/examples/examples.js +0 -87
  53. package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
  54. package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
  55. package/dist/_openapi_client/resources/examples/validate.js +0 -17
  56. package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
  57. package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
  58. package/dist/_openapi_client/resources/feedback/configs.js +0 -20
  59. package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
  60. package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
  61. package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
  62. package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
  63. package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
  64. package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
  65. package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
  66. package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
  67. package/dist/_openapi_client/resources/public/datasets.js +0 -43
  68. package/dist/_openapi_client/resources/public/public.cjs +0 -62
  69. package/dist/_openapi_client/resources/public/public.d.ts +0 -32
  70. package/dist/_openapi_client/resources/public/public.js +0 -25
  71. package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
  72. package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
  73. package/dist/_openapi_client/resources/repos/directories.js +0 -36
  74. package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
  75. package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
  76. package/dist/_openapi_client/resources/repos/repos.js +0 -56
  77. package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
  78. package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
  79. package/dist/_openapi_client/resources/runs/rules.js +0 -5
  80. package/dist/_openapi_client/resources/runs/runs.cjs +0 -102
  81. package/dist/_openapi_client/resources/runs/runs.d.ts +0 -542
  82. package/dist/_openapi_client/resources/runs/runs.js +0 -65
  83. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
  84. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
  85. package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
  86. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
  87. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
  88. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
  89. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
  90. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
  91. package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
  92. package/dist/_openapi_client/resources/settings.cjs +0 -15
  93. package/dist/_openapi_client/resources/settings.d.ts +0 -18
  94. package/dist/_openapi_client/resources/settings.js +0 -11
  95. package/dist/_openapi_client/resources/workspaces.cjs +0 -35
  96. package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
  97. package/dist/_openapi_client/resources/workspaces.js +0 -31
@@ -1,130 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as SessionsAPI from '../sessions/sessions.js';
3
- import { APIPromise } from '../../core/api-promise.js';
4
- import { RequestOptions } from '../../internal/request-options.js';
5
- export declare class Tokens extends APIResource {
6
- /**
7
- * Create a new feedback ingest token.
8
- */
9
- create(params: TokenCreateParams, options?: RequestOptions): APIPromise<TokenCreateResponse>;
10
- /**
11
- * Create a new feedback with a token.
12
- */
13
- retrieve(token: string, query?: TokenRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
14
- /**
15
- * Create a new feedback with a token.
16
- */
17
- update(token: string, body: TokenUpdateParams, options?: RequestOptions): APIPromise<unknown>;
18
- /**
19
- * List all feedback ingest tokens for a run.
20
- */
21
- list(query: TokenListParams, options?: RequestOptions): APIPromise<TokenListResponse>;
22
- }
23
- /**
24
- * Feedback ingest token create schema.
25
- */
26
- export interface FeedbackIngestTokenCreateSchema {
27
- feedback_key: string;
28
- run_id: string;
29
- expires_at?: string | null;
30
- /**
31
- * Timedelta input.
32
- */
33
- expires_in?: SessionsAPI.TimedeltaInput | null;
34
- feedback_config?: FeedbackIngestTokenCreateSchema.FeedbackConfig | null;
35
- }
36
- export declare namespace FeedbackIngestTokenCreateSchema {
37
- interface FeedbackConfig {
38
- /**
39
- * Enum for feedback types.
40
- */
41
- type: 'continuous' | 'categorical' | 'freeform';
42
- categories?: Array<FeedbackConfig.Category> | null;
43
- max?: number | null;
44
- min?: number | null;
45
- }
46
- namespace FeedbackConfig {
47
- /**
48
- * Specific value and label pair for feedback
49
- */
50
- interface Category {
51
- value: number;
52
- label?: string | null;
53
- }
54
- }
55
- }
56
- /**
57
- * Feedback ingest token schema.
58
- */
59
- export interface FeedbackIngestTokenSchema {
60
- id: string;
61
- expires_at: string;
62
- feedback_key: string;
63
- url: string;
64
- }
65
- /**
66
- * Feedback ingest token schema.
67
- */
68
- export type TokenCreateResponse = FeedbackIngestTokenSchema | Array<FeedbackIngestTokenSchema>;
69
- export type TokenRetrieveResponse = unknown;
70
- export type TokenUpdateResponse = unknown;
71
- export type TokenListResponse = Array<FeedbackIngestTokenSchema>;
72
- export type TokenCreateParams = TokenCreateParams.FeedbackIngestTokenCreateSchema | TokenCreateParams.Variant1;
73
- export declare namespace TokenCreateParams {
74
- interface FeedbackIngestTokenCreateSchema {
75
- feedback_key: string;
76
- run_id: string;
77
- expires_at?: string | null;
78
- /**
79
- * Timedelta input.
80
- */
81
- expires_in?: SessionsAPI.TimedeltaInput | null;
82
- feedback_config?: FeedbackIngestTokenCreateSchema.FeedbackConfig | null;
83
- }
84
- namespace FeedbackIngestTokenCreateSchema {
85
- interface FeedbackConfig {
86
- /**
87
- * Enum for feedback types.
88
- */
89
- type: 'continuous' | 'categorical' | 'freeform';
90
- categories?: Array<FeedbackConfig.Category> | null;
91
- max?: number | null;
92
- min?: number | null;
93
- }
94
- namespace FeedbackConfig {
95
- /**
96
- * Specific value and label pair for feedback
97
- */
98
- interface Category {
99
- value: number;
100
- label?: string | null;
101
- }
102
- }
103
- }
104
- interface Variant1 {
105
- body: Array<FeedbackIngestTokenCreateSchema>;
106
- }
107
- }
108
- export interface TokenRetrieveParams {
109
- comment?: string | null;
110
- correction?: string | null;
111
- score?: number | boolean | null;
112
- value?: number | boolean | string | null;
113
- }
114
- export interface TokenUpdateParams {
115
- comment?: string | null;
116
- correction?: {
117
- [key: string]: unknown;
118
- } | string | null;
119
- metadata?: {
120
- [key: string]: unknown;
121
- } | null;
122
- score?: number | boolean | null;
123
- value?: number | boolean | string | null;
124
- }
125
- export interface TokenListParams {
126
- run_id: string;
127
- }
128
- export declare namespace Tokens {
129
- export { 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, };
130
- }
@@ -1,31 +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 Tokens extends APIResource {
6
- /**
7
- * Create a new feedback ingest token.
8
- */
9
- create(params, options) {
10
- const body = 'body' in params ? params.body : params;
11
- return this._client.post('/api/v1/feedback/tokens', { body, ...options });
12
- }
13
- /**
14
- * Create a new feedback with a token.
15
- */
16
- retrieve(token, query = {}, options) {
17
- return this._client.get(path `/api/v1/feedback/tokens/${token}`, { query, ...options });
18
- }
19
- /**
20
- * Create a new feedback with a token.
21
- */
22
- update(token, body, options) {
23
- return this._client.post(path `/api/v1/feedback/tokens/${token}`, { body, ...options });
24
- }
25
- /**
26
- * List all feedback ingest tokens for a run.
27
- */
28
- list(query, options) {
29
- return this._client.get('/api/v1/feedback/tokens', { query, ...options });
30
- }
31
- }
@@ -1,47 +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.Datasets = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const pagination_js_1 = require("../../core/pagination.cjs");
8
- const headers_js_1 = require("../../internal/headers.cjs");
9
- const path_js_1 = require("../../internal/utils/path.cjs");
10
- class Datasets extends resource_js_1.APIResource {
11
- /**
12
- * Get dataset by ids or the shared dataset if not specifed.
13
- */
14
- list(shareToken, query = {}, options) {
15
- return this._client.get((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets`, { query, ...options });
16
- }
17
- /**
18
- * Get all comparative experiments for a given dataset.
19
- */
20
- listComparative(shareToken, query = {}, options) {
21
- return this._client.getAPIList((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets/comparative`, (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
22
- }
23
- /**
24
- * Get feedback for runs in projects run over a dataset that has been shared.
25
- */
26
- listFeedback(shareToken, query = {}, options) {
27
- return this._client.getAPIList((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets/feedback`, (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
28
- }
29
- /**
30
- * Get projects run on a dataset that has been shared.
31
- */
32
- listSessions(shareToken, params = {}, options) {
33
- const { accept, ...query } = params ?? {};
34
- return this._client.getAPIList((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets/sessions`, (pagination_js_1.OffsetPaginationTopLevelArray), {
35
- query,
36
- ...options,
37
- headers: (0, headers_js_1.buildHeaders)([{ ...(accept != null ? { accept: accept } : undefined) }, options?.headers]),
38
- });
39
- }
40
- /**
41
- * Get sessions from multiple datasets using share tokens.
42
- */
43
- retrieveSessionsBulk(query, options) {
44
- return this._client.get('/api/v1/public/datasets/sessions-bulk', { query, ...options });
45
- }
46
- }
47
- exports.Datasets = Datasets;
@@ -1,152 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as ComparativeAPI from '../datasets/comparative.js';
3
- import * as DatasetsAPI from '../datasets/datasets.js';
4
- import * as FeedbackAPI from '../feedback/feedback.js';
5
- import { FeedbackSchemasOffsetPaginationTopLevelArray } from '../feedback/feedback.js';
6
- import * as SessionsAPI from '../sessions/sessions.js';
7
- import { TracerSessionsOffsetPaginationTopLevelArray } from '../sessions/sessions.js';
8
- import { APIPromise } from '../../core/api-promise.js';
9
- import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
10
- import { RequestOptions } from '../../internal/request-options.js';
11
- export declare class Datasets extends APIResource {
12
- /**
13
- * Get dataset by ids or the shared dataset if not specifed.
14
- */
15
- list(shareToken: string, query?: DatasetListParams | null | undefined, options?: RequestOptions): APIPromise<DatasetListResponse>;
16
- /**
17
- * Get all comparative experiments for a given dataset.
18
- */
19
- listComparative(shareToken: string, query?: DatasetListComparativeParams | null | undefined, options?: RequestOptions): PagePromise<DatasetListComparativeResponsesOffsetPaginationTopLevelArray, DatasetListComparativeResponse>;
20
- /**
21
- * Get feedback for runs in projects run over a dataset that has been shared.
22
- */
23
- listFeedback(shareToken: string, query?: DatasetListFeedbackParams | null | undefined, options?: RequestOptions): PagePromise<FeedbackSchemasOffsetPaginationTopLevelArray, FeedbackAPI.FeedbackSchema>;
24
- /**
25
- * Get projects run on a dataset that has been shared.
26
- */
27
- listSessions(shareToken: string, params?: DatasetListSessionsParams | null | undefined, options?: RequestOptions): PagePromise<TracerSessionsOffsetPaginationTopLevelArray, SessionsAPI.TracerSession>;
28
- /**
29
- * Get sessions from multiple datasets using share tokens.
30
- */
31
- retrieveSessionsBulk(query: DatasetRetrieveSessionsBulkParams, options?: RequestOptions): APIPromise<DatasetRetrieveSessionsBulkResponse>;
32
- }
33
- export type DatasetListComparativeResponsesOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<DatasetListComparativeResponse>;
34
- /**
35
- * Public schema for datasets.
36
- *
37
- * Doesn't currently include session counts/stats since public test project sharing
38
- * is not yet shipped
39
- */
40
- export interface DatasetListResponse {
41
- id: string;
42
- example_count: number;
43
- name: string;
44
- created_at?: string;
45
- /**
46
- * Enum for dataset data types.
47
- */
48
- data_type?: DatasetsAPI.DataType | null;
49
- description?: string | null;
50
- externally_managed?: boolean | null;
51
- inputs_schema_definition?: {
52
- [key: string]: unknown;
53
- } | null;
54
- outputs_schema_definition?: {
55
- [key: string]: unknown;
56
- } | null;
57
- transformations?: Array<DatasetsAPI.DatasetTransformation> | null;
58
- }
59
- /**
60
- * Publicly-shared ComparativeExperiment schema.
61
- */
62
- export interface DatasetListComparativeResponse {
63
- id: string;
64
- created_at: string;
65
- experiments_info: Array<ComparativeAPI.SimpleExperimentInfo>;
66
- modified_at: string;
67
- description?: string | null;
68
- extra?: {
69
- [key: string]: unknown;
70
- } | null;
71
- feedback_stats?: {
72
- [key: string]: unknown;
73
- } | null;
74
- name?: string | null;
75
- }
76
- export type DatasetRetrieveSessionsBulkResponse = Array<SessionsAPI.TracerSession>;
77
- export interface DatasetListParams {
78
- limit?: number;
79
- offset?: number;
80
- /**
81
- * Enum for available dataset columns to sort by.
82
- */
83
- sort_by?: DatasetsAPI.SortByDatasetColumn;
84
- sort_by_desc?: boolean;
85
- }
86
- export interface DatasetListComparativeParams extends OffsetPaginationTopLevelArrayParams {
87
- name?: string | null;
88
- name_contains?: string | null;
89
- /**
90
- * Enum for available comparative experiment columns to sort by.
91
- */
92
- sort_by?: ComparativeAPI.SortByComparativeExperimentColumn;
93
- sort_by_desc?: boolean;
94
- }
95
- export interface DatasetListFeedbackParams extends OffsetPaginationTopLevelArrayParams {
96
- has_comment?: boolean | null;
97
- has_score?: boolean | null;
98
- key?: Array<string> | null;
99
- /**
100
- * Enum for feedback levels.
101
- */
102
- level?: FeedbackAPI.FeedbackLevel | null;
103
- run?: Array<string> | null;
104
- session?: Array<string> | null;
105
- source?: Array<FeedbackAPI.SourceType> | null;
106
- user?: Array<string> | null;
107
- }
108
- export interface DatasetListSessionsParams extends OffsetPaginationTopLevelArrayParams {
109
- /**
110
- * Query param
111
- */
112
- id?: Array<string> | null;
113
- /**
114
- * Query param
115
- */
116
- dataset_version?: string | null;
117
- /**
118
- * Query param
119
- */
120
- facets?: boolean;
121
- /**
122
- * Query param
123
- */
124
- name?: string | null;
125
- /**
126
- * Query param
127
- */
128
- name_contains?: string | null;
129
- /**
130
- * Query param
131
- */
132
- sort_by?: SessionsAPI.SessionSortableColumns;
133
- /**
134
- * Query param
135
- */
136
- sort_by_desc?: boolean;
137
- /**
138
- * Query param
139
- */
140
- sort_by_feedback_key?: string | null;
141
- /**
142
- * Header param
143
- */
144
- accept?: string;
145
- }
146
- export interface DatasetRetrieveSessionsBulkParams {
147
- share_tokens: Array<string>;
148
- }
149
- export declare namespace Datasets {
150
- export { type DatasetListResponse as DatasetListResponse, type DatasetListComparativeResponse as DatasetListComparativeResponse, type DatasetRetrieveSessionsBulkResponse as DatasetRetrieveSessionsBulkResponse, type DatasetListComparativeResponsesOffsetPaginationTopLevelArray as DatasetListComparativeResponsesOffsetPaginationTopLevelArray, type DatasetListParams as DatasetListParams, type DatasetListComparativeParams as DatasetListComparativeParams, type DatasetListFeedbackParams as DatasetListFeedbackParams, type DatasetListSessionsParams as DatasetListSessionsParams, type DatasetRetrieveSessionsBulkParams as DatasetRetrieveSessionsBulkParams, };
151
- }
152
- export { type FeedbackSchemasOffsetPaginationTopLevelArray, type TracerSessionsOffsetPaginationTopLevelArray, };
@@ -1,43 +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 { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
5
- import { buildHeaders } from '../../internal/headers.js';
6
- import { path } from '../../internal/utils/path.js';
7
- export class Datasets extends APIResource {
8
- /**
9
- * Get dataset by ids or the shared dataset if not specifed.
10
- */
11
- list(shareToken, query = {}, options) {
12
- return this._client.get(path `/api/v1/public/${shareToken}/datasets`, { query, ...options });
13
- }
14
- /**
15
- * Get all comparative experiments for a given dataset.
16
- */
17
- listComparative(shareToken, query = {}, options) {
18
- return this._client.getAPIList(path `/api/v1/public/${shareToken}/datasets/comparative`, (OffsetPaginationTopLevelArray), { query, ...options });
19
- }
20
- /**
21
- * Get feedback for runs in projects run over a dataset that has been shared.
22
- */
23
- listFeedback(shareToken, query = {}, options) {
24
- return this._client.getAPIList(path `/api/v1/public/${shareToken}/datasets/feedback`, (OffsetPaginationTopLevelArray), { query, ...options });
25
- }
26
- /**
27
- * Get projects run on a dataset that has been shared.
28
- */
29
- listSessions(shareToken, params = {}, options) {
30
- const { accept, ...query } = params ?? {};
31
- return this._client.getAPIList(path `/api/v1/public/${shareToken}/datasets/sessions`, (OffsetPaginationTopLevelArray), {
32
- query,
33
- ...options,
34
- headers: buildHeaders([{ ...(accept != null ? { accept: accept } : undefined) }, options?.headers]),
35
- });
36
- }
37
- /**
38
- * Get sessions from multiple datasets using share tokens.
39
- */
40
- retrieveSessionsBulk(query, options) {
41
- return this._client.get('/api/v1/public/datasets/sessions-bulk', { query, ...options });
42
- }
43
- }
@@ -1,62 +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.Public = void 0;
39
- const resource_js_1 = require("../../core/resource.cjs");
40
- const DatasetsAPI = __importStar(require("./datasets.cjs"));
41
- const datasets_js_1 = require("./datasets.cjs");
42
- const pagination_js_1 = require("../../core/pagination.cjs");
43
- const path_js_1 = require("../../internal/utils/path.cjs");
44
- class Public extends resource_js_1.APIResource {
45
- constructor() {
46
- super(...arguments);
47
- Object.defineProperty(this, "datasets", {
48
- enumerable: true,
49
- configurable: true,
50
- writable: true,
51
- value: new DatasetsAPI.Datasets(this._client)
52
- });
53
- }
54
- /**
55
- * Read Shared Feedbacks
56
- */
57
- retrieveFeedbacks(shareToken, query = {}, options) {
58
- return this._client.getAPIList((0, path_js_1.path) `/api/v1/public/${shareToken}/feedbacks`, (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
59
- }
60
- }
61
- exports.Public = Public;
62
- Public.Datasets = datasets_js_1.Datasets;
@@ -1,32 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as FeedbackAPI from '../feedback/feedback.js';
3
- import { FeedbackSchemasOffsetPaginationTopLevelArray } from '../feedback/feedback.js';
4
- import * as DatasetsAPI from './datasets.js';
5
- import { DatasetListComparativeParams, DatasetListComparativeResponse, DatasetListComparativeResponsesOffsetPaginationTopLevelArray, DatasetListFeedbackParams, DatasetListParams, DatasetListResponse, DatasetListSessionsParams, DatasetRetrieveSessionsBulkParams, DatasetRetrieveSessionsBulkResponse, Datasets } from './datasets.js';
6
- import { type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
7
- import { RequestOptions } from '../../internal/request-options.js';
8
- export declare class Public extends APIResource {
9
- datasets: DatasetsAPI.Datasets;
10
- /**
11
- * Read Shared Feedbacks
12
- */
13
- retrieveFeedbacks(shareToken: string, query?: PublicRetrieveFeedbacksParams | null | undefined, options?: RequestOptions): PagePromise<FeedbackSchemasOffsetPaginationTopLevelArray, FeedbackAPI.FeedbackSchema>;
14
- }
15
- export interface PublicRetrieveFeedbacksParams extends OffsetPaginationTopLevelArrayParams {
16
- has_comment?: boolean | null;
17
- has_score?: boolean | null;
18
- key?: Array<string> | null;
19
- /**
20
- * Enum for feedback levels.
21
- */
22
- level?: FeedbackAPI.FeedbackLevel | null;
23
- run?: Array<string> | null;
24
- session?: Array<string> | null;
25
- source?: Array<FeedbackAPI.SourceType> | null;
26
- user?: Array<string> | null;
27
- }
28
- export declare namespace Public {
29
- export { type PublicRetrieveFeedbacksParams as PublicRetrieveFeedbacksParams };
30
- export { Datasets as Datasets, type DatasetListResponse as DatasetListResponse, type DatasetListComparativeResponse as DatasetListComparativeResponse, type DatasetRetrieveSessionsBulkResponse as DatasetRetrieveSessionsBulkResponse, type DatasetListComparativeResponsesOffsetPaginationTopLevelArray as DatasetListComparativeResponsesOffsetPaginationTopLevelArray, type DatasetListParams as DatasetListParams, type DatasetListComparativeParams as DatasetListComparativeParams, type DatasetListFeedbackParams as DatasetListFeedbackParams, type DatasetListSessionsParams as DatasetListSessionsParams, type DatasetRetrieveSessionsBulkParams as DatasetRetrieveSessionsBulkParams, };
31
- }
32
- export { type FeedbackSchemasOffsetPaginationTopLevelArray };
@@ -1,25 +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 DatasetsAPI from './datasets.js';
5
- import { Datasets, } from './datasets.js';
6
- import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
7
- import { path } from '../../internal/utils/path.js';
8
- export class Public extends APIResource {
9
- constructor() {
10
- super(...arguments);
11
- Object.defineProperty(this, "datasets", {
12
- enumerable: true,
13
- configurable: true,
14
- writable: true,
15
- value: new DatasetsAPI.Datasets(this._client)
16
- });
17
- }
18
- /**
19
- * Read Shared Feedbacks
20
- */
21
- retrieveFeedbacks(shareToken, query = {}, options) {
22
- return this._client.getAPIList(path `/api/v1/public/${shareToken}/feedbacks`, (OffsetPaginationTopLevelArray), { query, ...options });
23
- }
24
- }
25
- Public.Datasets = Datasets;
@@ -1,40 +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.Directories = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const headers_js_1 = require("../../internal/headers.cjs");
8
- const path_js_1 = require("../../internal/utils/path.cjs");
9
- class Directories extends resource_js_1.APIResource {
10
- /**
11
- * Resolves the flattened file tree for an agent or skill repository at a specific
12
- * commit, tag, or latest.
13
- */
14
- list(repo, params, options) {
15
- const { owner, ...query } = params;
16
- return this._client.get((0, path_js_1.path) `/v1/platform/hub/repos/${owner}/${repo}/directories`, { query, ...options });
17
- }
18
- /**
19
- * Deletes an agent or skill repository and its owned child file repositories.
20
- */
21
- delete(repo, params, options) {
22
- const { owner } = params;
23
- return this._client.delete((0, path_js_1.path) `/v1/platform/hub/repos/${owner}/${repo}/directories`, {
24
- ...options,
25
- headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
26
- });
27
- }
28
- /**
29
- * Creates a new directory commit for an agent or skill repository by applying
30
- * file/link create, update, and delete operations.
31
- */
32
- commit(repo, params, options) {
33
- const { owner, ...body } = params;
34
- return this._client.post((0, path_js_1.path) `/v1/platform/hub/repos/${owner}/${repo}/directories/commits`, {
35
- body,
36
- ...options,
37
- });
38
- }
39
- }
40
- exports.Directories = Directories;
@@ -1,72 +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 Directories extends APIResource {
5
- /**
6
- * Resolves the flattened file tree for an agent or skill repository at a specific
7
- * commit, tag, or latest.
8
- */
9
- list(repo: string, params: DirectoryListParams, options?: RequestOptions): APIPromise<DirectoryListResponse>;
10
- /**
11
- * Deletes an agent or skill repository and its owned child file repositories.
12
- */
13
- delete(repo: string, params: DirectoryDeleteParams, options?: RequestOptions): APIPromise<void>;
14
- /**
15
- * Creates a new directory commit for an agent or skill repository by applying
16
- * file/link create, update, and delete operations.
17
- */
18
- commit(repo: string, params: DirectoryCommitParams, options?: RequestOptions): APIPromise<DirectoryCommitResponse>;
19
- }
20
- export interface DirectoryListResponse {
21
- commit_hash?: string;
22
- commit_id?: string;
23
- files?: {
24
- [key: string]: unknown;
25
- };
26
- }
27
- export interface DirectoryCommitResponse {
28
- commit?: DirectoryCommitResponse.Commit;
29
- }
30
- export declare namespace DirectoryCommitResponse {
31
- interface Commit {
32
- id?: string;
33
- commit_hash?: string;
34
- created_at?: string;
35
- }
36
- }
37
- export interface DirectoryListParams {
38
- /**
39
- * Path param: Repository owner handle or '-' for current tenant
40
- */
41
- owner: string;
42
- /**
43
- * Query param: Commit hash/tag to resolve (defaults to latest)
44
- */
45
- commit?: string;
46
- }
47
- export interface DirectoryDeleteParams {
48
- /**
49
- * Repository owner handle or '-' for current tenant
50
- */
51
- owner: string;
52
- }
53
- export interface DirectoryCommitParams {
54
- /**
55
- * Path param: Repository owner handle or '-' for current tenant
56
- */
57
- owner: string;
58
- /**
59
- * Body param: Files maps path to an Entry (object = create/update/link, null =
60
- * delete/unlink).
61
- */
62
- files?: {
63
- [key: string]: unknown;
64
- };
65
- /**
66
- * Body param
67
- */
68
- parent_commit?: string;
69
- }
70
- export declare namespace Directories {
71
- export { type DirectoryListResponse as DirectoryListResponse, type DirectoryCommitResponse as DirectoryCommitResponse, type DirectoryListParams as DirectoryListParams, type DirectoryDeleteParams as DirectoryDeleteParams, type DirectoryCommitParams as DirectoryCommitParams, };
72
- }
@@ -1,36 +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
- import { path } from '../../internal/utils/path.js';
6
- export class Directories extends APIResource {
7
- /**
8
- * Resolves the flattened file tree for an agent or skill repository at a specific
9
- * commit, tag, or latest.
10
- */
11
- list(repo, params, options) {
12
- const { owner, ...query } = params;
13
- return this._client.get(path `/v1/platform/hub/repos/${owner}/${repo}/directories`, { query, ...options });
14
- }
15
- /**
16
- * Deletes an agent or skill repository and its owned child file repositories.
17
- */
18
- delete(repo, params, options) {
19
- const { owner } = params;
20
- return this._client.delete(path `/v1/platform/hub/repos/${owner}/${repo}/directories`, {
21
- ...options,
22
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
23
- });
24
- }
25
- /**
26
- * Creates a new directory commit for an agent or skill repository by applying
27
- * file/link create, update, and delete operations.
28
- */
29
- commit(repo, params, options) {
30
- const { owner, ...body } = params;
31
- return this._client.post(path `/v1/platform/hub/repos/${owner}/${repo}/directories/commits`, {
32
- body,
33
- ...options,
34
- });
35
- }
36
- }