vellum-ai 0.0.16 → 0.0.17

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 (61) hide show
  1. package/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
  2. package/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +4 -3
  3. package/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
  4. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +3 -3
  5. package/api/resources/sandboxes/client/Client.d.ts +6 -0
  6. package/api/resources/sandboxes/client/Client.js +37 -0
  7. package/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
  8. package/api/resources/testSuites/client/Client.d.ts +6 -0
  9. package/api/resources/testSuites/client/Client.js +37 -0
  10. package/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
  11. package/api/types/DeploymentRead.d.ts +2 -2
  12. package/api/types/Document.d.ts +1 -1
  13. package/api/types/DocumentIndexRead.d.ts +3 -3
  14. package/api/types/ModelVersionRead.d.ts +2 -2
  15. package/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  16. package/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
  17. package/api/types/ProcessingFailureReasonEnum.js +0 -4
  18. package/api/types/PromptTemplateBlockRequest.d.ts +1 -0
  19. package/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
  20. package/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  21. package/api/types/ScenarioInputRequest.d.ts +1 -0
  22. package/api/types/SlimDocument.d.ts +1 -1
  23. package/api/types/SlimDocumentStatusEnum.d.ts +0 -3
  24. package/api/types/SlimDocumentStatusEnum.js +0 -4
  25. package/dist/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
  26. package/dist/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +4 -3
  27. package/dist/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
  28. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +3 -3
  29. package/dist/api/resources/sandboxes/client/Client.d.ts +6 -0
  30. package/dist/api/resources/sandboxes/client/Client.js +37 -0
  31. package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
  32. package/dist/api/resources/testSuites/client/Client.d.ts +6 -0
  33. package/dist/api/resources/testSuites/client/Client.js +37 -0
  34. package/dist/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
  35. package/dist/api/types/DeploymentRead.d.ts +2 -2
  36. package/dist/api/types/Document.d.ts +1 -1
  37. package/dist/api/types/DocumentIndexRead.d.ts +3 -3
  38. package/dist/api/types/ModelVersionRead.d.ts +2 -2
  39. package/dist/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  40. package/dist/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
  41. package/dist/api/types/ProcessingFailureReasonEnum.js +0 -4
  42. package/dist/api/types/PromptTemplateBlockRequest.d.ts +1 -0
  43. package/dist/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
  44. package/dist/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  45. package/dist/api/types/ScenarioInputRequest.d.ts +1 -0
  46. package/dist/api/types/SlimDocument.d.ts +1 -1
  47. package/dist/api/types/SlimDocumentStatusEnum.d.ts +0 -3
  48. package/dist/api/types/SlimDocumentStatusEnum.js +0 -4
  49. package/dist/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  50. package/dist/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
  51. package/dist/serialization/types/ProcessingFailureReasonEnum.js +1 -1
  52. package/dist/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  53. package/dist/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
  54. package/dist/serialization/types/SlimDocumentStatusEnum.js +1 -1
  55. package/package.json +1 -1
  56. package/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  57. package/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
  58. package/serialization/types/ProcessingFailureReasonEnum.js +1 -1
  59. package/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  60. package/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
  61. package/serialization/types/SlimDocumentStatusEnum.js +1 -1
