scorecard-ai 0.6.0 → 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 (111) hide show
  1. package/README.md +9 -9
  2. package/api/resources/prompt/client/Client.d.ts +27 -8
  3. package/api/resources/prompt/client/Client.js +126 -15
  4. package/api/resources/prompt/client/requests/PromptCreateParams.d.ts +8 -2
  5. package/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +4 -0
  6. package/api/resources/prompt/client/requests/PromptListPromptsRequest.d.ts +21 -0
  7. package/api/resources/prompt/client/requests/PromptListPromptsRequest.js +5 -0
  8. package/api/resources/prompt/client/requests/index.d.ts +1 -0
  9. package/api/resources/run/client/Client.js +3 -3
  10. package/api/resources/runMetric/client/Client.js +1 -1
  11. package/api/resources/score/client/Client.js +2 -2
  12. package/api/resources/scoringConfig/client/Client.d.ts +17 -1
  13. package/api/resources/scoringConfig/client/Client.js +90 -3
  14. package/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +3 -1
  15. package/api/resources/testcase/client/Client.d.ts +1 -1
  16. package/api/resources/testcase/client/Client.js +7 -7
  17. package/api/resources/testrecord/client/Client.js +2 -2
  18. package/api/resources/testset/client/Client.d.ts +4 -4
  19. package/api/resources/testset/client/Client.js +21 -12
  20. package/api/resources/testset/client/requests/TestsetCreateParams.d.ts +2 -0
  21. package/api/resources/testset/client/requests/TestsetGetRequest.d.ts +11 -0
  22. package/api/resources/testset/client/requests/TestsetGetRequest.js +5 -0
  23. package/api/resources/testset/client/requests/index.d.ts +1 -0
  24. package/api/resources/tracing/client/Client.js +3 -3
  25. package/api/types/Prompt.d.ts +2 -0
  26. package/api/types/PromptCursorPage.d.ts +17 -0
  27. package/api/types/PromptCursorPage.js +5 -0
  28. package/api/types/ScoringConfig.d.ts +2 -0
  29. package/api/types/Testset.d.ts +2 -0
  30. package/api/types/TestsetCursorPage.d.ts +17 -0
  31. package/api/types/TestsetCursorPage.js +5 -0
  32. package/api/types/index.d.ts +2 -0
  33. package/api/types/index.js +2 -0
  34. package/dist/api/resources/prompt/client/Client.d.ts +27 -8
  35. package/dist/api/resources/prompt/client/Client.js +126 -15
  36. package/dist/api/resources/prompt/client/requests/PromptCreateParams.d.ts +8 -2
  37. package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +4 -0
  38. package/dist/api/resources/prompt/client/requests/PromptListPromptsRequest.d.ts +21 -0
  39. package/dist/api/resources/prompt/client/requests/PromptListPromptsRequest.js +5 -0
  40. package/dist/api/resources/prompt/client/requests/index.d.ts +1 -0
  41. package/dist/api/resources/run/client/Client.js +3 -3
  42. package/dist/api/resources/runMetric/client/Client.js +1 -1
  43. package/dist/api/resources/score/client/Client.js +2 -2
  44. package/dist/api/resources/scoringConfig/client/Client.d.ts +17 -1
  45. package/dist/api/resources/scoringConfig/client/Client.js +90 -3
  46. package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +3 -1
  47. package/dist/api/resources/testcase/client/Client.d.ts +1 -1
  48. package/dist/api/resources/testcase/client/Client.js +7 -7
  49. package/dist/api/resources/testrecord/client/Client.js +2 -2
  50. package/dist/api/resources/testset/client/Client.d.ts +4 -4
  51. package/dist/api/resources/testset/client/Client.js +21 -12
  52. package/dist/api/resources/testset/client/requests/TestsetCreateParams.d.ts +2 -0
  53. package/dist/api/resources/testset/client/requests/TestsetGetRequest.d.ts +11 -0
  54. package/dist/api/resources/testset/client/requests/TestsetGetRequest.js +5 -0
  55. package/dist/api/resources/testset/client/requests/index.d.ts +1 -0
  56. package/dist/api/resources/tracing/client/Client.js +3 -3
  57. package/dist/api/types/Prompt.d.ts +2 -0
  58. package/dist/api/types/PromptCursorPage.d.ts +17 -0
  59. package/dist/api/types/PromptCursorPage.js +5 -0
  60. package/dist/api/types/ScoringConfig.d.ts +2 -0
  61. package/dist/api/types/Testset.d.ts +2 -0
  62. package/dist/api/types/TestsetCursorPage.d.ts +17 -0
  63. package/dist/api/types/TestsetCursorPage.js +5 -0
  64. package/dist/api/types/index.d.ts +2 -0
  65. package/dist/api/types/index.js +2 -0
  66. package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +2 -0
  67. package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.js +2 -0
  68. package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +1 -0
  69. package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +1 -0
  70. package/dist/serialization/resources/testcase/client/batchCopy.d.ts +11 -0
  71. package/dist/serialization/resources/testcase/client/batchCopy.js +32 -0
  72. package/dist/serialization/resources/testcase/client/index.d.ts +1 -0
  73. package/dist/serialization/resources/testcase/client/index.js +14 -0
  74. package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +1 -0
  75. package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.js +1 -0
  76. package/dist/serialization/types/Prompt.d.ts +1 -0
  77. package/dist/serialization/types/Prompt.js +1 -0
  78. package/dist/serialization/types/PromptCursorPage.d.ts +18 -0
  79. package/dist/serialization/types/PromptCursorPage.js +39 -0
  80. package/dist/serialization/types/ScoringConfig.d.ts +1 -0
  81. package/dist/serialization/types/ScoringConfig.js +1 -0
  82. package/dist/serialization/types/Testset.d.ts +1 -0
  83. package/dist/serialization/types/Testset.js +1 -0
  84. package/dist/serialization/types/TestsetCursorPage.d.ts +18 -0
  85. package/dist/serialization/types/TestsetCursorPage.js +39 -0
  86. package/dist/serialization/types/index.d.ts +2 -0
  87. package/dist/serialization/types/index.js +2 -0
  88. package/package.json +1 -1
  89. package/reference.md +140 -11
  90. package/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +2 -0
  91. package/serialization/resources/prompt/client/requests/PromptCreateParams.js +2 -0
  92. package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +1 -0
  93. package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +1 -0
  94. package/serialization/resources/testcase/client/batchCopy.d.ts +11 -0
  95. package/serialization/resources/testcase/client/batchCopy.js +32 -0
  96. package/serialization/resources/testcase/client/index.d.ts +1 -0
  97. package/serialization/resources/testcase/client/index.js +14 -0
  98. package/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +1 -0
  99. package/serialization/resources/testset/client/requests/TestsetCreateParams.js +1 -0
  100. package/serialization/types/Prompt.d.ts +1 -0
  101. package/serialization/types/Prompt.js +1 -0
  102. package/serialization/types/PromptCursorPage.d.ts +18 -0
  103. package/serialization/types/PromptCursorPage.js +39 -0
  104. package/serialization/types/ScoringConfig.d.ts +1 -0
  105. package/serialization/types/ScoringConfig.js +1 -0
  106. package/serialization/types/Testset.d.ts +1 -0
  107. package/serialization/types/Testset.js +1 -0
  108. package/serialization/types/TestsetCursorPage.d.ts +18 -0
  109. package/serialization/types/TestsetCursorPage.js +39 -0
  110. package/serialization/types/index.d.ts +2 -0
  111. package/serialization/types/index.js +2 -0
