scorecard-ai 1.0.0-alpha.2 → 1.0.0-alpha.4

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 (107) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +10 -12
  3. package/client.d.mts +3 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +9 -7
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -7
  10. package/client.mjs.map +1 -1
  11. package/internal/headers.d.mts +1 -1
  12. package/internal/headers.d.mts.map +1 -1
  13. package/internal/headers.d.ts +1 -1
  14. package/internal/headers.d.ts.map +1 -1
  15. package/internal/headers.js +2 -0
  16. package/internal/headers.js.map +1 -1
  17. package/internal/headers.mjs +2 -0
  18. package/internal/headers.mjs.map +1 -1
  19. package/internal/utils/base64.d.mts.map +1 -1
  20. package/internal/utils/base64.d.ts.map +1 -1
  21. package/internal/utils/base64.js +4 -3
  22. package/internal/utils/base64.js.map +1 -1
  23. package/internal/utils/base64.mjs +4 -3
  24. package/internal/utils/base64.mjs.map +1 -1
  25. package/internal/utils/bytes.d.mts +4 -0
  26. package/internal/utils/bytes.d.mts.map +1 -0
  27. package/internal/utils/bytes.d.ts +4 -0
  28. package/internal/utils/bytes.d.ts.map +1 -0
  29. package/internal/utils/bytes.js +32 -0
  30. package/internal/utils/bytes.js.map +1 -0
  31. package/internal/utils/bytes.mjs +26 -0
  32. package/internal/utils/bytes.mjs.map +1 -0
  33. package/lib/runAndEvaluate.d.mts +19 -0
  34. package/lib/runAndEvaluate.d.mts.map +1 -0
  35. package/lib/runAndEvaluate.d.ts +19 -0
  36. package/lib/runAndEvaluate.d.ts.map +1 -0
  37. package/lib/runAndEvaluate.js +40 -0
  38. package/lib/runAndEvaluate.js.map +1 -0
  39. package/lib/runAndEvaluate.mjs +36 -0
  40. package/lib/runAndEvaluate.mjs.map +1 -0
  41. package/package.json +12 -2
  42. package/resources/index.d.mts +1 -1
  43. package/resources/index.d.mts.map +1 -1
  44. package/resources/index.d.ts +1 -1
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js +3 -3
  47. package/resources/index.js.map +1 -1
  48. package/resources/index.mjs +1 -1
  49. package/resources/index.mjs.map +1 -1
  50. package/resources/projects.d.mts +5 -5
  51. package/resources/projects.d.ts +5 -5
  52. package/resources/projects.js +2 -2
  53. package/resources/projects.mjs +2 -2
  54. package/resources/records.d.mts +63 -0
  55. package/resources/records.d.mts.map +1 -0
  56. package/resources/records.d.ts +63 -0
  57. package/resources/records.d.ts.map +1 -0
  58. package/resources/{execution-records.js → records.js} +6 -6
  59. package/resources/records.js.map +1 -0
  60. package/resources/{execution-records.mjs → records.mjs} +4 -4
  61. package/resources/records.mjs.map +1 -0
  62. package/resources/runs.d.mts +13 -13
  63. package/resources/runs.d.ts +13 -13
  64. package/resources/runs.js +2 -2
  65. package/resources/runs.mjs +2 -2
  66. package/resources/shared.d.mts +1 -1
  67. package/resources/shared.d.ts +1 -1
  68. package/resources/system-configs.d.mts +11 -11
  69. package/resources/system-configs.d.ts +11 -11
  70. package/resources/systems.d.mts +20 -20
  71. package/resources/systems.d.ts +20 -20
  72. package/resources/testcases.d.mts +23 -23
  73. package/resources/testcases.d.ts +23 -23
  74. package/resources/testcases.js +5 -5
  75. package/resources/testcases.mjs +5 -5
  76. package/resources/testsets.d.mts +43 -42
  77. package/resources/testsets.d.mts.map +1 -1
  78. package/resources/testsets.d.ts +43 -42
  79. package/resources/testsets.d.ts.map +1 -1
  80. package/resources/testsets.js +5 -5
  81. package/resources/testsets.mjs +5 -5
  82. package/src/client.ts +11 -15
  83. package/src/internal/headers.ts +3 -2
  84. package/src/internal/utils/base64.ts +5 -4
  85. package/src/internal/utils/bytes.ts +32 -0
  86. package/src/lib/runAndEvaluate.ts +54 -0
  87. package/src/resources/index.ts +1 -5
  88. package/src/resources/projects.ts +5 -5
  89. package/src/resources/records.ts +79 -0
  90. package/src/resources/runs.ts +13 -13
  91. package/src/resources/shared.ts +1 -1
  92. package/src/resources/system-configs.ts +11 -11
  93. package/src/resources/systems.ts +20 -20
  94. package/src/resources/testcases.ts +23 -23
  95. package/src/resources/testsets.ts +43 -42
  96. package/src/version.ts +1 -1
  97. package/version.d.mts +1 -1
  98. package/version.d.ts +1 -1
  99. package/version.js +1 -1
  100. package/version.mjs +1 -1
  101. package/resources/execution-records.d.mts +0 -62
  102. package/resources/execution-records.d.mts.map +0 -1
  103. package/resources/execution-records.d.ts +0 -62
  104. package/resources/execution-records.d.ts.map +0 -1
  105. package/resources/execution-records.js.map +0 -1
  106. package/resources/execution-records.mjs.map +0 -1
  107. package/src/resources/execution-records.ts +0 -85
