vellum-ai 0.3.5 → 0.3.7

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 (101) hide show
  1. package/Client.d.ts +5 -2
  2. package/Client.js +43 -20
  3. package/api/resources/deployments/client/Client.d.ts +2 -2
  4. package/api/resources/deployments/client/Client.js +10 -4
  5. package/api/resources/documentIndexes/client/Client.d.ts +2 -2
  6. package/api/resources/documentIndexes/client/Client.js +7 -3
  7. package/api/resources/documents/client/Client.d.ts +2 -2
  8. package/api/resources/documents/client/Client.js +13 -5
  9. package/api/resources/folderEntities/client/Client.d.ts +31 -0
  10. package/api/resources/folderEntities/client/Client.js +106 -0
  11. package/api/resources/folderEntities/client/index.d.ts +1 -0
  12. package/api/resources/folderEntities/client/index.js +17 -0
  13. package/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +13 -0
  14. package/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +5 -0
  15. package/api/resources/folderEntities/client/requests/index.d.ts +1 -0
  16. package/api/resources/folderEntities/client/requests/index.js +2 -0
  17. package/api/resources/folderEntities/index.d.ts +1 -0
  18. package/api/resources/folderEntities/index.js +17 -0
  19. package/api/resources/index.d.ts +2 -0
  20. package/api/resources/index.js +3 -1
  21. package/api/resources/modelVersions/client/Client.d.ts +2 -2
  22. package/api/resources/modelVersions/client/Client.js +4 -2
  23. package/api/resources/registeredPrompts/client/Client.d.ts +2 -2
  24. package/api/resources/registeredPrompts/client/Client.js +4 -2
  25. package/api/resources/sandboxes/client/Client.d.ts +2 -2
  26. package/api/resources/sandboxes/client/Client.js +7 -3
  27. package/api/resources/testSuites/client/Client.d.ts +2 -2
  28. package/api/resources/testSuites/client/Client.js +7 -3
  29. package/api/resources/workflowDeployments/client/Client.d.ts +2 -2
  30. package/api/resources/workflowDeployments/client/Client.js +4 -2
  31. package/core/fetcher/Fetcher.js +8 -1
  32. package/core/index.d.ts +1 -0
  33. package/core/index.js +1 -0
  34. package/core/runtime/index.d.ts +1 -0
  35. package/core/runtime/index.js +5 -0
  36. package/core/runtime/runtime.d.ts +8 -0
  37. package/core/runtime/runtime.js +82 -0
  38. package/core/streaming-fetcher/Stream.d.ts +4 -0
  39. package/core/streaming-fetcher/Stream.js +63 -5
  40. package/dist/Client.d.ts +5 -2
  41. package/dist/Client.js +43 -20
  42. package/dist/api/resources/deployments/client/Client.d.ts +2 -2
  43. package/dist/api/resources/deployments/client/Client.js +10 -4
  44. package/dist/api/resources/documentIndexes/client/Client.d.ts +2 -2
  45. package/dist/api/resources/documentIndexes/client/Client.js +7 -3
  46. package/dist/api/resources/documents/client/Client.d.ts +2 -2
  47. package/dist/api/resources/documents/client/Client.js +13 -5
  48. package/dist/api/resources/folderEntities/client/Client.d.ts +31 -0
  49. package/dist/api/resources/folderEntities/client/Client.js +106 -0
  50. package/dist/api/resources/folderEntities/client/index.d.ts +1 -0
  51. package/dist/api/resources/folderEntities/client/index.js +17 -0
  52. package/dist/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +13 -0
  53. package/dist/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +5 -0
  54. package/dist/api/resources/folderEntities/client/requests/index.d.ts +1 -0
  55. package/dist/api/resources/folderEntities/client/requests/index.js +2 -0
  56. package/dist/api/resources/folderEntities/index.d.ts +1 -0
  57. package/dist/api/resources/folderEntities/index.js +17 -0
  58. package/dist/api/resources/index.d.ts +2 -0
  59. package/dist/api/resources/index.js +3 -1
  60. package/dist/api/resources/modelVersions/client/Client.d.ts +2 -2
  61. package/dist/api/resources/modelVersions/client/Client.js +4 -2
  62. package/dist/api/resources/registeredPrompts/client/Client.d.ts +2 -2
  63. package/dist/api/resources/registeredPrompts/client/Client.js +4 -2
  64. package/dist/api/resources/sandboxes/client/Client.d.ts +2 -2
  65. package/dist/api/resources/sandboxes/client/Client.js +7 -3
  66. package/dist/api/resources/testSuites/client/Client.d.ts +2 -2
  67. package/dist/api/resources/testSuites/client/Client.js +7 -3
  68. package/dist/api/resources/workflowDeployments/client/Client.d.ts +2 -2
  69. package/dist/api/resources/workflowDeployments/client/Client.js +4 -2
  70. package/dist/core/fetcher/Fetcher.js +8 -1
  71. package/dist/core/index.d.ts +1 -0
  72. package/dist/core/index.js +1 -0
  73. package/dist/core/runtime/index.d.ts +1 -0
  74. package/dist/core/runtime/index.js +5 -0
  75. package/dist/core/runtime/runtime.d.ts +8 -0
  76. package/dist/core/runtime/runtime.js +82 -0
  77. package/dist/core/streaming-fetcher/Stream.d.ts +4 -0
  78. package/dist/core/streaming-fetcher/Stream.js +63 -5
  79. package/dist/serialization/resources/folderEntities/client/index.d.ts +1 -0
  80. package/dist/serialization/resources/folderEntities/client/index.js +17 -0
  81. package/dist/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +12 -0
  82. package/dist/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +33 -0
  83. package/dist/serialization/resources/folderEntities/client/requests/index.d.ts +1 -0
  84. package/dist/serialization/resources/folderEntities/client/requests/index.js +5 -0
  85. package/dist/serialization/resources/folderEntities/index.d.ts +1 -0
  86. package/dist/serialization/resources/folderEntities/index.js +17 -0
  87. package/dist/serialization/resources/index.d.ts +2 -0
  88. package/dist/serialization/resources/index.js +3 -1
  89. package/jest.config.js +5 -0
  90. package/package.json +6 -2
  91. package/serialization/resources/folderEntities/client/index.d.ts +1 -0
  92. package/serialization/resources/folderEntities/client/index.js +17 -0
  93. package/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +12 -0
  94. package/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +33 -0
  95. package/serialization/resources/folderEntities/client/requests/index.d.ts +1 -0
  96. package/serialization/resources/folderEntities/client/requests/index.js +5 -0
  97. package/serialization/resources/folderEntities/index.d.ts +1 -0
  98. package/serialization/resources/folderEntities/index.js +17 -0
  99. package/serialization/resources/index.d.ts +2 -0
  100. package/serialization/resources/index.js +3 -1
  101. package/tests/client.test.ts +11 -0