@@ -70,7 +70,7 @@ class Testrecord {
70
70
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
71
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/run/${encodeURIComponent(runId)}/testrecord/${encodeURIComponent(testrecordId)}`),
72
72
  method: "GET",
73
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
73
+ 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())),
74
74
  contentType: "application/json",
75
75
  requestType: "json",
76
76
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -163,7 +163,7 @@ class Testrecord {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/run/${encodeURIComponent(runId)}/testrecord`),
165
165
  method: "POST",
166
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
166
+ 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())),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.TestrecordCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -23,9 +23,9 @@ export declare class Testset {
23
23
  protected readonly _options: Testset.Options;
24
24
  constructor(_options: Testset.Options);
25
25
  /**
26
- * Retrieve Testset metadata without Testcase data
26
+ * Retrieve all Testsets with cursor-based pagination
27
27
  *
28
- * @param {number} testsetId - The ID of the Testset to retrieve.
28
+ * @param {Scorecard.TestsetGetRequest} request
29
29
  * @param {Testset.RequestOptions} requestOptions - Request-specific configuration.
30
30
  *
31
31
  * @throws {@link Scorecard.UnauthorizedError}
@@ -34,9 +34,9 @@ export declare class Testset {
34
34
  * @throws {@link Scorecard.UnprocessableEntityError}
35
35
  *
36
36
  * @example
37
- * await client.testset.get(1)
37
+ * await client.testset.get()
38
38
  */
39
- get(testsetId: number, requestOptions?: Testset.RequestOptions): Promise<Scorecard.Testset>;
39
+ get(request?: Scorecard.TestsetGetRequest, requestOptions?: Testset.RequestOptions): Promise<Scorecard.TestsetCursorPage>;
40
40
  /**
41
41
  * Delete a Testset
42
42
  *
@@ -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,23 +61,32 @@ class Testset {
61
61
  * @throws {@link Scorecard.UnprocessableEntityError}
62
62
  *
63
63
  * @example
64
- * await client.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.6.0", "User-Agent": "scorecard-ai/0.6.0", "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,
74
83
  requestType: "json",
75
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
76
85
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
77
86
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
78
87
  });
79
88
  if (_response.ok) {
80
- return serializers.Testset.parseOrThrow(_response.body, {
89
+ return serializers.TestsetCursorPage.parseOrThrow(_response.body, {
81
90
  unrecognizedObjectKeys: "passthrough",
82
91
  allowUnrecognizedUnionMembers: true,
83
92
  allowUnrecognizedEnumValues: true,
@@ -161,7 +170,7 @@ class Testset {
161
170
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
162
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)}`),
163
172
  method: "DELETE",
164
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "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())),
165
174
  contentType: "application/json",
166
175
  requestType: "json",
167
176
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -254,7 +263,7 @@ class Testset {
254
263
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
255
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)}`),
256
265
  method: "PATCH",
257
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
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())),
258
267
  contentType: "application/json",
259
268
  requestType: "json",
260
269
  body: serializers.TestsetUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -349,7 +358,7 @@ class Testset {
349
358
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
350
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"),
351
360
  method: "POST",
352
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "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())),
353
362
  contentType: "application/json",
354
363
  requestType: "json",
355
364
  body: serializers.TestsetCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -442,7 +451,7 @@ class Testset {
442
451
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
443
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`),
444
453
  method: "GET",
445
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "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())),
446
455
  contentType: "application/json",
447
456
  requestType: "json",
448
457
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -543,7 +552,7 @@ class Testset {
543
552
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
544
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`),
545
554
  method: "GET",
546
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "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())),
547
556
  contentType: "application/json",
548
557
  queryParameters: _queryParams,
549
558
  requestType: "json",
@@ -21,4 +21,6 @@ export interface TestsetCreateParams {
21
21
  ingestionMethod?: Scorecard.IngestionMethod;
22
22
  /** Whether or not the testset is published. */
23
23
  published?: boolean;
24
+ /** Whether or not the testset was created by the playground. */
25
+ createdByPlayground?: boolean;
24
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 });
@@ -1,3 +1,4 @@
1
+ export { type TestsetGetRequest } from "./TestsetGetRequest";
1
2
  export { type TestsetUpdateParams } from "./TestsetUpdateParams";