@@ -3,15 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.fromBase64 = exports.toBase64 = void 0;
5
5
  const error_1 = require("../../core/error.js");
6
+ const bytes_1 = require("./bytes.js");
6
7
  const toBase64 = (data) => {
7
8
  if (!data)
8
9
  return '';
9
- if (typeof data === 'string') {
10
- data = new globalThis.TextEncoder().encode(data);
11
- }
12
10
  if (typeof globalThis.Buffer !== 'undefined') {
13
11
  return globalThis.Buffer.from(data).toString('base64');
14
12
  }
13
+ if (typeof data === 'string') {
14
+ data = (0, bytes_1.encodeUTF8)(data);
15
+ }
15
16
  if (typeof btoa !== 'undefined') {
16
17
  return btoa(String.fromCharCode.apply(null, data));
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+CAAkD;AAE3C,MAAM,QAAQ,GAAG,CAAC,IAA4C,EAAU,EAAE;IAC/E,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,IAAI,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,IAA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C,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAC7B;QACD,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,IAAI,sBAAc,CAAC,wEAAwE,CAAC,CAAC;AACrG,CAAC,CAAC;AAhBW,QAAA,UAAU,cAgBrB"}
@@ -1,14 +1,15 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { ScorecardError } from "../../core/error.mjs";
3
+ import { encodeUTF8 } from "./bytes.mjs";
3
4
  export const toBase64 = (data) => {
4
5
  if (!data)
5
6
  return '';
6
- if (typeof data === 'string') {
7
- data = new globalThis.TextEncoder().encode(data);
8
- }
9
7
  if (typeof globalThis.Buffer !== 'undefined') {
10
8
  return globalThis.Buffer.from(data).toString('base64');
11
9
  }
10
+ if (typeof data === 'string') {
11
+ data = encodeUTF8(data);
12
+ }
12
13
  if (typeof btoa !== 'undefined') {
13
14
  return btoa(String.fromCharCode.apply(null, data));
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base64.mjs","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,cAAc,EAAE;AAEzB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAA4C,EAAU,EAAE;IAC/E,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,IAAI,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC3D;IAED,IAAI,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW,EAAE;QACrD,OAAQ,UAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,C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AAC,CAAC;AACrG,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function concatBytes(buffers: Uint8Array[]): Uint8Array;
2
+ export declare function encodeUTF8(str: string): Uint8Array;
3
+ export declare function decodeUTF8(bytes: Uint8Array): string;
4
+ //# sourceMappingURL=bytes.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.d.mts","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAa7D;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,cAMrC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,UAM3C"}
@@ -0,0 +1,4 @@
1
+ export declare function concatBytes(buffers: Uint8Array[]): Uint8Array;
2
+ export declare function encodeUTF8(str: string): Uint8Array;
3
+ export declare function decodeUTF8(bytes: Uint8Array): string;
4
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAa7D;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,cAMrC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,UAM3C"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeUTF8 = exports.encodeUTF8 = exports.concatBytes = void 0;
4
+ function concatBytes(buffers) {
5
+ let length = 0;
6
+ for (const buffer of buffers) {
7
+ length += buffer.length;
8
+ }
9
+ const output = new Uint8Array(length);
10
+ let index = 0;
11
+ for (const buffer of buffers) {
12
+ output.set(buffer, index);
13
+ index += buffer.length;
14
+ }
15
+ return output;
16
+ }
17
+ exports.concatBytes = concatBytes;
18
+ let encodeUTF8_;
19
+ function encodeUTF8(str) {
20
+ let encoder;
21
+ return (encodeUTF8_ ??
22
+ ((encoder = new globalThis.TextEncoder()), (encodeUTF8_ = encoder.encode.bind(encoder))))(str);
23
+ }
24
+ exports.encodeUTF8 = encodeUTF8;
25
+ let decodeUTF8_;
26
+ function decodeUTF8(bytes) {
27
+ let decoder;
28
+ return (decodeUTF8_ ??
29
+ ((decoder = new globalThis.TextDecoder()), (decodeUTF8_ = decoder.decode.bind(decoder))))(bytes);
30
+ }
31
+ exports.decodeUTF8 = decodeUTF8;
32
+ //# sourceMappingURL=bytes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,OAAqB;IAC/C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;KACzB;IACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC1B,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC;KACxB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAbD,kCAaC;AAED,IAAI,WAAwC,CAAC;AAC7C,SAAgB,UAAU,CAAC,GAAW;IACpC,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,GAAG,CAAC,CAAC;AACT,CAAC;AAND,gCAMC;AAED,IAAI,WAA0C,CAAC;AAC/C,SAAgB,UAAU,CAAC,KAAiB;IAC1C,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,KAAK,CAAC,CAAC;AACX,CAAC;AAND,gCAMC"}
@@ -0,0 +1,26 @@
1
+ export function concatBytes(buffers) {
2
+ let length = 0;
3
+ for (const buffer of buffers) {
4
+ length += buffer.length;
5
+ }
6
+ const output = new Uint8Array(length);
7
+ let index = 0;
8
+ for (const buffer of buffers) {
9
+ output.set(buffer, index);
10
+ index += buffer.length;
11
+ }
12
+ return output;
13
+ }
14
+ let encodeUTF8_;
15
+ export function encodeUTF8(str) {
16
+ let encoder;
17
+ return (encodeUTF8_ ??
18
+ ((encoder = new globalThis.TextEncoder()), (encodeUTF8_ = encoder.encode.bind(encoder))))(str);
19
+ }
20
+ let decodeUTF8_;
21
+ export function decodeUTF8(bytes) {
22
+ let decoder;
23
+ return (decodeUTF8_ ??
24
+ ((decoder = new globalThis.TextDecoder()), (decodeUTF8_ = decoder.decode.bind(decoder))))(bytes);
25
+ }
26
+ //# sourceMappingURL=bytes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.mjs","sourceRoot":"","sources":["../../src/internal/utils/bytes.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,OAAqB;IAC/C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;KACzB;IACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC1B,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC;KACxB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,IAAI,WAAwC,CAAC;AAC7C,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,GAAG,CAAC,CAAC;AACT,CAAC;AAED,IAAI,WAA0C,CAAC;AAC/C,MAAM,UAAU,UAAU,CAAC,KAAiB;IAC1C,IAAI,OAAO,CAAC;IACZ,OAAO,CACL,WAAW;QACX,CAAC,CAAC,OAAO,GAAG,IAAK,UAAkB,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAClG,CAAC,KAAK,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { Scorecard } from "../client.mjs";
2
+ /**
3
+ * Runs a system on a Testset and records the results in Scorecard.
4
+ *
5
+ * @param scorecard The Scorecard client
6
+ * @param projectId The ID of the Project to run the system on.
7
+ * @param testsetId The ID of the Testset to run the system on.
8
+ * @param metricIds The IDs of the Metrics to use for evaluation.
9
+ * @param system The system to run on the Testset.
10
+ */
11
+ export declare function runAndEvaluate<SystemInput extends Object, SystemOutput extends Object>(scorecard: Scorecard, { projectId, testsetId, metricIds, system, }: {
12
+ projectId: string;
13
+ testsetId: string;
14
+ metricIds: Array<string>;
15
+ system: (testcaseInput: SystemInput) => Promise<SystemOutput>;
16
+ }): Promise<Pick<Scorecard.Runs.Run, 'id'> & {
17
+ url: string;
18
+ }>;
19
+ //# sourceMappingURL=runAndEvaluate.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAndEvaluate.d.mts","sourceRoot":"","sources":["../src/lib/runAndEvaluate.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE;AAEpB;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,WAAW,SAAS,MAAM,EAAE,YAAY,SAAS,MAAM,EAC1F,SAAS,EAAE,SAAS,EACpB,EACE,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,GACP,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,aAAa,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CAC/D,GACA,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CA6B3D"}
@@ -0,0 +1,19 @@
1
+ import { Scorecard } from "../client.js";
2
+ /**
3
+ * Runs a system on a Testset and records the results in Scorecard.
4
+ *
5
+ * @param scorecard The Scorecard client
6
+ * @param projectId The ID of the Project to run the system on.
7
+ * @param testsetId The ID of the Testset to run the system on.
8
+ * @param metricIds The IDs of the Metrics to use for evaluation.
9
+ * @param system The system to run on the Testset.
10
+ */
11
+ export declare function runAndEvaluate<SystemInput extends Object, SystemOutput extends Object>(scorecard: Scorecard, { projectId, testsetId, metricIds, system, }: {
12
+ projectId: string;
13
+ testsetId: string;
14
+ metricIds: Array<string>;
15
+ system: (testcaseInput: SystemInput) => Promise<SystemOutput>;
16
+ }): Promise<Pick<Scorecard.Runs.Run, 'id'> & {
17
+ url: string;
18
+ }>;
19
+ //# sourceMappingURL=runAndEvaluate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAndEvaluate.d.ts","sourceRoot":"","sources":["../src/lib/runAndEvaluate.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE;AAEpB;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,WAAW,SAAS,MAAM,EAAE,YAAY,SAAS,MAAM,EAC1F,SAAS,EAAE,SAAS,EACpB,EACE,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,GACP,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,aAAa,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CAC/D,GACA,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CA6B3D"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runAndEvaluate = void 0;
4
+ /**
5
+ * Runs a system on a Testset and records the results in Scorecard.
6
+ *
7
+ * @param scorecard The Scorecard client
8
+ * @param projectId The ID of the Project to run the system on.
9
+ * @param testsetId The ID of the Testset to run the system on.
10
+ * @param metricIds The IDs of the Metrics to use for evaluation.
11
+ * @param system The system to run on the Testset.
12
+ */
13
+ async function runAndEvaluate(scorecard, { projectId, testsetId, metricIds, system, }) {
14
+ const run = await scorecard.runs.create(projectId, {
15
+ testsetId,
16
+ metricIds,
17
+ });
18
+ // Run each Testcase sequentially
19
+ const recordPromises = [];
20
+ for await (const testcase of scorecard.testcases.list(run.testsetId)) {
21
+ const modelResponse = await system(testcase.inputs);
22
+ const promise = scorecard.records.create(run.id, {
23
+ testcaseId: testcase.id,
24
+ inputs: testcase.inputs,
25
+ labels: testcase.labels,
26
+ outputs: modelResponse,
27
+ });
28
+ recordPromises.push(promise);
29
+ }
30
+ // Wait until all the Records are created
31
+ await Promise.all(recordPromises);
32
+ // Mark the Run as done with execution and ready for scoring.
33
+ await scorecard.runs.update(run.id, {
34
+ status: 'awaiting_scoring',
35
+ });
36
+ const runUrl = `https://app.getscorecard.ai/projects/${projectId}/runs/grades/${run.id}`;
37
+ return { id: run.id, url: runUrl };
38
+ }
39
+ exports.runAndEvaluate = runAndEvaluate;
40
+ //# sourceMappingURL=runAndEvaluate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAndEvaluate.js","sourceRoot":"","sources":["../src/lib/runAndEvaluate.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;GAQG;AACI,KAAK,UAAU,cAAc,CAClC,SAAoB,EACpB,EACE,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,GAMP;IAED,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACjD,SAAS;QACT,SAAS;KACV,CAAC,CAAC;IAEH,iCAAiC;IACjC,MAAM,cAAc,GAAwB,EAAE,CAAC;IAC/C,IAAI,KAAK,EAAE,MAAM,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;QACpE,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAqB,CAAC,CAAC;QACnE,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;YAC/C,UAAU,EAAE,QAAQ,CAAC,EAAE;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,OAAO,EAAE,aAAwC;SAClD,CAAC,CAAC;QACH,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC9B;IACD,yCAAyC;IACzC,MAAM,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAElC,6DAA6D;IAC7D,MAAM,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;QAClC,MAAM,EAAE,kBAAkB;KAC3B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,wCAAwC,SAAS,gBAAgB,GAAG,CAAC,EAAE,EAAE,CAAC;IAEzF,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;AACrC,CAAC;AA1CD,wCA0CC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Runs a system on a Testset and records the results in Scorecard.
3
+ *
4
+ * @param scorecard The Scorecard client
5
+ * @param projectId The ID of the Project to run the system on.
6
+ * @param testsetId The ID of the Testset to run the system on.
7
+ * @param metricIds The IDs of the Metrics to use for evaluation.
8
+ * @param system The system to run on the Testset.
9
+ */
10
+ export async function runAndEvaluate(scorecard, { projectId, testsetId, metricIds, system, }) {
11
+ const run = await scorecard.runs.create(projectId, {
12
+ testsetId,
13
+ metricIds,
14
+ });
15
+ // Run each Testcase sequentially
16
+ const recordPromises = [];
17
+ for await (const testcase of scorecard.testcases.list(run.testsetId)) {
18
+ const modelResponse = await system(testcase.inputs);
19
+ const promise = scorecard.records.create(run.id, {
20
+ testcaseId: testcase.id,
21
+ inputs: testcase.inputs,
22
+ labels: testcase.labels,
23
+ outputs: modelResponse,
24
+ });
25
+ recordPromises.push(promise);
26
+ }
27
+ // Wait until all the Records are created
28
+ await Promise.all(recordPromises);
29
+ // Mark the Run as done with execution and ready for scoring.
30
+ await scorecard.runs.update(run.id, {
31
+ status: 'awaiting_scoring',
32
+ });
33
+ const runUrl = `https://app.getscorecard.ai/projects/${projectId}/runs/grades/${run.id}`;
34
+ return { id: run.id, url: runUrl };
35
+ }
36
+ //# sourceMappingURL=runAndEvaluate.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAndEvaluate.mjs","sourceRoot":"","sources":["../src/lib/runAndEvaluate.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQ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.0-alpha.4",
4
4
  "description": "The official TypeScript library for the Scorecard API",
5
5
  "author": "Scorecard <team@scorecard.io>",
6
6
  "types": "./index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "scripts": {
17
17
  "test": "./scripts/test",
18
18
  "build": "./scripts/build",
19
- "format": "prettier --write --cache --cache-strategy metadata . !dist",
19
+ "format": "./scripts/format",
20
20
  "tsn": "ts-node -r tsconfig-paths/register",
21
21
  "lint": "./scripts/lint",
22
22
  "fix": "./scripts/format"
@@ -92,6 +92,16 @@
92
92
  "./index.mjs": {
93
93
  "default": "./index.mjs"
94
94
  },
95
+ "./lib/*.mjs": {
96
+ "default": "./lib/*.mjs"
97
+ },
98
+ "./lib/*.js": {
99
+ "default": "./lib/*.js"
100
+ },
101
+ "./lib/*": {
102
+ "import": "./lib/*.mjs",
103
+ "require": "./lib/*.js"
104
+ },
95
105
  "./pagination": {
96
106
  "import": "./pagination.mjs",
97
107
  "require": "./pagination.js"
@@ -1,6 +1,6 @@
1
1
  export * from "./shared.mjs";
2
- export { ExecutionRecords, type ExecutionRecord, type ExecutionRecordCreateParams, } from "./execution-records.mjs";
3
2
  export { Projects, type ProjectListResponse, type ProjectListParams, type ProjectListResponsesPaginatedResponse, } from "./projects.mjs";
3
+ export { Records, type Record, type RecordCreateParams } from "./records.mjs";
4
4
  export { Runs, type Run, type RunUpdateResponse, type RunCreateParams, type RunUpdateParams } from "./runs.mjs";
5
5
  export { SystemConfigs, type SystemConfig, type SystemConfigCreateParams, type SystemConfigListParams, type SystemConfigGetParams, type SystemConfigsPaginatedResponse, } from "./system-configs.mjs";
6
6
  export { Systems, type System, type SystemDeleteResponse, type SystemCreateParams, type SystemUpdateParams, type SystemListParams, type SystemsPaginatedResponse, } from "./systems.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,2BAA2B,GACjC;OACM,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,GAC3C;OACM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE;OACtF,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,GACpC;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,GAC3C;OACM,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE;OACjD,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE;OACtF,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,GACpC;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B"}
@@ -1,6 +1,6 @@
1
1
  export * from "./shared.js";
2
- export { ExecutionRecords, type ExecutionRecord, type ExecutionRecordCreateParams, } from "./execution-records.js";
3
2
  export { Projects, type ProjectListResponse, type ProjectListParams, type ProjectListResponsesPaginatedResponse, } from "./projects.js";
3
+ export { Records, type Record, type RecordCreateParams } from "./records.js";
4
4
  export { Runs, type Run, type RunUpdateResponse, type RunCreateParams, type RunUpdateParams } from "./runs.js";
5
5
  export { SystemConfigs, type SystemConfig, type SystemConfigCreateParams, type SystemConfigListParams, type SystemConfigGetParams, type SystemConfigsPaginatedResponse, } from "./system-configs.js";
6
6
  export { Systems, type System, type SystemDeleteResponse, type SystemCreateParams, type SystemUpdateParams, type SystemListParams, type SystemsPaginatedResponse, } from "./systems.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,2BAA2B,GACjC;OACM,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,GAC3C;OACM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE;OACtF,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,GACpC;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,GAC3C;OACM,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE;OACjD,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE;OACtF,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,GACpC;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B"}
@@ -15,12 +15,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.Testsets = exports.Testcases = exports.Systems = exports.SystemConfigs = exports.Runs = exports.Projects = exports.ExecutionRecords = void 0;
18
+ exports.Testsets = exports.Testcases = exports.Systems = exports.SystemConfigs = exports.Runs = exports.Records = exports.Projects = void 0;
19
19
  __exportStar(require("./shared.js"), exports);
20
- var execution_records_1 = require("./execution-records.js");
21
- Object.defineProperty(exports, "ExecutionRecords", { enumerable: true, get: function () { return execution_records_1.ExecutionRecords; } });
22
20
  var projects_1 = require("./projects.js");
23
21
  Object.defineProperty(exports, "Projects", { enumerable: true, get: function () { return projects_1.Projects; } });
22
+ var records_1 = require("./records.js");
23
+ Object.defineProperty(exports, "Records", { enumerable: true, get: function () { return records_1.Records; } });
24
24
  var runs_1 = require("./runs.js");
25
25
  Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_1.Runs; } });
