vellum-ai 0.0.15 → 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 (129) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +15 -10
  3. package/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
  4. package/api/resources/documentIndexes/client/Client.d.ts +22 -0
  5. package/api/resources/documentIndexes/client/Client.js +88 -0
  6. package/api/resources/documentIndexes/client/index.d.ts +1 -0
  7. package/api/resources/documentIndexes/client/index.js +17 -0
  8. package/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +16 -0
  9. package/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +5 -0
  10. package/api/resources/documentIndexes/client/requests/index.d.ts +1 -0
  11. package/api/resources/documentIndexes/client/requests/index.js +2 -0
  12. package/api/resources/documentIndexes/index.d.ts +1 -0
  13. package/api/resources/documentIndexes/index.js +17 -0
  14. package/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
  15. package/api/resources/index.d.ts +2 -0
  16. package/api/resources/index.js +3 -1
  17. package/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +3 -3
  18. package/api/resources/sandboxes/client/Client.d.ts +6 -0
  19. package/api/resources/sandboxes/client/Client.js +37 -0
  20. package/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
  21. package/api/resources/testSuites/client/Client.d.ts +6 -0
  22. package/api/resources/testSuites/client/Client.js +37 -0
  23. package/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
  24. package/api/types/DeploymentRead.d.ts +2 -2
  25. package/api/types/Document.d.ts +1 -1
  26. package/api/types/DocumentIndexRead.d.ts +16 -0
  27. package/api/types/DocumentIndexRead.js +5 -0
  28. package/api/types/DocumentIndexStatus.d.ts +8 -0
  29. package/api/types/DocumentIndexStatus.js +10 -0
  30. package/api/types/ModelVersionRead.d.ts +2 -2
  31. package/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  32. package/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
  33. package/api/types/ProcessingFailureReasonEnum.js +0 -4
  34. package/api/types/PromptTemplateBlockRequest.d.ts +1 -0
  35. package/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
  36. package/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  37. package/api/types/ScenarioInputRequest.d.ts +1 -0
  38. package/api/types/SlimDocument.d.ts +1 -1
  39. package/api/types/SlimDocumentStatusEnum.d.ts +0 -3
  40. package/api/types/SlimDocumentStatusEnum.js +0 -4
  41. package/api/types/index.d.ts +2 -0
  42. package/api/types/index.js +2 -0
  43. package/dist/Client.d.ts +3 -0
  44. package/dist/Client.js +15 -10
  45. package/dist/api/client/requests/SearchRequestBodyRequest.d.ts +1 -1
  46. package/dist/api/resources/documentIndexes/client/Client.d.ts +22 -0
  47. package/dist/api/resources/documentIndexes/client/Client.js +88 -0
  48. package/dist/api/resources/documentIndexes/client/index.d.ts +1 -0
  49. package/dist/api/resources/documentIndexes/client/index.js +17 -0
  50. package/dist/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +16 -0
  51. package/dist/api/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +5 -0
  52. package/dist/api/resources/documentIndexes/client/requests/index.d.ts +1 -0
  53. package/dist/api/resources/documentIndexes/client/requests/index.js +2 -0
  54. package/dist/api/resources/documentIndexes/index.d.ts +1 -0
  55. package/dist/api/resources/documentIndexes/index.js +17 -0
  56. package/dist/api/resources/documents/client/requests/UploadDocumentBodyRequest.d.ts +1 -1
  57. package/dist/api/resources/index.d.ts +2 -0
  58. package/dist/api/resources/index.js +3 -1
  59. package/dist/api/resources/registeredPrompts/client/requests/RegisterPromptRequestRequest.d.ts +3 -3
  60. package/dist/api/resources/sandboxes/client/Client.d.ts +6 -0
  61. package/dist/api/resources/sandboxes/client/Client.js +37 -0
  62. package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequestRequest.d.ts +1 -1
  63. package/dist/api/resources/testSuites/client/Client.d.ts +6 -0
  64. package/dist/api/resources/testSuites/client/Client.js +37 -0
  65. package/dist/api/resources/testSuites/client/requests/TestSuiteTestCaseRequest.d.ts +1 -1
  66. package/dist/api/types/DeploymentRead.d.ts +2 -2
  67. package/dist/api/types/Document.d.ts +1 -1
  68. package/dist/api/types/DocumentIndexRead.d.ts +16 -0
  69. package/dist/api/types/DocumentIndexRead.js +5 -0
  70. package/dist/api/types/DocumentIndexStatus.d.ts +8 -0
  71. package/dist/api/types/DocumentIndexStatus.js +10 -0
  72. package/dist/api/types/ModelVersionRead.d.ts +2 -2
  73. package/dist/api/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  74. package/dist/api/types/ProcessingFailureReasonEnum.d.ts +0 -3
  75. package/dist/api/types/ProcessingFailureReasonEnum.js +0 -4
  76. package/dist/api/types/PromptTemplateBlockRequest.d.ts +1 -0
  77. package/dist/api/types/PromptTemplateInputVariableRequest.d.ts +1 -1
  78. package/dist/api/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  79. package/dist/api/types/ScenarioInputRequest.d.ts +1 -0
  80. package/dist/api/types/SlimDocument.d.ts +1 -1
  81. package/dist/api/types/SlimDocumentStatusEnum.d.ts +0 -3
  82. package/dist/api/types/SlimDocumentStatusEnum.js +0 -4
  83. package/dist/api/types/index.d.ts +2 -0
  84. package/dist/api/types/index.js +2 -0
  85. package/dist/serialization/resources/documentIndexes/client/index.d.ts +1 -0
  86. package/dist/serialization/resources/documentIndexes/client/index.js +17 -0
  87. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +16 -0
  88. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +37 -0
  89. package/dist/serialization/resources/documentIndexes/client/requests/index.d.ts +1 -0
  90. package/dist/serialization/resources/documentIndexes/client/requests/index.js +5 -0
  91. package/dist/serialization/resources/documentIndexes/index.d.ts +1 -0
  92. package/dist/serialization/resources/documentIndexes/index.js +17 -0
  93. package/dist/serialization/resources/index.d.ts +2 -0
  94. package/dist/serialization/resources/index.js +3 -1
  95. package/dist/serialization/types/DocumentIndexRead.d.ts +17 -0
  96. package/dist/serialization/types/DocumentIndexRead.js +38 -0
  97. package/dist/serialization/types/DocumentIndexStatus.d.ts +10 -0
  98. package/dist/serialization/types/DocumentIndexStatus.js +31 -0
  99. package/dist/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  100. package/dist/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
  101. package/dist/serialization/types/ProcessingFailureReasonEnum.js +1 -1
  102. package/dist/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  103. package/dist/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
  104. package/dist/serialization/types/SlimDocumentStatusEnum.js +1 -1
  105. package/dist/serialization/types/index.d.ts +2 -0
  106. package/dist/serialization/types/index.js +2 -0
  107. package/package.json +1 -1
  108. package/serialization/resources/documentIndexes/client/index.d.ts +1 -0
  109. package/serialization/resources/documentIndexes/client/index.js +17 -0
  110. package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.d.ts +16 -0
  111. package/serialization/resources/documentIndexes/client/requests/DocumentIndexCreateRequest.js +37 -0
  112. package/serialization/resources/documentIndexes/client/requests/index.d.ts +1 -0
  113. package/serialization/resources/documentIndexes/client/requests/index.js +5 -0
  114. package/serialization/resources/documentIndexes/index.d.ts +1 -0
  115. package/serialization/resources/documentIndexes/index.js +17 -0
  116. package/serialization/resources/index.d.ts +2 -0
  117. package/serialization/resources/index.js +3 -1
  118. package/serialization/types/DocumentIndexRead.d.ts +17 -0
  119. package/serialization/types/DocumentIndexRead.js +38 -0
  120. package/serialization/types/DocumentIndexStatus.d.ts +10 -0
  121. package/serialization/types/DocumentIndexStatus.js +31 -0
  122. package/serialization/types/ModelVersionSandboxSnapshot.d.ts +1 -1
  123. package/serialization/types/ModelVersionSandboxSnapshot.js +1 -1
  124. package/serialization/types/ProcessingFailureReasonEnum.js +1 -1
  125. package/serialization/types/RegisterPromptPromptInfoRequest.d.ts +2 -2
  126. package/serialization/types/RegisterPromptPromptInfoRequest.js +2 -4
  127. package/serialization/types/SlimDocumentStatusEnum.js +1 -1
  128. package/serialization/types/index.d.ts +2 -0
  129. package/serialization/types/index.js +2 -0