@@ -7,7 +7,7 @@ export interface SearchRequestBodyRequest {
7
7
  indexId?: string;
8
8
  /** The name of the index to search against. Must provide either this or index_id. */
9
9
  indexName?: string;
10
- /** The query to search for. */
10
+ /** The query to search for. <span style="white-space: nowrap">`non-empty`</span> */
11
11
  query: string;
12
12
  /** Configuration options for the search. */
13
13
  options?: Vellum.SearchRequestOptionsRequest;
@@ -3,13 +3,14 @@
3
3
  */
4
4
  import * as Vellum from "../../../..";
5
5
  export interface DocumentIndexCreateRequest {
6
- /** A human-readable label for the document index. */
6
+ /** A human-readable label for the document index <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 150 characters`</span> */
7
7
  label: string;
8
- /** A name that uniquely identifies this index within its workspace */
8
+ /** A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 150 characters`</span> */
9
9
  name: string;
10
10
  /** The current status of the document index */
11
11
  status?: Vellum.DocumentIndexStatus;
12
- /** Configuration representing how documents should be indexed. */
12
+ /** Configuration representing how documents should be indexed */
13
13
  indexingConfig: Record<string, unknown>;
14
+ /** Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index */
14
15
  copyDocumentsFromIndexId?: string;
15
16
  }
@@ -6,7 +6,7 @@ export interface UploadDocumentBodyRequest {
6
6
  addToIndexNames?: string[];
7
7
  /** Optionally include an external ID for this document. This is useful if you want to re-upload the same document later when its contents change and would like it to be re-indexed. */
8
8
  externalId?: string;
9
- /** A human-friendly name for this document. Typically the filename. */
9
+ /** A human-friendly name for this document. Typically the filename. <span style="white-space: nowrap">`non-empty`</span> */
10
10
  label: string;
11
11
  /** Optionally include a list of keywords that'll be associated with this document. Used when performing keyword searches. */
12
12
  keywords?: string[];
@@ -3,15 +3,15 @@
3
3
  */
4
4
  import * as Vellum from "../../../..";
5
5
  export interface RegisterPromptRequestRequest {
6
- /** A human-friendly label for corresponding entities created in Vellum. */
6
+ /** A human-friendly label for corresponding entities created in Vellum. <span style="white-space: nowrap">`non-empty`</span> */
7
7
  label: string;
8
- /** A uniquely-identifying name for corresponding entities created in Vellum. */
8
+ /** A uniquely-identifying name for corresponding entities created in Vellum. <span style="white-space: nowrap">`non-empty`</span> */
9
9
  name: string;
10
10
  /** Information about how to execute the prompt template. */
11
11
  prompt: Vellum.RegisterPromptPromptInfoRequest;
12
12
  /** The initial LLM provider to use for this prompt */
13
13
  provider: Vellum.ProviderEnum;
14
- /** The initial model to use for this prompt */
14
+ /** The initial model to use for this prompt <span style="white-space: nowrap">`non-empty`</span> */
15
15
  model: string;
16
16
  /** The initial model parameters to use for this prompt */
17
17
  parameters: Vellum.RegisterPromptModelParametersRequest;
@@ -25,4 +25,10 @@ export declare class Sandboxes {
25
25
  * or overwritten with default values.
26
26
  */
27
27
  upsertSandboxScenario(id: string, request: Vellum.UpsertSandboxScenarioRequestRequest): Promise<Vellum.SandboxScenario>;
28
+ /**
29
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
30
+ *
31
+ * Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
32
+ */
33
+ deleteSandboxScenario(id: string, scenarioId: string): Promise<void>;
28
34
  }
@@ -90,5 +90,42 @@ class Sandboxes {
90
90
  });
91
91
  }
92
92
  }
93
+ /**
94
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
95
+ *
96
+ * Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
97
+ */
98
+ async deleteSandboxScenario(id, scenarioId) {
99
+ const _response = await core.fetcher({
100
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/sandboxes/${id}/scenarios/${scenarioId}`),
101
+ method: "DELETE",
102
+ headers: {
103
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
104
+ },
105
+ contentType: "application/json",
106
+ });
107
+ if (_response.ok) {
108
+ return;
109
+ }
110
+ if (_response.error.reason === "status-code") {
111
+ throw new errors.VellumError({
112
+ statusCode: _response.error.statusCode,
113
+ body: _response.error.body,
114
+ });
115
+ }
116
+ switch (_response.error.reason) {
117
+ case "non-json":
118
+ throw new errors.VellumError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.rawBody,
121
+ });
122
+ case "timeout":
123
+ throw new errors.VellumTimeoutError();
124
+ case "unknown":
125
+ throw new errors.VellumError({
126
+ message: _response.error.errorMessage,
127
+ });
128
+ }
129
+ }
93
130
  }
94
131
  exports.Sandboxes = Sandboxes;
@@ -6,7 +6,7 @@ export interface UpsertSandboxScenarioRequestRequest {
6
6
  label?: string;
7
7
  /** The inputs for the scenario */
8
8
  inputs: Vellum.ScenarioInputRequest[];
9
- /** The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended. */
9
+ /** The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended. <span style="white-space: nowrap">`non-empty`</span> */
10
10
  scenarioId?: string;
11
11
  metricInputParams?: Vellum.SandboxMetricInputParamsRequest;
12
12
  }
@@ -25,4 +25,10 @@ export declare class TestSuites {
25
25
  * or overwritten with default values.
26
26
  */
27
27
  upsertTestSuiteTestCase(id: string, request: Vellum.TestSuiteTestCaseRequest): Promise<Vellum.TestSuiteTestCase>;
28
+ /**
29
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
30
+ *
31
+ * Deletes an existing test case for a test suite, keying off of the test case id.
32
+ */
33
+ deleteTestSuiteTestCase(id: string, testCaseId: string): Promise<void>;
28
34
  }
@@ -88,5 +88,42 @@ class TestSuites {
88
88
  });
89
89
  }
90
90
  }
91
+ /**
92
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
93
+ *
94
+ * Deletes an existing test case for a test suite, keying off of the test case id.
95
+ */
96
+ async deleteTestSuiteTestCase(id, testCaseId) {
97
+ const _response = await core.fetcher({
98
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/test-suites/${id}/test-cases/${testCaseId}`),
99
+ method: "DELETE",
100
+ headers: {
101
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
102
+ },
103
+ contentType: "application/json",
104
+ });
105
+ if (_response.ok) {
106
+ return;
107
+ }
108
+ if (_response.error.reason === "status-code") {
109
+ throw new errors.VellumError({
110
+ statusCode: _response.error.statusCode,
111
+ body: _response.error.body,
112
+ });
113
+ }
114
+ switch (_response.error.reason) {
115
+ case "non-json":
116
+ throw new errors.VellumError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.rawBody,
119
+ });
120
+ case "timeout":
121
+ throw new errors.VellumTimeoutError();
122
+ case "unknown":
123
+ throw new errors.VellumError({
124
+ message: _response.error.errorMessage,
125
+ });
126
+ }
127
+ }
91
128
  }