26
26
  var system_configs_1 = require("./system-configs.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;AAEtF,8CAAyB;AACzB,4DAI6B;AAH3B,qHAAA,gBAAgB,OAAA;AAIlB,0CAKoB;AAJlB,oGAAA,QAAQ,OAAA;AAKV,kCAA4G;AAAnG,4FAAA,IAAI,OAAA;AACb,sDAO0B;AANxB,+GAAA,aAAa,OAAA;AAOf,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,4CAUqB;AATnB,sGAAA,SAAS,OAAA;AAUX,0CAQoB;AAPlB,oGAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;AAEtF,8CAAyB;AACzB,0CAKoB;AAJlB,oGAAA,QAAQ,OAAA;AAKV,wCAA0E;AAAjE,kGAAA,OAAO,OAAA;AAChB,kCAA4G;AAAnG,4FAAA,IAAI,OAAA;AACb,sDAO0B;AANxB,+GAAA,aAAa,OAAA;AAOf,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,4CAUqB;AATnB,sGAAA,SAAS,OAAA;AAUX,0CAQoB;AAPlB,oGAAA,QAAQ,OAAA"}
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export * from "./shared.mjs";
3
- export { ExecutionRecords, } from "./execution-records.mjs";
4
3
  export { Projects, } from "./projects.mjs";