package/Client.d.ts CHANGED
@@ -7,6 +7,7 @@ import * as Vellum from "./api";
7
7
  import { Deployments } from "./api/resources/deployments/client/Client";
8
8
  import { DocumentIndexes } from "./api/resources/documentIndexes/client/Client";
9
9
  import { Documents } from "./api/resources/documents/client/Client";
10
+ import { FolderEntities } from "./api/resources/folderEntities/client/Client";
10
11
  import { ModelVersions } from "./api/resources/modelVersions/client/Client";
11
12
  import { RegisteredPrompts } from "./api/resources/registeredPrompts/client/Client";
12
13
  import { Sandboxes } from "./api/resources/sandboxes/client/Client";
@@ -15,7 +16,7 @@ import { WorkflowDeployments } from "./api/resources/workflowDeployments/client/
15
16
  export declare namespace VellumClient {
16
17
  interface Options {
17
18
  environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
18
- apiKey: core.Supplier<string>;
19
+ apiKey?: core.Supplier<string | undefined>;
19
20
  }
20
21
  interface RequestOptions {
21
22
  timeoutInSeconds?: number;
@@ -24,7 +25,7 @@ export declare namespace VellumClient {
24
25
  }
25
26
  export declare class VellumClient {
26
27
  protected readonly _options: VellumClient.Options;
27
- constructor(_options: VellumClient.Options);
28
+ constructor(_options?: VellumClient.Options);
28
29
  /**
29
30
  * Executes a deployed Prompt and returns the result.
30
31
  * @throws {@link Vellum.BadRequestError}
@@ -116,6 +117,8 @@ export declare class VellumClient {
116
117
  get documentIndexes(): DocumentIndexes;
117
118
  protected _documents: Documents | undefined;
118
119
  get documents(): Documents;
120
+ protected _folderEntities: FolderEntities | undefined;
121
+ get folderEntities(): FolderEntities;
119
122
  protected _modelVersions: ModelVersions | undefined;
120
123
  get modelVersions(): ModelVersions;
121
124
  protected _registeredPrompts: RegisteredPrompts | undefined;
package/Client.js CHANGED
@@ -48,13 +48,14 @@ const errors = __importStar(require("./errors"));
48
48
  const Client_1 = require("./api/resources/deployments/client/Client");
49
49
  const Client_2 = require("./api/resources/documentIndexes/client/Client");
50
50
  const Client_3 = require("./api/resources/documents/client/Client");
51
- const Client_4 = require("./api/resources/modelVersions/client/Client");
52
- const Client_5 = require("./api/resources/registeredPrompts/client/Client");
53
- const Client_6 = require("./api/resources/sandboxes/client/Client");
54
- const Client_7 = require("./api/resources/testSuites/client/Client");
55
- const Client_8 = require("./api/resources/workflowDeployments/client/Client");
51
+ const Client_4 = require("./api/resources/folderEntities/client/Client");
52
+ const Client_5 = require("./api/resources/modelVersions/client/Client");
53
+ const Client_6 = require("./api/resources/registeredPrompts/client/Client");
54
+ const Client_7 = require("./api/resources/sandboxes/client/Client");
55
+ const Client_8 = require("./api/resources/testSuites/client/Client");
56
+ const Client_9 = require("./api/resources/workflowDeployments/client/Client");
56
57
  class VellumClient {
57
- constructor(_options) {
58
+ constructor(_options = {}) {
58
59
  this._options = _options;
59
60
  }
60
61
  /**
@@ -75,7 +76,9 @@ class VellumClient {
75
76
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
76
77
  "X-Fern-Language": "JavaScript",
77
78
  "X-Fern-SDK-Name": "vellum-ai",
78
- "X-Fern-SDK-Version": "0.3.5",
79
+ "X-Fern-SDK-Version": "0.3.7",
80
+ "X-Fern-Runtime": core.RUNTIME.type,
81
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
79
82
  },
80
83
  contentType: "application/json",
81
84
  body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -136,7 +139,9 @@ class VellumClient {
136
139
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
137
140
  "X-Fern-Language": "JavaScript",
138
141
  "X-Fern-SDK-Name": "vellum-ai",
139
- "X-Fern-SDK-Version": "0.3.5",
142
+ "X-Fern-SDK-Version": "0.3.7",
143
+ "X-Fern-Runtime": core.RUNTIME.type,
144
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
140
145
  },
141
146
  contentType: "application/json",
142
147
  body: yield serializers.ExecutePromptStreamRequest.jsonOrThrow(request, {
@@ -209,7 +214,9 @@ class VellumClient {
209
214
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
210
215
  "X-Fern-Language": "JavaScript",
211
216
  "X-Fern-SDK-Name": "vellum-ai",
212
- "X-Fern-SDK-Version": "0.3.5",
217
+ "X-Fern-SDK-Version": "0.3.7",
218
+ "X-Fern-Runtime": core.RUNTIME.type,
219
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
213
220
  },
214
221
  contentType: "application/json",
215
222
  body: yield serializers.ExecuteWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -268,7 +275,9 @@ class VellumClient {
268
275
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
269
276
  "X-Fern-Language": "JavaScript",
270
277
  "X-Fern-SDK-Name": "vellum-ai",
271
- "X-Fern-SDK-Version": "0.3.5",
278
+ "X-Fern-SDK-Version": "0.3.7",
279
+ "X-Fern-Runtime": core.RUNTIME.type,
280
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
272
281
  },
273
282
  contentType: "application/json",
274
283
  body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
@@ -349,7 +358,9 @@ class VellumClient {
349
358
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
350
359
  "X-Fern-Language": "JavaScript",
351
360
  "X-Fern-SDK-Name": "vellum-ai",
352
- "X-Fern-SDK-Version": "0.3.5",
361
+ "X-Fern-SDK-Version": "0.3.7",
362
+ "X-Fern-Runtime": core.RUNTIME.type,
363
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
353
364
  },
354
365
  contentType: "application/json",
355
366
  body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -412,7 +423,9 @@ class VellumClient {
412
423
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
413
424
  "X-Fern-Language": "JavaScript",
414
425
  "X-Fern-SDK-Name": "vellum-ai",
415
- "X-Fern-SDK-Version": "0.3.5",
426
+ "X-Fern-SDK-Version": "0.3.7",
427
+ "X-Fern-Runtime": core.RUNTIME.type,
428
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
416
429
  },
417
430
  contentType: "application/json",
418
431
  body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -490,7 +503,9 @@ class VellumClient {
490
503
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
491
504
  "X-Fern-Language": "JavaScript",
492
505
  "X-Fern-SDK-Name": "vellum-ai",
493
- "X-Fern-SDK-Version": "0.3.5",
506
+ "X-Fern-SDK-Version": "0.3.7",
507
+ "X-Fern-Runtime": core.RUNTIME.type,
508
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
494
509
  },
495
510
  contentType: "application/json",
496
511
  body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -559,7 +574,9 @@ class VellumClient {
559
574
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
560
575
  "X-Fern-Language": "JavaScript",
561
576
  "X-Fern-SDK-Name": "vellum-ai",
562
- "X-Fern-SDK-Version": "0.3.5",
577
+ "X-Fern-SDK-Version": "0.3.7",
578
+ "X-Fern-Runtime": core.RUNTIME.type,
579
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
563
580
  },
564
581
  contentType: "application/json",
565
582
  body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
@@ -622,7 +639,9 @@ class VellumClient {
622
639
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
623
640
  "X-Fern-Language": "JavaScript",
624
641
  "X-Fern-SDK-Name": "vellum-ai",
625
- "X-Fern-SDK-Version": "0.3.5",
642
+ "X-Fern-SDK-Version": "0.3.7",
643
+ "X-Fern-Runtime": core.RUNTIME.type,
644
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
626
645
  },
627
646
  contentType: "application/json",
628
647
  body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
@@ -667,25 +686,29 @@ class VellumClient {
667
686
  var _a;
668
687
  return ((_a = this._documents) !== null && _a !== void 0 ? _a : (this._documents = new Client_3.Documents(this._options)));
669
688
  }
689
+ get folderEntities() {
690
+ var _a;
691
+ return ((_a = this._folderEntities) !== null && _a !== void 0 ? _a : (this._folderEntities = new Client_4.FolderEntities(this._options)));
692
+ }
670
693
  get modelVersions() {
671
694
  var _a;
672
- return ((_a = this._modelVersions) !== null && _a !== void 0 ? _a : (this._modelVersions = new Client_4.ModelVersions(this._options)));
695
+ return ((_a = this._modelVersions) !== null && _a !== void 0 ? _a : (this._modelVersions = new Client_5.ModelVersions(this._options)));
673
696
  }
674
697
  get registeredPrompts() {
675
698
  var _a;
676
- return ((_a = this._registeredPrompts) !== null && _a !== void 0 ? _a : (this._registeredPrompts = new Client_5.RegisteredPrompts(this._options)));
699
+ return ((_a = this._registeredPrompts) !== null && _a !== void 0 ? _a : (this._registeredPrompts = new Client_6.RegisteredPrompts(this._options)));
677
700
  }
678
701
  get sandboxes() {
679
702
  var _a;
680
- return ((_a = this._sandboxes) !== null && _a !== void 0 ? _a : (this._sandboxes = new Client_6.Sandboxes(this._options)));
703
+ return ((_a = this._sandboxes) !== null && _a !== void 0 ? _a : (this._sandboxes = new Client_7.Sandboxes(this._options)));
681
704
  }
682
705
  get testSuites() {
683
706
  var _a;
684
- return ((_a = this._testSuites) !== null && _a !== void 0 ? _a : (this._testSuites = new Client_7.TestSuites(this._options)));
707
+ return ((_a = this._testSuites) !== null && _a !== void 0 ? _a : (this._testSuites = new Client_8.TestSuites(this._options)));
685
708
  }
686
709
  get workflowDeployments() {
687
710
  var _a;
688
- return ((_a = this._workflowDeployments) !== null && _a !== void 0 ? _a : (this._workflowDeployments = new Client_8.WorkflowDeployments(this._options)));
711
+ return ((_a = this._workflowDeployments) !== null && _a !== void 0 ? _a : (this._workflowDeployments = new Client_9.WorkflowDeployments(this._options)));
689
712
  }
690
713
  }
691
714
  exports.VellumClient = VellumClient;
@@ -7,7 +7,7 @@ import * as Vellum from "../../..";
7
7
  export declare namespace Deployments {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
10
- apiKey: core.Supplier<string>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
13
  timeoutInSeconds?: number;
@@ -16,7 +16,7 @@ export declare namespace Deployments {
16
16
  }
17
17
  export declare class Deployments {
18
18
  protected readonly _options: Deployments.Options;
19
- constructor(_options: Deployments.Options);
19
+ constructor(_options?: Deployments.Options);
20
20
  list(request?: Vellum.DeploymentsListRequest, requestOptions?: Deployments.RequestOptions): Promise<Vellum.PaginatedSlimDeploymentReadList>;
21
21
  /**
22
22
  * Used to retrieve a deployment given its ID or name.
@@ -45,7 +45,7 @@ const url_join_1 = __importDefault(require("url-join"));
45
45
  const serializers = __importStar(require("../../../../serialization"));
46
46
  const errors = __importStar(require("../../../../errors"));
47
47
  class Deployments {
48
- constructor(_options) {
48
+ constructor(_options = {}) {
49
49
  this._options = _options;
50
50
  }
51
51
  list(request = {}, requestOptions) {
@@ -73,7 +73,9 @@ class Deployments {
73
73
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
74
74
  "X-Fern-Language": "JavaScript",
75
75
  "X-Fern-SDK-Name": "vellum-ai",
76
- "X-Fern-SDK-Version": "0.3.5",
76
+ "X-Fern-SDK-Version": "0.3.7",
77
+ "X-Fern-Runtime": core.RUNTIME.type,
78
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
77
79
  },
78
80
  contentType: "application/json",
79
81
  queryParameters: _queryParams,
@@ -126,7 +128,9 @@ class Deployments {
126
128
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
127
129
  "X-Fern-Language": "JavaScript",
128
130
  "X-Fern-SDK-Name": "vellum-ai",
129
- "X-Fern-SDK-Version": "0.3.5",
131
+ "X-Fern-SDK-Version": "0.3.7",
132
+ "X-Fern-Runtime": core.RUNTIME.type,
133
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
130
134
  },
131
135
  contentType: "application/json",
132
136
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -172,7 +176,9 @@ class Deployments {
172
176
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
173
177
  "X-Fern-Language": "JavaScript",
174
178
  "X-Fern-SDK-Name": "vellum-ai",
175
- "X-Fern-SDK-Version": "0.3.5",
179
+ "X-Fern-SDK-Version": "0.3.7",
180
+ "X-Fern-Runtime": core.RUNTIME.type,
181
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
176
182
  },
177
183
  contentType: "application/json",
178
184
  body: yield serializers.DeploymentProviderPayloadRequest.jsonOrThrow(request, {
@@ -7,7 +7,7 @@ import * as Vellum from "../../..";
7
7
  export declare namespace DocumentIndexes {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
10
- apiKey: core.Supplier<string>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
13
  timeoutInSeconds?: number;
@@ -16,7 +16,7 @@ export declare namespace DocumentIndexes {
16
16
  }
17
17
  export declare class DocumentIndexes {
18
18
  protected readonly _options: DocumentIndexes.Options;
19
- constructor(_options: DocumentIndexes.Options);
19
+ constructor(_options?: DocumentIndexes.Options);
20
20
  /**
21
21
  * Creates a new document index.
22
22
  *
@@ -45,7 +45,7 @@ const serializers = __importStar(require("../../../../serialization"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const errors = __importStar(require("../../../../errors"));
47
47
  class DocumentIndexes {
48
- constructor(_options) {
48
+ constructor(_options = {}) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -85,7 +85,9 @@ class DocumentIndexes {
85
85
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
86
86
  "X-Fern-Language": "JavaScript",
87
87
  "X-Fern-SDK-Name": "vellum-ai",
88
- "X-Fern-SDK-Version": "0.3.5",
88
+ "X-Fern-SDK-Version": "0.3.7",
89
+ "X-Fern-Runtime": core.RUNTIME.type,
90
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
89
91
  },
90
92
  contentType: "application/json",
91
93
  body: yield serializers.DocumentIndexCreateRequest.jsonOrThrow(request, {
@@ -140,7 +142,9 @@ class DocumentIndexes {
140
142
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
141
143
  "X-Fern-Language": "JavaScript",
142
144
  "X-Fern-SDK-Name": "vellum-ai",
143
- "X-Fern-SDK-Version": "0.3.5",
145
+ "X-Fern-SDK-Version": "0.3.7",
146
+ "X-Fern-Runtime": core.RUNTIME.type,
147
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
144
148
  },
145
149
  contentType: "application/json",
146
150
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -9,7 +9,7 @@ import * as fs from "fs";
9
9
  export declare namespace Documents {
10
10
  interface Options {
11
11
  environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
12
- apiKey: core.Supplier<string>;
12
+ apiKey?: core.Supplier<string | undefined>;
13
13
  }
14
14
  interface RequestOptions {
15
15
  timeoutInSeconds?: number;
@@ -18,7 +18,7 @@ export declare namespace Documents {
18
18
  }
19
19
  export declare class Documents {
20
20
  protected readonly _options: Documents.Options;
21
- constructor(_options: Documents.Options);
21
+ constructor(_options?: Documents.Options);
22
22
  /**
23
23
  * Used to list documents. Optionally filter on supported fields.
24
24
  *
@@ -47,7 +47,7 @@ const serializers = __importStar(require("../../../../serialization"));
47
47
  const errors = __importStar(require("../../../../errors"));
48
48
  const form_data_1 = __importDefault(require("form-data"));
49
49
  class Documents {
50
- constructor(_options) {
50
+ constructor(_options = {}) {
51
51
  this._options = _options;
52
52
  }
53
53
  /**
@@ -81,7 +81,9 @@ class Documents {
81
81
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
82
82
  "X-Fern-Language": "JavaScript",
83
83
  "X-Fern-SDK-Name": "vellum-ai",
84
- "X-Fern-SDK-Version": "0.3.5",
84
+ "X-Fern-SDK-Version": "0.3.7",
85
+ "X-Fern-Runtime": core.RUNTIME.type,
86
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
85
87
  },
86
88
  contentType: "application/json",
87
89
  queryParameters: _queryParams,
@@ -128,7 +130,9 @@ class Documents {
128
130
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
129
131
  "X-Fern-Language": "JavaScript",
130
132
  "X-Fern-SDK-Name": "vellum-ai",
131
- "X-Fern-SDK-Version": "0.3.5",
133
+ "X-Fern-SDK-Version": "0.3.7",
134
+ "X-Fern-Runtime": core.RUNTIME.type,
135
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
132
136
  },
133
137
  contentType: "application/json",
134
138
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -175,7 +179,9 @@ class Documents {
175
179
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
176
180
  "X-Fern-Language": "JavaScript",
177
181
  "X-Fern-SDK-Name": "vellum-ai",
178
- "X-Fern-SDK-Version": "0.3.5",
182
+ "X-Fern-SDK-Version": "0.3.7",
183
+ "X-Fern-Runtime": core.RUNTIME.type,
184
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
179
185
  },
180
186
  contentType: "application/json",
181
187
  body: yield serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, {
@@ -259,7 +265,9 @@ class Documents {
259
265
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
260
266
  "X-Fern-Language": "JavaScript",
261
267
  "X-Fern-SDK-Name": "vellum-ai",
262
- "X-Fern-SDK-Version": "0.3.5",
268
+ "X-Fern-SDK-Version": "0.3.7",
269
+ "X-Fern-Runtime": core.RUNTIME.type,
270
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
263
271
  },
264
272
  contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
265
273
  body: _request,
@@ -0,0 +1,31 @@
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 FolderEntities {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
+ }
12
+ interface RequestOptions {
13
+ timeoutInSeconds?: number;
14
+ maxRetries?: number;
15
+ }
16
+ }
17
+ export declare class FolderEntities {
18
+ protected readonly _options: FolderEntities.Options;
19
+ constructor(_options?: FolderEntities.Options);
20
+ /**
21
+ * Add an entity to a specific folder or root directory.
22
+ *
23
+ * Adding an entity to a folder will remove it from any other folders it might have been a member of.
24
+ *
25
+ * @example
26
+ * await vellum.folderEntities.addEntityToFolder("folder_id", {
27
+ * entityId: "entity_id"
28
+ * })
29
+ */
30
+ addEntityToFolder(folderId: string, request: Vellum.AddEntityToFolderRequest, requestOptions?: FolderEntities.RequestOptions): Promise<void>;
31
+ }
@@ -0,0 +1,106 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.FolderEntities = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const serializers = __importStar(require("../../../../serialization"));
45
+ const url_join_1 = __importDefault(require("url-join"));
46
+ const errors = __importStar(require("../../../../errors"));
47
+ class FolderEntities {
48
+ constructor(_options = {}) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * Add an entity to a specific folder or root directory.
53
+ *
54
+ * Adding an entity to a folder will remove it from any other folders it might have been a member of.
55
+ *
56
+ * @example
57
+ * await vellum.folderEntities.addEntityToFolder("folder_id", {
58
+ * entityId: "entity_id"
59
+ * })
60
+ */
61
+ addEntityToFolder(folderId, request, requestOptions) {
62
+ var _a;
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ const _response = yield core.fetcher({
65
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
66
+ .default, `v1/folders/${folderId}/add-entity`),
67
+ method: "POST",
68
+ headers: {
69
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
70
+ "X-Fern-Language": "JavaScript",
71
+ "X-Fern-SDK-Name": "vellum-ai",
72
+ "X-Fern-SDK-Version": "0.3.7",
73
+ "X-Fern-Runtime": core.RUNTIME.type,
74
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
75
+ },
76
+ contentType: "application/json",
77
+ body: yield serializers.AddEntityToFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
78
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
79
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
80
+ });
81
+ if (_response.ok) {
82
+ return;
83
+ }
84
+ if (_response.error.reason === "status-code") {
85
+ throw new errors.VellumError({
86
+ statusCode: _response.error.statusCode,
87
+ body: _response.error.body,
88
+ });
89
+ }
90
+ switch (_response.error.reason) {
91
+ case "non-json":
92
+ throw new errors.VellumError({
93
+ statusCode: _response.error.statusCode,
94
+ body: _response.error.rawBody,
95
+ });
96
+ case "timeout":
97
+ throw new errors.VellumTimeoutError();
98
+ case "unknown":
99
+ throw new errors.VellumError({
100
+ message: _response.error.errorMessage,
101
+ });
102
+ }
103
+ });
104
+ }
105
+ }
106
+ exports.FolderEntities = FolderEntities;
@@ -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,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * entityId: "entity_id"
8
+ * }
9
+ */
10
+ export interface AddEntityToFolderRequest {
11
+ /** The ID of the entity you would like to move. */
12
+ entityId: string;
13
+ }
@@ -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 { AddEntityToFolderRequest } from "./AddEntityToFolderRequest";
@@ -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);
@@ -4,6 +4,7 @@ export * as workflowDeployments from "./workflowDeployments";
4
4
  export * from "./workflowDeployments/types";