2
3
  export { type TestsetCreateParams } from "./TestsetCreateParams";
3
4
  export { type TestsetGetTestcasesRequest } from "./TestsetGetTestcasesRequest";
@@ -67,7 +67,7 @@ class Tracing {
67
67
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
68
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/traces"),
69
69
  method: "GET",
70
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
70
+ 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())),
71
71
  contentType: "application/json",
72
72
  requestType: "json",
73
73
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -151,7 +151,7 @@ class Tracing {
151
151
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
152
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/traces/${encodeURIComponent(traceId)}`),
153
153
  method: "GET",
154
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
154
+ 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())),
155
155
  contentType: "application/json",
156
156
  requestType: "json",
157
157
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -244,7 +244,7 @@ class Tracing {
244
244
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
245
245
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/traces/${encodeURIComponent(traceId)}/spans/${encodeURIComponent(spanId)}`),
246
246
  method: "GET",
247
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.0", "User-Agent": "scorecard-ai/0.6.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
247
+ 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())),
248
248
  contentType: "application/json",
249
249
  requestType: "json",
250
250
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -17,4 +17,6 @@ export interface Prompt {
17
17
  parentId?: string;
18
18
  mergeParentId?: string;
19
19
  createdAt?: Date;
20
+ /** The ID of the project the prompt belongs to. */
21
+ projectId?: number;
20
22
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Scorecard from "../index";
5
+ export interface PromptCursorPage {
6
+ items: Scorecard.Prompt[];
7
+ /** Total items */
8
+ total?: number;
9
+ /** Cursor to refetch the current page */
10
+ currentPage?: string;
11
+ /** Cursor to refetch the current page starting from the last item */
12
+ currentPageBackwards?: string;
13
+ /** Cursor for the previous page */
14
+ previousPage?: string;
15
+ /** Cursor for the next page */
16
+ nextPage?: string;
17
+ }
@@ -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 });
@@ -13,4 +13,6 @@ export interface ScoringConfig {
13
13
  isArchived?: boolean;
14
14
  metrics?: number[];
15
15
  createdAt?: Date;
16
+ /** The ID of the project the scoring config belongs to. */
17
+ projectId?: number;
16
18
  }