4
+ export { Records } from "./records.mjs";
5
5
  export { Runs } from "./runs.mjs";
6
6
  export { SystemConfigs, } from "./system-configs.mjs";
7
7
  export { Systems, } from "./systems.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,gBAAgB,GAGjB;OACM,EACL,QAAQ,GAIT;OACM,EAAE,IAAI,EAAgF;OACtF,EACL,aAAa,GAMd;OACM,EACL,OAAO,GAOR;OACM,EACL,SAAS,GASV;OACM,EACL,QAAQ,GAOT"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,QAAQ,GAIT;OACM,EAAE,OAAO,EAAwC;OACjD,EAAE,IAAI,EAAgF;OACtF,EACL,aAAa,GAMd;OACM,EACL,OAAO,GAOR;OACM,EACL,SAAS,GASV;OACM,EACL,QAAQ,GAOT"}
@@ -3,22 +3,22 @@ import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "..
3
3
  import { RequestOptions } from "../internal/request-options.mjs";
4
4
  export declare class Projects extends APIResource {
5
5
  /**
6
- * Retrieve a paginated list of all projects. Projects are ordered by creation
7
- * date, with oldest projects first.
6
+ * Retrieve a paginated list of all Projects. Projects are ordered by creation
7
+ * date, with oldest Projects first.
8
8
  */
9
9
  list(query?: ProjectListParams | null | undefined, options?: RequestOptions): PagePromise<ProjectListResponsesPaginatedResponse, ProjectListResponse>;
10
10
  }
