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.
- package/Client.d.ts +5 -2
- package/Client.js +43 -20
- package/api/resources/deployments/client/Client.d.ts +2 -2
- package/api/resources/deployments/client/Client.js +10 -4
- package/api/resources/documentIndexes/client/Client.d.ts +2 -2
- package/api/resources/documentIndexes/client/Client.js +7 -3
- package/api/resources/documents/client/Client.d.ts +2 -2
- package/api/resources/documents/client/Client.js +13 -5
- package/api/resources/folderEntities/client/Client.d.ts +31 -0
- package/api/resources/folderEntities/client/Client.js +106 -0
- package/api/resources/folderEntities/client/index.d.ts +1 -0
- package/api/resources/folderEntities/client/index.js +17 -0
- package/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +13 -0
- package/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +5 -0
- package/api/resources/folderEntities/client/requests/index.d.ts +1 -0
- package/api/resources/folderEntities/client/requests/index.js +2 -0
- package/api/resources/folderEntities/index.d.ts +1 -0
- package/api/resources/folderEntities/index.js +17 -0
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/modelVersions/client/Client.d.ts +2 -2
- package/api/resources/modelVersions/client/Client.js +4 -2
- package/api/resources/registeredPrompts/client/Client.d.ts +2 -2
- package/api/resources/registeredPrompts/client/Client.js +4 -2
- package/api/resources/sandboxes/client/Client.d.ts +2 -2
- package/api/resources/sandboxes/client/Client.js +7 -3
- package/api/resources/testSuites/client/Client.d.ts +2 -2
- package/api/resources/testSuites/client/Client.js +7 -3
- package/api/resources/workflowDeployments/client/Client.d.ts +2 -2
- package/api/resources/workflowDeployments/client/Client.js +4 -2
- package/core/fetcher/Fetcher.js +8 -1
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +8 -0
- package/core/runtime/runtime.js +82 -0
- package/core/streaming-fetcher/Stream.d.ts +4 -0
- package/core/streaming-fetcher/Stream.js +63 -5
- package/dist/Client.d.ts +5 -2
- package/dist/Client.js +43 -20
- package/dist/api/resources/deployments/client/Client.d.ts +2 -2
- package/dist/api/resources/deployments/client/Client.js +10 -4
- package/dist/api/resources/documentIndexes/client/Client.d.ts +2 -2
- package/dist/api/resources/documentIndexes/client/Client.js +7 -3
- package/dist/api/resources/documents/client/Client.d.ts +2 -2
- package/dist/api/resources/documents/client/Client.js +13 -5
- package/dist/api/resources/folderEntities/client/Client.d.ts +31 -0
- package/dist/api/resources/folderEntities/client/Client.js +106 -0
- package/dist/api/resources/folderEntities/client/index.d.ts +1 -0
- package/dist/api/resources/folderEntities/client/index.js +17 -0
- package/dist/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +13 -0
- package/dist/api/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +5 -0
- package/dist/api/resources/folderEntities/client/requests/index.d.ts +1 -0
- package/dist/api/resources/folderEntities/client/requests/index.js +2 -0
- package/dist/api/resources/folderEntities/index.d.ts +1 -0
- package/dist/api/resources/folderEntities/index.js +17 -0
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/modelVersions/client/Client.d.ts +2 -2
- package/dist/api/resources/modelVersions/client/Client.js +4 -2
- package/dist/api/resources/registeredPrompts/client/Client.d.ts +2 -2
- package/dist/api/resources/registeredPrompts/client/Client.js +4 -2
- package/dist/api/resources/sandboxes/client/Client.d.ts +2 -2
- package/dist/api/resources/sandboxes/client/Client.js +7 -3
- package/dist/api/resources/testSuites/client/Client.d.ts +2 -2
- package/dist/api/resources/testSuites/client/Client.js +7 -3
- package/dist/api/resources/workflowDeployments/client/Client.d.ts +2 -2
- package/dist/api/resources/workflowDeployments/client/Client.js +4 -2
- package/dist/core/fetcher/Fetcher.js +8 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +8 -0
- package/dist/core/runtime/runtime.js +82 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +4 -0
- package/dist/core/streaming-fetcher/Stream.js +63 -5
- package/dist/serialization/resources/folderEntities/client/index.d.ts +1 -0
- package/dist/serialization/resources/folderEntities/client/index.js +17 -0
- package/dist/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +12 -0
- package/dist/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +33 -0
- package/dist/serialization/resources/folderEntities/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/folderEntities/client/requests/index.js +5 -0
- package/dist/serialization/resources/folderEntities/index.d.ts +1 -0
- package/dist/serialization/resources/folderEntities/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/jest.config.js +5 -0
- package/package.json +6 -2
- package/serialization/resources/folderEntities/client/index.d.ts +1 -0
- package/serialization/resources/folderEntities/client/index.js +17 -0
- package/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts +12 -0
- package/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.js +33 -0
- package/serialization/resources/folderEntities/client/requests/index.d.ts +1 -0
- package/serialization/resources/folderEntities/client/requests/index.js +5 -0
- package/serialization/resources/folderEntities/index.d.ts +1 -0
- package/serialization/resources/folderEntities/index.js +17 -0
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/tests/client.test.ts +11 -0
|
@@ -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 WorkflowDeployments {
|
|
48
|
-
constructor(_options) {
|
|
48
|
+
constructor(_options = {}) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
list(request = {}, requestOptions) {
|
|
@@ -73,7 +73,9 @@ class WorkflowDeployments {
|
|
|
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.
|
|
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,
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.fetcher = void 0;
|
|
16
16
|
const form_data_1 = __importDefault(require("form-data"));
|
|
17
17
|
const qs_1 = __importDefault(require("qs"));
|
|
18
|
+
const runtime_1 = require("../runtime");
|
|
18
19
|
const INITIAL_RETRY_DELAY = 1;
|
|
19
20
|
const MAX_RETRY_DELAY = 60;
|
|
20
21
|
const DEFAULT_MAX_RETRIES = 2;
|
|
@@ -40,10 +41,16 @@ function fetcherImpl(args) {
|
|
|
40
41
|
// @ts-expect-error
|
|
41
42
|
body = args.body;
|
|
42
43
|
}
|
|
44
|
+
else if (args.body instanceof Uint8Array) {
|
|
45
|
+
body = args.body;
|
|
46
|
+
}
|
|
43
47
|
else {
|
|
44
48
|
body = JSON.stringify(args.body);
|
|
45
49
|
}
|
|
46
|
-
|
|
50
|
+
// In Node.js environments, the SDK always uses`node-fetch`.
|
|
51
|
+
// If not in Node.js the SDK uses global fetch if available,
|
|
52
|
+
// and falls back to node-fetch.
|
|
53
|
+
const fetchFn = runtime_1.RUNTIME.type === "node" ? require("node-fetch") : typeof fetch == "function" ? fetch : require("node-fetch");
|
|
47
54
|
const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
|
|
48
55
|
const controller = new AbortController();
|
|
49
56
|
let abortId = undefined;
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/index.js
CHANGED
|
@@ -28,5 +28,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.serialization = void 0;
|
|
30
30
|
__exportStar(require("./fetcher"), exports);
|
|
31
|
+
__exportStar(require("./runtime"), exports);
|
|
31
32
|
__exportStar(require("./streaming-fetcher"), exports);
|
|
32
33
|
exports.serialization = __importStar(require("./schemas"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RUNTIME } from "./runtime";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A constant that indicates which environment and version the SDK is running in.
|
|
3
|
+
*/
|
|
4
|
+
export declare const RUNTIME: Runtime;
|
|
5
|
+
export interface Runtime {
|
|
6
|
+
type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown";
|
|
7
|
+
version?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a, _b, _c, _d;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RUNTIME = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* A constant that indicates whether the environment the code is running is a Web Browser.
|
|
7
|
+
*/
|
|
8
|
+
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
9
|
+
/**
|
|
10
|
+
* A constant that indicates whether the environment the code is running is a Web Worker.
|
|
11
|
+
*/
|
|
12
|
+
const isWebWorker = typeof self === "object" &&
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
|
|
15
|
+
(((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" ||
|
|
16
|
+
((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" ||
|
|
17
|
+
((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope");
|
|
18
|
+
/**
|
|
19
|
+
* A constant that indicates whether the environment the code is running is Deno.
|
|
20
|
+
*/
|
|
21
|
+
const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
22
|
+
/**
|
|
23
|
+
* A constant that indicates whether the environment the code is running is Bun.sh.
|
|
24
|
+
*/
|
|
25
|
+
const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
26
|
+
/**
|
|
27
|
+
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
28
|
+
*/
|
|
29
|
+
const isNode = typeof process !== "undefined" &&
|
|
30
|
+
Boolean(process.version) &&
|
|
31
|
+
Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node) &&
|
|
32
|
+
// Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
|
|
33
|
+
!isDeno &&
|
|
34
|
+
!isBun;
|
|
35
|
+
/**
|
|
36
|
+
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
37
|
+
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
38
|
+
*/
|
|
39
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
40
|
+
/**
|
|
41
|
+
* A constant that indicates which environment and version the SDK is running in.
|
|
42
|
+
*/
|
|
43
|
+
exports.RUNTIME = evaluateRuntime();
|
|
44
|
+
function evaluateRuntime() {
|
|
45
|
+
if (isBrowser) {
|
|
46
|
+
return {
|
|
47
|
+
type: "browser",
|
|
48
|
+
version: window.navigator.userAgent,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (isWebWorker) {
|
|
52
|
+
return {
|
|
53
|
+
type: "web-worker",
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (isDeno) {
|
|
57
|
+
return {
|
|
58
|
+
type: "deno",
|
|
59
|
+
version: Deno.version.deno,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (isBun) {
|
|
63
|
+
return {
|
|
64
|
+
type: "bun",
|
|
65
|
+
version: Bun.version,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (isNode) {
|
|
69
|
+
return {
|
|
70
|
+
type: "node",
|
|
71
|
+
version: process.versions.node,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (isReactNative) {
|
|
75
|
+
return {
|
|
76
|
+
type: "react-native",
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
type: "unknown",
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -13,3 +13,7 @@ export declare class Stream<T> implements AsyncIterable<T> {
|
|
|
13
13
|
private iterMessages;
|
|
14
14
|
[Symbol.asyncIterator](): AsyncIterator<T, void, unknown>;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Browser polyfill for ReadableStream
|
|
18
|
+
*/
|
|
19
|
+
export declare function readableStreamAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
3
12
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
4
13
|
var m = o[Symbol.asyncIterator], i;
|
|
@@ -19,7 +28,7 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar
|
|
|
19
28
|
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
20
29
|
};
|
|
21
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Stream = void 0;
|
|
31
|
+
exports.readableStreamAsyncIterable = exports.Stream = void 0;
|
|
23
32
|
class Stream {
|
|
24
33
|
constructor({ stream, parse, terminator, }) {
|
|
25
34
|
this.stream = stream;
|
|
@@ -29,11 +38,21 @@ class Stream {
|
|
|
29
38
|
iterMessages() {
|
|
30
39
|
return __asyncGenerator(this, arguments, function* iterMessages_1() {
|
|
31
40
|
var e_1, _a;
|
|
41
|
+
const decoder = new TextDecoder("utf8");
|
|
42
|
+
const stream = readableStreamAsyncIterable(this.stream);
|
|
32
43
|
let previous = "";
|
|
33
44
|
try {
|
|
34
|
-
for (var
|
|
35
|
-
const chunk =
|
|
36
|
-
|
|
45
|
+
for (var stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield __await(stream_1.next()), !stream_1_1.done;) {
|
|
46
|
+
const chunk = stream_1_1.value;
|
|
47
|
+
let bufferChunk = "";
|
|
48
|
+
// Buffer is present in Node.js environment
|
|
49
|
+
if (typeof Buffer !== "undefined") {
|
|
50
|
+
bufferChunk += Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
51
|
+
}
|
|
52
|
+
// TextDecoder is present in Browser environment
|
|
53
|
+
else if (typeof TextDecoder !== "undefined") {
|
|
54
|
+
bufferChunk += decoder.decode(chunk);
|
|
55
|
+
}
|
|
37
56
|
previous += bufferChunk;
|
|
38
57
|
let terminatorIndex;
|
|
39
58
|
while ((terminatorIndex = previous.indexOf(this.terminator)) >= 0) {
|
|
@@ -47,7 +66,7 @@ class Stream {
|
|
|
47
66
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
48
67
|
finally {
|
|
49
68
|
try {
|
|
50
|
-
if (
|
|
69
|
+
if (stream_1_1 && !stream_1_1.done && (_a = stream_1.return)) yield __await(_a.call(stream_1));
|
|
51
70
|
}
|
|
52
71
|
finally { if (e_1) throw e_1.error; }
|
|
53
72
|
}
|
|
@@ -73,3 +92,42 @@ class Stream {
|
|
|
73
92
|
}
|
|
74
93
|
}
|
|
75
94
|
exports.Stream = Stream;
|
|
95
|
+
/**
|
|
96
|
+
* Browser polyfill for ReadableStream
|
|
97
|
+
*/
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
99
|
+
function readableStreamAsyncIterable(stream) {
|
|
100
|
+
if (stream[Symbol.asyncIterator]) {
|
|
101
|
+
return stream;
|
|
102
|
+
}
|
|
103
|
+
const reader = stream.getReader();
|
|
104
|
+
return {
|
|
105
|
+
next() {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
try {
|
|
108
|
+
const result = yield reader.read();
|
|
109
|
+
if (result === null || result === void 0 ? void 0 : result.done) {
|
|
110
|
+
reader.releaseLock();
|
|
111
|
+
} // release lock when stream becomes closed
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
116
|
+
throw e;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
return() {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const cancelPromise = reader.cancel();
|
|
123
|
+
reader.releaseLock();
|
|
124
|
+
yield cancelPromise;
|
|
125
|
+
return { done: true, value: undefined };
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
[Symbol.asyncIterator]() {
|
|
129
|
+
return this;
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
exports.readableStreamAsyncIterable = readableStreamAsyncIterable;
|
|
@@ -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);
|
package/dist/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../..";
|
|
5
|
+
import * as Vellum from "../../../../../api";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
export declare const AddEntityToFolderRequest: core.serialization.Schema<serializers.AddEntityToFolderRequest.Raw, Vellum.AddEntityToFolderRequest>;
|
|
8
|
+
export declare namespace AddEntityToFolderRequest {
|
|
9
|
+
interface Raw {
|
|
10
|
+
entity_id: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
package/dist/serialization/resources/folderEntities/client/requests/AddEntityToFolderRequest.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.AddEntityToFolderRequest = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../../core"));
|
|
31
|
+
exports.AddEntityToFolderRequest = core.serialization.object({
|
|
32
|
+
entityId: core.serialization.property("entity_id", core.serialization.string()),
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AddEntityToFolderRequest } from "./AddEntityToFolderRequest";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddEntityToFolderRequest = void 0;
|
|
4
|
+
var AddEntityToFolderRequest_1 = require("./AddEntityToFolderRequest");
|
|
5
|
+
Object.defineProperty(exports, "AddEntityToFolderRequest", { enumerable: true, get: function () { return AddEntityToFolderRequest_1.AddEntityToFolderRequest; } });
|
|
@@ -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,6 +7,8 @@ export * as documentIndexes from "./documentIndexes";
|
|
|
7
7
|
export * from "./documentIndexes/client/requests";
|
|
8
8
|
export * as documents from "./documents";
|
|
9
9
|
export * from "./documents/client/requests";
|
|
10
|
+
export * as folderEntities from "./folderEntities";
|
|
11
|
+
export * from "./folderEntities/client/requests";
|
|
10
12
|
export * as registeredPrompts from "./registeredPrompts";
|
|
11
13
|
export * from "./registeredPrompts/client/requests";
|
|
12
14
|
export * as sandboxes from "./sandboxes";
|
|
@@ -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.testSuites = exports.sandboxes = exports.registeredPrompts = exports.documents = exports.documentIndexes = exports.workflowDeployments = exports.deployments = void 0;
|
|
29
|
+
exports.testSuites = exports.sandboxes = exports.registeredPrompts = 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"));
|
|
@@ -36,6 +36,8 @@ exports.documentIndexes = __importStar(require("./documentIndexes"));
|
|
|
36
36
|
__exportStar(require("./documentIndexes/client/requests"), exports);
|
|
37
37
|
exports.documents = __importStar(require("./documents"));
|
|
38
38
|
__exportStar(require("./documents/client/requests"), exports);
|
|
39
|
+
exports.folderEntities = __importStar(require("./folderEntities"));
|
|
40
|
+
__exportStar(require("./folderEntities/client/requests"), exports);
|
|
39
41
|
exports.registeredPrompts = __importStar(require("./registeredPrompts"));
|
|
40
42
|
__exportStar(require("./registeredPrompts/client/requests"), exports);
|
|
41
43
|
exports.sandboxes = __importStar(require("./sandboxes"));
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vellum-ai",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "https://github.com/vellum-ai/vellum-client-node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"format": "prettier --write 'src/**/*.ts'",
|
|
11
11
|
"build": "tsc",
|
|
12
|
-
"prepack": "cp -rv dist/. ."
|
|
12
|
+
"prepack": "cp -rv dist/. .",
|
|
13
|
+
"test": "jest"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|
|
15
16
|
"url-join": "4.0.1",
|
|
@@ -21,6 +22,9 @@
|
|
|
21
22
|
"@types/url-join": "4.0.1",
|
|
22
23
|
"@types/qs": "6.9.8",
|
|
23
24
|
"@types/node-fetch": "2.6.9",
|
|
25
|
+
"jest": "^29.7.0",
|
|
26
|
+
"@types/jest": "^29.5.5",
|
|
27
|
+
"ts-jest": "^29.1.1",
|
|
24
28
|
"@types/node": "17.0.33",
|
|
25
29
|
"prettier": "2.7.1",
|
|
26
30
|
"typescript": "4.6.4"
|
|
@@ -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,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../..";
|
|
5
|
+
import * as Vellum from "../../../../../api";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
export declare const AddEntityToFolderRequest: core.serialization.Schema<serializers.AddEntityToFolderRequest.Raw, Vellum.AddEntityToFolderRequest>;
|
|
8
|
+
export declare namespace AddEntityToFolderRequest {
|
|
9
|
+
interface Raw {
|
|
10
|
+
entity_id: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.AddEntityToFolderRequest = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../../core"));
|
|
31
|
+
exports.AddEntityToFolderRequest = core.serialization.object({
|
|
32
|
+
entityId: core.serialization.property("entity_id", core.serialization.string()),
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AddEntityToFolderRequest } from "./AddEntityToFolderRequest";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddEntityToFolderRequest = void 0;
|
|
4
|
+
var AddEntityToFolderRequest_1 = require("./AddEntityToFolderRequest");
|
|
5
|
+
Object.defineProperty(exports, "AddEntityToFolderRequest", { enumerable: true, get: function () { return AddEntityToFolderRequest_1.AddEntityToFolderRequest; } });
|
|
@@ -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,6 +7,8 @@ export * as documentIndexes from "./documentIndexes";
|
|
|
7
7
|
export * from "./documentIndexes/client/requests";
|
|
8
8
|
export * as documents from "./documents";
|
|
9
9
|
export * from "./documents/client/requests";
|
|
10
|
+
export * as folderEntities from "./folderEntities";
|
|
11
|
+
export * from "./folderEntities/client/requests";
|
|
10
12
|
export * as registeredPrompts from "./registeredPrompts";
|
|
11
13
|
export * from "./registeredPrompts/client/requests";
|
|
12
14
|
export * as sandboxes from "./sandboxes";
|
|
@@ -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.testSuites = exports.sandboxes = exports.registeredPrompts = exports.documents = exports.documentIndexes = exports.workflowDeployments = exports.deployments = void 0;
|
|
29
|
+
exports.testSuites = exports.sandboxes = exports.registeredPrompts = 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"));
|
|
@@ -36,6 +36,8 @@ exports.documentIndexes = __importStar(require("./documentIndexes"));
|
|
|
36
36
|
__exportStar(require("./documentIndexes/client/requests"), exports);
|
|
37
37
|
exports.documents = __importStar(require("./documents"));
|
|
38
38
|
__exportStar(require("./documents/client/requests"), exports);
|
|
39
|
+
exports.folderEntities = __importStar(require("./folderEntities"));
|
|
40
|
+
__exportStar(require("./folderEntities/client/requests"), exports);
|
|
39
41
|
exports.registeredPrompts = __importStar(require("./registeredPrompts"));
|
|
40
42
|
__exportStar(require("./registeredPrompts/client/requests"), exports);
|
|
41
43
|
exports.sandboxes = __importStar(require("./sandboxes"));
|