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.
Files changed (234) hide show
  1. package/README.md +161 -15
  2. package/dist/_openapi_client/client.cjs +814 -0
  3. package/dist/_openapi_client/client.d.ts +247 -0
  4. package/dist/_openapi_client/client.js +777 -0
  5. package/dist/_openapi_client/core/api-promise.cjs +100 -0
  6. package/dist/_openapi_client/core/api-promise.d.ts +45 -0
  7. package/dist/_openapi_client/core/api-promise.js +96 -0
  8. package/dist/_openapi_client/core/error.cjs +134 -0
  9. package/dist/_openapi_client/core/error.d.ts +45 -0
  10. package/dist/_openapi_client/core/error.js +118 -0
  11. package/dist/_openapi_client/core/pagination.cjs +374 -0
  12. package/dist/_openapi_client/core/pagination.d.ts +157 -0
  13. package/dist/_openapi_client/core/pagination.js +361 -0
  14. package/dist/_openapi_client/core/resource.cjs +17 -0
  15. package/dist/_openapi_client/core/resource.d.ts +5 -0
  16. package/dist/_openapi_client/core/resource.js +13 -0
  17. package/dist/_openapi_client/core/uploads.cjs +5 -0
  18. package/dist/_openapi_client/core/uploads.d.ts +2 -0
  19. package/dist/_openapi_client/core/uploads.js +1 -0
  20. package/dist/_openapi_client/index.cjs +29 -0
  21. package/dist/_openapi_client/index.d.ts +6 -0
  22. package/dist/_openapi_client/index.js +8 -0
  23. package/dist/_openapi_client/internal/builtin-types.cjs +4 -0
  24. package/dist/_openapi_client/internal/builtin-types.d.ts +72 -0
  25. package/dist/_openapi_client/internal/builtin-types.js +3 -0
  26. package/dist/_openapi_client/internal/detect-platform.cjs +162 -0
  27. package/dist/_openapi_client/internal/detect-platform.d.ts +14 -0
  28. package/dist/_openapi_client/internal/detect-platform.js +157 -0
  29. package/dist/_openapi_client/internal/errors.cjs +41 -0
  30. package/dist/_openapi_client/internal/errors.d.ts +2 -0
  31. package/dist/_openapi_client/internal/errors.js +36 -0
  32. package/dist/_openapi_client/internal/headers.cjs +79 -0
  33. package/dist/_openapi_client/internal/headers.d.ts +5 -0
  34. package/dist/_openapi_client/internal/headers.js +74 -0
  35. package/dist/_openapi_client/internal/parse.cjs +40 -0
  36. package/dist/_openapi_client/internal/parse.d.ts +11 -0
  37. package/dist/_openapi_client/internal/parse.js +37 -0
  38. package/dist/_openapi_client/internal/qs/formats.cjs +12 -0
  39. package/dist/_openapi_client/internal/qs/formats.d.ts +6 -0
  40. package/dist/_openapi_client/internal/qs/formats.js +8 -0
  41. package/dist/_openapi_client/internal/qs/stringify.cjs +277 -0
  42. package/dist/_openapi_client/internal/qs/stringify.d.ts +2 -0
  43. package/dist/_openapi_client/internal/qs/stringify.js +274 -0
  44. package/dist/_openapi_client/internal/qs/types.cjs +2 -0
  45. package/dist/_openapi_client/internal/qs/types.d.ts +56 -0
  46. package/dist/_openapi_client/internal/qs/types.js +1 -0
  47. package/dist/_openapi_client/internal/qs/utils.cjs +230 -0
  48. package/dist/_openapi_client/internal/qs/utils.d.ts +14 -0
  49. package/dist/_openapi_client/internal/qs/utils.js +217 -0
  50. package/dist/_openapi_client/internal/request-options.cjs +14 -0
  51. package/dist/_openapi_client/internal/request-options.d.ts +74 -0
  52. package/dist/_openapi_client/internal/request-options.js +10 -0
  53. package/dist/_openapi_client/internal/shim-types.cjs +4 -0
  54. package/dist/_openapi_client/internal/shim-types.d.ts +16 -0
  55. package/dist/_openapi_client/internal/shim-types.js +3 -0
  56. package/dist/_openapi_client/internal/shims.cjs +92 -0
  57. package/dist/_openapi_client/internal/shims.d.ts +25 -0
  58. package/dist/_openapi_client/internal/shims.js +85 -0
  59. package/dist/_openapi_client/internal/to-file.cjs +91 -0
  60. package/dist/_openapi_client/internal/to-file.d.ts +44 -0
  61. package/dist/_openapi_client/internal/to-file.js +88 -0
  62. package/dist/_openapi_client/internal/types.cjs +4 -0
  63. package/dist/_openapi_client/internal/types.d.ts +62 -0
  64. package/dist/_openapi_client/internal/types.js +3 -0
  65. package/dist/_openapi_client/internal/uploads.cjs +140 -0
  66. package/dist/_openapi_client/internal/uploads.d.ts +41 -0
  67. package/dist/_openapi_client/internal/uploads.js +130 -0
  68. package/dist/_openapi_client/internal/utils/env.cjs +22 -0
  69. package/dist/_openapi_client/internal/utils/env.d.ts +8 -0
  70. package/dist/_openapi_client/internal/utils/env.js +18 -0
  71. package/dist/_openapi_client/internal/utils/log.cjs +88 -0
  72. package/dist/_openapi_client/internal/utils/log.d.ts +36 -0
  73. package/dist/_openapi_client/internal/utils/log.js +82 -0
  74. package/dist/_openapi_client/internal/utils/path.cjs +79 -0
  75. package/dist/_openapi_client/internal/utils/path.d.ts +14 -0
  76. package/dist/_openapi_client/internal/utils/path.js +74 -0
  77. package/dist/_openapi_client/internal/utils/query.cjs +42 -0
  78. package/dist/_openapi_client/internal/utils/query.d.ts +1 -0
  79. package/dist/_openapi_client/internal/utils/query.js +6 -0
  80. package/dist/_openapi_client/internal/utils/sleep.cjs +7 -0
  81. package/dist/_openapi_client/internal/utils/sleep.d.ts +1 -0
  82. package/dist/_openapi_client/internal/utils/sleep.js +3 -0
  83. package/dist/_openapi_client/internal/utils/uuid.cjs +19 -0
  84. package/dist/_openapi_client/internal/utils/uuid.d.ts +4 -0
  85. package/dist/_openapi_client/internal/utils/uuid.js +15 -0
  86. package/dist/_openapi_client/internal/utils/values.cjs +112 -0
  87. package/dist/_openapi_client/internal/utils/values.d.ts +17 -0
  88. package/dist/_openapi_client/internal/utils/values.js +94 -0
  89. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +138 -0
  90. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +367 -0
  91. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +101 -0
  92. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +46 -0
  93. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +128 -0
  94. package/dist/_openapi_client/resources/annotation-queues/runs.js +42 -0
  95. package/dist/_openapi_client/resources/commits.cjs +44 -0
  96. package/dist/_openapi_client/resources/commits.d.ts +204 -0
  97. package/dist/_openapi_client/resources/commits.js +40 -0
  98. package/dist/_openapi_client/resources/datasets/comparative.cjs +22 -0
  99. package/dist/_openapi_client/resources/datasets/comparative.d.ts +55 -0
  100. package/dist/_openapi_client/resources/datasets/comparative.js +18 -0
  101. package/dist/_openapi_client/resources/datasets/datasets.cjs +193 -0
  102. package/dist/_openapi_client/resources/datasets/datasets.d.ts +374 -0
  103. package/dist/_openapi_client/resources/datasets/datasets.js +156 -0
  104. package/dist/_openapi_client/resources/datasets/experiments.cjs +16 -0
  105. package/dist/_openapi_client/resources/datasets/experiments.d.ts +23 -0
  106. package/dist/_openapi_client/resources/datasets/experiments.js +12 -0
  107. package/dist/_openapi_client/resources/datasets/group.cjs +17 -0
  108. package/dist/_openapi_client/resources/datasets/group.d.ts +160 -0
  109. package/dist/_openapi_client/resources/datasets/group.js +13 -0
  110. package/dist/_openapi_client/resources/datasets/runs.cjs +29 -0
  111. package/dist/_openapi_client/resources/datasets/runs.d.ts +216 -0
  112. package/dist/_openapi_client/resources/datasets/runs.js +25 -0
  113. package/dist/_openapi_client/resources/datasets/share.cjs +32 -0
  114. package/dist/_openapi_client/resources/datasets/share.d.ts +28 -0
  115. package/dist/_openapi_client/resources/datasets/share.js +28 -0
  116. package/dist/_openapi_client/resources/datasets/splits.cjs +22 -0
  117. package/dist/_openapi_client/resources/datasets/splits.d.ts +30 -0
  118. package/dist/_openapi_client/resources/datasets/splits.js +18 -0
  119. package/dist/_openapi_client/resources/datasets/versions.cjs +23 -0
  120. package/dist/_openapi_client/resources/datasets/versions.d.ts +36 -0
  121. package/dist/_openapi_client/resources/datasets/versions.js +19 -0
  122. package/dist/_openapi_client/resources/evaluators.cjs +15 -0
  123. package/dist/_openapi_client/resources/evaluators.d.ts +125 -0
  124. package/dist/_openapi_client/resources/evaluators.js +11 -0
  125. package/dist/_openapi_client/resources/examples/bulk.cjs +24 -0
  126. package/dist/_openapi_client/resources/examples/bulk.d.ts +78 -0
  127. package/dist/_openapi_client/resources/examples/bulk.js +20 -0
  128. package/dist/_openapi_client/resources/examples/examples.cjs +124 -0
  129. package/dist/_openapi_client/resources/examples/examples.d.ts +182 -0
  130. package/dist/_openapi_client/resources/examples/examples.js +87 -0
  131. package/dist/_openapi_client/resources/examples/validate.cjs +21 -0
  132. package/dist/_openapi_client/resources/examples/validate.d.ts +38 -0
  133. package/dist/_openapi_client/resources/examples/validate.js +17 -0
  134. package/dist/_openapi_client/resources/feedback/configs.cjs +24 -0
  135. package/dist/_openapi_client/resources/feedback/configs.d.ts +18 -0
  136. package/dist/_openapi_client/resources/feedback/configs.js +20 -0
  137. package/dist/_openapi_client/resources/feedback/feedback.cjs +98 -0
  138. package/dist/_openapi_client/resources/feedback/feedback.d.ts +275 -0
  139. package/dist/_openapi_client/resources/feedback/feedback.js +61 -0
  140. package/dist/_openapi_client/resources/feedback/tokens.cjs +35 -0
  141. package/dist/_openapi_client/resources/feedback/tokens.d.ts +130 -0
  142. package/dist/_openapi_client/resources/feedback/tokens.js +31 -0
  143. package/dist/_openapi_client/resources/index.cjs +35 -0
  144. package/dist/_openapi_client/resources/index.d.ts +15 -0
  145. package/dist/_openapi_client/resources/index.js +17 -0
  146. package/dist/_openapi_client/resources/info.cjs +15 -0
  147. package/dist/_openapi_client/resources/info.d.ts +51 -0
  148. package/dist/_openapi_client/resources/info.js +11 -0
  149. package/dist/_openapi_client/resources/online-evaluators.cjs +70 -0
  150. package/dist/_openapi_client/resources/online-evaluators.d.ts +284 -0
  151. package/dist/_openapi_client/resources/online-evaluators.js +66 -0
  152. package/dist/_openapi_client/resources/public/datasets.cjs +47 -0
  153. package/dist/_openapi_client/resources/public/datasets.d.ts +152 -0
  154. package/dist/_openapi_client/resources/public/datasets.js +43 -0
  155. package/dist/_openapi_client/resources/public/public.cjs +62 -0
  156. package/dist/_openapi_client/resources/public/public.d.ts +32 -0
  157. package/dist/_openapi_client/resources/public/public.js +25 -0
  158. package/dist/_openapi_client/resources/repos/directories.cjs +40 -0
  159. package/dist/_openapi_client/resources/repos/directories.d.ts +72 -0
  160. package/dist/_openapi_client/resources/repos/directories.js +36 -0
  161. package/dist/_openapi_client/resources/repos/repos.cjs +93 -0
  162. package/dist/_openapi_client/resources/repos/repos.d.ts +188 -0
  163. package/dist/_openapi_client/resources/repos/repos.js +56 -0
  164. package/dist/_openapi_client/resources/runs/rules.cjs +9 -0
  165. package/dist/_openapi_client/resources/runs/rules.d.ts +3 -0
  166. package/dist/_openapi_client/resources/runs/rules.js +5 -0
  167. package/dist/_openapi_client/resources/runs/runs.cjs +102 -0
  168. package/dist/_openapi_client/resources/runs/runs.d.ts +542 -0
  169. package/dist/_openapi_client/resources/runs/runs.js +65 -0
  170. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
  171. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +1121 -0
  172. package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
  173. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +63 -0
  174. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +13 -0
  175. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +26 -0
  176. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
  177. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +130 -0
  178. package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
  179. package/dist/_openapi_client/resources/sessions/insights.cjs +54 -0
  180. package/dist/_openapi_client/resources/sessions/insights.d.ts +246 -0
  181. package/dist/_openapi_client/resources/sessions/insights.js +50 -0
  182. package/dist/_openapi_client/resources/sessions/sessions.cjs +109 -0
  183. package/dist/_openapi_client/resources/sessions/sessions.d.ts +674 -0
  184. package/dist/_openapi_client/resources/sessions/sessions.js +72 -0
  185. package/dist/_openapi_client/resources/settings.cjs +15 -0
  186. package/dist/_openapi_client/resources/settings.d.ts +18 -0
  187. package/dist/_openapi_client/resources/settings.js +11 -0
  188. package/dist/_openapi_client/resources/workspaces.cjs +35 -0
  189. package/dist/_openapi_client/resources/workspaces.d.ts +84 -0
  190. package/dist/_openapi_client/resources/workspaces.js +31 -0
  191. package/dist/_openapi_client/version.cjs +5 -0
  192. package/dist/_openapi_client/version.d.ts +1 -0
  193. package/dist/_openapi_client/version.js +2 -0
  194. package/dist/client.cjs +48 -19
  195. package/dist/client.d.ts +5 -0
  196. package/dist/client.js +29 -0
  197. package/dist/env.cjs +3 -3
  198. package/dist/env.d.ts +1 -1
  199. package/dist/env.js +1 -1
  200. package/dist/evaluation/_runner.cjs +31 -3
  201. package/dist/evaluation/_runner.d.ts +2 -0
  202. package/dist/evaluation/_runner.js +30 -4
  203. package/dist/experimental/otel/exporter.cjs +1 -1
  204. package/dist/experimental/otel/exporter.js +2 -2
  205. package/dist/experimental/vercel/telemetry.cjs +1 -1
  206. package/dist/experimental/vercel/telemetry.js +2 -2
  207. package/dist/index.cjs +4 -2
  208. package/dist/index.d.ts +2 -1
  209. package/dist/index.js +2 -1
  210. package/dist/run_trees.cjs +1 -1
  211. package/dist/run_trees.js +2 -2
  212. package/dist/sandbox/client.cjs +11 -3
  213. package/dist/sandbox/client.js +11 -3
  214. package/dist/sandbox/errors.cjs +2 -1
  215. package/dist/sandbox/errors.d.ts +2 -1
  216. package/dist/sandbox/errors.js +2 -1
  217. package/dist/sandbox/index.cjs +8 -2
  218. package/dist/sandbox/index.d.ts +3 -2
  219. package/dist/sandbox/index.js +2 -1
  220. package/dist/sandbox/mounts.cjs +114 -0
  221. package/dist/sandbox/mounts.d.ts +24 -0
  222. package/dist/sandbox/mounts.js +109 -0
  223. package/dist/sandbox/proxy_config.cjs +90 -5
  224. package/dist/sandbox/proxy_config.d.ts +19 -4
  225. package/dist/sandbox/proxy_config.js +86 -4
  226. package/dist/sandbox/types.d.ts +92 -3
  227. package/dist/traceable.cjs +1 -1
  228. package/dist/traceable.js +2 -2
  229. package/dist/utils/guard.cjs +13 -0
  230. package/dist/utils/guard.d.ts +6 -0
  231. package/dist/utils/guard.js +10 -0
  232. package/dist/utils/jestlike/globals.cjs +1 -1
  233. package/dist/utils/jestlike/globals.js +2 -2
  234. package/package.json +1 -1