11
11
  export type ProjectListResponsesPaginatedResponse = PaginatedResponse<ProjectListResponse>;
12
12
  /**
13
- * A project in the Scorecard system.
13
+ * A Project in the Scorecard system.
14
14
  */
15
15
  export interface ProjectListResponse {
16
16
  /**
17
- * The ID of the project
17
+ * The ID of the Project.
18
18
  */
19
19
  id: string;
20
20
  /**
21
- * The name of the project
21
+ * The name of the Project.
22
22
  */
23
23
  name: string | null;
24
24
  }
@@ -3,22 +3,22 @@ import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "..
3
3
  import { RequestOptions } from "../internal/request-options.js";
4
4
  export declare class Projects extends APIResource {
5
5
  /**
6
- * Retrieve a paginated list of all projects. Projects are ordered by creation
7
- * date, with oldest projects first.
6
+ * Retrieve a paginated list of all Projects. Projects are ordered by creation
7
+ * date, with oldest Projects first.
8
8
  */
9
9
  list(query?: ProjectListParams | null | undefined, options?: RequestOptions): PagePromise<ProjectListResponsesPaginatedResponse, ProjectListResponse>;
10
10
  }
11
11
  export type ProjectListResponsesPaginatedResponse = PaginatedResponse<ProjectListResponse>;