5
5
  export * as documentIndexes from "./documentIndexes";
6
6
  export * as documents from "./documents";
7
+ export * as folderEntities from "./folderEntities";
7
8
  export * as modelVersions from "./modelVersions";
8
9
  export * as registeredPrompts from "./registeredPrompts";
9
10
  export * as sandboxes from "./sandboxes";
@@ -11,6 +12,7 @@ export * as testSuites from "./testSuites";
11
12
  export * from "./deployments/client/requests";
12
13
  export * from "./documentIndexes/client/requests";
13
14
  export * from "./documents/client/requests";
15
+ export * from "./folderEntities/client/requests";
14
16
  export * from "./registeredPrompts/client/requests";
15
17
  export * from "./sandboxes/client/requests";
16
18
  export * from "./testSuites/client/requests";
@@ -26,13 +26,14 @@ 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.documentIndexes = exports.workflowDeployments = exports.deployments = void 0;
29
+ exports.testSuites = exports.sandboxes = exports.registeredPrompts = exports.modelVersions = exports.folderEntities = exports.documents = exports.documentIndexes = exports.workflowDeployments = exports.deployments = void 0;
30
30
  exports.deployments = __importStar(require("./deployments"));
31
31
  __exportStar(require("./deployments/types"), exports);
32
32
  exports.workflowDeployments = __importStar(require("./workflowDeployments"));
