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,101 +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 RunsAPI from './runs.js';
5
- import { Runs, } from './runs.js';
6
- import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
7
- import { path } from '../../internal/utils/path.js';
8
- export class AnnotationQueues extends APIResource {
9
- constructor() {
10
- super(...arguments);
11
- Object.defineProperty(this, "runs", {
12
- enumerable: true,
13
- configurable: true,
14
- writable: true,
15
- value: new RunsAPI.Runs(this._client)
16
- });
17
- }
18
- /**
19
- * Get Annotation Queue
20
- */
21
- retrieve(queueID, options) {
22
- return this._client.get(path `/api/v1/annotation-queues/${queueID}`, options);
23
- }
24
- /**
25
- * Update Annotation Queue
26
- */
27
- update(queueID, body, options) {
28
- return this._client.patch(path `/api/v1/annotation-queues/${queueID}`, { body, ...options });
29
- }
30
- /**
31
- * Delete Annotation Queue
32
- */
33
- delete(queueID, options) {
34
- return this._client.delete(path `/api/v1/annotation-queues/${queueID}`, options);
35
- }
36
- /**
37
- * Create Annotation Queue
38
- */
39
- annotationQueues(body, options) {
40
- return this._client.post('/api/v1/annotation-queues', { body, ...options });
41
- }
42
- /**
43
- * Create Identity Annotation Queue Run Status
44
- */
45
- createRunStatus(annotationQueueRunID, body, options) {
46
- return this._client.post(path `/api/v1/annotation-queues/status/${annotationQueueRunID}`, {
47
- body,
48
- ...options,
49
- });
50
- }
51
- /**
52
- * Export Annotation Queue Archived Runs
53
- */
54
- export(queueID, body, options) {
55
- return this._client.post(path `/api/v1/annotation-queues/${queueID}/export`, { body, ...options });
56
- }
57
- /**
58
- * Populate annotation queue with runs from an experiment.
59
- */
60
- populate(body, options) {
61
- return this._client.post('/api/v1/annotation-queues/populate', { body, ...options });
62
- }
63
- /**
64
- * Get Annotation Queues
65
- */
66
- retrieveAnnotationQueues(query = {}, options) {
67
- return this._client.getAPIList('/api/v1/annotation-queues', (OffsetPaginationTopLevelArray), { query, ...options });
68
- }
69
- /**
70
- * Get Annotation Queues For Run
71
- */
72
- retrieveQueues(runID, options) {
73
- return this._client.get(path `/api/v1/annotation-queues/${runID}/queues`, options);
74
- }
75
- /**
76
- * Get a run from an annotation queue
77
- */
78
- retrieveRun(index, params, options) {
79
- const { queue_id, ...query } = params;
80
- return this._client.get(path `/api/v1/annotation-queues/${queue_id}/run/${index}`, { query, ...options });
81
- }
82
- /**
83
- * Get Size From Annotation Queue
84
- */
85
- retrieveSize(queueID, query = {}, options) {
86
- return this._client.get(path `/api/v1/annotation-queues/${queueID}/size`, { query, ...options });
87
- }
88
- /**
89
- * Get Total Archived From Annotation Queue
90
- */
91
- retrieveTotalArchived(queueID, query = {}, options) {
92
- return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_archived`, { query, ...options });
93
- }
94
- /**
95
- * Get Total Size From Annotation Queue
96
- */
97
- retrieveTotalSize(queueID, options) {
98
- return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_size`, options);
99
- }
100
- }
101
- AnnotationQueues.Runs = Runs;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Runs = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const path_js_1 = require("../../internal/utils/path.cjs");
8
- class Runs extends resource_js_1.APIResource {
9
- /**
10
- * Add Runs To Annotation Queue
11
- */
12
- create(queueID, params, options) {
13
- const { body } = params;
14
- return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, { body: body, ...options });
15
- }
16
- /**
17
- * Update Run In Annotation Queue
18
- */
19
- update(queueRunID, params, options) {
20
- const { queue_id, ...body } = params;
21
- return this._client.patch((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, {
22
- body,
23
- ...options,
24
- });
25
- }
26
- /**
27
- * Get Runs From Annotation Queue
28
- */
29
- list(queueID, query = {}, options) {
30
- return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, { query, ...options });
31
- }
32
- /**
33
- * Delete Runs From Annotation Queue
34
- */
35
- deleteAll(queueID, body, options) {
36
- return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs/delete`, { body, ...options });
37
- }
38
- /**
39
- * Delete Run From Annotation Queue
40
- */
41
- deleteQueue(queueRunID, params, options) {
42
- const { queue_id } = params;
43
- return this._client.delete((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, options);
44
- }
45
- }
46
- exports.Runs = Runs;
@@ -1,128 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as AnnotationQueuesAPI from './annotation-queues.js';
3
- import { APIPromise } from '../../core/api-promise.js';
4
- import { RequestOptions } from '../../internal/request-options.js';
5
- export declare class Runs extends APIResource {
6
- /**
7
- * Add Runs To Annotation Queue
8
- */
9
- create(queueID: string, params: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse>;
10
- /**
11
- * Update Run In Annotation Queue
12
- */
13
- update(queueRunID: string, params: RunUpdateParams, options?: RequestOptions): APIPromise<unknown>;
14
- /**
15
- * Get Runs From Annotation Queue
16
- */
17
- list(queueID: string, query?: RunListParams | null | undefined, options?: RequestOptions): APIPromise<RunListResponse>;
18
- /**
19
- * Delete Runs From Annotation Queue
20
- */
21
- deleteAll(queueID: string, body: RunDeleteAllParams, options?: RequestOptions): APIPromise<unknown>;
22
- /**
23
- * Delete Run From Annotation Queue
24
- */
25
- deleteQueue(queueRunID: string, params: RunDeleteQueueParams, options?: RequestOptions): APIPromise<unknown>;
26
- }
27
- export type RunCreateResponse = Array<RunCreateResponse.RunCreateResponseItem>;
28
- export declare namespace RunCreateResponse {
29
- interface RunCreateResponseItem {
30
- id: string;
31
- queue_id: string;
32
- run_id: string;
33
- added_at?: string;
34
- last_reviewed_time?: string | null;
35
- source_proposed_example_id?: string | null;
36
- }
37
- }
38
- export type RunUpdateResponse = unknown;
39
- export type RunListResponse = Array<AnnotationQueuesAPI.RunSchemaWithAnnotationQueueInfo>;
40
- export type RunDeleteAllResponse = unknown;
41
- export type RunDeleteQueueResponse = unknown;
42
- export type RunCreateParams = RunCreateParams.RunsUuidArray | RunCreateParams.RunsAnnotationQueueRunAddSchemaArray | RunCreateParams.Variant2;
43
- export declare namespace RunCreateParams {
44
- interface RunsUuidArray {
45
- body: Array<string>;
46
- }
47
- interface RunsAnnotationQueueRunAddSchemaArray {
48
- body: Array<RunsAnnotationQueueRunAddSchemaArray.Body>;
49
- }
50
- namespace RunsAnnotationQueueRunAddSchemaArray {
51
- /**
52
- * Add a single run to AQ (CH path) with an optional back-pointer to the
53
- * issues-agent proposal that seeded this add. Use when bulk-adding runs that come
54
- * from different proposals — each row carries its own source_proposed_example_id.
55
- * For unrelated bulk adds, prefer plain List[UUID] on the same endpoint.
56
- */
57
- interface Body {
58
- run_id: string;
59
- source_proposed_example_id?: string | null;
60
- }
61
- }
62
- interface Variant2 {
63
- body: Array<Variant2.Body>;
64
- }
65
- namespace Variant2 {
66
- /**
67
- * Deprecated: use plain UUID list or AddRunToQueueByKeyRequest instead.
68
- */
69
- interface Body {
70
- /**
71
- * @deprecated
72
- */
73
- run_id: string;
74
- /**
75
- * @deprecated
76
- */
77
- parent_run_id?: string | null;
78
- /**
79
- * @deprecated
80
- */
81
- session_id?: string | null;
82
- /**
83
- * @deprecated
84
- */
85
- start_time?: string | null;
86
- /**
87
- * @deprecated
88
- */
89
- trace_id?: string | null;
90
- /**
91
- * @deprecated
92
- */
93
- trace_tier?: 'longlived' | 'shortlived' | null;
94
- }
95
- }
96
- }
97
- export interface RunUpdateParams {
98
- /**
99
- * Path param
100
- */
101
- queue_id: string;
102
- /**
103
- * Body param
104
- */
105
- added_at?: string | null;
106
- /**
107
- * Body param
108
- */
109
- last_reviewed_time?: string | null;
110
- }
111
- export interface RunListParams {
112
- archived?: boolean | null;
113
- include_stats?: boolean | null;
114
- limit?: number;
115
- offset?: number;
116
- status?: 'needs_my_review' | 'needs_others_review' | 'completed' | null;
117
- }
118
- export interface RunDeleteAllParams {
119
- delete_all?: boolean;
120
- exclude_run_ids?: Array<string> | null;
121
- run_ids?: Array<string> | null;
122
- }
123
- export interface RunDeleteQueueParams {
124
- queue_id: string;
125
- }
126
- export declare namespace Runs {
127
- export { type RunCreateResponse as RunCreateResponse, type RunUpdateResponse as RunUpdateResponse, type RunListResponse as RunListResponse, type RunDeleteAllResponse as RunDeleteAllResponse, type RunDeleteQueueResponse as RunDeleteQueueResponse, type RunCreateParams as RunCreateParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunDeleteAllParams as RunDeleteAllParams, type RunDeleteQueueParams as RunDeleteQueueParams, };
128
- }
@@ -1,42 +0,0 @@
1
- // @ts-nocheck
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- import { APIResource } from '../../core/resource.js';
4
- import { path } from '../../internal/utils/path.js';
5
- export class Runs extends APIResource {
6
- /**
7
- * Add Runs To Annotation Queue
8
- */
9
- create(queueID, params, options) {
10
- const { body } = params;
11
- return this._client.post(path `/api/v1/annotation-queues/${queueID}/runs`, { body: body, ...options });
12
- }
13
- /**
14
- * Update Run In Annotation Queue
15
- */
16
- update(queueRunID, params, options) {
17
- const { queue_id, ...body } = params;
18
- return this._client.patch(path `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, {
19
- body,
20
- ...options,
21
- });
22
- }
23
- /**
24
- * Get Runs From Annotation Queue
25
- */
26
- list(queueID, query = {}, options) {
27
- return this._client.get(path `/api/v1/annotation-queues/${queueID}/runs`, { query, ...options });
28
- }
29
- /**
30
- * Delete Runs From Annotation Queue
31
- */
32
- deleteAll(queueID, body, options) {
33
- return this._client.post(path `/api/v1/annotation-queues/${queueID}/runs/delete`, { body, ...options });
34
- }
35
- /**
36
- * Delete Run From Annotation Queue
37
- */
38
- deleteQueue(queueRunID, params, options) {
39
- const { queue_id } = params;
40
- return this._client.delete(path `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, options);
41
- }
42
- }
@@ -1,44 +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.Commits = void 0;
6
- const resource_js_1 = require("../core/resource.cjs");
7
- const pagination_js_1 = require("../core/pagination.cjs");
8
- const path_js_1 = require("../internal/utils/path.cjs");
9
- class Commits extends resource_js_1.APIResource {
10
- /**
11
- * Creates a new commit in a repository. Requires authentication and write access
12
- * to the repository.
13
- */
14
- create(repo, params, options) {
15
- const { owner, ...body } = params;
16
- return this._client.post((0, path_js_1.path) `/commits/${owner}/${repo}`, { body, ...options });
17
- }
18
- /**
19
- * Retrieves a specific commit by hash, tag, or "latest" for a repository. This
20
- * endpoint supports both authenticated and unauthenticated access. Authenticated
21
- * users can access private repos, while unauthenticated users can only access
22
- * public repos. Commit resolution logic:
23
- *
24
- * - "latest" or empty: Get the most recent commit
25
- * - Less than 8 characters: Only check for tags
26
- * - 8 or more characters: Prioritize commit hash over tag, check both
27
- */
28
- retrieve(commit, params, options) {
29
- const { owner, repo, ...query } = params;
30
- return this._client.get((0, path_js_1.path) `/commits/${owner}/${repo}/${commit}`, { query, ...options });
31
- }
32
- /**
33
- * Lists all commits for a repository with pagination support. This endpoint
34
- * supports both authenticated and unauthenticated access. Authenticated users can
35
- * access private repos, while unauthenticated users can only access public repos.
36
- * The include_stats parameter controls whether download and view statistics are
37
- * computed (defaults to true).
38
- */
39
- list(repo, params, options) {
40
- const { owner, ...query } = params;
41
- return this._client.getAPIList((0, path_js_1.path) `/commits/${owner}/${repo}`, (pagination_js_1.OffsetPaginationCommits), { query, ...options });
42
- }
43
- }
44
- exports.Commits = Commits;
@@ -1,204 +0,0 @@
1
- import { APIResource } from '../core/resource.js';
2
- import { APIPromise } from '../core/api-promise.js';
3
- import { OffsetPaginationCommits, type OffsetPaginationCommitsParams, PagePromise } from '../core/pagination.js';
4
- import { RequestOptions } from '../internal/request-options.js';
5
- export declare class Commits extends APIResource {
6
- /**
7
- * Creates a new commit in a repository. Requires authentication and write access
8
- * to the repository.
9
- */
10
- create(repo: string, params: CommitCreateParams, options?: RequestOptions): APIPromise<CommitCreateResponse>;
11
- /**
12
- * Retrieves a specific commit by hash, tag, or "latest" for a repository. This
13
- * endpoint supports both authenticated and unauthenticated access. Authenticated
14
- * users can access private repos, while unauthenticated users can only access
15
- * public repos. Commit resolution logic:
16
- *
17
- * - "latest" or empty: Get the most recent commit
18
- * - Less than 8 characters: Only check for tags
19
- * - 8 or more characters: Prioritize commit hash over tag, check both
20
- */
21
- retrieve(commit: string, params: CommitRetrieveParams, options?: RequestOptions): APIPromise<CommitRetrieveResponse>;
22
- /**
23
- * Lists all commits for a repository with pagination support. This endpoint
24
- * supports both authenticated and unauthenticated access. Authenticated users can
25
- * access private repos, while unauthenticated users can only access public repos.
26
- * The include_stats parameter controls whether download and view statistics are
27
- * computed (defaults to true).
28
- */
29
- list(repo: string, params: CommitListParams, options?: RequestOptions): PagePromise<CommitWithLookupsOffsetPaginationCommits, CommitWithLookups>;
30
- }
31
- export type CommitWithLookupsOffsetPaginationCommits = OffsetPaginationCommits<CommitWithLookups>;
32
- /**
33
- * Response model for get_commit_manifest.
34
- */
35
- export interface CommitManifestResponse {
36
- commit_hash: string;
37
- manifest: {
38
- [key: string]: unknown;
39
- };
40
- examples?: Array<CommitManifestResponse.Example> | null;
41
- }
42
- export declare namespace CommitManifestResponse {
43
- /**
44
- * Response model for example runs
45
- */
46
- interface Example {
47
- id: string;
48
- session_id: string;
49
- inputs?: {
50
- [key: string]: unknown;
51
- } | null;
52
- outputs?: {
53
- [key: string]: unknown;
54
- } | null;
55
- start_time?: string | null;
56
- }
57
- }
58
- export interface CommitWithLookups {
59
- /**
60
- * The commit ID
61
- */
62
- id?: string;
63
- /**
64
- * The hash of the commit
65
- */
66
- commit_hash?: string;
67
- /**
68
- * When the commit was created
69
- */
70
- created_at?: string;
71
- /**
72
- * Optional human-readable description for the commit
73
- */
74
- description?: string;
75
- /**
76
- * Example run IDs associated with the commit
77
- */
78
- example_run_ids?: Array<string>;
79
- /**
80
- * Author's full name
81
- */
82
- full_name?: string;
83
- /**
84
- * The manifest of the commit
85
- */
86
- manifest?: unknown;
87
- /**
88
- * The SHA of the manifest
89
- */
90
- manifest_sha?: Array<number>;
91
- /**
92
- * Number of API downloads
93
- */
94
- num_downloads?: number;
95
- /**
96
- * Number of web views
97
- */
98
- num_views?: number;
99
- /**
100
- * The hash of the parent commit
101
- */
102
- parent_commit_hash?: string;
103
- /**
104
- * The ID of the parent commit
105
- */
106
- parent_id?: string;
107
- /**
108
- * Repository ID
109
- */
110
- repo_id?: string;
111
- /**
112
- * When the commit was last updated
113
- */
114
- updated_at?: string;
115
- }
116
- export interface CommitCreateResponse {
117
- commit?: CommitWithLookups;
118
- }
119
- export interface CommitRetrieveResponse {
120
- commit_hash?: string;
121
- description?: string;
122
- examples?: Array<CommitRetrieveResponse.Example>;
123
- is_draft?: boolean;
124
- manifest?: unknown;
125
- model_config?: unknown;
126
- model_provider?: string;
127
- }
128
- export declare namespace CommitRetrieveResponse {
129
- interface Example {
130
- id?: string;
131
- inputs?: unknown;
132
- outputs?: unknown;
133
- session_id?: string;
134
- start_time?: string;
135
- }
136
- }
137
- export interface CommitCreateParams {
138
- /**
139
- * Path param: Repository owner (tenant handle) or '-' for private repos
140
- */
141
- owner: string;
142
- /**
143
- * Body param
144
- */
145
- description?: string;
146
- /**
147
- * Body param
148
- */
149
- manifest?: unknown;
150
- /**
151
- * Body param
152
- */
153
- parent_commit?: string;
154
- /**
155
- * Body param: SkipWebhooks allows skipping webhook notifications. Can be true
156
- * (boolean) to skip all, or an array of webhook UUIDs to skip specific ones.
157
- */
158
- skip_webhooks?: unknown;
159
- }
160
- export interface CommitRetrieveParams {
161
- /**
162
- * Path param: Repository owner (tenant handle) or '-' for private repos
163
- */
164
- owner: string;
165
- /**
166
- * Path param: Repository handle
167
- */
168
- repo: string;
169
- /**
170
- * Query param
171
- */
172
- get_examples?: boolean;
173
- /**
174
- * Query param: Comma-separated list of optional fields: "model", "is_draft"
175
- */
176
- include?: string;
177
- /**
178
- * Query param: Deprecated: use Include instead
179
- */
180
- include_model?: boolean;
181
- /**
182
- * Query param
183
- */
184
- is_view?: boolean;
185
- }
186
- export interface CommitListParams extends OffsetPaginationCommitsParams {
187
- /**
188
- * Path param: Repository owner (tenant handle) or '-' for private repos
189
- */
190
- owner: string;
191
- /**
192
- * Query param: IncludeStats determines whether to compute num_downloads and
193
- * num_views
194
- */
195
- include_stats?: boolean;
196
- /**
197
- * Query param: Tag filters commits to only those with a specific tag (e.g.
198
- * "production", "staging")
199
- */
200
- tag?: string;
201
- }
202
- export declare namespace Commits {
203
- export { type CommitManifestResponse as CommitManifestResponse, type CommitWithLookups as CommitWithLookups, type CommitCreateResponse as CommitCreateResponse, type CommitRetrieveResponse as CommitRetrieveResponse, type CommitWithLookupsOffsetPaginationCommits as CommitWithLookupsOffsetPaginationCommits, type CommitCreateParams as CommitCreateParams, type CommitRetrieveParams as CommitRetrieveParams, type CommitListParams as CommitListParams, };
204
- }
@@ -1,40 +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 { OffsetPaginationCommits } from '../core/pagination.js';
5
- import { path } from '../internal/utils/path.js';
6
- export class Commits extends APIResource {
7
- /**
8
- * Creates a new commit in a repository. Requires authentication and write access
9
- * to the repository.
10
- */
11
- create(repo, params, options) {
12
- const { owner, ...body } = params;
13
- return this._client.post(path `/commits/${owner}/${repo}`, { body, ...options });
14
- }
15
- /**
16
- * Retrieves a specific commit by hash, tag, or "latest" for a repository. This
17
- * endpoint supports both authenticated and unauthenticated access. Authenticated
18
- * users can access private repos, while unauthenticated users can only access
19
- * public repos. Commit resolution logic:
20
- *
21
- * - "latest" or empty: Get the most recent commit
22
- * - Less than 8 characters: Only check for tags
23
- * - 8 or more characters: Prioritize commit hash over tag, check both
24
- */
25
- retrieve(commit, params, options) {
26
- const { owner, repo, ...query } = params;
27
- return this._client.get(path `/commits/${owner}/${repo}/${commit}`, { query, ...options });
28
- }
29
- /**
30
- * Lists all commits for a repository with pagination support. This endpoint
31
- * supports both authenticated and unauthenticated access. Authenticated users can
32
- * access private repos, while unauthenticated users can only access public repos.
33
- * The include_stats parameter controls whether download and view statistics are
34
- * computed (defaults to true).
35
- */
36
- list(repo, params, options) {
37
- const { owner, ...query } = params;
38
- return this._client.getAPIList(path `/commits/${owner}/${repo}`, (OffsetPaginationCommits), { query, ...options });
39
- }
40
- }
@@ -1,15 +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.Evaluators = void 0;
6
- const resource_js_1 = require("../core/resource.cjs");
7
- class Evaluators extends resource_js_1.APIResource {
8
- /**
9
- * List all run rules.
10
- */
11
- list(query = {}, options) {
12
- return this._client.get('/api/v1/runs/rules', { query, ...options });
13
- }
14
- }
15
- exports.Evaluators = Evaluators;