scorecard-ai 0.5.4 → 0.6.1

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 (403) hide show
  1. package/Client.d.ts +9 -3
  2. package/Client.js +8 -3
  3. package/README.md +9 -9
  4. package/api/resources/index.d.ts +3 -1
  5. package/api/resources/index.js +4 -2
  6. package/api/resources/prompt/client/Client.d.ts +49 -25
  7. package/api/resources/prompt/client/Client.js +194 -72
  8. package/api/resources/prompt/client/requests/PromptCreateParams.d.ts +8 -2
  9. package/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +19 -0
  10. package/api/resources/prompt/client/requests/PromptListPromptsRequest.d.ts +21 -0
  11. package/api/resources/prompt/client/requests/index.d.ts +2 -0
  12. package/api/resources/run/client/Client.d.ts +6 -3
  13. package/api/resources/run/client/Client.js +26 -23
  14. package/api/resources/runMetric/client/Client.d.ts +4 -1
  15. package/api/resources/runMetric/client/Client.js +8 -7
  16. package/api/resources/score/client/Client.d.ts +5 -2
  17. package/api/resources/score/client/Client.js +18 -16
  18. package/api/resources/scoringConfig/client/Client.d.ts +78 -0
  19. package/api/resources/scoringConfig/client/Client.js +336 -0
  20. package/api/resources/scoringConfig/client/index.d.ts +1 -0
  21. package/api/resources/scoringConfig/client/index.js +17 -0
  22. package/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +18 -0
  23. package/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +5 -0
  24. package/api/resources/scoringConfig/client/requests/index.d.ts +1 -0
  25. package/api/resources/testcase/client/Client.d.ts +55 -3
  26. package/api/resources/testcase/client/Client.js +308 -22
  27. package/api/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +11 -0
  28. package/api/resources/testcase/client/requests/TestcaseBatchCopyParams.js +5 -0
  29. package/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +11 -0
  30. package/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +5 -0
  31. package/api/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
  32. package/api/resources/testcase/client/requests/TestcaseUpdateParams.js +5 -0
  33. package/api/resources/testcase/client/requests/index.d.ts +3 -0
  34. package/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +5 -0
  35. package/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +5 -0
  36. package/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +5 -0
  37. package/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +5 -0
  38. package/api/resources/testcase/types/index.d.ts +2 -0
  39. package/api/resources/testcase/types/index.js +2 -0
  40. package/api/resources/testrecord/client/Client.d.ts +5 -2
  41. package/api/resources/testrecord/client/Client.js +17 -15
  42. package/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +2 -0
  43. package/api/resources/testset/client/Client.d.ts +27 -8
  44. package/api/resources/testset/client/Client.js +148 -40
  45. package/api/resources/testset/client/requests/TestsetCreateParams.d.ts +8 -0
  46. package/api/resources/testset/client/requests/TestsetGetRequest.d.ts +11 -0
  47. package/api/resources/testset/client/requests/TestsetGetRequest.js +5 -0
  48. package/api/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
  49. package/api/resources/testset/client/requests/TestsetUpdateParams.js +5 -0
  50. package/api/resources/testset/client/requests/index.d.ts +2 -0
  51. package/api/resources/tracing/client/Client.d.ts +72 -0
  52. package/api/resources/tracing/client/Client.js +327 -0
  53. package/api/types/IngestionMethod.d.ts +8 -0
  54. package/api/types/IngestionMethod.js +10 -0
  55. package/api/types/Prompt.d.ts +2 -0
  56. package/api/types/PromptCursorPage.d.ts +17 -0
  57. package/api/types/PromptCursorPage.js +5 -0
  58. package/api/types/ScoringConfig.d.ts +18 -0
  59. package/api/types/ScoringConfig.js +5 -0
  60. package/api/types/TestcaseBatchDeletionResponse.d.ts +9 -0
  61. package/api/types/TestcaseBatchDeletionResponse.js +5 -0
  62. package/api/types/Testrecord.d.ts +2 -0
  63. package/api/types/Testset.d.ts +2 -0
  64. package/api/types/TestsetCursorPage.d.ts +17 -0
  65. package/api/types/TestsetCursorPage.js +5 -0
  66. package/api/types/Trace.d.ts +2 -0
  67. package/api/types/index.d.ts +8 -4
  68. package/api/types/index.js +8 -4
  69. package/core/fetcher/Fetcher.d.ts +4 -1
  70. package/core/fetcher/Fetcher.js +19 -176
  71. package/core/fetcher/createRequestUrl.d.ts +1 -0
  72. package/core/fetcher/createRequestUrl.js +13 -0
  73. package/core/fetcher/getFetchFn.d.ts +4 -0
  74. package/core/fetcher/getFetchFn.js +59 -0
  75. package/core/fetcher/getRequestBody.d.ts +7 -0
  76. package/core/fetcher/getRequestBody.js +23 -0
  77. package/core/fetcher/getResponseBody.d.ts +1 -0
  78. package/core/fetcher/getResponseBody.js +52 -0
  79. package/core/fetcher/makeRequest.d.ts +1 -0
  80. package/core/fetcher/makeRequest.js +42 -0
  81. package/core/fetcher/requestWithRetries.d.ts +1 -0
  82. package/core/fetcher/requestWithRetries.js +32 -0
  83. package/core/fetcher/signals.d.ts +12 -0
  84. package/core/fetcher/signals.js +37 -0
  85. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
  86. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
  87. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  88. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  89. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  90. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
  91. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  92. package/{serialization/resources/traces/client/get.js → core/fetcher/stream-wrappers/chooseStreamWrapper.js} +16 -6
  93. package/core/runtime/runtime.d.ts +2 -1
  94. package/core/runtime/runtime.js +12 -1
  95. package/core/schemas/Schema.d.ts +7 -4
  96. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  97. package/core/schemas/builders/lazy/lazy.js +8 -19
  98. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  99. package/core/schemas/builders/list/list.js +31 -44
  100. package/core/schemas/builders/object/object.js +90 -111
  101. package/core/schemas/builders/object/types.d.ts +2 -2
  102. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  103. package/core/schemas/builders/record/record.js +49 -60
  104. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  105. package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  106. package/core/schemas/builders/set/set.js +6 -15
  107. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  108. package/core/schemas/builders/union/union.js +51 -62
  109. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  110. package/dist/Client.d.ts +9 -3
  111. package/dist/Client.js +8 -3
  112. package/dist/api/resources/index.d.ts +3 -1
  113. package/dist/api/resources/index.js +4 -2
  114. package/dist/api/resources/prompt/client/Client.d.ts +49 -25
  115. package/dist/api/resources/prompt/client/Client.js +194 -72
  116. package/dist/api/resources/prompt/client/requests/PromptCreateParams.d.ts +8 -2
  117. package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +19 -0
  118. package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.js +5 -0
  119. package/dist/api/resources/prompt/client/requests/PromptListPromptsRequest.d.ts +21 -0
  120. package/dist/api/resources/prompt/client/requests/PromptListPromptsRequest.js +5 -0
  121. package/dist/api/resources/prompt/client/requests/index.d.ts +2 -0
  122. package/dist/api/resources/run/client/Client.d.ts +6 -3
  123. package/dist/api/resources/run/client/Client.js +26 -23
  124. package/dist/api/resources/runMetric/client/Client.d.ts +4 -1
  125. package/dist/api/resources/runMetric/client/Client.js +8 -7
  126. package/dist/api/resources/score/client/Client.d.ts +5 -2
  127. package/dist/api/resources/score/client/Client.js +18 -16
  128. package/dist/api/resources/scoringConfig/client/Client.d.ts +78 -0
  129. package/dist/api/resources/scoringConfig/client/Client.js +336 -0
  130. package/dist/api/resources/scoringConfig/client/index.d.ts +1 -0
  131. package/dist/api/resources/scoringConfig/client/index.js +17 -0
  132. package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +18 -0
  133. package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +5 -0
  134. package/dist/api/resources/scoringConfig/client/requests/index.d.ts +1 -0
  135. package/dist/api/resources/scoringConfig/client/requests/index.js +2 -0
  136. package/dist/api/resources/testcase/client/Client.d.ts +55 -3
  137. package/dist/api/resources/testcase/client/Client.js +308 -22
  138. package/dist/api/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +11 -0
  139. package/dist/api/resources/testcase/client/requests/TestcaseBatchCopyParams.js +5 -0
  140. package/dist/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +11 -0
  141. package/dist/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +5 -0
  142. package/dist/api/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
  143. package/dist/api/resources/testcase/client/requests/TestcaseUpdateParams.js +5 -0
  144. package/dist/api/resources/testcase/client/requests/index.d.ts +3 -0
  145. package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +5 -0
  146. package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +5 -0
  147. package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +5 -0
  148. package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +5 -0
  149. package/dist/api/resources/testcase/types/index.d.ts +2 -0
  150. package/dist/api/resources/testcase/types/index.js +2 -0
  151. package/dist/api/resources/testrecord/client/Client.d.ts +5 -2
  152. package/dist/api/resources/testrecord/client/Client.js +17 -15
  153. package/dist/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +2 -0
  154. package/dist/api/resources/testset/client/Client.d.ts +27 -8
  155. package/dist/api/resources/testset/client/Client.js +148 -40
  156. package/dist/api/resources/testset/client/requests/TestsetCreateParams.d.ts +8 -0
  157. package/dist/api/resources/testset/client/requests/TestsetGetRequest.d.ts +11 -0
  158. package/dist/api/resources/testset/client/requests/TestsetGetRequest.js +5 -0
  159. package/dist/api/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
  160. package/dist/api/resources/testset/client/requests/TestsetUpdateParams.js +5 -0
  161. package/dist/api/resources/testset/client/requests/index.d.ts +2 -0
  162. package/dist/api/resources/tracing/client/Client.d.ts +72 -0
  163. package/dist/api/resources/tracing/client/Client.js +327 -0
  164. package/dist/api/resources/tracing/client/index.js +2 -0
  165. package/dist/api/types/IngestionMethod.d.ts +8 -0
  166. package/dist/api/types/IngestionMethod.js +10 -0
  167. package/dist/api/types/Prompt.d.ts +2 -0
  168. package/dist/api/types/PromptCursorPage.d.ts +17 -0
  169. package/dist/api/types/PromptCursorPage.js +5 -0
  170. package/dist/api/types/ScoringConfig.d.ts +18 -0
  171. package/dist/api/types/ScoringConfig.js +5 -0
  172. package/dist/api/types/TestcaseBatchDeletionResponse.d.ts +9 -0
  173. package/dist/api/types/TestcaseBatchDeletionResponse.js +5 -0
  174. package/dist/api/types/Testrecord.d.ts +2 -0
  175. package/dist/api/types/Testset.d.ts +2 -0
  176. package/dist/api/types/TestsetCursorPage.d.ts +17 -0
  177. package/dist/api/types/TestsetCursorPage.js +5 -0
  178. package/dist/api/types/Trace.d.ts +2 -0
  179. package/dist/api/types/index.d.ts +8 -4
  180. package/dist/api/types/index.js +8 -4
  181. package/dist/core/fetcher/Fetcher.d.ts +4 -1
  182. package/dist/core/fetcher/Fetcher.js +19 -176
  183. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  184. package/dist/core/fetcher/createRequestUrl.js +13 -0
  185. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  186. package/dist/core/fetcher/getFetchFn.js +59 -0
  187. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  188. package/dist/core/fetcher/getRequestBody.js +23 -0
  189. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  190. package/dist/core/fetcher/getResponseBody.js +52 -0
  191. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  192. package/dist/core/fetcher/makeRequest.js +42 -0
  193. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  194. package/dist/core/fetcher/requestWithRetries.js +32 -0
  195. package/dist/core/fetcher/signals.d.ts +12 -0
  196. package/dist/core/fetcher/signals.js +37 -0
  197. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
  198. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
  199. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  200. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  201. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  202. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
  203. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  204. package/dist/{serialization/resources/traces/client/get.js → core/fetcher/stream-wrappers/chooseStreamWrapper.js} +16 -6
  205. package/dist/core/runtime/runtime.d.ts +2 -1
  206. package/dist/core/runtime/runtime.js +12 -1
  207. package/dist/core/schemas/Schema.d.ts +7 -4
  208. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  209. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  210. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  211. package/dist/core/schemas/builders/list/list.js +31 -44
  212. package/dist/core/schemas/builders/object/object.js +90 -111
  213. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  214. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  215. package/dist/core/schemas/builders/record/record.js +49 -60
  216. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  217. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  218. package/dist/core/schemas/builders/set/set.js +6 -15
  219. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  220. package/dist/core/schemas/builders/union/union.js +51 -62
  221. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  222. package/dist/serialization/resources/index.d.ts +3 -1
  223. package/dist/serialization/resources/index.js +4 -2
  224. package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +2 -0
  225. package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.js +2 -0
  226. package/dist/serialization/resources/scoringConfig/client/index.d.ts +1 -0
  227. package/dist/serialization/resources/scoringConfig/client/index.js +17 -0
  228. package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +15 -0
  229. package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +36 -0
  230. package/dist/serialization/resources/scoringConfig/client/requests/index.d.ts +1 -0
  231. package/dist/serialization/resources/scoringConfig/client/requests/index.js +5 -0
  232. package/dist/serialization/resources/scoringConfig/index.d.ts +1 -0
  233. package/dist/serialization/resources/scoringConfig/index.js +17 -0
  234. package/dist/serialization/resources/testcase/client/batchCopy.d.ts +11 -0
  235. package/dist/serialization/resources/testcase/client/batchCopy.js +32 -0
  236. package/dist/serialization/resources/testcase/client/index.d.ts +1 -0
  237. package/dist/serialization/resources/testcase/client/index.js +14 -0
  238. package/dist/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +12 -0
  239. package/dist/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.js +33 -0
  240. package/dist/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +12 -0
  241. package/dist/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +33 -0
  242. package/dist/serialization/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
  243. package/dist/serialization/resources/testcase/client/requests/TestcaseUpdateParams.js +43 -0
  244. package/dist/serialization/resources/testcase/client/requests/index.d.ts +3 -0
  245. package/dist/serialization/resources/testcase/client/requests/index.js +7 -1
  246. package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -10
  247. package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -10
  248. package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +11 -0
  249. package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +40 -0
  250. package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +11 -0
  251. package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +40 -0
  252. package/dist/serialization/resources/testcase/types/index.d.ts +2 -0
  253. package/dist/serialization/resources/testcase/types/index.js +2 -0
  254. package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -0
  255. package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +1 -0
  256. package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -10
  257. package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -10
  258. package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -10
  259. package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +5 -0
  260. package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.js +5 -0
  261. package/dist/serialization/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
  262. package/dist/serialization/resources/testset/client/requests/TestsetUpdateParams.js +37 -0
  263. package/dist/serialization/resources/testset/client/requests/index.d.ts +1 -0
  264. package/dist/serialization/resources/testset/client/requests/index.js +3 -1
  265. package/dist/serialization/resources/tracing/client/index.d.ts +1 -0
  266. package/{serialization/resources/traces → dist/serialization/resources/tracing}/client/index.js +2 -2
  267. package/dist/serialization/resources/{traces/client/get.d.ts → tracing/client/traces.d.ts} +3 -2
  268. package/dist/serialization/resources/tracing/client/traces.js +32 -0
  269. package/dist/serialization/resources/tracing/index.d.ts +1 -0
  270. package/dist/serialization/resources/tracing/index.js +17 -0
  271. package/dist/serialization/types/IngestionMethod.d.ts +10 -0
  272. package/dist/serialization/types/IngestionMethod.js +31 -0
  273. package/dist/serialization/types/JsonObject.js +2 -10
  274. package/dist/serialization/types/JsonObjectInputValue.js +3 -11
  275. package/dist/serialization/types/JsonObjectOutputValue.js +3 -11
  276. package/dist/serialization/types/Prompt.d.ts +1 -0
  277. package/dist/serialization/types/Prompt.js +1 -0
  278. package/dist/serialization/types/PromptCursorPage.d.ts +18 -0
  279. package/dist/serialization/types/PromptCursorPage.js +39 -0
  280. package/dist/serialization/types/ScoringConfig.d.ts +21 -0
  281. package/dist/serialization/types/ScoringConfig.js +42 -0
  282. package/dist/serialization/types/Span.js +2 -10
  283. package/dist/serialization/types/TestCaseCustomInputsValue.js +2 -10
  284. package/dist/serialization/types/TestCaseCustomLabelsValue.js +2 -10
  285. package/dist/serialization/types/TestcaseBatchDeletionResponse.d.ts +13 -0
  286. package/dist/serialization/types/{TestCaseCreate.js → TestcaseBatchDeletionResponse.js} +4 -7
  287. package/dist/serialization/types/Testrecord.d.ts +1 -0
  288. package/dist/serialization/types/Testrecord.js +1 -0
  289. package/dist/serialization/types/TestrecordCustomInputsValue.js +2 -10
  290. package/dist/serialization/types/TestrecordCustomLabelsValue.js +2 -10
  291. package/dist/serialization/types/TestrecordCustomOutputsValue.js +2 -10
  292. package/dist/serialization/types/Testset.d.ts +1 -0
  293. package/dist/serialization/types/Testset.js +1 -0
  294. package/dist/serialization/types/TestsetCursorPage.d.ts +18 -0
  295. package/dist/serialization/types/TestsetCursorPage.js +39 -0
  296. package/dist/serialization/types/Trace.d.ts +1 -0
  297. package/dist/serialization/types/Trace.js +2 -0
  298. package/dist/serialization/types/index.d.ts +8 -4
  299. package/dist/serialization/types/index.js +8 -4
  300. package/package.json +8 -2
  301. package/reference.md +840 -623
  302. package/serialization/resources/index.d.ts +3 -1
  303. package/serialization/resources/index.js +4 -2
  304. package/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +2 -0
  305. package/serialization/resources/prompt/client/requests/PromptCreateParams.js +2 -0
  306. package/serialization/resources/scoringConfig/client/index.d.ts +1 -0
  307. package/serialization/resources/scoringConfig/client/index.js +17 -0
  308. package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +15 -0
  309. package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +36 -0
  310. package/serialization/resources/scoringConfig/client/requests/index.d.ts +1 -0
  311. package/serialization/resources/scoringConfig/client/requests/index.js +5 -0
  312. package/serialization/resources/scoringConfig/index.d.ts +1 -0
  313. package/serialization/resources/scoringConfig/index.js +17 -0
  314. package/serialization/resources/testcase/client/batchCopy.d.ts +11 -0
  315. package/serialization/resources/testcase/client/batchCopy.js +32 -0
  316. package/serialization/resources/testcase/client/index.d.ts +1 -0
  317. package/serialization/resources/testcase/client/index.js +14 -0
  318. package/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +12 -0
  319. package/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.js +33 -0
  320. package/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +12 -0
  321. package/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +33 -0
  322. package/serialization/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
  323. package/serialization/resources/testcase/client/requests/TestcaseUpdateParams.js +43 -0
  324. package/serialization/resources/testcase/client/requests/index.d.ts +3 -0
  325. package/serialization/resources/testcase/client/requests/index.js +7 -1
  326. package/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -10
  327. package/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -10
  328. package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +11 -0
  329. package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +40 -0
  330. package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +11 -0
  331. package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +40 -0
  332. package/serialization/resources/testcase/types/index.d.ts +2 -0
  333. package/serialization/resources/testcase/types/index.js +2 -0
  334. package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -0
  335. package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +1 -0
  336. package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -10
  337. package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -10
  338. package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -10
  339. package/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +5 -0
  340. package/serialization/resources/testset/client/requests/TestsetCreateParams.js +5 -0
  341. package/serialization/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
  342. package/serialization/resources/testset/client/requests/TestsetUpdateParams.js +37 -0
  343. package/serialization/resources/testset/client/requests/index.d.ts +1 -0
  344. package/serialization/resources/testset/client/requests/index.js +3 -1
  345. package/serialization/resources/tracing/client/index.d.ts +1 -0
  346. package/{dist/serialization/resources/traces → serialization/resources/tracing}/client/index.js +2 -2
  347. package/serialization/resources/{traces/client/get.d.ts → tracing/client/traces.d.ts} +3 -2
  348. package/serialization/resources/tracing/client/traces.js +32 -0
  349. package/serialization/resources/tracing/index.d.ts +1 -0
  350. package/serialization/resources/tracing/index.js +17 -0
  351. package/serialization/types/IngestionMethod.d.ts +10 -0
  352. package/serialization/types/IngestionMethod.js +31 -0
  353. package/serialization/types/JsonObject.js +2 -10
  354. package/serialization/types/JsonObjectInputValue.js +3 -11
  355. package/serialization/types/JsonObjectOutputValue.js +3 -11
  356. package/serialization/types/Prompt.d.ts +1 -0
  357. package/serialization/types/Prompt.js +1 -0
  358. package/serialization/types/PromptCursorPage.d.ts +18 -0
  359. package/serialization/types/PromptCursorPage.js +39 -0
  360. package/serialization/types/ScoringConfig.d.ts +21 -0
  361. package/serialization/types/ScoringConfig.js +42 -0
  362. package/serialization/types/Span.js +2 -10
  363. package/serialization/types/TestCaseCustomInputsValue.js +2 -10
  364. package/serialization/types/TestCaseCustomLabelsValue.js +2 -10
  365. package/serialization/types/TestcaseBatchDeletionResponse.d.ts +13 -0
  366. package/serialization/types/{TestCaseCreate.js → TestcaseBatchDeletionResponse.js} +4 -7
  367. package/serialization/types/Testrecord.d.ts +1 -0
  368. package/serialization/types/Testrecord.js +1 -0
  369. package/serialization/types/TestrecordCustomInputsValue.js +2 -10
  370. package/serialization/types/TestrecordCustomLabelsValue.js +2 -10
  371. package/serialization/types/TestrecordCustomOutputsValue.js +2 -10
  372. package/serialization/types/Testset.d.ts +1 -0
  373. package/serialization/types/Testset.js +1 -0
  374. package/serialization/types/TestsetCursorPage.d.ts +18 -0
  375. package/serialization/types/TestsetCursorPage.js +39 -0
  376. package/serialization/types/Trace.d.ts +1 -0
  377. package/serialization/types/Trace.js +2 -0
  378. package/serialization/types/index.d.ts +8 -4
  379. package/serialization/types/index.js +8 -4
  380. package/api/resources/traces/client/Client.d.ts +0 -40
  381. package/api/resources/traces/client/Client.js +0 -151
  382. package/api/types/TestCaseCreate.d.ts +0 -10
  383. package/dist/api/resources/traces/client/Client.d.ts +0 -40
  384. package/dist/api/resources/traces/client/Client.js +0 -151
  385. package/dist/api/types/TestCaseCreate.d.ts +0 -10
  386. package/dist/serialization/resources/traces/client/index.d.ts +0 -1
  387. package/dist/serialization/types/TestCaseCreate.d.ts +0 -16
  388. package/serialization/resources/traces/client/index.d.ts +0 -1
  389. package/serialization/types/TestCaseCreate.d.ts +0 -16
  390. /package/api/{types/TestCaseCreate.js → resources/prompt/client/requests/PromptGetByNameRequest.js} +0 -0
  391. /package/{dist/api/types/TestCaseCreate.js → api/resources/prompt/client/requests/PromptListPromptsRequest.js} +0 -0
  392. /package/api/resources/{traces/client → scoringConfig/client/requests}/index.js +0 -0
  393. /package/api/resources/{traces → scoringConfig}/index.d.ts +0 -0
  394. /package/api/resources/{traces → scoringConfig}/index.js +0 -0
  395. /package/api/resources/{traces → tracing}/client/index.d.ts +0 -0
  396. /package/{dist/api/resources/traces → api/resources/tracing}/client/index.js +0 -0
  397. /package/{dist/api/resources/traces → api/resources/tracing}/index.d.ts +0 -0
  398. /package/{dist/api/resources/traces → api/resources/tracing}/index.js +0 -0
  399. /package/dist/{serialization/resources/traces → api/resources/scoringConfig}/index.d.ts +0 -0
  400. /package/dist/{serialization/resources/traces → api/resources/scoringConfig}/index.js +0 -0
  401. /package/dist/api/resources/{traces → tracing}/client/index.d.ts +0 -0
  402. /package/{serialization/resources/traces → dist/api/resources/tracing}/index.d.ts +0 -0
  403. /package/{serialization/resources/traces → dist/api/resources/tracing}/index.js +0 -0