12
12
  /**
13
- * A project in the Scorecard system.
13
+ * A Project in the Scorecard system.
14
14
  */
15
15
  export interface ProjectListResponse {
16
16
  /**
17
- * The ID of the project
17
+ * The ID of the Project.
18
18
  */
19
19
  id: string;
20
20
  /**
21
- * The name of the project
21
+ * The name of the Project.
22
22
  */
23
23
  name: string | null;
24
24
  }
@@ -6,8 +6,8 @@ const resource_1 = require("../core/resource.js");
6
6
  const pagination_1 = require("../core/pagination.js");
7
7
  class Projects extends resource_1.APIResource {
8
8
  /**
9
- * Retrieve a paginated list of all projects. Projects are ordered by creation
10
- * date, with oldest projects first.
9
+ * Retrieve a paginated list of all Projects. Projects are ordered by creation
10
+ * date, with oldest Projects first.
11
11
  */
12
12
  list(query = {}, options) {
13
13
  return this._client.getAPIList('/projects', (pagination_1.PaginatedResponse), {
@@ -3,8 +3,8 @@ import { APIResource } from "../core/resource.mjs";
3
3
  import { PaginatedResponse } from "../core/pagination.mjs";
4
4
  export class Projects extends APIResource {
5
5
  /**
6
- * Retrieve a paginated list of all projects. Projects are ordered by creation
7
- * date, with oldest projects first.
6
+ * Retrieve a paginated list of all Projects. Projects are ordered by creation
7
+ * date, with oldest Projects first.
8
8
  */
9
9
  list(query = {}, options) {
10
10
  return this._client.getAPIList('/projects', (PaginatedResponse), {
@@ -0,0 +1,63 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { type Record as BuiltinRecord } from "../internal/builtin-types.mjs";
4
+ import { RequestOptions } from "../internal/request-options.mjs";
5
+ export declare class Records extends APIResource {
6
+ /**
7
+ * Create a new Record in a Run.
8
+ */
9
+ create(runID: string, body: RecordCreateParams, options?: RequestOptions): APIPromise<Record>;
10
+ }
11
+ /**
12
+ * A record of a system execution in the Scorecard system.
13
+ */
14
+ export interface Record {
15
+ /**
16
+ * The ID of the Record.
17
+ */
18
+ id: string;
19
+ /**
20
+ * The actual inputs sent to the system, which should match the system's input
21
+ * schema.
22
+ */
23
+ inputs: BuiltinRecord<string, unknown>;
24
+ /**
25
+ * The expected outputs for the Testcase.
26
+ */
27
+ labels: BuiltinRecord<string, unknown>;
28
+ /**
29
+ * The actual outputs from the system.
30
+ */
31
+ outputs: BuiltinRecord<string, unknown>;
32
+ /**
33
+ * The ID of the Run containing this Record.
34
+ */
35
+ runId: string;
36
+ /**
37
+ * The ID of the Testcase.
38
+ */
39
+ testcaseId?: string;
40
+ }
41
+ export interface RecordCreateParams {
42
+ /**
43
+ * The actual inputs sent to the system, which should match the system's input
44
+ * schema.
45
+ */
46
+ inputs: BuiltinRecord<string, unknown>;
47
+ /**
48
+ * The expected outputs for the Testcase.
49
+ */
50
+ labels: BuiltinRecord<string, unknown>;
51
+ /**
52
+ * The actual outputs from the system.
53
+ */
54
+ outputs: BuiltinRecord<string, unknown>;
55
+ /**
56
+ * The ID of the Testcase.
57
+ */
58
+ testcaseId?: string;
59
+ }
60
+ export declare namespace Records {
61
+ export { type Record as Record, type RecordCreateParams as RecordCreateParams };
62
+ }
63
+ //# sourceMappingURL=records.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.mts","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,MAAM,IAAI,aAAa,EAAE;OAChC,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAG9F;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,MAAM,IAAI,MAAM,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CACjF"}
@@ -0,0 +1,63 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { type Record as BuiltinRecord } from "../internal/builtin-types.js";
4
+ import { RequestOptions } from "../internal/request-options.js";
5
+ export declare class Records extends APIResource {
6
+ /**
7
+ * Create a new Record in a Run.
8
+ */
9
+ create(runID: string, body: RecordCreateParams, options?: RequestOptions): APIPromise<Record>;
10
+ }
11
+ /**
12
+ * A record of a system execution in the Scorecard system.
13
+ */
14
+ export interface Record {
15
+ /**
16
+ * The ID of the Record.
17
+ */
18
+ id: string;
19
+ /**
20
+ * The actual inputs sent to the system, which should match the system's input
21
+ * schema.
22
+ */
23
+ inputs: BuiltinRecord<string, unknown>;
24
+ /**
25
+ * The expected outputs for the Testcase.
26
+ */
27
+ labels: BuiltinRecord<string, unknown>;
28
+ /**
29
+ * The actual outputs from the system.
30
+ */
31
+ outputs: BuiltinRecord<string, unknown>;
32
+ /**
33
+ * The ID of the Run containing this Record.
34
+ */
35
+ runId: string;
36
+ /**
37
+ * The ID of the Testcase.
38
+ */
39
+ testcaseId?: string;
40
+ }
41
+ export interface RecordCreateParams {
42
+ /**
43
+ * The actual inputs sent to the system, which should match the system's input
44
+ * schema.
45
+ */
46
+ inputs: BuiltinRecord<string, unknown>;
47
+ /**
48
+ * The expected outputs for the Testcase.
49
+ */
50
+ labels: BuiltinRecord<string, unknown>;
51
+ /**
52
+ * The actual outputs from the system.
53
+ */
54
+ outputs: BuiltinRecord<string, unknown>;
55
+ /**
56
+ * The ID of the Testcase.
57
+ */
58
+ testcaseId?: string;
59
+ }
60
+ export declare namespace Records {
61
+ export { type Record as Record, type RecordCreateParams as RecordCreateParams };
62
+ }
63
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,MAAM,IAAI,aAAa,EAAE;OAChC,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAG9F;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,MAAM,IAAI,MAAM,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CACjF"}