scorecard-ai 0.5.4 → 0.6.0
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.
- package/Client.d.ts +9 -3
- package/Client.js +8 -3
- package/api/resources/index.d.ts +3 -1
- package/api/resources/index.js +4 -2
- package/api/resources/prompt/client/Client.d.ts +27 -22
- package/api/resources/prompt/client/Client.js +110 -99
- package/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +15 -0
- package/api/resources/prompt/client/requests/index.d.ts +1 -0
- package/api/resources/run/client/Client.d.ts +6 -3
- package/api/resources/run/client/Client.js +26 -23
- package/api/resources/runMetric/client/Client.d.ts +4 -1
- package/api/resources/runMetric/client/Client.js +8 -7
- package/api/resources/score/client/Client.d.ts +5 -2
- package/api/resources/score/client/Client.js +18 -16
- package/api/resources/scoringConfig/client/Client.d.ts +62 -0
- package/{dist/api/resources/traces → api/resources/scoringConfig}/client/Client.js +114 -16
- package/api/resources/scoringConfig/client/index.d.ts +1 -0
- package/api/resources/scoringConfig/client/index.js +17 -0
- package/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +16 -0
- package/api/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/api/resources/testcase/client/Client.d.ts +55 -3
- package/api/resources/testcase/client/Client.js +308 -22
- package/api/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +11 -0
- package/api/resources/testcase/client/requests/TestcaseBatchCopyParams.js +5 -0
- package/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +11 -0
- package/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +5 -0
- package/api/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/api/resources/testcase/client/requests/TestcaseUpdateParams.js +5 -0
- package/api/resources/testcase/client/requests/index.d.ts +3 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +5 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +5 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +5 -0
- package/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +5 -0
- package/api/resources/testcase/types/index.d.ts +2 -0
- package/api/resources/testcase/types/index.js +2 -0
- package/api/resources/testrecord/client/Client.d.ts +5 -2
- package/api/resources/testrecord/client/Client.js +17 -15
- package/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +2 -0
- package/api/resources/testset/client/Client.d.ts +24 -5
- package/api/resources/testset/client/Client.js +135 -36
- package/api/resources/testset/client/requests/TestsetCreateParams.d.ts +6 -0
- package/api/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/api/resources/testset/client/requests/TestsetUpdateParams.js +5 -0
- package/api/resources/testset/client/requests/index.d.ts +1 -0
- package/api/resources/tracing/client/Client.d.ts +72 -0
- package/api/resources/tracing/client/Client.js +327 -0
- package/api/types/IngestionMethod.d.ts +8 -0
- package/api/types/IngestionMethod.js +10 -0
- package/api/types/ScoringConfig.d.ts +16 -0
- package/api/types/ScoringConfig.js +5 -0
- package/api/types/TestcaseBatchDeletionResponse.d.ts +9 -0
- package/api/types/TestcaseBatchDeletionResponse.js +5 -0
- package/api/types/Testrecord.d.ts +2 -0
- package/api/types/Trace.d.ts +2 -0
- package/api/types/index.d.ts +6 -4
- package/api/types/index.js +6 -4
- package/core/fetcher/Fetcher.d.ts +4 -1
- package/core/fetcher/Fetcher.js +19 -176
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +52 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +32 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/{serialization/resources/traces/client/get.js → core/fetcher/stream-wrappers/chooseStreamWrapper.js} +16 -6
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +12 -1
- package/core/schemas/Schema.d.ts +7 -4
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/Client.d.ts +9 -3
- package/dist/Client.js +8 -3
- package/dist/api/resources/index.d.ts +3 -1
- package/dist/api/resources/index.js +4 -2
- package/dist/api/resources/prompt/client/Client.d.ts +27 -22
- package/dist/api/resources/prompt/client/Client.js +110 -99
- package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +15 -0
- package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.js +5 -0
- package/dist/api/resources/prompt/client/requests/index.d.ts +1 -0
- package/dist/api/resources/run/client/Client.d.ts +6 -3
- package/dist/api/resources/run/client/Client.js +26 -23
- package/dist/api/resources/runMetric/client/Client.d.ts +4 -1
- package/dist/api/resources/runMetric/client/Client.js +8 -7
- package/dist/api/resources/score/client/Client.d.ts +5 -2
- package/dist/api/resources/score/client/Client.js +18 -16
- package/dist/api/resources/scoringConfig/client/Client.d.ts +62 -0
- package/{api/resources/traces → dist/api/resources/scoringConfig}/client/Client.js +114 -16
- package/dist/api/resources/scoringConfig/client/index.d.ts +1 -0
- package/dist/api/resources/scoringConfig/client/index.js +17 -0
- package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +16 -0
- package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +5 -0
- package/dist/api/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/dist/api/resources/scoringConfig/client/requests/index.js +2 -0
- package/dist/api/resources/testcase/client/Client.d.ts +55 -3
- package/dist/api/resources/testcase/client/Client.js +308 -22
- package/dist/api/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +11 -0
- package/dist/api/resources/testcase/client/requests/TestcaseBatchCopyParams.js +5 -0
- package/dist/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +11 -0
- package/dist/api/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +5 -0
- package/dist/api/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/dist/api/resources/testcase/client/requests/TestcaseUpdateParams.js +5 -0
- package/dist/api/resources/testcase/client/requests/index.d.ts +3 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +5 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +5 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +5 -0
- package/dist/api/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +5 -0
- package/dist/api/resources/testcase/types/index.d.ts +2 -0
- package/dist/api/resources/testcase/types/index.js +2 -0
- package/dist/api/resources/testrecord/client/Client.d.ts +5 -2
- package/dist/api/resources/testrecord/client/Client.js +17 -15
- package/dist/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +2 -0
- package/dist/api/resources/testset/client/Client.d.ts +24 -5
- package/dist/api/resources/testset/client/Client.js +135 -36
- package/dist/api/resources/testset/client/requests/TestsetCreateParams.d.ts +6 -0
- package/dist/api/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/dist/api/resources/testset/client/requests/TestsetUpdateParams.js +5 -0
- package/dist/api/resources/testset/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tracing/client/Client.d.ts +72 -0
- package/dist/api/resources/tracing/client/Client.js +327 -0
- package/dist/api/resources/tracing/client/index.js +2 -0
- package/dist/api/types/IngestionMethod.d.ts +8 -0
- package/dist/api/types/IngestionMethod.js +10 -0
- package/dist/api/types/ScoringConfig.d.ts +16 -0
- package/dist/api/types/ScoringConfig.js +5 -0
- package/dist/api/types/TestcaseBatchDeletionResponse.d.ts +9 -0
- package/dist/api/types/TestcaseBatchDeletionResponse.js +5 -0
- package/dist/api/types/Testrecord.d.ts +2 -0
- package/dist/api/types/Trace.d.ts +2 -0
- package/dist/api/types/index.d.ts +6 -4
- package/dist/api/types/index.js +6 -4
- package/dist/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/core/fetcher/Fetcher.js +19 -176
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +52 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +32 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/{serialization/resources/traces/client/get.js → core/fetcher/stream-wrappers/chooseStreamWrapper.js} +16 -6
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +12 -1
- package/dist/core/schemas/Schema.d.ts +7 -4
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/serialization/resources/index.d.ts +3 -1
- package/dist/serialization/resources/index.js +4 -2
- package/dist/serialization/resources/scoringConfig/client/index.d.ts +1 -0
- package/dist/serialization/resources/scoringConfig/client/index.js +17 -0
- package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +14 -0
- package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +35 -0
- package/dist/serialization/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/scoringConfig/client/requests/index.js +5 -0
- package/dist/serialization/resources/scoringConfig/index.d.ts +1 -0
- package/dist/serialization/resources/scoringConfig/index.js +17 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +12 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.js +33 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +12 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +33 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/dist/serialization/resources/testcase/client/requests/TestcaseUpdateParams.js +43 -0
- package/dist/serialization/resources/testcase/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/testcase/client/requests/index.js +7 -1
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -10
- package/dist/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -10
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +11 -0
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +40 -0
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +11 -0
- package/dist/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +40 -0
- package/dist/serialization/resources/testcase/types/index.d.ts +2 -0
- package/dist/serialization/resources/testcase/types/index.js +2 -0
- package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -0
- package/dist/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +1 -0
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -10
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -10
- package/dist/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -10
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +4 -0
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.js +4 -0
- package/dist/serialization/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/dist/serialization/resources/testset/client/requests/TestsetUpdateParams.js +37 -0
- package/dist/serialization/resources/testset/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/testset/client/requests/index.js +3 -1
- package/dist/serialization/resources/tracing/client/index.d.ts +1 -0
- package/{serialization/resources/traces → dist/serialization/resources/tracing}/client/index.js +2 -2
- package/dist/serialization/resources/{traces/client/get.d.ts → tracing/client/traces.d.ts} +3 -2
- package/dist/serialization/resources/tracing/client/traces.js +32 -0
- package/dist/serialization/resources/tracing/index.d.ts +1 -0
- package/dist/serialization/resources/tracing/index.js +17 -0
- package/dist/serialization/types/IngestionMethod.d.ts +10 -0
- package/dist/serialization/types/IngestionMethod.js +31 -0
- package/dist/serialization/types/JsonObject.js +2 -10
- package/dist/serialization/types/JsonObjectInputValue.js +3 -11
- package/dist/serialization/types/JsonObjectOutputValue.js +3 -11
- package/dist/serialization/types/ScoringConfig.d.ts +20 -0
- package/dist/serialization/types/ScoringConfig.js +41 -0
- package/dist/serialization/types/Span.js +2 -10
- package/dist/serialization/types/TestCaseCustomInputsValue.js +2 -10
- package/dist/serialization/types/TestCaseCustomLabelsValue.js +2 -10
- package/dist/serialization/types/TestcaseBatchDeletionResponse.d.ts +13 -0
- package/dist/serialization/types/{TestCaseCreate.js → TestcaseBatchDeletionResponse.js} +4 -7
- package/dist/serialization/types/Testrecord.d.ts +1 -0
- package/dist/serialization/types/Testrecord.js +1 -0
- package/dist/serialization/types/TestrecordCustomInputsValue.js +2 -10
- package/dist/serialization/types/TestrecordCustomLabelsValue.js +2 -10
- package/dist/serialization/types/TestrecordCustomOutputsValue.js +2 -10
- package/dist/serialization/types/Trace.d.ts +1 -0
- package/dist/serialization/types/Trace.js +2 -0
- package/dist/serialization/types/index.d.ts +6 -4
- package/dist/serialization/types/index.js +6 -4
- package/package.json +8 -2
- package/reference.md +657 -569
- package/serialization/resources/index.d.ts +3 -1
- package/serialization/resources/index.js +4 -2
- package/serialization/resources/scoringConfig/client/index.d.ts +1 -0
- package/serialization/resources/scoringConfig/client/index.js +17 -0
- package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +14 -0
- package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +35 -0
- package/serialization/resources/scoringConfig/client/requests/index.d.ts +1 -0
- package/serialization/resources/scoringConfig/client/requests/index.js +5 -0
- package/serialization/resources/scoringConfig/index.d.ts +1 -0
- package/serialization/resources/scoringConfig/index.js +17 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.d.ts +12 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchCopyParams.js +33 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.d.ts +12 -0
- package/serialization/resources/testcase/client/requests/TestcaseBatchDeleteParams.js +33 -0
- package/serialization/resources/testcase/client/requests/TestcaseUpdateParams.d.ts +18 -0
- package/serialization/resources/testcase/client/requests/TestcaseUpdateParams.js +43 -0
- package/serialization/resources/testcase/client/requests/index.d.ts +3 -0
- package/serialization/resources/testcase/client/requests/index.js +7 -1
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomInputsValue.js +2 -10
- package/serialization/resources/testcase/types/TestcaseCreateParamsCustomLabelsValue.js +2 -10
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.d.ts +11 -0
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomInputsValue.js +40 -0
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.d.ts +11 -0
- package/serialization/resources/testcase/types/TestcaseUpdateParamsCustomLabelsValue.js +40 -0
- package/serialization/resources/testcase/types/index.d.ts +2 -0
- package/serialization/resources/testcase/types/index.js +2 -0
- package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +1 -0
- package/serialization/resources/testrecord/client/requests/TestrecordCreateParams.js +1 -0
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomInputsValue.js +2 -10
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomLabelsValue.js +2 -10
- package/serialization/resources/testrecord/types/TestrecordCreateParamsCustomOutputsValue.js +2 -10
- package/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +4 -0
- package/serialization/resources/testset/client/requests/TestsetCreateParams.js +4 -0
- package/serialization/resources/testset/client/requests/TestsetUpdateParams.d.ts +16 -0
- package/serialization/resources/testset/client/requests/TestsetUpdateParams.js +37 -0
- package/serialization/resources/testset/client/requests/index.d.ts +1 -0
- package/serialization/resources/testset/client/requests/index.js +3 -1
- package/serialization/resources/tracing/client/index.d.ts +1 -0
- package/{dist/serialization/resources/traces → serialization/resources/tracing}/client/index.js +2 -2
- package/serialization/resources/{traces/client/get.d.ts → tracing/client/traces.d.ts} +3 -2
- package/serialization/resources/tracing/client/traces.js +32 -0
- package/serialization/resources/tracing/index.d.ts +1 -0
- package/serialization/resources/tracing/index.js +17 -0
- package/serialization/types/IngestionMethod.d.ts +10 -0
- package/serialization/types/IngestionMethod.js +31 -0
- package/serialization/types/JsonObject.js +2 -10
- package/serialization/types/JsonObjectInputValue.js +3 -11
- package/serialization/types/JsonObjectOutputValue.js +3 -11
- package/serialization/types/ScoringConfig.d.ts +20 -0
- package/serialization/types/ScoringConfig.js +41 -0
- package/serialization/types/Span.js +2 -10
- package/serialization/types/TestCaseCustomInputsValue.js +2 -10
- package/serialization/types/TestCaseCustomLabelsValue.js +2 -10
- package/serialization/types/TestcaseBatchDeletionResponse.d.ts +13 -0
- package/serialization/types/{TestCaseCreate.js → TestcaseBatchDeletionResponse.js} +4 -7
- package/serialization/types/Testrecord.d.ts +1 -0
- package/serialization/types/Testrecord.js +1 -0
- package/serialization/types/TestrecordCustomInputsValue.js +2 -10
- package/serialization/types/TestrecordCustomLabelsValue.js +2 -10
- package/serialization/types/TestrecordCustomOutputsValue.js +2 -10
- package/serialization/types/Trace.d.ts +1 -0
- package/serialization/types/Trace.js +2 -0
- package/serialization/types/index.d.ts +6 -4
- package/serialization/types/index.js +6 -4
- package/api/resources/traces/client/Client.d.ts +0 -40
- package/api/types/TestCaseCreate.d.ts +0 -10
- package/dist/api/resources/traces/client/Client.d.ts +0 -40
- package/dist/api/types/TestCaseCreate.d.ts +0 -10
- package/dist/serialization/resources/traces/client/index.d.ts +0 -1
- package/dist/serialization/types/TestCaseCreate.d.ts +0 -16
- package/serialization/resources/traces/client/index.d.ts +0 -1
- package/serialization/types/TestCaseCreate.d.ts +0 -16
- /package/api/{types/TestCaseCreate.js → resources/prompt/client/requests/PromptGetByNameRequest.js} +0 -0
- /package/{dist/api/types/TestCaseCreate.js → api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js} +0 -0
- /package/api/resources/{traces/client → scoringConfig/client/requests}/index.js +0 -0
- /package/api/resources/{traces → scoringConfig}/index.d.ts +0 -0
- /package/api/resources/{traces → scoringConfig}/index.js +0 -0
- /package/api/resources/{traces → tracing}/client/index.d.ts +0 -0
- /package/{dist/api/resources/traces → api/resources/tracing}/client/index.js +0 -0
- /package/{dist/api/resources/traces → api/resources/tracing}/index.d.ts +0 -0
- /package/{dist/api/resources/traces → api/resources/tracing}/index.js +0 -0
- /package/dist/{serialization/resources/traces → api/resources/scoringConfig}/index.d.ts +0 -0
- /package/dist/{serialization/resources/traces → api/resources/scoringConfig}/index.js +0 -0
- /package/dist/api/resources/{traces → tracing}/client/index.d.ts +0 -0
- /package/{serialization/resources/traces → dist/api/resources/tracing}/index.d.ts +0 -0
- /package/{serialization/resources/traces → dist/api/resources/tracing}/index.js +0 -0
|
@@ -62,7 +62,7 @@ class Testrecord {
|
|
|
62
62
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
|
-
* await
|
|
65
|
+
* await client.testrecord.get(1, 1)
|
|
66
66
|
*/
|
|
67
67
|
get(testrecordId, runId, requestOptions) {
|
|
68
68
|
var _a, _b;
|
|
@@ -70,14 +70,15 @@ 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.
|
|
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())),
|
|
74
74
|
contentType: "application/json",
|
|
75
|
+
requestType: "json",
|
|
75
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
76
77
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
77
78
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
78
79
|
});
|
|
79
80
|
if (_response.ok) {
|
|
80
|
-
return
|
|
81
|
+
return serializers.Testrecord.parseOrThrow(_response.body, {
|
|
81
82
|
unrecognizedObjectKeys: "passthrough",
|
|
82
83
|
allowUnrecognizedUnionMembers: true,
|
|
83
84
|
allowUnrecognizedEnumValues: true,
|
|
@@ -88,7 +89,7 @@ class Testrecord {
|
|
|
88
89
|
if (_response.error.reason === "status-code") {
|
|
89
90
|
switch (_response.error.statusCode) {
|
|
90
91
|
case 401:
|
|
91
|
-
throw new Scorecard.UnauthorizedError(
|
|
92
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
92
93
|
unrecognizedObjectKeys: "passthrough",
|
|
93
94
|
allowUnrecognizedUnionMembers: true,
|
|
94
95
|
allowUnrecognizedEnumValues: true,
|
|
@@ -96,7 +97,7 @@ class Testrecord {
|
|
|
96
97
|
breadcrumbsPrefix: ["response"],
|
|
97
98
|
}));
|
|
98
99
|
case 403:
|
|
99
|
-
throw new Scorecard.ForbiddenError(
|
|
100
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
100
101
|
unrecognizedObjectKeys: "passthrough",
|
|
101
102
|
allowUnrecognizedUnionMembers: true,
|
|
102
103
|
allowUnrecognizedEnumValues: true,
|
|
@@ -104,7 +105,7 @@ class Testrecord {
|
|
|
104
105
|
breadcrumbsPrefix: ["response"],
|
|
105
106
|
}));
|
|
106
107
|
case 404:
|
|
107
|
-
throw new Scorecard.NotFoundError(
|
|
108
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
108
109
|
unrecognizedObjectKeys: "passthrough",
|
|
109
110
|
allowUnrecognizedUnionMembers: true,
|
|
110
111
|
allowUnrecognizedEnumValues: true,
|
|
@@ -112,7 +113,7 @@ class Testrecord {
|
|
|
112
113
|
breadcrumbsPrefix: ["response"],
|
|
113
114
|
}));
|
|
114
115
|
case 422:
|
|
115
|
-
throw new Scorecard.UnprocessableEntityError(
|
|
116
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
116
117
|
unrecognizedObjectKeys: "passthrough",
|
|
117
118
|
allowUnrecognizedUnionMembers: true,
|
|
118
119
|
allowUnrecognizedEnumValues: true,
|
|
@@ -154,7 +155,7 @@ class Testrecord {
|
|
|
154
155
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
155
156
|
*
|
|
156
157
|
* @example
|
|
157
|
-
* await
|
|
158
|
+
* await client.testrecord.create(1)
|
|
158
159
|
*/
|
|
159
160
|
create(runId, request = {}, requestOptions) {
|
|
160
161
|
var _a, _b;
|
|
@@ -162,15 +163,16 @@ class Testrecord {
|
|
|
162
163
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
163
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`),
|
|
164
165
|
method: "POST",
|
|
165
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.
|
|
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
167
|
contentType: "application/json",
|
|
167
|
-
|
|
168
|
+
requestType: "json",
|
|
169
|
+
body: serializers.TestrecordCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
168
170
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
169
171
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
170
172
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
171
173
|
});
|
|
172
174
|
if (_response.ok) {
|
|
173
|
-
return
|
|
175
|
+
return serializers.Testrecord.parseOrThrow(_response.body, {
|
|
174
176
|
unrecognizedObjectKeys: "passthrough",
|
|
175
177
|
allowUnrecognizedUnionMembers: true,
|
|
176
178
|
allowUnrecognizedEnumValues: true,
|
|
@@ -181,7 +183,7 @@ class Testrecord {
|
|
|
181
183
|
if (_response.error.reason === "status-code") {
|
|
182
184
|
switch (_response.error.statusCode) {
|
|
183
185
|
case 401:
|
|
184
|
-
throw new Scorecard.UnauthorizedError(
|
|
186
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
185
187
|
unrecognizedObjectKeys: "passthrough",
|
|
186
188
|
allowUnrecognizedUnionMembers: true,
|
|
187
189
|
allowUnrecognizedEnumValues: true,
|
|
@@ -189,7 +191,7 @@ class Testrecord {
|
|
|
189
191
|
breadcrumbsPrefix: ["response"],
|
|
190
192
|
}));
|
|
191
193
|
case 403:
|
|
192
|
-
throw new Scorecard.ForbiddenError(
|
|
194
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
193
195
|
unrecognizedObjectKeys: "passthrough",
|
|
194
196
|
allowUnrecognizedUnionMembers: true,
|
|
195
197
|
allowUnrecognizedEnumValues: true,
|
|
@@ -197,7 +199,7 @@ class Testrecord {
|
|
|
197
199
|
breadcrumbsPrefix: ["response"],
|
|
198
200
|
}));
|
|
199
201
|
case 404:
|
|
200
|
-
throw new Scorecard.NotFoundError(
|
|
202
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
201
203
|
unrecognizedObjectKeys: "passthrough",
|
|
202
204
|
allowUnrecognizedUnionMembers: true,
|
|
203
205
|
allowUnrecognizedEnumValues: true,
|
|
@@ -205,7 +207,7 @@ class Testrecord {
|
|
|
205
207
|
breadcrumbsPrefix: ["response"],
|
|
206
208
|
}));
|
|
207
209
|
case 422:
|
|
208
|
-
throw new Scorecard.UnprocessableEntityError(
|
|
210
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
209
211
|
unrecognizedObjectKeys: "passthrough",
|
|
210
212
|
allowUnrecognizedUnionMembers: true,
|
|
211
213
|
allowUnrecognizedEnumValues: true,
|
|
@@ -26,4 +26,6 @@ export interface TestrecordCreateParams {
|
|
|
26
26
|
modelParams?: Record<string, Scorecard.TestrecordCreateParamsModelParamsValue | undefined>;
|
|
27
27
|
/** Debug information generated by Scorecard during the execution of the testrecord. */
|
|
28
28
|
modelDebugInfo?: Record<string, Scorecard.TestrecordCreateParamsModelDebugInfoValue | undefined>;
|
|
29
|
+
/** The error message for the testrecord. */
|
|
30
|
+
errorMessage?: string;
|
|
29
31
|
}
|
|
@@ -11,8 +11,11 @@ export declare namespace Testset {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -31,7 +34,7 @@ export declare class Testset {
|
|
|
31
34
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
32
35
|
*
|
|
33
36
|
* @example
|
|
34
|
-
* await
|
|
37
|
+
* await client.testset.get(1)
|
|
35
38
|
*/
|
|
36
39
|
get(testsetId: number, requestOptions?: Testset.RequestOptions): Promise<Scorecard.Testset>;
|
|
37
40
|
/**
|
|
@@ -46,9 +49,25 @@ export declare class Testset {
|
|
|
46
49
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
47
50
|
*
|
|
48
51
|
* @example
|
|
49
|
-
* await
|
|
52
|
+
* await client.testset.delete(1)
|
|
50
53
|
*/
|
|
51
54
|
delete(testsetId: number, requestOptions?: Testset.RequestOptions): Promise<Scorecard.Testset>;
|
|
55
|
+
/**
|
|
56
|
+
* Update a Testset.
|
|
57
|
+
*
|
|
58
|
+
* @param {number} testsetId - The ID of the Testset to update.
|
|
59
|
+
* @param {Scorecard.TestsetUpdateParams} request
|
|
60
|
+
* @param {Testset.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Scorecard.UnauthorizedError}
|
|
63
|
+
* @throws {@link Scorecard.ForbiddenError}
|
|
64
|
+
* @throws {@link Scorecard.NotFoundError}
|
|
65
|
+
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.testset.update(1)
|
|
69
|
+
*/
|
|
70
|
+
update(testsetId: number, request?: Scorecard.TestsetUpdateParams, requestOptions?: Testset.RequestOptions): Promise<Scorecard.Testset>;
|
|
52
71
|
/**
|
|
53
72
|
* Create a new Testset
|
|
54
73
|
*
|
|
@@ -61,7 +80,7 @@ export declare class Testset {
|
|
|
61
80
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
62
81
|
*
|
|
63
82
|
* @example
|
|
64
|
-
* await
|
|
83
|
+
* await client.testset.create({
|
|
65
84
|
* name: "name"
|
|
66
85
|
* })
|
|
67
86
|
*/
|
|
@@ -78,7 +97,7 @@ export declare class Testset {
|
|
|
78
97
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
79
98
|
*
|
|
80
99
|
* @example
|
|
81
|
-
* await
|
|
100
|
+
* await client.testset.readSchema(1)
|
|
82
101
|
*/
|
|
83
102
|
readSchema(testsetId: number, requestOptions?: Testset.RequestOptions): Promise<Scorecard.CustomSchema>;
|
|
84
103
|
/**
|
|
@@ -94,7 +113,7 @@ export declare class Testset {
|
|
|
94
113
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
95
114
|
*
|
|
96
115
|
* @example
|
|
97
|
-
* await
|
|
116
|
+
* await client.testset.getTestcases(1)
|
|
98
117
|
*/
|
|
99
118
|
getTestcases(testsetId: number, request?: Scorecard.TestsetGetTestcasesRequest, requestOptions?: Testset.RequestOptions): Promise<Scorecard.PaginatedTestcaseResponse>;
|
|
100
119
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -61,7 +61,7 @@ class Testset {
|
|
|
61
61
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* await
|
|
64
|
+
* await client.testset.get(1)
|
|
65
65
|
*/
|
|
66
66
|
get(testsetId, requestOptions) {
|
|
67
67
|
var _a, _b;
|
|
@@ -69,14 +69,15 @@ class Testset {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
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)}`),
|
|
71
71
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.
|
|
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())),
|
|
73
73
|
contentType: "application/json",
|
|
74
|
+
requestType: "json",
|
|
74
75
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
76
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
76
77
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
77
78
|
});
|
|
78
79
|
if (_response.ok) {
|
|
79
|
-
return
|
|
80
|
+
return serializers.Testset.parseOrThrow(_response.body, {
|
|
80
81
|
unrecognizedObjectKeys: "passthrough",
|
|
81
82
|
allowUnrecognizedUnionMembers: true,
|
|
82
83
|
allowUnrecognizedEnumValues: true,
|
|
@@ -87,7 +88,7 @@ class Testset {
|
|
|
87
88
|
if (_response.error.reason === "status-code") {
|
|
88
89
|
switch (_response.error.statusCode) {
|
|
89
90
|
case 401:
|
|
90
|
-
throw new Scorecard.UnauthorizedError(
|
|
91
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
91
92
|
unrecognizedObjectKeys: "passthrough",
|
|
92
93
|
allowUnrecognizedUnionMembers: true,
|
|
93
94
|
allowUnrecognizedEnumValues: true,
|
|
@@ -95,7 +96,7 @@ class Testset {
|
|
|
95
96
|
breadcrumbsPrefix: ["response"],
|
|
96
97
|
}));
|
|
97
98
|
case 403:
|
|
98
|
-
throw new Scorecard.ForbiddenError(
|
|
99
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
99
100
|
unrecognizedObjectKeys: "passthrough",
|
|
100
101
|
allowUnrecognizedUnionMembers: true,
|
|
101
102
|
allowUnrecognizedEnumValues: true,
|
|
@@ -103,7 +104,7 @@ class Testset {
|
|
|
103
104
|
breadcrumbsPrefix: ["response"],
|
|
104
105
|
}));
|
|
105
106
|
case 404:
|
|
106
|
-
throw new Scorecard.NotFoundError(
|
|
107
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
107
108
|
unrecognizedObjectKeys: "passthrough",
|
|
108
109
|
allowUnrecognizedUnionMembers: true,
|
|
109
110
|
allowUnrecognizedEnumValues: true,
|
|
@@ -111,7 +112,7 @@ class Testset {
|
|
|
111
112
|
breadcrumbsPrefix: ["response"],
|
|
112
113
|
}));
|
|
113
114
|
case 422:
|
|
114
|
-
throw new Scorecard.UnprocessableEntityError(
|
|
115
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
115
116
|
unrecognizedObjectKeys: "passthrough",
|
|
116
117
|
allowUnrecognizedUnionMembers: true,
|
|
117
118
|
allowUnrecognizedEnumValues: true,
|
|
@@ -152,7 +153,7 @@ class Testset {
|
|
|
152
153
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
153
154
|
*
|
|
154
155
|
* @example
|
|
155
|
-
* await
|
|
156
|
+
* await client.testset.delete(1)
|
|
156
157
|
*/
|
|
157
158
|
delete(testsetId, requestOptions) {
|
|
158
159
|
var _a, _b;
|
|
@@ -160,14 +161,15 @@ class Testset {
|
|
|
160
161
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
161
162
|
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
163
|
method: "DELETE",
|
|
163
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.
|
|
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())),
|
|
164
165
|
contentType: "application/json",
|
|
166
|
+
requestType: "json",
|
|
165
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
166
168
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
167
169
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
168
170
|
});
|
|
169
171
|
if (_response.ok) {
|
|
170
|
-
return
|
|
172
|
+
return serializers.Testset.parseOrThrow(_response.body, {
|
|
171
173
|
unrecognizedObjectKeys: "passthrough",
|
|
172
174
|
allowUnrecognizedUnionMembers: true,
|
|
173
175
|
allowUnrecognizedEnumValues: true,
|
|
@@ -178,7 +180,7 @@ class Testset {
|
|
|
178
180
|
if (_response.error.reason === "status-code") {
|
|
179
181
|
switch (_response.error.statusCode) {
|
|
180
182
|
case 401:
|
|
181
|
-
throw new Scorecard.UnauthorizedError(
|
|
183
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
182
184
|
unrecognizedObjectKeys: "passthrough",
|
|
183
185
|
allowUnrecognizedUnionMembers: true,
|
|
184
186
|
allowUnrecognizedEnumValues: true,
|
|
@@ -186,7 +188,7 @@ class Testset {
|
|
|
186
188
|
breadcrumbsPrefix: ["response"],
|
|
187
189
|
}));
|
|
188
190
|
case 403:
|
|
189
|
-
throw new Scorecard.ForbiddenError(
|
|
191
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
190
192
|
unrecognizedObjectKeys: "passthrough",
|
|
191
193
|
allowUnrecognizedUnionMembers: true,
|
|
192
194
|
allowUnrecognizedEnumValues: true,
|
|
@@ -194,7 +196,7 @@ class Testset {
|
|
|
194
196
|
breadcrumbsPrefix: ["response"],
|
|
195
197
|
}));
|
|
196
198
|
case 404:
|
|
197
|
-
throw new Scorecard.NotFoundError(
|
|
199
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
198
200
|
unrecognizedObjectKeys: "passthrough",
|
|
199
201
|
allowUnrecognizedUnionMembers: true,
|
|
200
202
|
allowUnrecognizedEnumValues: true,
|
|
@@ -202,7 +204,101 @@ class Testset {
|
|
|
202
204
|
breadcrumbsPrefix: ["response"],
|
|
203
205
|
}));
|
|
204
206
|
case 422:
|
|
205
|
-
throw new Scorecard.UnprocessableEntityError(
|
|
207
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
208
|
+
unrecognizedObjectKeys: "passthrough",
|
|
209
|
+
allowUnrecognizedUnionMembers: true,
|
|
210
|
+
allowUnrecognizedEnumValues: true,
|
|
211
|
+
skipValidation: true,
|
|
212
|
+
breadcrumbsPrefix: ["response"],
|
|
213
|
+
}));
|
|
214
|
+
default:
|
|
215
|
+
throw new errors.ScorecardError({
|
|
216
|
+
statusCode: _response.error.statusCode,
|
|
217
|
+
body: _response.error.body,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
switch (_response.error.reason) {
|
|
222
|
+
case "non-json":
|
|
223
|
+
throw new errors.ScorecardError({
|
|
224
|
+
statusCode: _response.error.statusCode,
|
|
225
|
+
body: _response.error.rawBody,
|
|
226
|
+
});
|
|
227
|
+
case "timeout":
|
|
228
|
+
throw new errors.ScorecardTimeoutError();
|
|
229
|
+
case "unknown":
|
|
230
|
+
throw new errors.ScorecardError({
|
|
231
|
+
message: _response.error.errorMessage,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Update a Testset.
|
|
238
|
+
*
|
|
239
|
+
* @param {number} testsetId - The ID of the Testset to update.
|
|
240
|
+
* @param {Scorecard.TestsetUpdateParams} request
|
|
241
|
+
* @param {Testset.RequestOptions} requestOptions - Request-specific configuration.
|
|
242
|
+
*
|
|
243
|
+
* @throws {@link Scorecard.UnauthorizedError}
|
|
244
|
+
* @throws {@link Scorecard.ForbiddenError}
|
|
245
|
+
* @throws {@link Scorecard.NotFoundError}
|
|
246
|
+
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* await client.testset.update(1)
|
|
250
|
+
*/
|
|
251
|
+
update(testsetId, request = {}, requestOptions) {
|
|
252
|
+
var _a, _b;
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
255
|
+
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
|
+
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())),
|
|
258
|
+
contentType: "application/json",
|
|
259
|
+
requestType: "json",
|
|
260
|
+
body: serializers.TestsetUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
261
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
262
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
263
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
264
|
+
});
|
|
265
|
+
if (_response.ok) {
|
|
266
|
+
return serializers.Testset.parseOrThrow(_response.body, {
|
|
267
|
+
unrecognizedObjectKeys: "passthrough",
|
|
268
|
+
allowUnrecognizedUnionMembers: true,
|
|
269
|
+
allowUnrecognizedEnumValues: true,
|
|
270
|
+
skipValidation: true,
|
|
271
|
+
breadcrumbsPrefix: ["response"],
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
if (_response.error.reason === "status-code") {
|
|
275
|
+
switch (_response.error.statusCode) {
|
|
276
|
+
case 401:
|
|
277
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
278
|
+
unrecognizedObjectKeys: "passthrough",
|
|
279
|
+
allowUnrecognizedUnionMembers: true,
|
|
280
|
+
allowUnrecognizedEnumValues: true,
|
|
281
|
+
skipValidation: true,
|
|
282
|
+
breadcrumbsPrefix: ["response"],
|
|
283
|
+
}));
|
|
284
|
+
case 403:
|
|
285
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
286
|
+
unrecognizedObjectKeys: "passthrough",
|
|
287
|
+
allowUnrecognizedUnionMembers: true,
|
|
288
|
+
allowUnrecognizedEnumValues: true,
|
|
289
|
+
skipValidation: true,
|
|
290
|
+
breadcrumbsPrefix: ["response"],
|
|
291
|
+
}));
|
|
292
|
+
case 404:
|
|
293
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
294
|
+
unrecognizedObjectKeys: "passthrough",
|
|
295
|
+
allowUnrecognizedUnionMembers: true,
|
|
296
|
+
allowUnrecognizedEnumValues: true,
|
|
297
|
+
skipValidation: true,
|
|
298
|
+
breadcrumbsPrefix: ["response"],
|
|
299
|
+
}));
|
|
300
|
+
case 422:
|
|
301
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
206
302
|
unrecognizedObjectKeys: "passthrough",
|
|
207
303
|
allowUnrecognizedUnionMembers: true,
|
|
208
304
|
allowUnrecognizedEnumValues: true,
|
|
@@ -243,7 +339,7 @@ class Testset {
|
|
|
243
339
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
244
340
|
*
|
|
245
341
|
* @example
|
|
246
|
-
* await
|
|
342
|
+
* await client.testset.create({
|
|
247
343
|
* name: "name"
|
|
248
344
|
* })
|
|
249
345
|
*/
|
|
@@ -253,15 +349,16 @@ class Testset {
|
|
|
253
349
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
254
350
|
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
351
|
method: "POST",
|
|
256
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.
|
|
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())),
|
|
257
353
|
contentType: "application/json",
|
|
258
|
-
|
|
354
|
+
requestType: "json",
|
|
355
|
+
body: serializers.TestsetCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
259
356
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
260
357
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
261
358
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
262
359
|
});
|
|
263
360
|
if (_response.ok) {
|
|
264
|
-
return
|
|
361
|
+
return serializers.Testset.parseOrThrow(_response.body, {
|
|
265
362
|
unrecognizedObjectKeys: "passthrough",
|
|
266
363
|
allowUnrecognizedUnionMembers: true,
|
|
267
364
|
allowUnrecognizedEnumValues: true,
|
|
@@ -272,7 +369,7 @@ class Testset {
|
|
|
272
369
|
if (_response.error.reason === "status-code") {
|
|
273
370
|
switch (_response.error.statusCode) {
|
|
274
371
|
case 401:
|
|
275
|
-
throw new Scorecard.UnauthorizedError(
|
|
372
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
276
373
|
unrecognizedObjectKeys: "passthrough",
|
|
277
374
|
allowUnrecognizedUnionMembers: true,
|
|
278
375
|
allowUnrecognizedEnumValues: true,
|
|
@@ -280,7 +377,7 @@ class Testset {
|
|
|
280
377
|
breadcrumbsPrefix: ["response"],
|
|
281
378
|
}));
|
|
282
379
|
case 403:
|
|
283
|
-
throw new Scorecard.ForbiddenError(
|
|
380
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
284
381
|
unrecognizedObjectKeys: "passthrough",
|
|
285
382
|
allowUnrecognizedUnionMembers: true,
|
|
286
383
|
allowUnrecognizedEnumValues: true,
|
|
@@ -288,7 +385,7 @@ class Testset {
|
|
|
288
385
|
breadcrumbsPrefix: ["response"],
|
|
289
386
|
}));
|
|
290
387
|
case 404:
|
|
291
|
-
throw new Scorecard.NotFoundError(
|
|
388
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
292
389
|
unrecognizedObjectKeys: "passthrough",
|
|
293
390
|
allowUnrecognizedUnionMembers: true,
|
|
294
391
|
allowUnrecognizedEnumValues: true,
|
|
@@ -296,7 +393,7 @@ class Testset {
|
|
|
296
393
|
breadcrumbsPrefix: ["response"],
|
|
297
394
|
}));
|
|
298
395
|
case 422:
|
|
299
|
-
throw new Scorecard.UnprocessableEntityError(
|
|
396
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
300
397
|
unrecognizedObjectKeys: "passthrough",
|
|
301
398
|
allowUnrecognizedUnionMembers: true,
|
|
302
399
|
allowUnrecognizedEnumValues: true,
|
|
@@ -337,7 +434,7 @@ class Testset {
|
|
|
337
434
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
338
435
|
*
|
|
339
436
|
* @example
|
|
340
|
-
* await
|
|
437
|
+
* await client.testset.readSchema(1)
|
|
341
438
|
*/
|
|
342
439
|
readSchema(testsetId, requestOptions) {
|
|
343
440
|
var _a, _b;
|
|
@@ -345,14 +442,15 @@ class Testset {
|
|
|
345
442
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
346
443
|
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
444
|
method: "GET",
|
|
348
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.
|
|
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())),
|
|
349
446
|
contentType: "application/json",
|
|
447
|
+
requestType: "json",
|
|
350
448
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
351
449
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
352
450
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
353
451
|
});
|
|
354
452
|
if (_response.ok) {
|
|
355
|
-
return
|
|
453
|
+
return serializers.CustomSchema.parseOrThrow(_response.body, {
|
|
356
454
|
unrecognizedObjectKeys: "passthrough",
|
|
357
455
|
allowUnrecognizedUnionMembers: true,
|
|
358
456
|
allowUnrecognizedEnumValues: true,
|
|
@@ -363,7 +461,7 @@ class Testset {
|
|
|
363
461
|
if (_response.error.reason === "status-code") {
|
|
364
462
|
switch (_response.error.statusCode) {
|
|
365
463
|
case 401:
|
|
366
|
-
throw new Scorecard.UnauthorizedError(
|
|
464
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
367
465
|
unrecognizedObjectKeys: "passthrough",
|
|
368
466
|
allowUnrecognizedUnionMembers: true,
|
|
369
467
|
allowUnrecognizedEnumValues: true,
|
|
@@ -371,7 +469,7 @@ class Testset {
|
|
|
371
469
|
breadcrumbsPrefix: ["response"],
|
|
372
470
|
}));
|
|
373
471
|
case 403:
|
|
374
|
-
throw new Scorecard.ForbiddenError(
|
|
472
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
375
473
|
unrecognizedObjectKeys: "passthrough",
|
|
376
474
|
allowUnrecognizedUnionMembers: true,
|
|
377
475
|
allowUnrecognizedEnumValues: true,
|
|
@@ -379,7 +477,7 @@ class Testset {
|
|
|
379
477
|
breadcrumbsPrefix: ["response"],
|
|
380
478
|
}));
|
|
381
479
|
case 404:
|
|
382
|
-
throw new Scorecard.NotFoundError(
|
|
480
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
383
481
|
unrecognizedObjectKeys: "passthrough",
|
|
384
482
|
allowUnrecognizedUnionMembers: true,
|
|
385
483
|
allowUnrecognizedEnumValues: true,
|
|
@@ -387,7 +485,7 @@ class Testset {
|
|
|
387
485
|
breadcrumbsPrefix: ["response"],
|
|
388
486
|
}));
|
|
389
487
|
case 422:
|
|
390
|
-
throw new Scorecard.UnprocessableEntityError(
|
|
488
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
391
489
|
unrecognizedObjectKeys: "passthrough",
|
|
392
490
|
allowUnrecognizedUnionMembers: true,
|
|
393
491
|
allowUnrecognizedEnumValues: true,
|
|
@@ -429,7 +527,7 @@ class Testset {
|
|
|
429
527
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
430
528
|
*
|
|
431
529
|
* @example
|
|
432
|
-
* await
|
|
530
|
+
* await client.testset.getTestcases(1)
|
|
433
531
|
*/
|
|
434
532
|
getTestcases(testsetId, request = {}, requestOptions) {
|
|
435
533
|
var _a, _b;
|
|
@@ -445,15 +543,16 @@ class Testset {
|
|
|
445
543
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
446
544
|
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
545
|
method: "GET",
|
|
448
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.
|
|
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())),
|
|
449
547
|
contentType: "application/json",
|
|
450
548
|
queryParameters: _queryParams,
|
|
549
|
+
requestType: "json",
|
|
451
550
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
452
551
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
453
552
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
454
553
|
});
|
|
455
554
|
if (_response.ok) {
|
|
456
|
-
return
|
|
555
|
+
return serializers.PaginatedTestcaseResponse.parseOrThrow(_response.body, {
|
|
457
556
|
unrecognizedObjectKeys: "passthrough",
|
|
458
557
|
allowUnrecognizedUnionMembers: true,
|
|
459
558
|
allowUnrecognizedEnumValues: true,
|
|
@@ -464,7 +563,7 @@ class Testset {
|
|
|
464
563
|
if (_response.error.reason === "status-code") {
|
|
465
564
|
switch (_response.error.statusCode) {
|
|
466
565
|
case 401:
|
|
467
|
-
throw new Scorecard.UnauthorizedError(
|
|
566
|
+
throw new Scorecard.UnauthorizedError(serializers.UnauthenticatedError.parseOrThrow(_response.error.body, {
|
|
468
567
|
unrecognizedObjectKeys: "passthrough",
|
|
469
568
|
allowUnrecognizedUnionMembers: true,
|
|
470
569
|
allowUnrecognizedEnumValues: true,
|
|
@@ -472,7 +571,7 @@ class Testset {
|
|
|
472
571
|
breadcrumbsPrefix: ["response"],
|
|
473
572
|
}));
|
|
474
573
|
case 403:
|
|
475
|
-
throw new Scorecard.ForbiddenError(
|
|
574
|
+
throw new Scorecard.ForbiddenError(serializers.UnauthorizedErrorBody.parseOrThrow(_response.error.body, {
|
|
476
575
|
unrecognizedObjectKeys: "passthrough",
|
|
477
576
|
allowUnrecognizedUnionMembers: true,
|
|
478
577
|
allowUnrecognizedEnumValues: true,
|
|
@@ -480,7 +579,7 @@ class Testset {
|
|
|
480
579
|
breadcrumbsPrefix: ["response"],
|
|
481
580
|
}));
|
|
482
581
|
case 404:
|
|
483
|
-
throw new Scorecard.NotFoundError(
|
|
582
|
+
throw new Scorecard.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
484
583
|
unrecognizedObjectKeys: "passthrough",
|
|
485
584
|
allowUnrecognizedUnionMembers: true,
|
|
486
585
|
allowUnrecognizedEnumValues: true,
|
|
@@ -488,7 +587,7 @@ class Testset {
|
|
|
488
587
|
breadcrumbsPrefix: ["response"],
|
|
489
588
|
}));
|
|
490
589
|
case 422:
|
|
491
|
-
throw new Scorecard.UnprocessableEntityError(
|
|
590
|
+
throw new Scorecard.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
492
591
|
unrecognizedObjectKeys: "passthrough",
|
|
493
592
|
allowUnrecognizedUnionMembers: true,
|
|
494
593
|
allowUnrecognizedEnumValues: true,
|
|
@@ -15,4 +15,10 @@ 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;
|
|
18
24
|
}
|
|
@@ -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
|
+
}
|