@getzep/zep-cloud 3.12.0 → 3.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.
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +11 -6
- package/dist/cjs/api/resources/graph/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/graph/client/Client.js +1 -0
- package/dist/cjs/api/resources/graph/client/requests/AddTripleRequest.d.ts +2 -1
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +2 -1
- package/dist/cjs/api/resources/task/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/task/client/Client.js +148 -0
- package/dist/cjs/api/resources/task/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/task/client/index.js +2 -0
- package/dist/cjs/api/resources/task/index.d.ts +1 -0
- package/dist/cjs/api/resources/task/index.js +17 -0
- package/dist/cjs/api/types/AddThreadMessagesResponse.d.ts +1 -0
- package/dist/cjs/api/types/AddTripleResponse.d.ts +2 -0
- package/dist/cjs/api/types/CloneGraphResponse.d.ts +2 -0
- package/dist/cjs/api/types/Episode.d.ts +2 -0
- package/dist/cjs/api/types/GetTaskResponse.d.ts +15 -0
- package/dist/cjs/api/types/GetTaskResponse.js +5 -0
- package/dist/cjs/api/types/TaskErrorResponse.d.ts +8 -0
- package/dist/cjs/api/types/TaskErrorResponse.js +5 -0
- package/dist/cjs/api/types/TaskProgress.d.ts +7 -0
- package/dist/cjs/api/types/TaskProgress.js +5 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +1 -1
- package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.js +1 -1
- package/dist/cjs/serialization/types/AddThreadMessagesResponse.d.ts +1 -0
- package/dist/cjs/serialization/types/AddThreadMessagesResponse.js +1 -0
- package/dist/cjs/serialization/types/AddTripleResponse.d.ts +1 -0
- package/dist/cjs/serialization/types/AddTripleResponse.js +1 -0
- package/dist/cjs/serialization/types/CloneGraphResponse.d.ts +1 -0
- package/dist/cjs/serialization/types/CloneGraphResponse.js +1 -0
- package/dist/cjs/serialization/types/Episode.d.ts +1 -0
- package/dist/cjs/serialization/types/Episode.js +1 -0
- package/dist/cjs/serialization/types/GetTaskResponse.d.ts +22 -0
- package/dist/cjs/serialization/types/GetTaskResponse.js +53 -0
- package/dist/cjs/serialization/types/TaskErrorResponse.d.ts +14 -0
- package/dist/cjs/serialization/types/TaskErrorResponse.js +45 -0
- package/dist/cjs/serialization/types/TaskProgress.d.ts +13 -0
- package/dist/cjs/serialization/types/TaskProgress.js +44 -0
- package/dist/cjs/serialization/types/index.d.ts +3 -0
- package/dist/cjs/serialization/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/graph/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/graph/client/Client.mjs +1 -0
- package/dist/esm/api/resources/graph/client/requests/AddTripleRequest.d.mts +2 -1
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/task/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/task/client/Client.mjs +111 -0
- package/dist/esm/api/resources/task/client/index.d.mts +1 -0
- package/dist/esm/api/resources/task/client/index.mjs +1 -0
- package/dist/esm/api/resources/task/index.d.mts +1 -0
- package/dist/esm/api/resources/task/index.mjs +1 -0
- package/dist/esm/api/types/AddThreadMessagesResponse.d.mts +1 -0
- package/dist/esm/api/types/AddTripleResponse.d.mts +2 -0
- package/dist/esm/api/types/CloneGraphResponse.d.mts +2 -0
- package/dist/esm/api/types/Episode.d.mts +2 -0
- package/dist/esm/api/types/GetTaskResponse.d.mts +15 -0
- package/dist/esm/api/types/GetTaskResponse.mjs +4 -0
- package/dist/esm/api/types/TaskErrorResponse.d.mts +8 -0
- package/dist/esm/api/types/TaskErrorResponse.mjs +4 -0
- package/dist/esm/api/types/TaskProgress.d.mts +7 -0
- package/dist/esm/api/types/TaskProgress.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.d.mts +1 -1
- package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.mjs +1 -1
- package/dist/esm/serialization/types/AddThreadMessagesResponse.d.mts +1 -0
- package/dist/esm/serialization/types/AddThreadMessagesResponse.mjs +1 -0
- package/dist/esm/serialization/types/AddTripleResponse.d.mts +1 -0
- package/dist/esm/serialization/types/AddTripleResponse.mjs +1 -0
- package/dist/esm/serialization/types/CloneGraphResponse.d.mts +1 -0
- package/dist/esm/serialization/types/CloneGraphResponse.mjs +1 -0
- package/dist/esm/serialization/types/Episode.d.mts +1 -0
- package/dist/esm/serialization/types/Episode.mjs +1 -0
- package/dist/esm/serialization/types/GetTaskResponse.d.mts +22 -0
- package/dist/esm/serialization/types/GetTaskResponse.mjs +17 -0
- package/dist/esm/serialization/types/TaskErrorResponse.d.mts +14 -0
- package/dist/esm/serialization/types/TaskErrorResponse.mjs +9 -0
- package/dist/esm/serialization/types/TaskProgress.d.mts +13 -0
- package/dist/esm/serialization/types/TaskProgress.mjs +8 -0
- package/dist/esm/serialization/types/index.d.mts +3 -0
- package/dist/esm/serialization/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +66 -0
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import * as core from "./core/index.js";
|
|
|
6
6
|
import { Context } from "./api/resources/context/client/Client.js";
|
|
7
7
|
import { Graph } from "./api/resources/graph/client/Client.js";
|
|
8
8
|
import { Project } from "./api/resources/project/client/Client.js";
|
|
9
|
+
import { Task } from "./api/resources/task/client/Client.js";
|
|
9
10
|
import { Thread } from "./api/resources/thread/client/Client.js";
|
|
10
11
|
import { User } from "./api/resources/user/client/Client.js";
|
|
11
12
|
export declare namespace ZepClient {
|
|
@@ -34,12 +35,14 @@ export declare class ZepClient {
|
|
|
34
35
|
protected _context: Context | undefined;
|
|
35
36
|
protected _graph: Graph | undefined;
|
|
36
37
|
protected _project: Project | undefined;
|
|
38
|
+
protected _task: Task | undefined;
|
|
37
39
|
protected _thread: Thread | undefined;
|
|
38
40
|
protected _user: User | undefined;
|
|
39
41
|
constructor(_options?: ZepClient.Options);
|
|
40
42
|
get context(): Context;
|
|
41
43
|
get graph(): Graph;
|
|
42
44
|
get project(): Project;
|
|
45
|
+
get task(): Task;
|
|
43
46
|
get thread(): Thread;
|
|
44
47
|
get user(): User;
|
|
45
48
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -42,15 +42,16 @@ const headers_js_1 = require("./core/headers.js");
|
|
|
42
42
|
const Client_js_1 = require("./api/resources/context/client/Client.js");
|
|
43
43
|
const Client_js_2 = require("./api/resources/graph/client/Client.js");
|
|
44
44
|
const Client_js_3 = require("./api/resources/project/client/Client.js");
|
|
45
|
-
const Client_js_4 = require("./api/resources/
|
|
46
|
-
const Client_js_5 = require("./api/resources/
|
|
45
|
+
const Client_js_4 = require("./api/resources/task/client/Client.js");
|
|
46
|
+
const Client_js_5 = require("./api/resources/thread/client/Client.js");
|
|
47
|
+
const Client_js_6 = require("./api/resources/user/client/Client.js");
|
|
47
48
|
class ZepClient {
|
|
48
49
|
constructor(_options = {}) {
|
|
49
50
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
50
51
|
"X-Fern-Language": "JavaScript",
|
|
51
52
|
"X-Fern-SDK-Name": "zep-cloud",
|
|
52
|
-
"X-Fern-SDK-Version": "3.
|
|
53
|
-
"User-Agent": "zep-cloud/3.
|
|
53
|
+
"X-Fern-SDK-Version": "3.13.0",
|
|
54
|
+
"User-Agent": "zep-cloud/3.13.0",
|
|
54
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
55
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
56
57
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -67,13 +68,17 @@ class ZepClient {
|
|
|
67
68
|
var _a;
|
|
68
69
|
return ((_a = this._project) !== null && _a !== void 0 ? _a : (this._project = new Client_js_3.Project(this._options)));
|
|
69
70
|
}
|
|
71
|
+
get task() {
|
|
72
|
+
var _a;
|
|
73
|
+
return ((_a = this._task) !== null && _a !== void 0 ? _a : (this._task = new Client_js_4.Task(this._options)));
|
|
74
|
+
}
|
|
70
75
|
get thread() {
|
|
71
76
|
var _a;
|
|
72
|
-
return ((_a = this._thread) !== null && _a !== void 0 ? _a : (this._thread = new
|
|
77
|
+
return ((_a = this._thread) !== null && _a !== void 0 ? _a : (this._thread = new Client_js_5.Thread(this._options)));
|
|
73
78
|
}
|
|
74
79
|
get user() {
|
|
75
80
|
var _a;
|
|
76
|
-
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new
|
|
81
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_js_6.User(this._options)));
|
|
77
82
|
}
|
|
78
83
|
}
|
|
79
84
|
exports.ZepClient = ZepClient;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* {
|
|
7
7
|
* fact: "fact",
|
|
8
8
|
* factName: "fact_name",
|
|
9
|
+
* sourceNodeName: "source_node_name",
|
|
9
10
|
* targetNodeName: "target_node_name"
|
|
10
11
|
* }
|
|
11
12
|
*/
|
|
@@ -24,7 +25,7 @@ export interface AddTripleRequest {
|
|
|
24
25
|
/** The time (if any) at which the fact stops being true */
|
|
25
26
|
invalidAt?: string;
|
|
26
27
|
/** The name of the source node to add */
|
|
27
|
-
sourceNodeName
|
|
28
|
+
sourceNodeName: string;
|
|
28
29
|
/** The summary of the source node to add */
|
|
29
30
|
sourceNodeSummary?: string;
|
|
30
31
|
/** The source node uuid */
|
|
@@ -3,6 +3,7 @@ export * from "./thread/types/index.js";
|
|
|
3
3
|
export * as context from "./context/index.js";
|
|
4
4
|
export * as graph from "./graph/index.js";
|
|
5
5
|
export * as project from "./project/index.js";
|
|
6
|
+
export * as task from "./task/index.js";
|
|
6
7
|
export * as user from "./user/index.js";
|
|
7
8
|
export * from "./context/client/requests/index.js";
|
|
8
9
|
export * from "./graph/client/requests/index.js";
|
|
@@ -36,12 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.user = exports.project = exports.graph = exports.context = exports.thread = void 0;
|
|
39
|
+
exports.user = exports.task = exports.project = exports.graph = exports.context = exports.thread = void 0;
|
|
40
40
|
exports.thread = __importStar(require("./thread/index.js"));
|
|
41
41
|
__exportStar(require("./thread/types/index.js"), exports);
|
|
42
42
|
exports.context = __importStar(require("./context/index.js"));
|
|
43
43
|
exports.graph = __importStar(require("./graph/index.js"));
|
|
44
44
|
exports.project = __importStar(require("./project/index.js"));
|
|
45
|
+
exports.task = __importStar(require("./task/index.js"));
|
|
45
46
|
exports.user = __importStar(require("./user/index.js"));
|
|
46
47
|
__exportStar(require("./context/client/requests/index.js"), exports);
|
|
47
48
|
__exportStar(require("./graph/client/requests/index.js"), exports);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../core/index.js";
|
|
6
|
+
import * as Zep from "../../../index.js";
|
|
7
|
+
export declare namespace Task {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ZepEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional headers to include in the request. */
|
|
25
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export declare class Task {
|
|
29
|
+
protected readonly _options: Task.Options;
|
|
30
|
+
constructor(_options?: Task.Options);
|
|
31
|
+
/**
|
|
32
|
+
* Gets a task by its ID
|
|
33
|
+
*
|
|
34
|
+
* @param {string} taskId - Task ID
|
|
35
|
+
* @param {Task.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Zep.NotFoundError}
|
|
38
|
+
* @throws {@link Zep.InternalServerError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.task.get("task_id")
|
|
42
|
+
*/
|
|
43
|
+
get(taskId: string, requestOptions?: Task.RequestOptions): core.HttpResponsePromise<Zep.GetTaskResponse>;
|
|
44
|
+
private __get;
|
|
45
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
46
|
+
Authorization: string;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
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 () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.Task = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
51
|
+
const Zep = __importStar(require("../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
|
+
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
54
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
55
|
+
class Task {
|
|
56
|
+
constructor(_options = {}) {
|
|
57
|
+
this._options = _options;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Gets a task by its ID
|
|
61
|
+
*
|
|
62
|
+
* @param {string} taskId - Task ID
|
|
63
|
+
* @param {Task.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Zep.NotFoundError}
|
|
66
|
+
* @throws {@link Zep.InternalServerError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.task.get("task_id")
|
|
70
|
+
*/
|
|
71
|
+
get(taskId, requestOptions) {
|
|
72
|
+
return core.HttpResponsePromise.fromPromise(this.__get(taskId, requestOptions));
|
|
73
|
+
}
|
|
74
|
+
__get(taskId, requestOptions) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
var _a, _b, _c, _d;
|
|
77
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `tasks/${encodeURIComponent(taskId)}`),
|
|
79
|
+
method: "GET",
|
|
80
|
+
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
84
|
+
});
|
|
85
|
+
if (_response.ok) {
|
|
86
|
+
return {
|
|
87
|
+
data: serializers.GetTaskResponse.parseOrThrow(_response.body, {
|
|
88
|
+
unrecognizedObjectKeys: "passthrough",
|
|
89
|
+
allowUnrecognizedUnionMembers: true,
|
|
90
|
+
allowUnrecognizedEnumValues: true,
|
|
91
|
+
skipValidation: true,
|
|
92
|
+
breadcrumbsPrefix: ["response"],
|
|
93
|
+
}),
|
|
94
|
+
rawResponse: _response.rawResponse,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
if (_response.error.reason === "status-code") {
|
|
98
|
+
switch (_response.error.statusCode) {
|
|
99
|
+
case 404:
|
|
100
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
101
|
+
unrecognizedObjectKeys: "passthrough",
|
|
102
|
+
allowUnrecognizedUnionMembers: true,
|
|
103
|
+
allowUnrecognizedEnumValues: true,
|
|
104
|
+
skipValidation: true,
|
|
105
|
+
breadcrumbsPrefix: ["response"],
|
|
106
|
+
}), _response.rawResponse);
|
|
107
|
+
case 500:
|
|
108
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
109
|
+
unrecognizedObjectKeys: "passthrough",
|
|
110
|
+
allowUnrecognizedUnionMembers: true,
|
|
111
|
+
allowUnrecognizedEnumValues: true,
|
|
112
|
+
skipValidation: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}), _response.rawResponse);
|
|
115
|
+
default:
|
|
116
|
+
throw new errors.ZepError({
|
|
117
|
+
statusCode: _response.error.statusCode,
|
|
118
|
+
body: _response.error.body,
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
switch (_response.error.reason) {
|
|
124
|
+
case "non-json":
|
|
125
|
+
throw new errors.ZepError({
|
|
126
|
+
statusCode: _response.error.statusCode,
|
|
127
|
+
body: _response.error.rawBody,
|
|
128
|
+
rawResponse: _response.rawResponse,
|
|
129
|
+
});
|
|
130
|
+
case "timeout":
|
|
131
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /tasks/{task_id}.");
|
|
132
|
+
case "unknown":
|
|
133
|
+
throw new errors.ZepError({
|
|
134
|
+
message: _response.error.errorMessage,
|
|
135
|
+
rawResponse: _response.rawResponse,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
_getCustomAuthorizationHeaders() {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
var _a;
|
|
143
|
+
const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["ZEP_API_KEY"];
|
|
144
|
+
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.Task = Task;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -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/index.js"), exports);
|
|
@@ -20,6 +20,8 @@ export interface Episode {
|
|
|
20
20
|
score?: number;
|
|
21
21
|
source?: Zep.GraphDataType;
|
|
22
22
|
sourceDescription?: string;
|
|
23
|
+
/** Optional task ID to poll episode processing status. Currently only available for batch ingestion. */
|
|
24
|
+
taskId?: string;
|
|
23
25
|
/** Optional thread ID, will be present if the episode is part of a thread */
|
|
24
26
|
threadId?: string;
|
|
25
27
|
uuid: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Zep from "../index.js";
|
|
5
|
+
export interface GetTaskResponse {
|
|
6
|
+
completedAt?: string;
|
|
7
|
+
createdAt?: string;
|
|
8
|
+
error?: Zep.TaskErrorResponse;
|
|
9
|
+
progress?: Zep.TaskProgress;
|
|
10
|
+
startedAt?: string;
|
|
11
|
+
status?: string;
|
|
12
|
+
taskId?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
updatedAt?: string;
|
|
15
|
+
}
|
|
@@ -12,6 +12,7 @@ export * from "./EpisodeData.js";
|
|
|
12
12
|
export * from "./EpisodeMentions.js";
|
|
13
13
|
export * from "./FactRatingExamples.js";
|
|
14
14
|
export * from "./FactRatingInstruction.js";
|
|
15
|
+
export * from "./GetTaskResponse.js";
|
|
15
16
|
export * from "./Graph.js";
|
|
16
17
|
export * from "./GraphEdgesRequest.js";
|
|
17
18
|
export * from "./Episode.js";
|
|
@@ -25,6 +26,8 @@ export * from "./ProjectInfo.js";
|
|
|
25
26
|
export * from "./ProjectInfoResponse.js";
|
|
26
27
|
export * from "./RoleType.js";
|
|
27
28
|
export * from "./SuccessResponse.js";
|
|
29
|
+
export * from "./TaskErrorResponse.js";
|
|
30
|
+
export * from "./TaskProgress.js";
|
|
28
31
|
export * from "./Thread.js";
|
|
29
32
|
export * from "./ThreadContextResponse.js";
|
|
30
33
|
export * from "./ThreadListResponse.js";
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./EpisodeData.js"), exports);
|
|
|
28
28
|
__exportStar(require("./EpisodeMentions.js"), exports);
|
|
29
29
|
__exportStar(require("./FactRatingExamples.js"), exports);
|
|
30
30
|
__exportStar(require("./FactRatingInstruction.js"), exports);
|
|
31
|
+
__exportStar(require("./GetTaskResponse.js"), exports);
|
|
31
32
|
__exportStar(require("./Graph.js"), exports);
|
|
32
33
|
__exportStar(require("./GraphEdgesRequest.js"), exports);
|
|
33
34
|
__exportStar(require("./Episode.js"), exports);
|
|
@@ -41,6 +42,8 @@ __exportStar(require("./ProjectInfo.js"), exports);
|
|
|
41
42
|
__exportStar(require("./ProjectInfoResponse.js"), exports);
|
|
42
43
|
__exportStar(require("./RoleType.js"), exports);
|
|
43
44
|
__exportStar(require("./SuccessResponse.js"), exports);
|
|
45
|
+
__exportStar(require("./TaskErrorResponse.js"), exports);
|
|
46
|
+
__exportStar(require("./TaskProgress.js"), exports);
|
|
44
47
|
__exportStar(require("./Thread.js"), exports);
|
|
45
48
|
__exportStar(require("./ThreadContextResponse.js"), exports);
|
|
46
49
|
__exportStar(require("./ThreadListResponse.js"), exports);
|
|
@@ -14,7 +14,7 @@ export declare namespace AddTripleRequest {
|
|
|
14
14
|
fact_uuid?: string | null;
|
|
15
15
|
graph_id?: string | null;
|
|
16
16
|
invalid_at?: string | null;
|
|
17
|
-
source_node_name
|
|
17
|
+
source_node_name: string;
|
|
18
18
|
source_node_summary?: string | null;
|
|
19
19
|
source_node_uuid?: string | null;
|
|
20
20
|
target_node_name: string;
|
|
@@ -46,7 +46,7 @@ exports.AddTripleRequest = core.serialization.object({
|
|
|
46
46
|
factUuid: core.serialization.property("fact_uuid", core.serialization.string().optional()),
|
|
47
47
|
graphId: core.serialization.property("graph_id", core.serialization.string().optional()),
|
|
48
48
|
invalidAt: core.serialization.property("invalid_at", core.serialization.string().optional()),
|
|
49
|
-
sourceNodeName: core.serialization.property("source_node_name", core.serialization.string()
|
|
49
|
+
sourceNodeName: core.serialization.property("source_node_name", core.serialization.string()),
|
|
50
50
|
sourceNodeSummary: core.serialization.property("source_node_summary", core.serialization.string().optional()),
|
|
51
51
|
sourceNodeUuid: core.serialization.property("source_node_uuid", core.serialization.string().optional()),
|
|
52
52
|
targetNodeName: core.serialization.property("target_node_name", core.serialization.string()),
|
|
@@ -41,4 +41,5 @@ const core = __importStar(require("../../core/index.js"));
|
|
|
41
41
|
exports.AddThreadMessagesResponse = core.serialization.object({
|
|
42
42
|
context: core.serialization.string().optional(),
|
|
43
43
|
messageUuids: core.serialization.property("message_uuids", core.serialization.list(core.serialization.string()).optional()),
|
|
44
|
+
taskId: core.serialization.property("task_id", core.serialization.string().optional()),
|
|
44
45
|
});
|
|
@@ -44,4 +44,5 @@ exports.AddTripleResponse = core.serialization.object({
|
|
|
44
44
|
edge: EntityEdge_js_1.EntityEdge.optional(),
|
|
45
45
|
sourceNode: core.serialization.property("source_node", EntityNode_js_1.EntityNode.optional()),
|
|
46
46
|
targetNode: core.serialization.property("target_node", EntityNode_js_1.EntityNode.optional()),
|
|
47
|
+
taskId: core.serialization.property("task_id", core.serialization.string().optional()),
|
|
47
48
|
});
|
|
@@ -40,5 +40,6 @@ exports.CloneGraphResponse = void 0;
|
|
|
40
40
|
const core = __importStar(require("../../core/index.js"));
|
|
41
41
|
exports.CloneGraphResponse = core.serialization.object({
|
|
42
42
|
graphId: core.serialization.property("graph_id", core.serialization.string().optional()),
|
|
43
|
+
taskId: core.serialization.property("task_id", core.serialization.string().optional()),
|
|
43
44
|
userId: core.serialization.property("user_id", core.serialization.string().optional()),
|
|
44
45
|
});
|
|
@@ -51,6 +51,7 @@ exports.Episode = core.serialization.object({
|
|
|
51
51
|
score: core.serialization.number().optional(),
|
|
52
52
|
source: GraphDataType_js_1.GraphDataType.optional(),
|
|
53
53
|
sourceDescription: core.serialization.property("source_description", core.serialization.string().optional()),
|
|
54
|
+
taskId: core.serialization.property("task_id", core.serialization.string().optional()),
|
|
54
55
|
threadId: core.serialization.property("thread_id", core.serialization.string().optional()),
|
|
55
56
|
uuid: core.serialization.string(),
|
|
56
57
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index.js";
|
|
5
|
+
import * as Zep from "../../api/index.js";
|
|
6
|
+
import * as core from "../../core/index.js";
|
|
7
|
+
import { TaskErrorResponse } from "./TaskErrorResponse.js";
|
|
8
|
+
import { TaskProgress } from "./TaskProgress.js";
|
|
9
|
+
export declare const GetTaskResponse: core.serialization.ObjectSchema<serializers.GetTaskResponse.Raw, Zep.GetTaskResponse>;
|
|
10
|
+
export declare namespace GetTaskResponse {
|
|
11
|
+
interface Raw {
|
|
12
|
+
completed_at?: string | null;
|
|
13
|
+
created_at?: string | null;
|
|
14
|
+
error?: TaskErrorResponse.Raw | null;
|
|
15
|
+
progress?: TaskProgress.Raw | null;
|
|
16
|
+
started_at?: string | null;
|
|
17
|
+
status?: string | null;
|
|
18
|
+
task_id?: string | null;
|
|
19
|
+
type?: string | null;
|
|
20
|
+
updated_at?: string | null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.GetTaskResponse = void 0;
|
|
40
|
+
const core = __importStar(require("../../core/index.js"));
|
|
41
|
+
const TaskErrorResponse_js_1 = require("./TaskErrorResponse.js");
|
|
42
|
+
const TaskProgress_js_1 = require("./TaskProgress.js");
|
|
43
|
+
exports.GetTaskResponse = core.serialization.object({
|
|
44
|
+
completedAt: core.serialization.property("completed_at", core.serialization.string().optional()),
|
|
45
|
+
createdAt: core.serialization.property("created_at", core.serialization.string().optional()),
|
|
46
|
+
error: TaskErrorResponse_js_1.TaskErrorResponse.optional(),
|
|
47
|
+
progress: TaskProgress_js_1.TaskProgress.optional(),
|
|
48
|
+
startedAt: core.serialization.property("started_at", core.serialization.string().optional()),
|
|
49
|
+
status: core.serialization.string().optional(),
|
|
50
|
+
taskId: core.serialization.property("task_id", core.serialization.string().optional()),
|
|
51
|
+
type: core.serialization.string().optional(),
|
|
52
|
+
updatedAt: core.serialization.property("updated_at", core.serialization.string().optional()),
|
|
53
|
+
});
|