@@ -50,9 +50,9 @@ class Testset {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Retrieve Testset metadata without Testcase data
53
+ * Retrieve all Testsets with cursor-based pagination
54
54
  *
55
- * @param {number} testsetId - The ID of the Testset to retrieve.
55
+ * @param {Scorecard.TestsetGetRequest} request
56
56
  * @param {Testset.RequestOptions} requestOptions - Request-specific configuration.
57
57
  *
58
58
  * @throws {@link Scorecard.UnauthorizedError}
@@ -61,22 +61,32 @@ class Testset {
61
61
  * @throws {@link Scorecard.UnprocessableEntityError}
62
62
  *
63
63
  * @example
64
- * await scorecard.testset.get(1)
64
+ * await client.testset.get()
65
65
  */
66
- get(testsetId, requestOptions) {
66
+ get(request = {}, requestOptions) {
67
67
  var _a, _b;
68
68
  return __awaiter(this, void 0, void 0, function* () {
69
+ const { cursor, size } = request;
70
+ const _queryParams = {};
71
+ if (cursor != null) {
72
+ _queryParams["cursor"] = cursor;
73
+ }
74
+ if (size != null) {
75
+ _queryParams["size"] = size.toString();
76
+ }
69
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
70
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}`),
78
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/testset"),
71
79
  method: "GET",
72
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
73
81
  contentType: "application/json",
82
+ queryParameters: _queryParams,
83
+ requestType: "json",
74
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
75
85
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
76
86
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
77
87
  });
78
88
  if (_response.ok) {
79
- return yield serializers.Testset.parseOrThrow(_response.body, {
89
+ return serializers.TestsetCursorPage.parseOrThrow(_response.body, {
80
90
  unrecognizedObjectKeys: "passthrough",
81
91
  allowUnrecognizedUnionMembers: true,
82
92
  allowUnrecognizedEnumValues: true,
@@ -87,7 +97,7 @@ class Testset {
87
97
  if (_response.error.reason === "status-code") {
88
98
  switch (_response.error.statusCode) {
89
99
  case 401:
90
- throw new Scorecard.UnauthorizedError(yield serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
100
+ throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
91
101
  unrecognizedObjectKeys: "passthrough",
92
102
  allowUnrecognizedUnionMembers: true,
93
103
  allowUnrecognizedEnumValues: true,
@@ -95,7 +105,7 @@ class Testset {
95
105
  breadcrumbsPrefix: ["response"],
96
106
  }));
97
107
  case 403:
98
- throw new Scorecard.ForbiddenError(yield serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
108
+ throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
99
109
  unrecognizedObjectKeys: "passthrough",
100
110
  allowUnrecognizedUnionMembers: true,
101
111
  allowUnrecognizedEnumValues: true,
@@ -103,7 +113,7 @@ class Testset {
103
113
  breadcrumbsPrefix: ["response"],
104
114
  }));
105
115
  case 404:
106
- throw new Scorecard.NotFoundError(yield serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
116
+ throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
107
117
  unrecognizedObjectKeys: "passthrough",
108
118
  allowUnrecognizedUnionMembers: true,
109
119
  allowUnrecognizedEnumValues: true,
@@ -111,7 +121,7 @@ class Testset {
111
121
  breadcrumbsPrefix: ["response"],
112
122
  }));
113
123
  case 422:
114
- throw new Scorecard.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
124
+ throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
115
125
  unrecognizedObjectKeys: "passthrough",
116
126
  allowUnrecognizedUnionMembers: true,
117
127
  allowUnrecognizedEnumValues: true,
@@ -152,7 +162,7 @@ class Testset {
152
162
  * @throws {@link Scorecard.UnprocessableEntityError}
153
163
  *
154
164
  * @example
155
- * await scorecard.testset.delete(1)
165
+ * await client.testset.delete(1)
156
166
  */
157
167
  delete(testsetId, requestOptions) {
158
168
  var _a, _b;
@@ -160,14 +170,109 @@ class Testset {
160
170
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
161
171
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}`),
162
172
  method: "DELETE",
163
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
173
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
174
+ contentType: "application/json",
175
+ requestType: "json",
176
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
177
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
178
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
179
+ });
180
+ if (_response.ok) {
181
+ return serializers.Testset.parseOrThrow(_response.body, {
182
+ unrecognizedObjectKeys: "passthrough",
183
+ allowUnrecognizedUnionMembers: true,
184
+ allowUnrecognizedEnumValues: true,
185
+ skipValidation: true,
186
+ breadcrumbsPrefix: ["response"],
187
+ });
188
+ }
189
+ if (_response.error.reason === "status-code") {
190
+ switch (_response.error.statusCode) {
191
+ case 401:
192
+ throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
193
+ unrecognizedObjectKeys: "passthrough",
194
+ allowUnrecognizedUnionMembers: true,
195
+ allowUnrecognizedEnumValues: true,
196
+ skipValidation: true,
197
+ breadcrumbsPrefix: ["response"],
198
+ }));
199
+ case 403:
200
+ throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
201
+ unrecognizedObjectKeys: "passthrough",
202
+ allowUnrecognizedUnionMembers: true,
203
+ allowUnrecognizedEnumValues: true,
204
+ skipValidation: true,
205
+ breadcrumbsPrefix: ["response"],
206
+ }));
207
+ case 404:
208
+ throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
209
+ unrecognizedObjectKeys: "passthrough",
210
+ allowUnrecognizedUnionMembers: true,
211
+ allowUnrecognizedEnumValues: true,
212
+ skipValidation: true,
213
+ breadcrumbsPrefix: ["response"],
214
+ }));
215
+ case 422:
216
+ throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
217
+ unrecognizedObjectKeys: "passthrough",
218
+ allowUnrecognizedUnionMembers: true,
219
+ allowUnrecognizedEnumValues: true,
220
+ skipValidation: true,
221
+ breadcrumbsPrefix: ["response"],
222
+ }));
223
+ default:
224
+ throw new errors.ScorecardError({
225
+ statusCode: _response.error.statusCode,
226
+ body: _response.error.body,
227
+ });
228
+ }
229
+ }
230
+ switch (_response.error.reason) {
231
+ case "non-json":
232
+ throw new errors.ScorecardError({
233
+ statusCode: _response.error.statusCode,
234
+ body: _response.error.rawBody,
235
+ });
236
+ case "timeout":
237
+ throw new errors.ScorecardTimeoutError();
238
+ case "unknown":
239
+ throw new errors.ScorecardError({
240
+ message: _response.error.errorMessage,
241
+ });
242
+ }
243
+ });
244
+ }
245
+ /**
246
+ * Update a Testset.
247
+ *
248
+ * @param {number} testsetId - The ID of the Testset to update.
249
+ * @param {Scorecard.TestsetUpdateParams} request
250
+ * @param {Testset.RequestOptions} requestOptions - Request-specific configuration.
251
+ *
252
+ * @throws {@link Scorecard.UnauthorizedError}
253
+ * @throws {@link Scorecard.ForbiddenError}
254
+ * @throws {@link Scorecard.NotFoundError}
255
+ * @throws {@link Scorecard.UnprocessableEntityError}
256
+ *
257
+ * @example
258
+ * await client.testset.update(1)
259
+ */
260
+ update(testsetId, request = {}, requestOptions) {
261
+ var _a, _b;
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
264
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}`),
265
+ method: "PATCH",
266
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
164
267
  contentType: "application/json",
268
+ requestType: "json",
269
+ body: serializers.TestsetUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
165
270
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
166
271
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
167
272
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
168
273
  });
169
274
  if (_response.ok) {
170
- return yield serializers.Testset.parseOrThrow(_response.body, {
275
+ return serializers.Testset.parseOrThrow(_response.body, {
171
276
  unrecognizedObjectKeys: "passthrough",
172
277
  allowUnrecognizedUnionMembers: true,
173
278
  allowUnrecognizedEnumValues: true,
@@ -178,7 +283,7 @@ class Testset {
178
283
  if (_response.error.reason === "status-code") {
179
284
  switch (_response.error.statusCode) {
180
285
  case 401:
181
- throw new Scorecard.UnauthorizedError(yield serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
286
+ throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
182
287
  unrecognizedObjectKeys: "passthrough",
183
288
  allowUnrecognizedUnionMembers: true,
184
289
  allowUnrecognizedEnumValues: true,
@@ -186,7 +291,7 @@ class Testset {
186
291
  breadcrumbsPrefix: ["response"],
187
292
  }));
188
293
  case 403:
189
- throw new Scorecard.ForbiddenError(yield serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
294
+ throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
190
295
  unrecognizedObjectKeys: "passthrough",
191
296
  allowUnrecognizedUnionMembers: true,
192
297
  allowUnrecognizedEnumValues: true,
@@ -194,7 +299,7 @@ class Testset {
194
299
  breadcrumbsPrefix: ["response"],
195
300
  }));
196
301
  case 404:
197
- throw new Scorecard.NotFoundError(yield serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
302
+ throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
198
303
  unrecognizedObjectKeys: "passthrough",
199
304
  allowUnrecognizedUnionMembers: true,
200
305
  allowUnrecognizedEnumValues: true,
@@ -202,7 +307,7 @@ class Testset {
202
307
  breadcrumbsPrefix: ["response"],
203
308
  }));
204
309
  case 422:
205
- throw new Scorecard.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
310
+ throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
206
311
  unrecognizedObjectKeys: "passthrough",
207
312
  allowUnrecognizedUnionMembers: true,
208
313
  allowUnrecognizedEnumValues: true,
@@ -243,7 +348,7 @@ class Testset {
243
348
  * @throws {@link Scorecard.UnprocessableEntityError}
244
349
  *
245
350
  * @example
246
- * await scorecard.testset.create({
351
+ * await client.testset.create({
247
352
  * name: "name"
248
353
  * })
249
354
  */
@@ -253,15 +358,16 @@ class Testset {
253
358
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
254
359
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/testset"),
255
360
  method: "POST",
256
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
361
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
257
362
  contentType: "application/json",
258
- body: yield serializers.TestsetCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
363
+ requestType: "json",
364
+ body: serializers.TestsetCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
259
365
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
260
366
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
261
367
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
262
368
  });
263
369
  if (_response.ok) {
264
- return yield serializers.Testset.parseOrThrow(_response.body, {
370
+ return serializers.Testset.parseOrThrow(_response.body, {
265
371
  unrecognizedObjectKeys: "passthrough",
266
372
  allowUnrecognizedUnionMembers: true,
267
373
  allowUnrecognizedEnumValues: true,
@@ -272,7 +378,7 @@ class Testset {
272
378
  if (_response.error.reason === "status-code") {
273
379
  switch (_response.error.statusCode) {
274
380
  case 401:
275
- throw new Scorecard.UnauthorizedError(yield serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
381
+ throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
276
382
  unrecognizedObjectKeys: "passthrough",
277
383
  allowUnrecognizedUnionMembers: true,
278
384
  allowUnrecognizedEnumValues: true,
@@ -280,7 +386,7 @@ class Testset {
280
386
  breadcrumbsPrefix: ["response"],
281
387
  }));
282
388
  case 403:
283
- throw new Scorecard.ForbiddenError(yield serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
389
+ throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
284
390
  unrecognizedObjectKeys: "passthrough",
285
391
  allowUnrecognizedUnionMembers: true,
286
392
  allowUnrecognizedEnumValues: true,
@@ -288,7 +394,7 @@ class Testset {
288
394
  breadcrumbsPrefix: ["response"],
289
395
  }));
290
396
  case 404:
291
- throw new Scorecard.NotFoundError(yield serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
397
+ throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
292
398
  unrecognizedObjectKeys: "passthrough",
293
399
  allowUnrecognizedUnionMembers: true,
294
400
  allowUnrecognizedEnumValues: true,
@@ -296,7 +402,7 @@ class Testset {
296
402
  breadcrumbsPrefix: ["response"],
297
403
  }));
298
404
  case 422:
299
- throw new Scorecard.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
405
+ throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
300
406
  unrecognizedObjectKeys: "passthrough",
301
407
  allowUnrecognizedUnionMembers: true,
302
408
  allowUnrecognizedEnumValues: true,
@@ -337,7 +443,7 @@ class Testset {
337
443
  * @throws {@link Scorecard.UnprocessableEntityError}
338
444
  *
339
445
  * @example
340
- * await scorecard.testset.readSchema(1)
446
+ * await client.testset.readSchema(1)
341
447
  */
342
448
  readSchema(testsetId, requestOptions) {
343
449
  var _a, _b;
@@ -345,14 +451,15 @@ class Testset {
345
451
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
346
452
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}/schema`),
347
453
  method: "GET",