@@ -26,4 +26,6 @@ export interface Testset {
26
26
  /** The ID of the project the testset belongs to. */
27
27
  projectId?: number;
28
28
  customSchema?: Scorecard.CustomSchema;
29
+ /** Whether or not the testset was created by the playground. */
30
+ createdByPlayground?: boolean;
29
31
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Scorecard from "../index";
5
+ export interface TestsetCursorPage {
6
+ items: Scorecard.Testset[];
7
+ /** Total items */
8
+ total?: number;
9
+ /** Cursor to refetch the current page */
10
+ currentPage?: string;
11
+ /** Cursor to refetch the current page starting from the last item */
12
+ currentPageBackwards?: string;
13
+ /** Cursor for the previous page */
14
+ previousPage?: string;
15
+ /** Cursor for the next page */
16
+ nextPage?: string;
17
+ }
@@ -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 });
@@ -12,6 +12,7 @@ export * from "./NotFoundErrorBody";
12
12
  export * from "./PaginatedTestcaseResponse";
13
13
  export * from "./PromptModelParamsValue";
14
14
  export * from "./Prompt";
15
+ export * from "./PromptCursorPage";
15
16
  export * from "./RoleEnum";
16
17
  export * from "./Run";
17
18
  export * from "./RunMetric";
@@ -31,6 +32,7 @@ export * from "./TestrecordModelParamsValue";
31
32
  export * from "./TestrecordModelDebugInfoValue";
32
33
  export * from "./Testrecord";
33
34
  export * from "./Testset";
35
+ export * from "./TestsetCursorPage";
34
36
  export * from "./Trace";
35
37
  export * from "./UnauthenticatedError";
36
38
  export * from "./UnauthorizedErrorBody";
@@ -28,6 +28,7 @@ __exportStar(require("./NotFoundErrorBody"), exports);
28
28
  __exportStar(require("./PaginatedTestcaseResponse"), exports);
29
29
  __exportStar(require("./PromptModelParamsValue"), exports);
30
30
  __exportStar(require("./Prompt"), exports);
31
+ __exportStar(require("./PromptCursorPage"), exports);
31
32
  __exportStar(require("./RoleEnum"), exports);
32
33
  __exportStar(require("./Run"), exports);
33
34
  __exportStar(require("./RunMetric"), exports);
@@ -47,6 +48,7 @@ __exportStar(require("./TestrecordModelParamsValue"), exports);
47
48
  __exportStar(require("./TestrecordModelDebugInfoValue"), exports);
48
49
  __exportStar(require("./Testrecord"), exports);
49
50
  __exportStar(require("./Testset"), exports);
