vellum-ai 0.12.17 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/.mock/definition/__package__.yml +44 -78
  2. package/.mock/definition/organizations.yml +29 -0
  3. package/.mock/definition/workspaces.yml +29 -0
  4. package/.mock/openapi/openapi.yml +84 -148
  5. package/Client.d.ts +9 -3
  6. package/Client.js +35 -25
  7. package/api/resources/adHoc/client/Client.d.ts +3 -3
  8. package/api/resources/adHoc/client/Client.js +2 -2
  9. package/api/resources/containerImages/client/Client.d.ts +3 -3
  10. package/api/resources/containerImages/client/Client.js +5 -5
  11. package/api/resources/deployments/client/Client.d.ts +3 -3
  12. package/api/resources/deployments/client/Client.js +8 -8
  13. package/api/resources/documentIndexes/client/Client.d.ts +3 -3
  14. package/api/resources/documentIndexes/client/Client.js +9 -9
  15. package/api/resources/documents/client/Client.d.ts +3 -3
  16. package/api/resources/documents/client/Client.js +6 -6
  17. package/api/resources/folderEntities/client/Client.d.ts +3 -3
  18. package/api/resources/folderEntities/client/Client.js +3 -3
  19. package/api/resources/index.d.ts +2 -0
  20. package/api/resources/index.js +3 -1
  21. package/api/resources/metricDefinitions/client/Client.d.ts +3 -3
  22. package/api/resources/metricDefinitions/client/Client.js +3 -3
  23. package/api/resources/mlModels/client/Client.d.ts +3 -3
  24. package/api/resources/mlModels/client/Client.js +2 -2
  25. package/api/resources/organizations/client/Client.d.ts +36 -0
  26. package/api/resources/organizations/client/Client.js +109 -0
  27. package/api/resources/organizations/client/index.d.ts +1 -0
  28. package/api/resources/organizations/client/index.js +2 -0
  29. package/api/resources/organizations/index.d.ts +1 -0
  30. package/api/resources/organizations/index.js +17 -0
  31. package/api/resources/sandboxes/client/Client.d.ts +3 -3
  32. package/api/resources/sandboxes/client/Client.js +4 -4
  33. package/api/resources/testSuiteRuns/client/Client.d.ts +3 -3
  34. package/api/resources/testSuiteRuns/client/Client.js +4 -4
  35. package/api/resources/testSuites/client/Client.d.ts +3 -3
  36. package/api/resources/testSuites/client/Client.js +5 -5
  37. package/api/resources/workflowDeployments/client/Client.d.ts +3 -3
  38. package/api/resources/workflowDeployments/client/Client.js +7 -7
  39. package/api/resources/workflowSandboxes/client/Client.d.ts +3 -3
  40. package/api/resources/workflowSandboxes/client/Client.js +2 -2
  41. package/api/resources/workflows/client/Client.d.ts +3 -3
  42. package/api/resources/workflows/client/Client.js +3 -3
  43. package/api/resources/workspaceSecrets/client/Client.d.ts +3 -3
  44. package/api/resources/workspaceSecrets/client/Client.js +3 -3
  45. package/api/resources/workspaces/client/Client.d.ts +36 -0
  46. package/api/resources/workspaces/client/Client.js +109 -0
  47. package/api/resources/workspaces/client/index.d.ts +1 -0
  48. package/api/resources/workspaces/client/index.js +2 -0
  49. package/api/resources/workspaces/index.d.ts +1 -0
  50. package/api/resources/workspaces/index.js +17 -0
  51. package/api/types/NewMemberJoinBehaviorEnum.d.ts +14 -0
  52. package/api/types/NewMemberJoinBehaviorEnum.js +11 -0
  53. package/api/types/OrganizationRead.d.ts +10 -0
  54. package/api/types/WorkflowResultEventOutputDataArray.d.ts +1 -1
  55. package/api/types/WorkspaceRead.d.ts +10 -0
  56. package/api/types/index.d.ts +3 -11
  57. package/api/types/index.js +3 -11
  58. package/dist/Client.d.ts +9 -3
  59. package/dist/Client.js +35 -25
  60. package/dist/api/resources/adHoc/client/Client.d.ts +3 -3
  61. package/dist/api/resources/adHoc/client/Client.js +2 -2
  62. package/dist/api/resources/containerImages/client/Client.d.ts +3 -3
  63. package/dist/api/resources/containerImages/client/Client.js +5 -5
  64. package/dist/api/resources/deployments/client/Client.d.ts +3 -3
  65. package/dist/api/resources/deployments/client/Client.js +8 -8
  66. package/dist/api/resources/documentIndexes/client/Client.d.ts +3 -3
  67. package/dist/api/resources/documentIndexes/client/Client.js +9 -9
  68. package/dist/api/resources/documents/client/Client.d.ts +3 -3
  69. package/dist/api/resources/documents/client/Client.js +6 -6
  70. package/dist/api/resources/folderEntities/client/Client.d.ts +3 -3
  71. package/dist/api/resources/folderEntities/client/Client.js +3 -3
  72. package/dist/api/resources/index.d.ts +2 -0
  73. package/dist/api/resources/index.js +3 -1
  74. package/dist/api/resources/metricDefinitions/client/Client.d.ts +3 -3
  75. package/dist/api/resources/metricDefinitions/client/Client.js +3 -3
  76. package/dist/api/resources/mlModels/client/Client.d.ts +3 -3
  77. package/dist/api/resources/mlModels/client/Client.js +2 -2
  78. package/dist/api/resources/organizations/client/Client.d.ts +36 -0
  79. package/dist/api/resources/organizations/client/Client.js +109 -0
  80. package/dist/api/resources/organizations/client/index.d.ts +1 -0
  81. package/dist/api/resources/organizations/client/index.js +2 -0
  82. package/dist/api/resources/organizations/index.d.ts +1 -0
  83. package/dist/api/resources/organizations/index.js +17 -0
  84. package/dist/api/resources/sandboxes/client/Client.d.ts +3 -3
  85. package/dist/api/resources/sandboxes/client/Client.js +4 -4
  86. package/dist/api/resources/testSuiteRuns/client/Client.d.ts +3 -3
  87. package/dist/api/resources/testSuiteRuns/client/Client.js +4 -4
  88. package/dist/api/resources/testSuites/client/Client.d.ts +3 -3
  89. package/dist/api/resources/testSuites/client/Client.js +5 -5
  90. package/dist/api/resources/workflowDeployments/client/Client.d.ts +3 -3
  91. package/dist/api/resources/workflowDeployments/client/Client.js +7 -7
  92. package/dist/api/resources/workflowSandboxes/client/Client.d.ts +3 -3
  93. package/dist/api/resources/workflowSandboxes/client/Client.js +2 -2
  94. package/dist/api/resources/workflows/client/Client.d.ts +3 -3
  95. package/dist/api/resources/workflows/client/Client.js +3 -3
  96. package/dist/api/resources/workspaceSecrets/client/Client.d.ts +3 -3
  97. package/dist/api/resources/workspaceSecrets/client/Client.js +3 -3
  98. package/dist/api/resources/workspaces/client/Client.d.ts +36 -0
  99. package/dist/api/resources/workspaces/client/Client.js +109 -0
  100. package/dist/api/resources/workspaces/client/index.d.ts +1 -0
  101. package/dist/api/resources/workspaces/client/index.js +2 -0
  102. package/dist/api/resources/workspaces/index.d.ts +1 -0
  103. package/dist/api/resources/workspaces/index.js +17 -0
  104. package/dist/api/types/NewMemberJoinBehaviorEnum.d.ts +14 -0
  105. package/dist/api/types/NewMemberJoinBehaviorEnum.js +11 -0
  106. package/dist/api/types/OrganizationRead.d.ts +10 -0
  107. package/dist/api/types/WorkflowResultEventOutputDataArray.d.ts +1 -1
  108. package/dist/api/types/WorkspaceRead.d.ts +10 -0
  109. package/dist/api/types/index.d.ts +3 -11
  110. package/dist/api/types/index.js +3 -11
  111. package/dist/serialization/types/NewMemberJoinBehaviorEnum.d.ts +10 -0
  112. package/dist/serialization/types/{JsonVariableValue.js → NewMemberJoinBehaviorEnum.js} +6 -5
  113. package/dist/serialization/types/OrganizationRead.d.ts +16 -0
  114. package/dist/serialization/types/{ArrayVariableValue.js → OrganizationRead.js} +7 -5
  115. package/dist/serialization/types/WorkflowResultEventOutputDataArray.d.ts +1 -1
  116. package/dist/serialization/types/WorkflowResultEventOutputDataArray.js +1 -1
  117. package/dist/serialization/types/WorkspaceRead.d.ts +15 -0
  118. package/dist/serialization/types/{StringVariableValue.js → WorkspaceRead.js} +6 -4
  119. package/dist/serialization/types/index.d.ts +3 -11
  120. package/dist/serialization/types/index.js +3 -11
  121. package/dist/version.d.ts +1 -1
  122. package/dist/version.js +1 -1
  123. package/package.json +1 -1
  124. package/reference.md +114 -0
  125. package/serialization/types/NewMemberJoinBehaviorEnum.d.ts +10 -0
  126. package/{dist/serialization/types/NumberVariableValue.js → serialization/types/NewMemberJoinBehaviorEnum.js} +6 -5
  127. package/serialization/types/OrganizationRead.d.ts +16 -0
  128. package/{dist/serialization/types/ChatHistoryVariableValue.js → serialization/types/OrganizationRead.js} +7 -5
  129. package/serialization/types/WorkflowResultEventOutputDataArray.d.ts +1 -1
  130. package/serialization/types/WorkflowResultEventOutputDataArray.js +1 -1
  131. package/serialization/types/WorkspaceRead.d.ts +15 -0
  132. package/serialization/types/{JsonVariableValue.js → WorkspaceRead.js} +6 -4
  133. package/serialization/types/index.d.ts +3 -11
  134. package/serialization/types/index.js +3 -11
  135. package/version.d.ts +1 -1
  136. package/version.js +1 -1
  137. package/api/types/ArrayVariableValue.d.ts +0 -8
  138. package/api/types/ArrayVariableValueItem.d.ts +0 -5
  139. package/api/types/AudioVariableValue.d.ts +0 -11
  140. package/api/types/ChatHistoryVariableValue.d.ts +0 -8
  141. package/api/types/ErrorVariableValue.d.ts +0 -8
  142. package/api/types/ErrorVariableValue.js +0 -5
  143. package/api/types/FunctionCallVariableValue.d.ts +0 -8
  144. package/api/types/FunctionCallVariableValue.js +0 -5
  145. package/api/types/ImageVariableValue.d.ts +0 -11
  146. package/api/types/ImageVariableValue.js +0 -5
  147. package/api/types/JsonVariableValue.d.ts +0 -7
  148. package/api/types/JsonVariableValue.js +0 -5
  149. package/api/types/NumberVariableValue.d.ts +0 -7
  150. package/api/types/NumberVariableValue.js +0 -5
  151. package/api/types/SearchResultsVariableValue.d.ts +0 -8
  152. package/api/types/SearchResultsVariableValue.js +0 -5
  153. package/api/types/StringVariableValue.d.ts +0 -7
  154. package/api/types/StringVariableValue.js +0 -5
  155. package/dist/api/types/ArrayVariableValue.d.ts +0 -8
  156. package/dist/api/types/ArrayVariableValue.js +0 -5
  157. package/dist/api/types/ArrayVariableValueItem.d.ts +0 -5
  158. package/dist/api/types/ArrayVariableValueItem.js +0 -5
  159. package/dist/api/types/AudioVariableValue.d.ts +0 -11
  160. package/dist/api/types/AudioVariableValue.js +0 -5
  161. package/dist/api/types/ChatHistoryVariableValue.d.ts +0 -8
  162. package/dist/api/types/ChatHistoryVariableValue.js +0 -5
  163. package/dist/api/types/ErrorVariableValue.d.ts +0 -8
  164. package/dist/api/types/ErrorVariableValue.js +0 -5
  165. package/dist/api/types/FunctionCallVariableValue.d.ts +0 -8
  166. package/dist/api/types/FunctionCallVariableValue.js +0 -5
  167. package/dist/api/types/ImageVariableValue.d.ts +0 -11
  168. package/dist/api/types/ImageVariableValue.js +0 -5
  169. package/dist/api/types/JsonVariableValue.d.ts +0 -7
  170. package/dist/api/types/JsonVariableValue.js +0 -5
  171. package/dist/api/types/NumberVariableValue.d.ts +0 -7
  172. package/dist/api/types/NumberVariableValue.js +0 -5
  173. package/dist/api/types/SearchResultsVariableValue.d.ts +0 -8
  174. package/dist/api/types/SearchResultsVariableValue.js +0 -5
  175. package/dist/api/types/StringVariableValue.d.ts +0 -7
  176. package/dist/api/types/StringVariableValue.js +0 -5
  177. package/dist/serialization/types/ArrayVariableValue.d.ts +0 -13
  178. package/dist/serialization/types/ArrayVariableValueItem.d.ts +0 -19
  179. package/dist/serialization/types/ArrayVariableValueItem.js +0 -52
  180. package/dist/serialization/types/AudioVariableValue.d.ts +0 -14
  181. package/dist/serialization/types/AudioVariableValue.js +0 -35
  182. package/dist/serialization/types/ChatHistoryVariableValue.d.ts +0 -14
  183. package/dist/serialization/types/ErrorVariableValue.d.ts +0 -14
  184. package/dist/serialization/types/ErrorVariableValue.js +0 -35
  185. package/dist/serialization/types/FunctionCallVariableValue.d.ts +0 -14
  186. package/dist/serialization/types/FunctionCallVariableValue.js +0 -35
  187. package/dist/serialization/types/ImageVariableValue.d.ts +0 -14
  188. package/dist/serialization/types/ImageVariableValue.js +0 -35
  189. package/dist/serialization/types/JsonVariableValue.d.ts +0 -13
  190. package/dist/serialization/types/NumberVariableValue.d.ts +0 -13
  191. package/dist/serialization/types/SearchResultsVariableValue.d.ts +0 -14
  192. package/dist/serialization/types/SearchResultsVariableValue.js +0 -35
  193. package/dist/serialization/types/StringVariableValue.d.ts +0 -13
  194. package/serialization/types/ArrayVariableValue.d.ts +0 -13
  195. package/serialization/types/ArrayVariableValue.js +0 -35
  196. package/serialization/types/ArrayVariableValueItem.d.ts +0 -19
  197. package/serialization/types/ArrayVariableValueItem.js +0 -52
  198. package/serialization/types/AudioVariableValue.d.ts +0 -14
  199. package/serialization/types/AudioVariableValue.js +0 -35
  200. package/serialization/types/ChatHistoryVariableValue.d.ts +0 -14
  201. package/serialization/types/ChatHistoryVariableValue.js +0 -35
  202. package/serialization/types/ErrorVariableValue.d.ts +0 -14
  203. package/serialization/types/ErrorVariableValue.js +0 -35
  204. package/serialization/types/FunctionCallVariableValue.d.ts +0 -14
  205. package/serialization/types/FunctionCallVariableValue.js +0 -35
  206. package/serialization/types/ImageVariableValue.d.ts +0 -14
  207. package/serialization/types/ImageVariableValue.js +0 -35
  208. package/serialization/types/JsonVariableValue.d.ts +0 -13
  209. package/serialization/types/NumberVariableValue.d.ts +0 -13
  210. package/serialization/types/NumberVariableValue.js +0 -34
  211. package/serialization/types/SearchResultsVariableValue.d.ts +0 -14
  212. package/serialization/types/SearchResultsVariableValue.js +0 -35
  213. package/serialization/types/StringVariableValue.d.ts +0 -13
  214. package/serialization/types/StringVariableValue.js +0 -34
  215. /package/api/types/{ArrayVariableValue.js → OrganizationRead.js} +0 -0
  216. /package/api/types/{ArrayVariableValueItem.js → WorkspaceRead.js} +0 -0
  217. /package/{api/types/AudioVariableValue.js → dist/api/types/OrganizationRead.js} +0 -0
  218. /package/{api/types/ChatHistoryVariableValue.js → dist/api/types/WorkspaceRead.js} +0 -0