33
33
  __exportStar(require("./workflowDeployments/types"), exports);
34
34
  exports.documentIndexes = __importStar(require("./documentIndexes"));
35
35
  exports.documents = __importStar(require("./documents"));
36
+ exports.folderEntities = __importStar(require("./folderEntities"));
36
37
  exports.modelVersions = __importStar(require("./modelVersions"));
37
38
  exports.registeredPrompts = __importStar(require("./registeredPrompts"));
38
39
  exports.sandboxes = __importStar(require("./sandboxes"));
@@ -40,6 +41,7 @@ exports.testSuites = __importStar(require("./testSuites"));
40
41
  __exportStar(require("./deployments/client/requests"), exports);
41
42
  __exportStar(require("./documentIndexes/client/requests"), exports);
42
43
  __exportStar(require("./documents/client/requests"), exports);
44
+ __exportStar(require("./folderEntities/client/requests"), exports);
43
45
  __exportStar(require("./registeredPrompts/client/requests"), exports);
44
46
  __exportStar(require("./sandboxes/client/requests"), exports);
45
47
  __exportStar(require("./testSuites/client/requests"), exports);
@@ -7,7 +7,7 @@ import * as Vellum from "../../..";
7
7
  export declare namespace ModelVersions {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
10
- apiKey: core.Supplier<string>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
13
  timeoutInSeconds?: number;
@@ -16,7 +16,7 @@ export declare namespace ModelVersions {
16
16
  }
17
17
  export declare class ModelVersions {
18
18
  protected readonly _options: ModelVersions.Options;
19
- constructor(_options: ModelVersions.Options);
19
+ constructor(_options?: ModelVersions.Options);
20
20
  /**
21
21
  * Deprecated. Use the `deployments/provider-payload` endpoint to fetch information that we send to Model providers.
22
22
  *