51
+ __exportStar(require("./TestsetCursorPage"), exports);
50
52
  __exportStar(require("./Trace"), exports);
51
53
  __exportStar(require("./UnauthenticatedError"), exports);
52
54
  __exportStar(require("./UnauthorizedErrorBody"), exports);
@@ -13,6 +13,8 @@ export declare namespace PromptCreateParams {
13
13
  parent_id?: string | null;
14
14
  description?: string | null;
15
15
  model_params?: Record<string, PromptCreateParamsModelParamsValue.Raw | null | undefined> | null;
16
+ tag?: string | null;
16
17
  is_prod?: boolean | null;
18
+ project_id?: number | null;
17
19
  }
18
20
  }
@@ -35,5 +35,7 @@ exports.PromptCreateParams = core.serialization.object({
35
35
  parentId: core.serialization.property("parent_id", core.serialization.string().optional()),
36
36
  description: core.serialization.string().optional(),
37
37
  modelParams: core.serialization.property("model_params", core.serialization.record(core.serialization.string(), PromptCreateParamsModelParamsValue_1.PromptCreateParamsModelParamsValue.optional()).optional()),
38
+ tag: core.serialization.string().optional(),
38
39
  isProd: core.serialization.property("is_prod", core.serialization.boolean().optional()),
40
+ projectId: core.serialization.property("project_id", core.serialization.number().optional()),
39
41
  });
@@ -10,5 +10,6 @@ export declare namespace ScoringConfigCreateParams {
10
10
  name?: string | null;
11
11
  description?: string | null;
12
12
  metrics?: number[] | null;
13
+ project_id?: number | null;
13
14
  }
14
15
  }
@@ -32,4 +32,5 @@ exports.ScoringConfigCreateParams = core.serialization.object({
32
32
  name: core.serialization.string().optional(),
33
33
  description: core.serialization.string().optional(),
34
34
  metrics: core.serialization.list(core.serialization.number()).optional(),
35
+ projectId: core.serialization.property("project_id", core.serialization.number().optional()),
35
36
  });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Scorecard from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { TestCase } from "../../../types/TestCase";
8
+ export declare const Response: core.serialization.Schema<serializers.testcase.batchCopy.Response.Raw, Scorecard.TestCase[]>;
9
+ export declare namespace Response {
10
+ type Raw = TestCase.Raw[];
11
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Response = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const TestCase_1 = require("../../../types/TestCase");
32
+ exports.Response = core.serialization.list(TestCase_1.TestCase);
@@ -1 +1,2 @@
1
+ export * as batchCopy from "./batchCopy";
1
2
  export * from "./requests";
@@ -10,8 +10,22 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
13
25
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
27
  };
16
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.batchCopy = void 0;
30
+ exports.batchCopy = __importStar(require("./batchCopy"));
17
31
  __exportStar(require("./requests"), exports);
@@ -16,5 +16,6 @@ export declare namespace TestsetCreateParams {
16
16
  project_id?: number | null;
17
17
  ingestion_method?: IngestionMethod.Raw | null;
18
18
  published?: boolean | null;
19
+ created_by_playground?: boolean | null;
19
20
  }
20
21
  }
@@ -38,4 +38,5 @@ exports.TestsetCreateParams = core.serialization.object({
38
38
  projectId: core.serialization.property("project_id", core.serialization.number().optional()),
39
39
  ingestionMethod: core.serialization.property("ingestion_method", IngestionMethod_1.IngestionMethod.optional()),
40
40
  published: core.serialization.boolean().optional(),
41
+ createdByPlayground: core.serialization.property("created_by_playground", core.serialization.boolean().optional()),
41
42
  });
@@ -20,5 +20,6 @@ export declare namespace Prompt {
20
20
  parent_id?: string | null;
21
21
  merge_parent_id?: string | null;
22
22
  created_at?: string | null;
23
+ project_id?: number | null;
23
24
  }
24
25
  }
@@ -42,4 +42,5 @@ exports.Prompt = core.serialization.object({
42
42
  parentId: core.serialization.property("parent_id", core.serialization.string().optional()),
43
43
  mergeParentId: core.serialization.property("merge_parent_id", core.serialization.string().optional()),
44
44
  createdAt: core.serialization.property("created_at", core.serialization.date().optional()),
45
+ projectId: core.serialization.property("project_id", core.serialization.number().optional()),
45
46
  });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Scorecard from "../../api/index";