@@ -45,7 +45,7 @@ const url_join_1 = __importDefault(require("url-join"));
45
45
  const serializers = __importStar(require("../../../../serialization/index"));
46
46
  const errors = __importStar(require("../../../../errors/index"));
47
47
  class DocumentIndexes {
48
- constructor(_options) {
48
+ constructor(_options = {}) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -81,7 +81,7 @@ class DocumentIndexes {
81
81
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
82
82
  .default, "v1/document-indexes"),
83
83
  method: "GET",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -196,7 +196,7 @@ class DocumentIndexes {
196
196
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
197
197
  .default, "v1/document-indexes"),
198
198
  method: "POST",
199
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
199
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
200
200
  contentType: "application/json",
201
201
  requestType: "json",
202
202
  body: serializers.DocumentIndexCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -249,7 +249,7 @@ class DocumentIndexes {
249
249
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
250
250
  .default, `v1/document-indexes/${encodeURIComponent(id)}`),
251
251
  method: "GET",
252
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
252
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
253
253
  contentType: "application/json",
254
254
  requestType: "json",
255
255
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -304,7 +304,7 @@ class DocumentIndexes {
304
304
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
305
305
  .default, `v1/document-indexes/${encodeURIComponent(id)}`),
306
306
  method: "PUT",
307
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
307
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
308
308
  contentType: "application/json",
309
309
  requestType: "json",
310
310
  body: serializers.DocumentIndexUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -357,7 +357,7 @@ class DocumentIndexes {
357
357
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
358
358
  .documents, `v1/document-indexes/${encodeURIComponent(id)}`),
359
359
  method: "DELETE",
360
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
360
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
361
361
  contentType: "application/json",
362
362
  requestType: "json",
363
363
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -405,7 +405,7 @@ class DocumentIndexes {
405
405
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
406
406
  .default, `v1/document-indexes/${encodeURIComponent(id)}`),
407
407
  method: "PATCH",
408
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
408
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
409
409
  contentType: "application/json",
410
410
  requestType: "json",
411
411
  body: serializers.PatchedDocumentIndexUpdateRequest.jsonOrThrow(request, {
@@ -461,7 +461,7 @@ class DocumentIndexes {
461
461
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
462
462
  .default, `v1/document-indexes/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
463
463
  method: "POST",
464
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
464
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
465
465
  contentType: "application/json",
466
466
  requestType: "json",
467
467
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -509,7 +509,7 @@ class DocumentIndexes {
509
509
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
510
510
  .documents, `v1/document-indexes/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
511
511
  method: "DELETE",
512
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
512
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
513
513
  contentType: "application/json",
514
514
  requestType: "json",
515
515
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -10,7 +10,7 @@ import { Blob } from "buffer";
10
10
  export declare namespace Documents {
11
11
  interface Options {
12
12
  environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
13
- apiKey: core.Supplier<string>;
13
+ apiKey?: core.Supplier<string | undefined>;
14
14
  }
15
15
  interface RequestOptions {
16
16
  /** The maximum time to wait for a response in seconds. */
@@ -23,7 +23,7 @@ export declare namespace Documents {
23
23
  }
24
24
  export declare class Documents {
25
25
  protected readonly _options: Documents.Options;
26
- constructor(_options: Documents.Options);
26
+ constructor(_options?: Documents.Options);
27
27
  /**
28
28
  * Used to list documents. Optionally filter on supported fields.
29
29
  *
@@ -93,6 +93,6 @@ export declare class Documents {
93
93
  */
94
94
  upload(contents: File | fs.ReadStream | Blob, request: Vellum.UploadDocumentBodyRequest, requestOptions?: Documents.RequestOptions): Promise<Vellum.UploadDocumentResponse>;
95
95
  protected _getCustomAuthorizationHeaders(): Promise<{
96
- X_API_KEY: string;
96
+ X_API_KEY: string | undefined;
97
97
  }>;
98
98
  }
@@ -46,7 +46,7 @@ const url_join_1 = __importDefault(require("url-join"));
46
46
  const serializers = __importStar(require("../../../../serialization/index"));
47
47
  const errors = __importStar(require("../../../../errors/index"));
48
48
  class Documents {
49
- constructor(_options) {
49
+ constructor(_options = {}) {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
@@ -79,7 +79,7 @@ class Documents {
79
79
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
80
80
  .default, "v1/documents"),
81
81
  method: "GET",
82
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
83
83
  contentType: "application/json",
84
84
  queryParameters: _queryParams,
85
85
  requestType: "json",
@@ -132,7 +132,7 @@ class Documents {
132
132
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
133
133
  .default, `v1/documents/${encodeURIComponent(id)}`),
134
134
  method: "GET",
135
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
135
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
136
136
  contentType: "application/json",
137
137
  requestType: "json",
138
138
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -184,7 +184,7 @@ class Documents {
184
184
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
185
185
  .documents, `v1/documents/${encodeURIComponent(id)}`),
186
186
  method: "DELETE",
187
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
187
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
188
188
  contentType: "application/json",
189
189
  requestType: "json",
190
190
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -232,7 +232,7 @@ class Documents {
232
232
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
233
233
  .default, `v1/documents/${encodeURIComponent(id)}`),
234
234
  method: "PATCH",
235
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
235
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
236
236
  contentType: "application/json",
237
237
  requestType: "json",
238
238
  body: serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -322,7 +322,7 @@ class Documents {
322
322
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
323
323
  .documents, "v1/upload-document"),
324
324
  method: "POST",
325
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
325
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
326
326
  requestType: "file",
327
327
  duplex: _maybeEncodedRequest.duplex,
328
328
  body: _maybeEncodedRequest.body,
@@ -7,7 +7,7 @@ import * as Vellum from "../../../index";
7
7
  export declare namespace FolderEntities {
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
  /** The maximum time to wait for a response in seconds. */
@@ -20,7 +20,7 @@ export declare namespace FolderEntities {
20
20
  }
21
21
  export declare class FolderEntities {
22
22
  protected readonly _options: FolderEntities.Options;
23
- constructor(_options: FolderEntities.Options);
23
+ constructor(_options?: FolderEntities.Options);
24
24
  /**
25
25
  * List all folder entities within a specified folder.
26
26
  *
@@ -55,6 +55,6 @@ export declare class FolderEntities {
55
55
  */
56
56
  addEntityToFolder(folderId: string, request: Vellum.AddEntityToFolderRequest, requestOptions?: FolderEntities.RequestOptions): Promise<void>;
57
57
  protected _getCustomAuthorizationHeaders(): Promise<{
58
- X_API_KEY: string;
58
+ X_API_KEY: string | undefined;
59
59
  }>;
60
60
  }
@@ -45,7 +45,7 @@ const url_join_1 = __importDefault(require("url-join"));
45
45
  const serializers = __importStar(require("../../../../serialization/index"));
46
46
  const errors = __importStar(require("../../../../errors/index"));
47
47
  class FolderEntities {
48
- constructor(_options) {
48
+ constructor(_options = {}) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -81,7 +81,7 @@ class FolderEntities {
81
81
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
82
82
  .default, "v1/folder-entities"),
83
83
  method: "GET",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -145,7 +145,7 @@ class FolderEntities {
145
145
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
146
146
  .default, `v1/folders/${encodeURIComponent(folderId)}/add-entity`),
147
147
  method: "POST",
148
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
148
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
149
149
  contentType: "application/json",
150
150
  requestType: "json",
151
151
  body: serializers.AddEntityToFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -13,11 +13,13 @@ export * as containerImages from "./containerImages";
13
13
  export * as documents from "./documents";
14
14
  export * as metricDefinitions from "./metricDefinitions";
15
15
  export * as mlModels from "./mlModels";
16
+ export * as organizations from "./organizations";
16
17
  export * as sandboxes from "./sandboxes";
17
18
  export * as testSuiteRuns from "./testSuiteRuns";
18
19
  export * as testSuites from "./testSuites";
19
20
  export * as workflowSandboxes from "./workflowSandboxes";
20
21
  export * as workspaceSecrets from "./workspaceSecrets";
22
+ export * as workspaces from "./workspaces";
21
23
  export * from "./adHoc/client/requests";
22
24
  export * from "./containerImages/client/requests";
23
25
  export * from "./deployments/client/requests";
@@ -26,7 +26,7 @@ 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.workspaceSecrets = exports.workflowSandboxes = exports.testSuites = exports.testSuiteRuns = exports.sandboxes = exports.mlModels = exports.metricDefinitions = exports.documents = exports.containerImages = exports.adHoc = exports.workflows = exports.workflowDeployments = exports.folderEntities = exports.documentIndexes = exports.deployments = void 0;
29
+ exports.workspaces = exports.workspaceSecrets = exports.workflowSandboxes = exports.testSuites = exports.testSuiteRuns = exports.sandboxes = exports.organizations = exports.mlModels = exports.metricDefinitions = exports.documents = exports.containerImages = exports.adHoc = exports.workflows = exports.workflowDeployments = exports.folderEntities = exports.documentIndexes = exports.deployments = void 0;
30
30
  exports.deployments = __importStar(require("./deployments"));
31
31
  __exportStar(require("./deployments/types"), exports);
32
32
  exports.documentIndexes = __importStar(require("./documentIndexes"));
@@ -42,11 +42,13 @@ exports.containerImages = __importStar(require("./containerImages"));
42
42
  exports.documents = __importStar(require("./documents"));
43
43
  exports.metricDefinitions = __importStar(require("./metricDefinitions"));
44
44
  exports.mlModels = __importStar(require("./mlModels"));
45
+ exports.organizations = __importStar(require("./organizations"));
45
46
  exports.sandboxes = __importStar(require("./sandboxes"));
46
47
  exports.testSuiteRuns = __importStar(require("./testSuiteRuns"));
47
48
  exports.testSuites = __importStar(require("./testSuites"));
48
49
  exports.workflowSandboxes = __importStar(require("./workflowSandboxes"));
49
50
  exports.workspaceSecrets = __importStar(require("./workspaceSecrets"));
51
+ exports.workspaces = __importStar(require("./workspaces"));
50
52
  __exportStar(require("./adHoc/client/requests"), exports);
51
53
  __exportStar(require("./containerImages/client/requests"), exports);
52
54
  __exportStar(require("./deployments/client/requests"), exports);
@@ -7,7 +7,7 @@ import * as Vellum from "../../../index";
7
7
  export declare namespace MetricDefinitions {
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
  /** The maximum time to wait for a response in seconds. */
@@ -20,7 +20,7 @@ export declare namespace MetricDefinitions {
20
20
  }
21
21
  export declare class MetricDefinitions {
22
22
  protected readonly _options: MetricDefinitions.Options;
23
- constructor(_options: MetricDefinitions.Options);
23
+ constructor(_options?: MetricDefinitions.Options);
24
24
  /**
25
25
  * @param {string} id - Either the Metric Definition's ID or its unique name
26
26
  * @param {Vellum.ExecuteMetricDefinition} request
@@ -46,6 +46,6 @@ export declare class MetricDefinitions {
46
46
  */
47
47
  metricDefinitionHistoryItemRetrieve(historyIdOrReleaseTag: string, id: string, requestOptions?: MetricDefinitions.RequestOptions): Promise<Vellum.MetricDefinitionHistoryItem>;
48
48
  protected _getCustomAuthorizationHeaders(): Promise<{
49
- X_API_KEY: string;
49
+ X_API_KEY: string | undefined;
50
50
  }>;
51
51
  }
@@ -45,7 +45,7 @@ const serializers = __importStar(require("../../../../serialization/index"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const errors = __importStar(require("../../../../errors/index"));
47
47
  class MetricDefinitions {
48
- constructor(_options) {
48
+ constructor(_options = {}) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -69,7 +69,7 @@ class MetricDefinitions {
69
69
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
70
70
  .predict, `v1/metric-definitions/${encodeURIComponent(id)}/execute`),
71
71
  method: "POST",
72
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
72
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
73
73
  contentType: "application/json",
74
74
  requestType: "json",
75
75
  body: serializers.ExecuteMetricDefinition.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -121,7 +121,7 @@ class MetricDefinitions {
121
121
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
122
122
  .default, `v1/metric-definitions/${encodeURIComponent(id)}/history/${encodeURIComponent(historyIdOrReleaseTag)}`),
123
123
  method: "GET",
124
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
124
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
125
125
  contentType: "application/json",
126
126
  requestType: "json",
127
127
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -7,7 +7,7 @@ import * as Vellum from "../../../index";
7
7
  export declare namespace MlModels {
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
  /** The maximum time to wait for a response in seconds. */
@@ -20,7 +20,7 @@ export declare namespace MlModels {
20
20
  }
21
21
  export declare class MlModels {
22
22
  protected readonly _options: MlModels.Options;
23
- constructor(_options: MlModels.Options);
23
+ constructor(_options?: MlModels.Options);
24
24
  /**
25
25
  * Retrieve details about an ML Model
26
26
  *
@@ -32,6 +32,6 @@ export declare class MlModels {
32
32
  */
33
33
  retrieve(id: string, requestOptions?: MlModels.RequestOptions): Promise<Vellum.MlModelRead>;
34
34
  protected _getCustomAuthorizationHeaders(): Promise<{
35
- X_API_KEY: string;
35
+ X_API_KEY: string | undefined;
36
36
  }>;
37
37
  }
@@ -45,7 +45,7 @@ const url_join_1 = __importDefault(require("url-join"));
45
45
  const serializers = __importStar(require("../../../../serialization/index"));
46
46
  const errors = __importStar(require("../../../../errors/index"));
47
47
  class MlModels {
48
- constructor(_options) {
48
+ constructor(_options = {}) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -64,7 +64,7 @@ class MlModels {
64
64
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
65
65
  .default, `v1/ml-models/${encodeURIComponent(id)}`),
66
66
  method: "GET",
67
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
67
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
68
68
  contentType: "application/json",
69
69
  requestType: "json",
70
70
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
@@ -0,0 +1,36 @@
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 "../../../index";
7
+ export declare namespace Organizations {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
+ }
12
+ interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
14
+ timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
16
+ maxRetries?: number;
17
+ /** A hook to abort the request. */
18
+ abortSignal?: AbortSignal;
19
+ }
20
+ }
21
+ export declare class Organizations {
22
+ protected readonly _options: Organizations.Options;
23
+ constructor(_options?: Organizations.Options);
24
+ /**
25
+ * Retrieves information about the active Organization
26
+ *
27
+ * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @example
30
+ * await client.organizations.organizationIdentity()
31
+ */
32
+ organizationIdentity(requestOptions?: Organizations.RequestOptions): Promise<Vellum.OrganizationRead>;
33
+ protected _getCustomAuthorizationHeaders(): Promise<{
34
+ X_API_KEY: string | undefined;
35
+ }>;
36
+ }
@@ -0,0 +1,109 @@
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.Organizations = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const url_join_1 = __importDefault(require("url-join"));
45
+ const serializers = __importStar(require("../../../../serialization/index"));
46
+ const errors = __importStar(require("../../../../errors/index"));
47
+ class Organizations {
48
+ constructor(_options = {}) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * Retrieves information about the active Organization
53
+ *
54
+ * @param {Organizations.RequestOptions} requestOptions - Request-specific configuration.
55
+ *
56
+ * @example
57
+ * await client.organizations.organizationIdentity()
58
+ */
59
+ organizationIdentity(requestOptions) {
60
+ var _a;
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const _response = yield core.fetcher({
63
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
64
+ .default, "v1/organizations/identity"),
65
+ method: "GET",
66
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
67
+ contentType: "application/json",
68
+ requestType: "json",
69
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
70
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
71
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
72
+ });
73
+ if (_response.ok) {
74
+ return serializers.OrganizationRead.parseOrThrow(_response.body, {
75
+ unrecognizedObjectKeys: "passthrough",
76
+ allowUnrecognizedUnionMembers: true,
77
+ allowUnrecognizedEnumValues: true,
78
+ breadcrumbsPrefix: ["response"],
79
+ });
80
+ }
81
+ if (_response.error.reason === "status-code") {
82
+ throw new errors.VellumError({
83
+ statusCode: _response.error.statusCode,
84
+ body: _response.error.body,
85
+ });
86
+ }
87
+ switch (_response.error.reason) {
88
+ case "non-json":
89
+ throw new errors.VellumError({
90
+ statusCode: _response.error.statusCode,
91
+ body: _response.error.rawBody,
92
+ });
93
+ case "timeout":
94
+ throw new errors.VellumTimeoutError();
95
+ case "unknown":
96
+ throw new errors.VellumError({
97
+ message: _response.error.errorMessage,
98
+ });
99
+ }
100
+ });
101
+ }
102
+ _getCustomAuthorizationHeaders() {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
105
+ return { X_API_KEY: apiKeyValue };
106
+ });
107
+ }
108
+ }
109
+ exports.Organizations = Organizations;
@@ -0,0 +1 @@
1
+ export {};
@@ -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);
@@ -7,7 +7,7 @@ import * as Vellum from "../../../index";
7
7
  export declare namespace Sandboxes {
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
  /** The maximum time to wait for a response in seconds. */
@@ -20,7 +20,7 @@ export declare namespace Sandboxes {
20
20
  }
21
21
  export declare class Sandboxes {
22
22
  protected readonly _options: Sandboxes.Options;
23
- constructor(_options: Sandboxes.Options);
23
+ constructor(_options?: Sandboxes.Options);
24
24
  /**
25
25
  * @param {string} id - A UUID string identifying this sandbox.
26
26
  * @param {string} promptVariantId - An ID identifying the Prompt you'd like to deploy.
@@ -87,6 +87,6 @@ export declare class Sandboxes {
87
87
  */
88
88
  deleteSandboxScenario(id: string, scenarioId: string, requestOptions?: Sandboxes.RequestOptions): Promise<void>;
89
89
  protected _getCustomAuthorizationHeaders(): Promise<{
90
- X_API_KEY: string;
90
+ X_API_KEY: string | undefined;
91
91
  }>;
92
92
  }
@@ -45,7 +45,7 @@ const serializers = __importStar(require("../../../../serialization/index"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const errors = __importStar(require("../../../../errors/index"));
47
47
  class Sandboxes {
48
- constructor(_options) {
48
+ constructor(_options = {}) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -64,7 +64,7 @@ class Sandboxes {
64
64
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
65
65
  .default, `v1/sandboxes/${encodeURIComponent(id)}/prompts/${encodeURIComponent(promptVariantId)}/deploy`),
66
66
  method: "POST",
67
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
67
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
68
68
  contentType: "application/json",
69
69
  requestType: "json",
70
70
  body: serializers.DeploySandboxPromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -151,7 +151,7 @@ class Sandboxes {
151
151
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
152
152
  .default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios`),
153
153
  method: "POST",
154
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
154
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
155
155
  contentType: "application/json",
156
156
  requestType: "json",
157
157
  body: serializers.UpsertSandboxScenarioRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -205,7 +205,7 @@ class Sandboxes {
205
205
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
206
206
  .default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios/${encodeURIComponent(scenarioId)}`),
207
207
  method: "DELETE",
208
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.12.17", "User-Agent": "vellum-ai/0.12.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
208
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.13.0", "User-Agent": "vellum-ai/0.13.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
209
209
  contentType: "application/json",
210
210
  requestType: "json",
211
211
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,