92
129
  exports.TestSuites = TestSuites;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Vellum from "../../../..";
5
5
  export interface TestSuiteTestCaseRequest {
6
- /** The id of the test case to update. If none is provided, an id will be generated and a new test case will be appended. */
6
+ /** The id of the test case to update. If none is provided, an id will be generated and a new test case will be appended. <span style="white-space: nowrap">`non-empty`</span> */
7
7
  testCaseId?: string;
8
8
  /** A human-friendly label for the test case. */
9
9
  label?: string;
@@ -5,9 +5,9 @@ import * as Vellum from "..";
5
5
  export interface DeploymentRead {
6
6
  id: string;
7
7
  created: string;
8
- /** A human-readable label for the deployment */
8
+ /** A human-readable label for the deployment <span style="white-space: nowrap">`<= 150 characters`</span> */
9
9
  label: string;
10
- /** A name that uniquely identifies this deployment within its workspace */
10
+ /** A name that uniquely identifies this deployment within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> */
11
11
  name: string;
12
12
  /** The current status of the deployment */
13
13
  status?: Vellum.DeploymentReadStatusEnum;
@@ -4,7 +4,7 @@
4
4
  export interface Document {
5
5
  /** The ID of the document. */
6
6
  id: string;
7
- /** The human-readable name for the document. */
7
+ /** The human-readable name for the document. <span style="white-space: nowrap">`<= 1000 characters`</span> */
8
8
  label: string;
9
9
  /** The unique ID of the document as represented in an external system and specified when it was originally uploaded. */
10
10
  externalId?: string;
@@ -5,12 +5,12 @@ import * as Vellum from "..";
5
5
  export interface DocumentIndexRead {
6
6
  id: string;
7
7
  created: string;
8
- /** A human-readable label for the document index. */
8
+ /** A human-readable label for the document index <span style="white-space: nowrap">`<= 150 characters`</span> */
9
9
  label: string;
10
- /** A name that uniquely identifies this index within its workspace */
10
+ /** A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> */
11
11
  name: string;
12
12
  /** The current status of the document index */
13
13
  status?: Vellum.DocumentIndexStatus;
14
- /** Configuration representing how documents should be indexed. */
14
+ /** Configuration representing how documents should be indexed */
15
15
  indexingConfig: Record<string, unknown>;
16
16
  }
@@ -7,13 +7,13 @@ export interface ModelVersionRead {
7
7
  id: string;
8
8
  /** Timestamp of when this model version was created. */
9
9
  created: string;
10
- /** Human-friendly name for this model version. */
10
+ /** Human-friendly name for this model version. <span style="white-space: nowrap">`<= 150 characters`</span> */
11
11
  label: string;
12
12
  /** The type of task this model is used for. */
13
13
  modelType: Vellum.ModelTypeEnum;
14
14
  /** Which LLM provider this model version is associated with. */
15
15
  provider: Vellum.ProviderEnum;
16
- /** The unique id of this model version as it exists in the above provider's system. */
16
+ /** The unique id of this model version as it exists in the above provider's system. <span style="white-space: nowrap">`<= 250 characters`</span> */
17
17
  externalId: string;
18
18
  /** Configuration used to build this model version. */
19
19
  buildConfig: Vellum.ModelVersionBuildConfig;
@@ -8,5 +8,5 @@ export interface ModelVersionSandboxSnapshot {
8
8
  promptIndex?: number;
9
9
  /** The id of the prompt in the sandbox snapshot. */
10
10
  promptId?: string;
11
- sandboxId: string;
11
+ sandboxId?: string;
12
12
  }
@@ -2,6 +2,3 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export declare type ProcessingFailureReasonEnum = "EXCEEDED_CHARACTER_LIMIT";
5
- export declare const ProcessingFailureReasonEnum: {
6
- readonly ExceededCharacterLimit: "EXCEEDED_CHARACTER_LIMIT";
7
- };
@@ -3,7 +3,3 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ProcessingFailureReasonEnum = void 0;
7
- exports.ProcessingFailureReasonEnum = {
8
- ExceededCharacterLimit: "EXCEEDED_CHARACTER_LIMIT",
9
- };
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Vellum from "..";
5
5
  export interface PromptTemplateBlockRequest {
6
+ /** <span style="white-space: nowrap">`non-empty`</span> */
6
7
  id: string;
7
8
  blockType: Vellum.BlockTypeEnum;
8
9
  properties: Vellum.PromptTemplateBlockPropertiesRequest;
@@ -2,6 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface PromptTemplateInputVariableRequest {
5
- /** The name of the input variable. */
5
+ /** The name of the input variable. <span style="white-space: nowrap">`non-empty`</span> */
6
6
  key: string;
7
7
  }
@@ -4,7 +4,7 @@
4
4
  import * as Vellum from "..";
5
5
  export interface RegisterPromptPromptInfoRequest {
6
6
  promptSyntaxVersion?: number;
7
- promptBlockData?: Vellum.PromptTemplateBlockDataRequest;
7
+ promptBlockData: Vellum.PromptTemplateBlockDataRequest;
8
8
  /** Names of the input variables specified in the prompt template. */
9
- inputVariables?: Vellum.PromptTemplateInputVariableRequest[];
9
+ inputVariables: Vellum.PromptTemplateInputVariableRequest[];
10
10
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Vellum from "..";
5
5
  export interface ScenarioInputRequest {
6
+ /** <span style="white-space: nowrap">`non-empty`</span> */
6
7
  key: string;
7
8
  type?: Vellum.TypeEnum;
8
9
  value?: string;
@@ -9,7 +9,7 @@ export interface SlimDocument {
9
9
  externalId?: string;
10
10
  /** A timestamp representing when this document was most recently uploaded. */
11
11
  lastUploadedAt: string;
12
- /** Human-friendly name for this document. */
12
+ /** Human-friendly name for this document. <span style="white-space: nowrap">`<= 1000 characters`</span> */
13
13
  label: string;
14
14
  /** An enum value representing where this document is along its processing lifecycle. Note that this is different than its indexing lifecycle. */
15
15
  processingState?: Vellum.ProcessingStateEnum;
@@ -2,6 +2,3 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export declare type SlimDocumentStatusEnum = "ACTIVE";
5
- export declare const SlimDocumentStatusEnum: {
6
- readonly Active: "ACTIVE";
7
- };
@@ -3,7 +3,3 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SlimDocumentStatusEnum = void 0;
7
- exports.SlimDocumentStatusEnum = {
8
- Active: "ACTIVE",
9
- };
@@ -7,7 +7,7 @@ export interface SearchRequestBodyRequest {
7
7
  indexId?: string;
8
8
  /** The name of the index to search against. Must provide either this or index_id. */
9
9
  indexName?: string;
10
- /** The query to search for. */
10
+ /** The query to search for. <span style="white-space: nowrap">`non-empty`</span> */
11
11
  query: string;
12
12
  /** Configuration options for the search. */
13
13
  options?: Vellum.SearchRequestOptionsRequest;
@@ -3,13 +3,14 @@
3
3
  */
4
4
  import * as Vellum from "../../../..";
5
5
  export interface DocumentIndexCreateRequest {
6
- /** A human-readable label for the document index. */
6
+ /** A human-readable label for the document index <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 150 characters`</span> */
7
7
  label: string;
8
- /** A name that uniquely identifies this index within its workspace */
8
+ /** A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 150 characters`</span> */
9
9
  name: string;
10
10
  /** The current status of the document index */
11
11
  status?: Vellum.DocumentIndexStatus;
12
- /** Configuration representing how documents should be indexed. */
12
+ /** Configuration representing how documents should be indexed */
13
13
  indexingConfig: Record<string, unknown>;
14
+ /** Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index */
14
15
  copyDocumentsFromIndexId?: string;
15
16
  }
@@ -6,7 +6,7 @@ export interface UploadDocumentBodyRequest {
6
6
  addToIndexNames?: string[];
7
7
  /** Optionally include an external ID for this document. This is useful if you want to re-upload the same document later when its contents change and would like it to be re-indexed. */
8
8
  externalId?: string;
9
- /** A human-friendly name for this document. Typically the filename. */
9
+ /** A human-friendly name for this document. Typically the filename. <span style="white-space: nowrap">`non-empty`</span> */
10
10
  label: string;
11
11
  /** Optionally include a list of keywords that'll be associated with this document. Used when performing keyword searches. */
12
12
  keywords?: string[];
@@ -3,15 +3,15 @@
3
3
  */
4
4
  import * as Vellum from "../../../..";
5
5
  export interface RegisterPromptRequestRequest {
6
- /** A human-friendly label for corresponding entities created in Vellum. */
6
+ /** A human-friendly label for corresponding entities created in Vellum. <span style="white-space: nowrap">`non-empty`</span> */
7
7
  label: string;
8
- /** A uniquely-identifying name for corresponding entities created in Vellum. */
8
+ /** A uniquely-identifying name for corresponding entities created in Vellum. <span style="white-space: nowrap">`non-empty`</span> */
9
9
  name: string;
10
10
  /** Information about how to execute the prompt template. */
11
11
  prompt: Vellum.RegisterPromptPromptInfoRequest;
12
12
  /** The initial LLM provider to use for this prompt */
13
13
  provider: Vellum.ProviderEnum;
14
- /** The initial model to use for this prompt */
14
+ /** The initial model to use for this prompt <span style="white-space: nowrap">`non-empty`</span> */
15
15
  model: string;
16
16
  /** The initial model parameters to use for this prompt */
17
17
  parameters: Vellum.RegisterPromptModelParametersRequest;
@@ -25,4 +25,10 @@ export declare class Sandboxes {
25
25
  * or overwritten with default values.
26
26
  */
27
27
  upsertSandboxScenario(id: string, request: Vellum.UpsertSandboxScenarioRequestRequest): Promise<Vellum.SandboxScenario>;
28
+ /**
29
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
30
+ *
31
+ * Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
32
+ */
33
+ deleteSandboxScenario(id: string, scenarioId: string): Promise<void>;
28
34
  }
@@ -90,5 +90,42 @@ class Sandboxes {
90
90
  });
91
91
  }
92
92
  }
93
+ /**
94
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
95
+ *
96
+ * Deletes an existing scenario from a sandbox, keying off of the provided scenario id.
97
+ */
98
+ async deleteSandboxScenario(id, scenarioId) {
99
+ const _response = await core.fetcher({
100
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/sandboxes/${id}/scenarios/${scenarioId}`),
101
+ method: "DELETE",
102
+ headers: {
103
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
104
+ },
105
+ contentType: "application/json",
106
+ });
107
+ if (_response.ok) {
108
+ return;
109
+ }
110
+ if (_response.error.reason === "status-code") {
111
+ throw new errors.VellumError({
112
+ statusCode: _response.error.statusCode,
113
+ body: _response.error.body,
114
+ });
115
+ }
116
+ switch (_response.error.reason) {
117
+ case "non-json":
118
+ throw new errors.VellumError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.rawBody,
121
+ });
122
+ case "timeout":
123
+ throw new errors.VellumTimeoutError();
124
+ case "unknown":
125
+ throw new errors.VellumError({
126
+ message: _response.error.errorMessage,
127
+ });
128
+ }
129
+ }
93
130
  }
94
131
  exports.Sandboxes = Sandboxes;
@@ -6,7 +6,7 @@ export interface UpsertSandboxScenarioRequestRequest {
6
6
  label?: string;
7
7
  /** The inputs for the scenario */
8
8
  inputs: Vellum.ScenarioInputRequest[];
9
- /** The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended. */
9
+ /** The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended. <span style="white-space: nowrap">`non-empty`</span> */
10
10
  scenarioId?: string;
11
11
  metricInputParams?: Vellum.SandboxMetricInputParamsRequest;
12
12
  }
@@ -25,4 +25,10 @@ export declare class TestSuites {
25
25
  * or overwritten with default values.
26
26
  */
27
27
  upsertTestSuiteTestCase(id: string, request: Vellum.TestSuiteTestCaseRequest): Promise<Vellum.TestSuiteTestCase>;
28
+ /**
29
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
30
+ *
31
+ * Deletes an existing test case for a test suite, keying off of the test case id.
32
+ */
33
+ deleteTestSuiteTestCase(id: string, testCaseId: string): Promise<void>;
28
34
  }
@@ -88,5 +88,42 @@ class TestSuites {
88
88
  });
89
89
  }
90
90
  }
91
+ /**
92
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
93
+ *
94
+ * Deletes an existing test case for a test suite, keying off of the test case id.
95
+ */
96
+ async deleteTestSuiteTestCase(id, testCaseId) {
97
+ const _response = await core.fetcher({
98
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/test-suites/${id}/test-cases/${testCaseId}`),
99
+ method: "DELETE",
100
+ headers: {
101
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
102
+ },
103
+ contentType: "application/json",
104
+ });
105
+ if (_response.ok) {
106
+ return;
107
+ }
108
+ if (_response.error.reason === "status-code") {
109
+ throw new errors.VellumError({
110
+ statusCode: _response.error.statusCode,
111
+ body: _response.error.body,
112
+ });
113
+ }
114
+ switch (_response.error.reason) {
115
+ case "non-json":
116
+ throw new errors.VellumError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.rawBody,
119
+ });
120
+ case "timeout":
121
+ throw new errors.VellumTimeoutError();
122
+ case "unknown":
123
+ throw new errors.VellumError({
124
+ message: _response.error.errorMessage,
125
+ });
126
+ }
127
+ }
91
128
  }
92
129
  exports.TestSuites = TestSuites;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Vellum from "../../../..";
5
5
  export interface TestSuiteTestCaseRequest {
6
- /** The id of the test case to update. If none is provided, an id will be generated and a new test case will be appended. */
6
+ /** The id of the test case to update. If none is provided, an id will be generated and a new test case will be appended. <span style="white-space: nowrap">`non-empty`</span> */
7
7
  testCaseId?: string;
8
8
  /** A human-friendly label for the test case. */
9
9
  label?: string;
@@ -5,9 +5,9 @@ import * as Vellum from "..";
5
5
  export interface DeploymentRead {
6
6
  id: string;
7
7
  created: string;
8
- /** A human-readable label for the deployment */
8
+ /** A human-readable label for the deployment <span style="white-space: nowrap">`<= 150 characters`</span> */
9
9
  label: string;
10
- /** A name that uniquely identifies this deployment within its workspace */
10
+ /** A name that uniquely identifies this deployment within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> */
11
11
  name: string;
12
12
  /** The current status of the deployment */
13
13
  status?: Vellum.DeploymentReadStatusEnum;
@@ -4,7 +4,7 @@
4
4
  export interface Document {
5
5
  /** The ID of the document. */
6
6
  id: string;
7
- /** The human-readable name for the document. */
7
+ /** The human-readable name for the document. <span style="white-space: nowrap">`<= 1000 characters`</span> */
8
8
  label: string;
9
9
  /** The unique ID of the document as represented in an external system and specified when it was originally uploaded. */
10
10
  externalId?: string;
@@ -5,12 +5,12 @@ import * as Vellum from "..";
5
5
  export interface DocumentIndexRead {
6
6
  id: string;
7
7
  created: string;
8
- /** A human-readable label for the document index. */
8
+ /** A human-readable label for the document index <span style="white-space: nowrap">`<= 150 characters`</span> */
9
9
  label: string;
10
- /** A name that uniquely identifies this index within its workspace */
10
+ /** A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> */
11
11
  name: string;
12
12
  /** The current status of the document index */
13
13
  status?: Vellum.DocumentIndexStatus;
14
- /** Configuration representing how documents should be indexed. */
14
+ /** Configuration representing how documents should be indexed */
15
15
  indexingConfig: Record<string, unknown>;
16
16
  }
@@ -7,13 +7,13 @@ export interface ModelVersionRead {
7
7
  id: string;
8
8
  /** Timestamp of when this model version was created. */
9
9
  created: string;
10
- /** Human-friendly name for this model version. */
10
+ /** Human-friendly name for this model version. <span style="white-space: nowrap">`<= 150 characters`</span> */
11
11
  label: string;
12
12
  /** The type of task this model is used for. */
13
13
  modelType: Vellum.ModelTypeEnum;
14
14
  /** Which LLM provider this model version is associated with. */
15
15
  provider: Vellum.ProviderEnum;
16
- /** The unique id of this model version as it exists in the above provider's system. */
16
+ /** The unique id of this model version as it exists in the above provider's system. <span style="white-space: nowrap">`<= 250 characters`</span> */
17
17
  externalId: string;
18
18
  /** Configuration used to build this model version. */
19
19
  buildConfig: Vellum.ModelVersionBuildConfig;
@@ -8,5 +8,5 @@ export interface ModelVersionSandboxSnapshot {
8
8
  promptIndex?: number;
9
9
  /** The id of the prompt in the sandbox snapshot. */
10
10
  promptId?: string;
11
- sandboxId: string;
11
+ sandboxId?: string;
12
12
  }
@@ -2,6 +2,3 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export declare type ProcessingFailureReasonEnum = "EXCEEDED_CHARACTER_LIMIT";
5
- export declare const ProcessingFailureReasonEnum: {
6
- readonly ExceededCharacterLimit: "EXCEEDED_CHARACTER_LIMIT";
7
- };
@@ -3,7 +3,3 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ProcessingFailureReasonEnum = void 0;
7
- exports.ProcessingFailureReasonEnum = {
8
- ExceededCharacterLimit: "EXCEEDED_CHARACTER_LIMIT",
9
- };
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Vellum from "..";
5
5
  export interface PromptTemplateBlockRequest {
6
+ /** <span style="white-space: nowrap">`non-empty`</span> */
6
7
  id: string;
7
8
  blockType: Vellum.BlockTypeEnum;
8
9
  properties: Vellum.PromptTemplateBlockPropertiesRequest;
@@ -2,6 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface PromptTemplateInputVariableRequest {
5
- /** The name of the input variable. */
5
+ /** The name of the input variable. <span style="white-space: nowrap">`non-empty`</span> */
6
6
  key: string;
7
7
  }
@@ -4,7 +4,7 @@
4
4
  import * as Vellum from "..";
5
5
  export interface RegisterPromptPromptInfoRequest {
6
6
  promptSyntaxVersion?: number;
7
- promptBlockData?: Vellum.PromptTemplateBlockDataRequest;
7
+ promptBlockData: Vellum.PromptTemplateBlockDataRequest;
8
8
  /** Names of the input variables specified in the prompt template. */
9
- inputVariables?: Vellum.PromptTemplateInputVariableRequest[];
9
+ inputVariables: Vellum.PromptTemplateInputVariableRequest[];
10
10
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Vellum from "..";
5
5
  export interface ScenarioInputRequest {
6
+ /** <span style="white-space: nowrap">`non-empty`</span> */
6
7
  key: string;
7
8
  type?: Vellum.TypeEnum;
8
9
  value?: string;
@@ -9,7 +9,7 @@ export interface SlimDocument {
9
9
  externalId?: string;
10
10
  /** A timestamp representing when this document was most recently uploaded. */
11
11
  lastUploadedAt: string;
12
- /** Human-friendly name for this document. */
12
+ /** Human-friendly name for this document. <span style="white-space: nowrap">`<= 1000 characters`</span> */
13
13
  label: string;
14
14
  /** An enum value representing where this document is along its processing lifecycle. Note that this is different than its indexing lifecycle. */
15
15
  processingState?: Vellum.ProcessingStateEnum;
@@ -2,6 +2,3 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export declare type SlimDocumentStatusEnum = "ACTIVE";
5
- export declare const SlimDocumentStatusEnum: {
6
- readonly Active: "ACTIVE";
7
- };
@@ -3,7 +3,3 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SlimDocumentStatusEnum = void 0;
7
- exports.SlimDocumentStatusEnum = {
8
- Active: "ACTIVE",
9
- };
@@ -10,6 +10,6 @@ export declare namespace ModelVersionSandboxSnapshot {
10
10
  id: string;
11
11
  prompt_index?: number | null;
12
12
  prompt_id?: string | null;
13
- sandbox_id: string;
13
+ sandbox_id?: string | null;
14
14
  }
15
15
  }
@@ -32,5 +32,5 @@ exports.ModelVersionSandboxSnapshot = core.serialization.object({
32
32
  id: core.serialization.string(),
33
33
  promptIndex: core.serialization.property("prompt_index", core.serialization.number().optional()),
34
34
  promptId: core.serialization.property("prompt_id", core.serialization.string().optional()),
35
- sandboxId: core.serialization.property("sandbox_id", core.serialization.string()),
35
+ sandboxId: core.serialization.property("sandbox_id", core.serialization.string().optional()),
36
36
  });
@@ -28,4 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ProcessingFailureReasonEnum = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.ProcessingFailureReasonEnum = core.serialization.enum_(["EXCEEDED_CHARACTER_LIMIT"]);
31
+ exports.ProcessingFailureReasonEnum = core.serialization.stringLiteral("EXCEEDED_CHARACTER_LIMIT");
@@ -8,7 +8,7 @@ export declare const RegisterPromptPromptInfoRequest: core.serialization.ObjectS
8
8
  export declare namespace RegisterPromptPromptInfoRequest {
9
9
  interface Raw {
10
10
  prompt_syntax_version?: number | null;
11
- prompt_block_data?: serializers.PromptTemplateBlockDataRequest.Raw | null;
12
- input_variables?: serializers.PromptTemplateInputVariableRequest.Raw[] | null;
11
+ prompt_block_data: serializers.PromptTemplateBlockDataRequest.Raw;
12
+ input_variables: serializers.PromptTemplateInputVariableRequest.Raw[];
13
13
  }
14
14
  }
@@ -30,8 +30,6 @@ exports.RegisterPromptPromptInfoRequest = void 0;
30
30
  const core = __importStar(require("../../core"));
31
31
  exports.RegisterPromptPromptInfoRequest = core.serialization.object({
32
32
  promptSyntaxVersion: core.serialization.property("prompt_syntax_version", core.serialization.number().optional()),
33
- promptBlockData: core.serialization.property("prompt_block_data", core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateBlockDataRequest).optional()),
34
- inputVariables: core.serialization.property("input_variables", core.serialization
35
- .list(core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateInputVariableRequest))
36
- .optional()),
33
+ promptBlockData: core.serialization.property("prompt_block_data", core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateBlockDataRequest)),
34
+ inputVariables: core.serialization.property("input_variables", core.serialization.list(core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateInputVariableRequest))),
37
35
  });
@@ -28,4 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SlimDocumentStatusEnum = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.SlimDocumentStatusEnum = core.serialization.enum_(["ACTIVE"]);
31
+ exports.SlimDocumentStatusEnum = core.serialization.stringLiteral("ACTIVE");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vellum-ai",
3
- "version": "v0.0.16",
3
+ "version": "v0.0.17",
4
4
  "private": false,
5
5
  "repository": "https://github.com/vellum-ai/vellum-client-node",
6
6
  "main": "./index.js",
@@ -10,6 +10,6 @@ export declare namespace ModelVersionSandboxSnapshot {
10
10
  id: string;
11
11
  prompt_index?: number | null;
12
12
  prompt_id?: string | null;
13
- sandbox_id: string;
13
+ sandbox_id?: string | null;
14
14
  }
15
15
  }
@@ -32,5 +32,5 @@ exports.ModelVersionSandboxSnapshot = core.serialization.object({
32
32
  id: core.serialization.string(),
33
33
  promptIndex: core.serialization.property("prompt_index", core.serialization.number().optional()),
34
34
  promptId: core.serialization.property("prompt_id", core.serialization.string().optional()),
35
- sandboxId: core.serialization.property("sandbox_id", core.serialization.string()),
35
+ sandboxId: core.serialization.property("sandbox_id", core.serialization.string().optional()),
36
36
  });
@@ -28,4 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ProcessingFailureReasonEnum = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.ProcessingFailureReasonEnum = core.serialization.enum_(["EXCEEDED_CHARACTER_LIMIT"]);
31
+ exports.ProcessingFailureReasonEnum = core.serialization.stringLiteral("EXCEEDED_CHARACTER_LIMIT");
@@ -8,7 +8,7 @@ export declare const RegisterPromptPromptInfoRequest: core.serialization.ObjectS
8
8
  export declare namespace RegisterPromptPromptInfoRequest {
9
9
  interface Raw {
10
10
  prompt_syntax_version?: number | null;
11
- prompt_block_data?: serializers.PromptTemplateBlockDataRequest.Raw | null;
12
- input_variables?: serializers.PromptTemplateInputVariableRequest.Raw[] | null;
11
+ prompt_block_data: serializers.PromptTemplateBlockDataRequest.Raw;
12
+ input_variables: serializers.PromptTemplateInputVariableRequest.Raw[];
13
13
  }
14
14
  }
@@ -30,8 +30,6 @@ exports.RegisterPromptPromptInfoRequest = void 0;
30
30
  const core = __importStar(require("../../core"));
31
31
  exports.RegisterPromptPromptInfoRequest = core.serialization.object({
32
32
  promptSyntaxVersion: core.serialization.property("prompt_syntax_version", core.serialization.number().optional()),
33
- promptBlockData: core.serialization.property("prompt_block_data", core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateBlockDataRequest).optional()),
34
- inputVariables: core.serialization.property("input_variables", core.serialization
35
- .list(core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateInputVariableRequest))
36
- .optional()),
33
+ promptBlockData: core.serialization.property("prompt_block_data", core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateBlockDataRequest)),
34
+ inputVariables: core.serialization.property("input_variables", core.serialization.list(core.serialization.lazyObject(async () => (await Promise.resolve().then(() => __importStar(require("..")))).PromptTemplateInputVariableRequest))),
37
35
  });
@@ -28,4 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SlimDocumentStatusEnum = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.SlimDocumentStatusEnum = core.serialization.enum_(["ACTIVE"]);
31
+ exports.SlimDocumentStatusEnum = core.serialization.stringLiteral("ACTIVE");