@@ -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
- };
@@ -6,6 +6,8 @@ export * from "./DeploymentRead";
6
6
  export * from "./DeploymentReadStatusEnum";
7
7
  export * from "./Document";
8
8
  export * from "./DocumentDocumentToDocumentIndex";
9
+ export * from "./DocumentIndexRead";
10
+ export * from "./DocumentIndexStatus";
9
11
  export * from "./EnrichedNormalizedCompletion";
10
12
  export * from "./EnvironmentEnum";
11
13
  export * from "./EvaluationParams";
@@ -22,6 +22,8 @@ __exportStar(require("./DeploymentRead"), exports);
22
22
  __exportStar(require("./DeploymentReadStatusEnum"), exports);
23
23
  __exportStar(require("./Document"), exports);
24
24
  __exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
25
+ __exportStar(require("./DocumentIndexRead"), exports);
26
+ __exportStar(require("./DocumentIndexStatus"), exports);
25
27
  __exportStar(require("./EnrichedNormalizedCompletion"), exports);
26
28
  __exportStar(require("./EnvironmentEnum"), exports);
27
29
  __exportStar(require("./EvaluationParams"), exports);
package/dist/Client.d.ts CHANGED
@@ -5,6 +5,7 @@ import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import * as Vellum from "./api";
7
7
  import { Deployments } from "./api/resources/deployments/client/Client";