6
+ import * as core from "../../core";
7
+ import { Prompt } from "./Prompt";
8
+ export declare const PromptCursorPage: core.serialization.ObjectSchema<serializers.PromptCursorPage.Raw, Scorecard.PromptCursorPage>;
9
+ export declare namespace PromptCursorPage {
10
+ interface Raw {
11
+ items: Prompt.Raw[];
12
+ total?: number | null;
13
+ current_page?: string | null;
14
+ current_page_backwards?: string | null;
15
+ previous_page?: string | null;
16
+ next_page?: string | null;
17
+ }
18
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.PromptCursorPage = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ const Prompt_1 = require("./Prompt");
32
+ exports.PromptCursorPage = core.serialization.object({
33
+ items: core.serialization.list(Prompt_1.Prompt),
34
+ total: core.serialization.number().optional(),
35
+ currentPage: core.serialization.property("current_page", core.serialization.string().optional()),
36
+ currentPageBackwards: core.serialization.property("current_page_backwards", core.serialization.string().optional()),
37
+ previousPage: core.serialization.property("previous_page", core.serialization.string().optional()),
38
+ nextPage: core.serialization.property("next_page", core.serialization.string().optional()),
39
+ });
@@ -16,5 +16,6 @@ export declare namespace ScoringConfig {
16
16
  is_archived?: boolean | null;
17
17
  metrics?: number[] | null;
18
18
  created_at?: string | null;
19
+ project_id?: number | null;
19
20
  }
20
21
  }
@@ -38,4 +38,5 @@ exports.ScoringConfig = core.serialization.object({
38
38
  isArchived: core.serialization.property("is_archived", core.serialization.boolean().optional()),
39
39
  metrics: core.serialization.list(core.serialization.number()).optional(),
40
40
  createdAt: core.serialization.property("created_at", core.serialization.date().optional()),
41
+ projectId: core.serialization.property("project_id", core.serialization.number().optional()),
41
42
  });
@@ -20,5 +20,6 @@ export declare namespace Testset {
20
20
  is_archived?: boolean | null;
21
21
  project_id?: number | null;
22
22
  custom_schema?: CustomSchema.Raw | null;
23
+ created_by_playground?: boolean | null;
23
24
  }
24
25
  }
@@ -42,4 +42,5 @@ exports.Testset = core.serialization.object({
42
42
  isArchived: core.serialization.property("is_archived", core.serialization.boolean().optional()),
43
43
  projectId: core.serialization.property("project_id", core.serialization.number().optional()),
44
44
  customSchema: core.serialization.property("custom_schema", CustomSchema_1.CustomSchema.optional()),
45
+ createdByPlayground: core.serialization.property("created_by_playground", core.serialization.boolean().optional()),
45
46
  });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Scorecard from "../../api/index";
6
+ import * as core from "../../core";
7
+ import { Testset } from "./Testset";
8
+ export declare const TestsetCursorPage: core.serialization.ObjectSchema<serializers.TestsetCursorPage.Raw, Scorecard.TestsetCursorPage>;
9
+ export declare namespace TestsetCursorPage {
10
+ interface Raw {
11
+ items: Testset.Raw[];
12
+ total?: number | null;
13
+ current_page?: string | null;
14
+ current_page_backwards?: string | null;
15
+ previous_page?: string | null;
16
+ next_page?: string | null;
17
+ }
18
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.TestsetCursorPage = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ const Testset_1 = require("./Testset");
32
+ exports.TestsetCursorPage = core.serialization.object({
33
+ items: core.serialization.list(Testset_1.Testset),
34
+ total: core.serialization.number().optional(),
35
+ currentPage: core.serialization.property("current_page", core.serialization.string().optional()),
36
+ currentPageBackwards: core.serialization.property("current_page_backwards", core.serialization.string().optional()),
37
+ previousPage: core.serialization.property("previous_page", core.serialization.string().optional()),
38
+ nextPage: core.serialization.property("next_page", core.serialization.string().optional()),
39
+ });