348
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
454
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
349
455
  contentType: "application/json",
456
+ requestType: "json",
350
457
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
351
458
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
352
459
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
353
460
  });
354
461
  if (_response.ok) {
355
- return yield serializers.CustomSchema.parseOrThrow(_response.body, {
462
+ return serializers.CustomSchema.parseOrThrow(_response.body, {
356
463
  unrecognizedObjectKeys: "passthrough",
357
464
  allowUnrecognizedUnionMembers: true,
358
465
  allowUnrecognizedEnumValues: true,
@@ -363,7 +470,7 @@ class Testset {
363
470
  if (_response.error.reason === "status-code") {
364
471
  switch (_response.error.statusCode) {
365
472
  case 401:
366
- throw new Scorecard.UnauthorizedError(yield serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
473
+ throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
367
474
  unrecognizedObjectKeys: "passthrough",
368
475
  allowUnrecognizedUnionMembers: true,
369
476
  allowUnrecognizedEnumValues: true,
@@ -371,7 +478,7 @@ class Testset {
371
478
  breadcrumbsPrefix: ["response"],
372
479
  }));
373
480
  case 403:
374
- throw new Scorecard.ForbiddenError(yield serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
481
+ throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
375
482
  unrecognizedObjectKeys: "passthrough",
376
483
  allowUnrecognizedUnionMembers: true,
377
484
  allowUnrecognizedEnumValues: true,
@@ -379,7 +486,7 @@ class Testset {
379
486
  breadcrumbsPrefix: ["response"],
380
487
  }));
381
488
  case 404:
382
- throw new Scorecard.NotFoundError(yield serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
489
+ throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
383
490
  unrecognizedObjectKeys: "passthrough",
384
491
  allowUnrecognizedUnionMembers: true,
385
492
  allowUnrecognizedEnumValues: true,
@@ -387,7 +494,7 @@ class Testset {
387
494
  breadcrumbsPrefix: ["response"],
388
495
  }));
389
496
  case 422:
390
- throw new Scorecard.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
497
+ throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
391
498
  unrecognizedObjectKeys: "passthrough",
392
499
  allowUnrecognizedUnionMembers: true,
393
500
  allowUnrecognizedEnumValues: true,
@@ -429,7 +536,7 @@ class Testset {
429
536
  * @throws {@link Scorecard.UnprocessableEntityError}
430
537
  *
431
538
  * @example
432
- * await scorecard.testset.getTestcases(1)
539
+ * await client.testset.getTestcases(1)
433
540
  */
434
541
  getTestcases(testsetId, request = {}, requestOptions) {
435
542
  var _a, _b;
@@ -445,15 +552,16 @@ class Testset {
445
552
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
446
553
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}/testcase`),
447
554
  method: "GET",
448
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
555
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
449
556
  contentType: "application/json",
450
557
  queryParameters: _queryParams,
558
+ requestType: "json",
451
559
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
452
560
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
453
561
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
454
562
  });
455
563
  if (_response.ok) {
456
- return yield serializers.PaginatedTestcaseResponse.parseOrThrow(_response.body, {
564
+ return serializers.PaginatedTestcaseResponse.parseOrThrow(_response.body, {
457
565
  unrecognizedObjectKeys: "passthrough",
458
566
  allowUnrecognizedUnionMembers: true,
459
567
  allowUnrecognizedEnumValues: true,
@@ -464,7 +572,7 @@ class Testset {
464
572
  if (_response.error.reason === "status-code") {
465
573
  switch (_response.error.statusCode) {
466
574
  case 401:
467
- throw new Scorecard.UnauthorizedError(yield serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
575
+ throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
468
576
  unrecognizedObjectKeys: "passthrough",
469
577
  allowUnrecognizedUnionMembers: true,
470
578
  allowUnrecognizedEnumValues: true,
@@ -472,7 +580,7 @@ class Testset {
472
580
  breadcrumbsPrefix: ["response"],
473
581
  }));
474
582
  case 403:
475
- throw new Scorecard.ForbiddenError(yield serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
583
+ throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
476
584
  unrecognizedObjectKeys: "passthrough",
477
585
  allowUnrecognizedUnionMembers: true,
478
586
  allowUnrecognizedEnumValues: true,
@@ -480,7 +588,7 @@ class Testset {
480
588
  breadcrumbsPrefix: ["response"],
481
589
  }));
482
590
  case 404:
483
- throw new Scorecard.NotFoundError(yield serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
591
+ throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
484
592
  unrecognizedObjectKeys: "passthrough",
485
593
  allowUnrecognizedUnionMembers: true,
486
594
  allowUnrecognizedEnumValues: true,
@@ -488,7 +596,7 @@ class Testset {
488
596
  breadcrumbsPrefix: ["response"],
489
597
  }));
490
598
  case 422:
491
- throw new Scorecard.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
599
+ throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
492
600
  unrecognizedObjectKeys: "passthrough",
493
601
  allowUnrecognizedUnionMembers: true,
494
602
  allowUnrecognizedEnumValues: true,
@@ -15,4 +15,12 @@ export interface TestsetCreateParams {
15
15
  /** Whether or not the testset uses retrieval. */
16
16
  usingRetrieval?: boolean;
17
17
  customSchema?: Scorecard.CustomSchema;
18
+ /** The ID of the project to create the testset in. Omitting this optional argument will create the testset inside your Organization's default project. */
19
+ projectId?: number;
20
+ /** The method of ingestion for the testset. */
21
+ ingestionMethod?: Scorecard.IngestionMethod;
22
+ /** Whether or not the testset is published. */
23
+ published?: boolean;
24
+ /** Whether or not the testset was created by the playground. */
25
+ createdByPlayground?: boolean;
18
26
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface TestsetGetRequest {
9
+ cursor?: string;
10
+ size?: number;
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Scorecard from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface TestsetUpdateParams {
10
+ name?: string;
11
+ /** A description for the testset. */
12
+ description?: string;
13
+ /** Whether or not the testset uses retrieval. */
14
+ usingRetrieval?: boolean;
15
+ customSchema?: Scorecard.CustomSchema;
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,4 @@
1
+ export { type TestsetGetRequest } from "./TestsetGetRequest";
2
+ export { type TestsetUpdateParams } from "./TestsetUpdateParams";
1
3
  export { type TestsetCreateParams } from "./TestsetCreateParams";
2
4
  export { type TestsetGetTestcasesRequest } from "./TestsetGetTestcasesRequest";
@@ -0,0 +1,72 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Scorecard from "../../../index";
7
+ export declare namespace Tracing {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ScorecardEnvironment | string>;
10
+ apiKey: core.Supplier<string>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ }
21
+ }
22
+ export declare class Tracing {
23
+ protected readonly _options: Tracing.Options;
24
+ constructor(_options: Tracing.Options);
25
+ /**
26
+ * Retrieve traces
27
+ *
28
+ * @param {Tracing.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @throws {@link Scorecard.UnauthorizedError}
31
+ * @throws {@link Scorecard.ForbiddenError}
32
+ * @throws {@link Scorecard.NotFoundError}
33
+ *
34
+ * @example
35
+ * await client.tracing.traces()
36
+ */
37
+ traces(requestOptions?: Tracing.RequestOptions): Promise<Scorecard.Trace[]>;
38
+ /**
39
+ * Retrieve specified trace
40
+ *
41
+ * @param {string} traceId - The ID of the trace to retrieve spans from.
42
+ * @param {Tracing.RequestOptions} requestOptions - Request-specific configuration.
43
+ *
44
+ * @throws {@link Scorecard.UnauthorizedError}
45
+ * @throws {@link Scorecard.ForbiddenError}
46
+ * @throws {@link Scorecard.NotFoundError}
47
+ * @throws {@link Scorecard.UnprocessableEntityError}
48
+ *
49
+ * @example
50
+ * await client.tracing.trace("trace_id")
51
+ */
52
+ trace(traceId: string, requestOptions?: Tracing.RequestOptions): Promise<Scorecard.Trace>;
53
+ /**
54
+ * Retrieve specified span
55
+ *
56
+ * @param {string} traceId - The ID of the trace which the span is a part of.
57
+ * @param {string} spanId - The ID of the span to retrieve.
58
+ * @param {Tracing.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link Scorecard.UnauthorizedError}
61
+ * @throws {@link Scorecard.ForbiddenError}
62
+ * @throws {@link Scorecard.NotFoundError}
63
+ * @throws {@link Scorecard.UnprocessableEntityError}
64
+ *
65
+ * @example
66
+ * await client.tracing.span("trace_id", "span_id")
67
+ */
68
+ span(traceId: string, spanId: string, requestOptions?: Tracing.RequestOptions): Promise<Scorecard.Span>;
69
+ protected _getCustomAuthorizationHeaders(): Promise<{
70
+ "X-API-Key": string;
71
+ }>;
72
+ }