8
+ import { DocumentIndexes } from "./api/resources/documentIndexes/client/Client";
8
9
  import { Documents } from "./api/resources/documents/client/Client";
9
10
  import { ModelVersions } from "./api/resources/modelVersions/client/Client";
10
11
  import { RegisteredPrompts } from "./api/resources/registeredPrompts/client/Client";
@@ -65,6 +66,8 @@ export declare class VellumClient {
65
66
  submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest): Promise<void>;
66
67
  protected _deployments: Deployments | undefined;
67
68
  get deployments(): Deployments;
69
+ protected _documentIndexes: DocumentIndexes | undefined;
70
+ get documentIndexes(): DocumentIndexes;
68
71
  protected _documents: Documents | undefined;
69
72
  get documents(): Documents;
70
73
  protected _modelVersions: ModelVersions | undefined;
package/dist/Client.js CHANGED
@@ -37,11 +37,12 @@ const url_join_1 = __importDefault(require("url-join"));
37
37
  const serializers = __importStar(require("./serialization"));
38
38
  const errors = __importStar(require("./errors"));
39
39
  const Client_1 = require("./api/resources/deployments/client/Client");
40
- const Client_2 = require("./api/resources/documents/client/Client");
41
- const Client_3 = require("./api/resources/modelVersions/client/Client");
42
- const Client_4 = require("./api/resources/registeredPrompts/client/Client");
43
- const Client_5 = require("./api/resources/sandboxes/client/Client");
44
- const Client_6 = require("./api/resources/testSuites/client/Client");
40
+ const Client_2 = require("./api/resources/documentIndexes/client/Client");
41
+ const Client_3 = require("./api/resources/documents/client/Client");
42
+ const Client_4 = require("./api/resources/modelVersions/client/Client");
43
+ const Client_5 = require("./api/resources/registeredPrompts/client/Client");
44
+ const Client_6 = require("./api/resources/sandboxes/client/Client");
45
+ const Client_7 = require("./api/resources/testSuites/client/Client");
45
46
  class VellumClient {
46
47
  options;
47
48
  constructor(options) {
@@ -254,25 +255,29 @@ class VellumClient {
254
255
  get deployments() {
255
256
  return (this._deployments ??= new Client_1.Deployments(this.options));
256
257
  }
258
+ _documentIndexes;
259
+ get documentIndexes() {
260
+ return (this._documentIndexes ??= new Client_2.DocumentIndexes(this.options));
261
+ }
257
262
  _documents;
258
263
  get documents() {
259
- return (this._documents ??= new Client_2.Documents(this.options));
264
+ return (this._documents ??= new Client_3.Documents(this.options));
260
265
  }
261
266
  _modelVersions;
262
267
  get modelVersions() {
263
- return (this._modelVersions ??= new Client_3.ModelVersions(this.options));
268
+ return (this._modelVersions ??= new Client_4.ModelVersions(this.options));
264
269
  }
265
270
  _registeredPrompts;
266
271
  get registeredPrompts() {
267
- return (this._registeredPrompts ??= new Client_4.RegisteredPrompts(this.options));
272
+ return (this._registeredPrompts ??= new Client_5.RegisteredPrompts(this.options));
268
273
  }
269
274
  _sandboxes;
270
275
  get sandboxes() {
271
- return (this._sandboxes ??= new Client_5.Sandboxes(this.options));
276
+ return (this._sandboxes ??= new Client_6.Sandboxes(this.options));
272
277
  }
273
278
  _testSuites;
274
279
  get testSuites() {
275
- return (this._testSuites ??= new Client_6.TestSuites(this.options));
280
+ return (this._testSuites ??= new Client_7.TestSuites(this.options));
276
281
  }
277
282
  }
278
283
  exports.VellumClient = VellumClient;
@@ -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;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Vellum from "../../..";
7
+ export declare namespace DocumentIndexes {
8
+ interface Options {
9
+ environment?: environments.VellumEnvironment | environments.VellumEnvironmentUrls;
10
+ apiKey: core.Supplier<string>;
11
+ }
12
+ }
13
+ export declare class DocumentIndexes {
14
+ protected readonly options: DocumentIndexes.Options;
15
+ constructor(options: DocumentIndexes.Options);
16
+ /**
17
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
18
+ *
19
+ * Creates a new document index.
20
+ */
21
+ create(request: Vellum.DocumentIndexCreateRequest): Promise<Vellum.DocumentIndexRead>;
22
+ }
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.DocumentIndexes = void 0;
33
+ const environments = __importStar(require("../../../../environments"));
34
+ const core = __importStar(require("../../../../core"));
35
+ const url_join_1 = __importDefault(require("url-join"));
36
+ const serializers = __importStar(require("../../../../serialization"));
37
+ const errors = __importStar(require("../../../../errors"));
38
+ class DocumentIndexes {
39
+ options;
40
+ constructor(options) {
41
+ this.options = options;
42
+ }
43
+ /**
44
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
45
+ *
46
+ * Creates a new document index.
47
+ */
48
+ async create(request) {
49
+ const _response = await core.fetcher({
50
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, "v1/document-indexes"),
51
+ method: "POST",
52
+ headers: {
53
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
54
+ },
55
+ contentType: "application/json",
56
+ body: await serializers.DocumentIndexCreateRequest.jsonOrThrow(request, {
57
+ unrecognizedObjectKeys: "strip",
58
+ }),
59
+ });
60
+ if (_response.ok) {
61
+ return await serializers.DocumentIndexRead.parseOrThrow(_response.body, {
62
+ unrecognizedObjectKeys: "passthrough",
63
+ allowUnrecognizedUnionMembers: true,
64
+ allowUnrecognizedEnumValues: true,
65
+ });
66
+ }
67
+ if (_response.error.reason === "status-code") {
68
+ throw new errors.VellumError({
69
+ statusCode: _response.error.statusCode,
70
+ body: _response.error.body,
71
+ });
72
+ }
73
+ switch (_response.error.reason) {
74
+ case "non-json":
75
+ throw new errors.VellumError({
76
+ statusCode: _response.error.statusCode,
77
+ body: _response.error.rawBody,
78
+ });
79
+ case "timeout":
80
+ throw new errors.VellumTimeoutError();
81
+ case "unknown":
82
+ throw new errors.VellumError({
83
+ message: _response.error.errorMessage,
84
+ });
85
+ }
86
+ }
87
+ }
88
+ exports.DocumentIndexes = DocumentIndexes;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "../../../..";
5
+ export interface DocumentIndexCreateRequest {
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
+ label: string;
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
+ name: string;
10
+ /** The current status of the document index */
11
+ status?: Vellum.DocumentIndexStatus;
12
+ /** Configuration representing how documents should be indexed */
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 */
15
+ copyDocumentsFromIndexId?: string;
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { DocumentIndexCreateRequest } from "./DocumentIndexCreateRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -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[];
@@ -1,9 +1,11 @@
1
1
  export * as deployments from "./deployments";
2
+ export * as documentIndexes from "./documentIndexes";
2
3
  export * as documents from "./documents";
3
4
  export * as modelVersions from "./modelVersions";
4
5
  export * as registeredPrompts from "./registeredPrompts";
5
6
  export * as sandboxes from "./sandboxes";
6
7
  export * as testSuites from "./testSuites";
8
+ export * from "./documentIndexes/client/requests";
7
9
  export * from "./documents/client/requests";
8
10
  export * from "./modelVersions/client/requests";
9
11
  export * from "./registeredPrompts/client/requests";
@@ -26,13 +26,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.testSuites = exports.sandboxes = exports.registeredPrompts = exports.modelVersions = exports.documents = exports.deployments = void 0;
29
+ exports.testSuites = exports.sandboxes = exports.registeredPrompts = exports.modelVersions = exports.documents = exports.documentIndexes = exports.deployments = void 0;
30
30
  exports.deployments = __importStar(require("./deployments"));
31
+ exports.documentIndexes = __importStar(require("./documentIndexes"));
31
32
  exports.documents = __importStar(require("./documents"));
32
33
  exports.modelVersions = __importStar(require("./modelVersions"));
33
34
  exports.registeredPrompts = __importStar(require("./registeredPrompts"));
34
35
  exports.sandboxes = __importStar(require("./sandboxes"));
35
36
  exports.testSuites = __importStar(require("./testSuites"));
37
+ __exportStar(require("./documentIndexes/client/requests"), exports);
36
38
  __exportStar(require("./documents/client/requests"), exports);
37
39
  __exportStar(require("./modelVersions/client/requests"), exports);
38
40
  __exportStar(require("./registeredPrompts/client/requests"), exports);
@@ -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;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface DocumentIndexRead {
6
+ id: string;
7
+ created: string;
8
+ /** A human-readable label for the document index <span style="white-space: nowrap">`<= 150 characters`</span> */
9
+ label: string;
10
+ /** A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> */
11
+ name: string;
12
+ /** The current status of the document index */
13
+ status?: Vellum.DocumentIndexStatus;
14
+ /** Configuration representing how documents should be indexed */
15
+ indexingConfig: Record<string, unknown>;
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type DocumentIndexStatus = "ACTIVE" | "ARCHIVED";
5
+ export declare const DocumentIndexStatus: {
6
+ readonly Active: "ACTIVE";
7
+ readonly Archived: "ARCHIVED";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DocumentIndexStatus = void 0;
7
+ exports.DocumentIndexStatus = {
8
+ Active: "ACTIVE",
9
+ Archived: "ARCHIVED",
10
+ };
@@ -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
  }