@@ -0,0 +1,361 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
4
+ if (kind === "m") throw new TypeError("Private method is not writable");
5
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
6
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
7
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
8
+ };
9
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13
+ };
14
+ var _AbstractPage_client;
15
+ import { LangsmithError } from './error.js';
16
+ import { defaultParseResponse } from '../internal/parse.js';
17
+ import { APIPromise } from './api-promise.js';
18
+ import { maybeObj } from '../internal/utils/values.js';
19
+ export class AbstractPage {
20
+ constructor(client, response, body, options) {
21
+ _AbstractPage_client.set(this, void 0);
22
+ Object.defineProperty(this, "options", {
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true,
26
+ value: void 0
27
+ });
28
+ Object.defineProperty(this, "response", {
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true,
32
+ value: void 0
33
+ });
34
+ Object.defineProperty(this, "body", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: void 0
39
+ });
40
+ __classPrivateFieldSet(this, _AbstractPage_client, client, "f");
41
+ this.options = options;
42
+ this.response = response;
43
+ this.body = body;
44
+ }
45
+ hasNextPage() {
46
+ const items = this.getPaginatedItems();
47
+ if (!items.length)
48
+ return false;
49
+ return this.nextPageRequestOptions() != null;
50
+ }
51
+ async getNextPage() {
52
+ const nextOptions = this.nextPageRequestOptions();
53
+ if (!nextOptions) {
54
+ throw new LangsmithError('No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.');
55
+ }
56
+ return await __classPrivateFieldGet(this, _AbstractPage_client, "f").requestAPIList(this.constructor, nextOptions);
57
+ }
58
+ async *iterPages() {
59
+ let page = this;
60
+ yield page;
61
+ while (page.hasNextPage()) {
62
+ page = await page.getNextPage();
63
+ yield page;
64
+ }
65
+ }
66
+ async *[(_AbstractPage_client = new WeakMap(), Symbol.asyncIterator)]() {
67
+ for await (const page of this.iterPages()) {
68
+ for (const item of page.getPaginatedItems()) {
69
+ yield item;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ /**
75
+ * This subclass of Promise will resolve to an instantiated Page once the request completes.
76
+ *
77
+ * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg:
78
+ *
79
+ * for await (const item of client.items.list()) {
80
+ * console.log(item)
81
+ * }
82
+ */
83
+ export class PagePromise extends APIPromise {
84
+ constructor(client, request, Page) {
85
+ super(client, request, async (client, props) => new Page(client, props.response, await defaultParseResponse(client, props), props.options));
86
+ }
87
+ /**
88
+ * Allow auto-paginating iteration on an unawaited list call, eg:
89
+ *
90
+ * for await (const item of client.items.list()) {
91
+ * console.log(item)
92
+ * }
93
+ */
94
+ async *[Symbol.asyncIterator]() {
95
+ const page = await this;
96
+ for await (const item of page) {
97
+ yield item;
98
+ }
99
+ }
100
+ }
101
+ export class OffsetPaginationTopLevelArray extends AbstractPage {
102
+ constructor(client, response, body, options) {
103
+ super(client, response, body, options);
104
+ Object.defineProperty(this, "items", {
105
+ enumerable: true,
106
+ configurable: true,
107
+ writable: true,
108
+ value: void 0
109
+ });
110
+ this.items = body || [];
111
+ }
112
+ getPaginatedItems() {
113
+ return this.items ?? [];
114
+ }
115
+ nextPageRequestOptions() {
116
+ const offset = this.options.query.offset ?? 0;
117
+ const length = this.getPaginatedItems().length;
118
+ const currentCount = offset + length;
119
+ return {
120
+ ...this.options,
121
+ query: {
122
+ ...maybeObj(this.options.query),
123
+ offset: currentCount,
124
+ },
125
+ };
126
+ }
127
+ }
128
+ export class OffsetPaginationRepos extends AbstractPage {
129
+ constructor(client, response, body, options) {
130
+ super(client, response, body, options);
131
+ Object.defineProperty(this, "repos", {
132
+ enumerable: true,
133
+ configurable: true,
134
+ writable: true,
135
+ value: void 0
136
+ });
137
+ Object.defineProperty(this, "total", {
138
+ enumerable: true,
139
+ configurable: true,
140
+ writable: true,
141
+ value: void 0
142
+ });
143
+ this.repos = body.repos || [];
144
+ this.total = body.total || 0;
145
+ }
146
+ getPaginatedItems() {
147
+ return this.repos ?? [];
148
+ }
149
+ nextPageRequestOptions() {
150
+ const offset = this.options.query.offset ?? 0;
151
+ const length = this.getPaginatedItems().length;
152
+ const currentCount = offset + length;
153
+ return {
154
+ ...this.options,
155
+ query: {
156
+ ...maybeObj(this.options.query),
157
+ offset: currentCount,
158
+ },
159
+ };
160
+ }
161
+ }
162
+ export class OffsetPaginationCommits extends AbstractPage {
163
+ constructor(client, response, body, options) {
164
+ super(client, response, body, options);
165
+ Object.defineProperty(this, "commits", {
166
+ enumerable: true,
167
+ configurable: true,
168
+ writable: true,
169
+ value: void 0
170
+ });
171
+ Object.defineProperty(this, "total", {
172
+ enumerable: true,
173
+ configurable: true,
174
+ writable: true,
175
+ value: void 0
176
+ });
177
+ this.commits = body.commits || [];
178
+ this.total = body.total || 0;
179
+ }
180
+ getPaginatedItems() {
181
+ return this.commits ?? [];
182
+ }
183
+ nextPageRequestOptions() {
184
+ const offset = this.options.query.offset ?? 0;
185
+ const length = this.getPaginatedItems().length;
186
+ const currentCount = offset + length;
187
+ return {
188
+ ...this.options,
189
+ query: {
190
+ ...maybeObj(this.options.query),
191
+ offset: currentCount,
192
+ },
193
+ };
194
+ }
195
+ }
196
+ export class OffsetPaginationOnlineEvaluators extends AbstractPage {
197
+ constructor(client, response, body, options) {
198
+ super(client, response, body, options);
199
+ Object.defineProperty(this, "evaluators", {
200
+ enumerable: true,
201
+ configurable: true,
202
+ writable: true,
203
+ value: void 0
204
+ });
205
+ Object.defineProperty(this, "total", {
206
+ enumerable: true,
207
+ configurable: true,
208
+ writable: true,
209
+ value: void 0
210
+ });
211
+ this.evaluators = body.evaluators || [];
212
+ this.total = body.total || 0;
213
+ }
214
+ getPaginatedItems() {
215
+ return this.evaluators ?? [];
216
+ }
217
+ nextPageRequestOptions() {
218
+ const offset = this.options.query.offset ?? 0;
219
+ const length = this.getPaginatedItems().length;
220
+ const currentCount = offset + length;
221
+ return {
222
+ ...this.options,
223
+ query: {
224
+ ...maybeObj(this.options.query),
225
+ offset: currentCount,
226
+ },
227
+ };
228
+ }
229
+ }
230
+ export class OffsetPaginationInsightsClusteringJobs extends AbstractPage {
231
+ constructor(client, response, body, options) {
232
+ super(client, response, body, options);
233
+ Object.defineProperty(this, "clustering_jobs", {
234
+ enumerable: true,
235
+ configurable: true,
236
+ writable: true,
237
+ value: void 0
238
+ });
239
+ this.clustering_jobs = body.clustering_jobs || [];
240
+ }
241
+ getPaginatedItems() {
242
+ return this.clustering_jobs ?? [];
243
+ }
244
+ nextPageRequestOptions() {
245
+ const offset = this.options.query.offset ?? 0;
246
+ const length = this.getPaginatedItems().length;
247
+ const currentCount = offset + length;
248
+ return {
249
+ ...this.options,
250
+ query: {
251
+ ...maybeObj(this.options.query),
252
+ offset: currentCount,
253
+ },
254
+ };
255
+ }
256
+ }
257
+ export class CursorPagination extends AbstractPage {
258
+ constructor(client, response, body, options) {
259
+ super(client, response, body, options);
260
+ Object.defineProperty(this, "runs", {
261
+ enumerable: true,
262
+ configurable: true,
263
+ writable: true,
264
+ value: void 0
265
+ });
266
+ Object.defineProperty(this, "cursors", {
267
+ enumerable: true,
268
+ configurable: true,
269
+ writable: true,
270
+ value: void 0
271
+ });
272
+ this.runs = body.runs || [];
273
+ this.cursors = body.cursors || {};
274
+ }
275
+ getPaginatedItems() {
276
+ return this.runs ?? [];
277
+ }
278
+ nextPageRequestOptions() {
279
+ const cursor = this.cursors?.next;
280
+ if (!cursor) {
281
+ return null;
282
+ }
283
+ return {
284
+ ...this.options,
285
+ query: {
286
+ ...maybeObj(this.options.query),
287
+ cursor,
288
+ },
289
+ };
290
+ }
291
+ }
292
+ export class ItemsCursorPostPagination extends AbstractPage {
293
+ constructor(client, response, body, options) {
294
+ super(client, response, body, options);
295
+ Object.defineProperty(this, "items", {
296
+ enumerable: true,
297
+ configurable: true,
298
+ writable: true,
299
+ value: void 0
300
+ });
301
+ Object.defineProperty(this, "next_cursor", {
302
+ enumerable: true,
303
+ configurable: true,
304
+ writable: true,
305
+ value: void 0
306
+ });
307
+ this.items = body.items || [];
308
+ this.next_cursor = body.next_cursor || '';
309
+ }
310
+ getPaginatedItems() {
311
+ return this.items ?? [];
312
+ }
313
+ nextPageRequestOptions() {
314
+ const cursor = this.next_cursor;
315
+ if (!cursor) {
316
+ return null;
317
+ }
318
+ return {
319
+ ...this.options,
320
+ body: {
321
+ ...maybeObj(this.options.body),
322
+ cursor,
323
+ },
324
+ };
325
+ }
326
+ }
327
+ export class ItemsCursorGetPagination extends AbstractPage {
328
+ constructor(client, response, body, options) {
329
+ super(client, response, body, options);
330
+ Object.defineProperty(this, "items", {
331
+ enumerable: true,
332
+ configurable: true,
333
+ writable: true,
334
+ value: void 0
335
+ });
336
+ Object.defineProperty(this, "next_cursor", {
337
+ enumerable: true,
338
+ configurable: true,
339
+ writable: true,
340
+ value: void 0
341
+ });
342
+ this.items = body.items || [];
343
+ this.next_cursor = body.next_cursor || '';
344
+ }
345
+ getPaginatedItems() {
346
+ return this.items ?? [];
347
+ }
348
+ nextPageRequestOptions() {
349
+ const cursor = this.next_cursor;
350
+ if (!cursor) {
351
+ return null;
352
+ }
353
+ return {
354
+ ...this.options,
355
+ query: {
356
+ ...maybeObj(this.options.query),
357
+ cursor,
358
+ },
359
+ };
360
+ }
361
+ }
@@ -0,0 +1,17 @@
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.APIResource = void 0;
6
+ class APIResource {
7
+ constructor(client) {
8
+ Object.defineProperty(this, "_client", {
9
+ enumerable: true,
10
+ configurable: true,
11
+ writable: true,
12
+ value: void 0
13
+ });
14
+ this._client = client;
15
+ }
16
+ }
17
+ exports.APIResource = APIResource;
@@ -0,0 +1,5 @@
1
+ import type { Langsmith } from '../client.js';
2
+ export declare abstract class APIResource {
3
+ protected _client: Langsmith;
4
+ constructor(client: Langsmith);
5
+ }
@@ -0,0 +1,13 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ export class APIResource {
4
+ constructor(client) {
5
+ Object.defineProperty(this, "_client", {
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true,
9
+ value: void 0
10
+ });
11
+ this._client = client;
12
+ }
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toFile = void 0;
4
+ var to_file_js_1 = require("../internal/to-file.cjs");
5
+ Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return to_file_js_1.toFile; } });
@@ -0,0 +1,2 @@
1
+ export { type Uploadable } from '../internal/uploads.js';
2
+ export { toFile, type ToFileInput } from '../internal/to-file.js';
@@ -0,0 +1 @@
1
+ export { toFile } from '../internal/to-file.js';
@@ -0,0 +1,29 @@
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.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.LangsmithError = exports.PagePromise = exports.Langsmith = exports.APIPromise = exports.toFile = exports.default = void 0;
6
+ var client_js_1 = require("./client.cjs");
7
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return client_js_1.Langsmith; } });
8
+ var uploads_js_1 = require("./core/uploads.cjs");
9
+ Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_js_1.toFile; } });
10
+ var api_promise_js_1 = require("./core/api-promise.cjs");
11
+ Object.defineProperty(exports, "APIPromise", { enumerable: true, get: function () { return api_promise_js_1.APIPromise; } });
12
+ var client_js_2 = require("./client.cjs");
13
+ Object.defineProperty(exports, "Langsmith", { enumerable: true, get: function () { return client_js_2.Langsmith; } });
14
+ var pagination_js_1 = require("./core/pagination.cjs");
15
+ Object.defineProperty(exports, "PagePromise", { enumerable: true, get: function () { return pagination_js_1.PagePromise; } });
16
+ var error_js_1 = require("./core/error.cjs");
17
+ Object.defineProperty(exports, "LangsmithError", { enumerable: true, get: function () { return error_js_1.LangsmithError; } });
18
+ Object.defineProperty(exports, "APIError", { enumerable: true, get: function () { return error_js_1.APIError; } });
19
+ Object.defineProperty(exports, "APIConnectionError", { enumerable: true, get: function () { return error_js_1.APIConnectionError; } });
20
+ Object.defineProperty(exports, "APIConnectionTimeoutError", { enumerable: true, get: function () { return error_js_1.APIConnectionTimeoutError; } });
21
+ Object.defineProperty(exports, "APIUserAbortError", { enumerable: true, get: function () { return error_js_1.APIUserAbortError; } });
22
+ Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return error_js_1.NotFoundError; } });
23
+ Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return error_js_1.ConflictError; } });
24
+ Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return error_js_1.RateLimitError; } });
25
+ Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return error_js_1.BadRequestError; } });
26
+ Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return error_js_1.AuthenticationError; } });
27
+ Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return error_js_1.InternalServerError; } });
28
+ Object.defineProperty(exports, "PermissionDeniedError", { enumerable: true, get: function () { return error_js_1.PermissionDeniedError; } });
29
+ Object.defineProperty(exports, "UnprocessableEntityError", { enumerable: true, get: function () { return error_js_1.UnprocessableEntityError; } });
@@ -0,0 +1,6 @@
1
+ export { Langsmith as default } from './client.js';
2
+ export { type Uploadable, toFile } from './core/uploads.js';
3
+ export { APIPromise } from './core/api-promise.js';
4
+ export { Langsmith, type ClientOptions } from './client.js';
5
+ export { PagePromise } from './core/pagination.js';
6
+ export { LangsmithError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from './core/error.js';
@@ -0,0 +1,8 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ export { Langsmith as default } from './client.js';
4
+ export { toFile } from './core/uploads.js';
5
+ export { APIPromise } from './core/api-promise.js';
6
+ export { Langsmith } from './client.js';
7
+ export { PagePromise } from './core/pagination.js';
8
+ export { LangsmithError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from './core/error.js';
@@ -0,0 +1,4 @@
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 });
@@ -0,0 +1,72 @@
1
+ export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
2
+ /**
3
+ * An alias to the builtin `RequestInit` type so we can
4
+ * easily alias it in import statements if there are name clashes.
5
+ *
6
+ * https://developer.mozilla.org/docs/Web/API/RequestInit
7
+ */
8
+ type _RequestInit = RequestInit;
9
+ /**
10
+ * An alias to the builtin `Response` type so we can
11
+ * easily alias it in import statements if there are name clashes.
12
+ *
13
+ * https://developer.mozilla.org/docs/Web/API/Response
14
+ */
15
+ type _Response = Response;
16
+ /**
17
+ * The type for the first argument to `fetch`.
18
+ *
19
+ * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
20
+ */
21
+ type _RequestInfo = Request | URL | string;
22
+ /**
23
+ * The type for constructing `RequestInit` Headers.
24
+ *
25
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
26
+ */
27
+ type _HeadersInit = RequestInit['headers'];
28
+ /**
29
+ * The type for constructing `RequestInit` body.
30
+ *
31
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#body
32
+ */
33
+ type _BodyInit = RequestInit['body'];
34
+ /**
35
+ * An alias to the builtin `Array<T>` type so we can
36
+ * easily alias it in import statements if there are name clashes.
37
+ */
38
+ type _Array<T> = Array<T>;
39
+ /**
40
+ * An alias to the builtin `Record<K, T>` type so we can
41
+ * easily alias it in import statements if there are name clashes.
42
+ */
43
+ type _Record<K extends keyof any, T> = Record<K, T>;
44
+ export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
45
+ /**
46
+ * A copy of the builtin `EndingType` type as it isn't fully supported in certain
47
+ * environments and attempting to reference the global version will error.
48
+ *
49
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
50
+ */
51
+ type EndingType = 'native' | 'transparent';
52
+ /**
53
+ * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
54
+ * environments and attempting to reference the global version will error.
55
+ *
56
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
57
+ * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
58
+ */
59
+ export interface BlobPropertyBag {
60
+ endings?: EndingType;
61
+ type?: string;
62
+ }
63
+ /**
64
+ * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
65
+ * environments and attempting to reference the global version will error.
66
+ *
67
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
68
+ * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
69
+ */
70
+ export interface FilePropertyBag extends BlobPropertyBag {
71
+ lastModified?: number;
72
+ }
@@ -0,0 +1,3 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ export {};