@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.
Files changed (92) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +11 -6
  3. package/dist/cjs/api/resources/graph/client/Client.d.ts +1 -0
  4. package/dist/cjs/api/resources/graph/client/Client.js +1 -0
  5. package/dist/cjs/api/resources/graph/client/requests/AddTripleRequest.d.ts +2 -1
  6. package/dist/cjs/api/resources/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/index.js +2 -1
  8. package/dist/cjs/api/resources/task/client/Client.d.ts +48 -0
  9. package/dist/cjs/api/resources/task/client/Client.js +148 -0
  10. package/dist/cjs/api/resources/task/client/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/task/client/index.js +2 -0
  12. package/dist/cjs/api/resources/task/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/task/index.js +17 -0
  14. package/dist/cjs/api/types/AddThreadMessagesResponse.d.ts +1 -0
  15. package/dist/cjs/api/types/AddTripleResponse.d.ts +2 -0
  16. package/dist/cjs/api/types/CloneGraphResponse.d.ts +2 -0
  17. package/dist/cjs/api/types/Episode.d.ts +2 -0
  18. package/dist/cjs/api/types/GetTaskResponse.d.ts +15 -0
  19. package/dist/cjs/api/types/GetTaskResponse.js +5 -0
  20. package/dist/cjs/api/types/TaskErrorResponse.d.ts +8 -0
  21. package/dist/cjs/api/types/TaskErrorResponse.js +5 -0
  22. package/dist/cjs/api/types/TaskProgress.d.ts +7 -0
  23. package/dist/cjs/api/types/TaskProgress.js +5 -0
  24. package/dist/cjs/api/types/index.d.ts +3 -0
  25. package/dist/cjs/api/types/index.js +3 -0
  26. package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +1 -1
  27. package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.js +1 -1
  28. package/dist/cjs/serialization/types/AddThreadMessagesResponse.d.ts +1 -0
  29. package/dist/cjs/serialization/types/AddThreadMessagesResponse.js +1 -0
  30. package/dist/cjs/serialization/types/AddTripleResponse.d.ts +1 -0
  31. package/dist/cjs/serialization/types/AddTripleResponse.js +1 -0
  32. package/dist/cjs/serialization/types/CloneGraphResponse.d.ts +1 -0
  33. package/dist/cjs/serialization/types/CloneGraphResponse.js +1 -0
  34. package/dist/cjs/serialization/types/Episode.d.ts +1 -0
  35. package/dist/cjs/serialization/types/Episode.js +1 -0
  36. package/dist/cjs/serialization/types/GetTaskResponse.d.ts +22 -0
  37. package/dist/cjs/serialization/types/GetTaskResponse.js +53 -0
  38. package/dist/cjs/serialization/types/TaskErrorResponse.d.ts +14 -0
  39. package/dist/cjs/serialization/types/TaskErrorResponse.js +45 -0
  40. package/dist/cjs/serialization/types/TaskProgress.d.ts +13 -0
  41. package/dist/cjs/serialization/types/TaskProgress.js +44 -0
  42. package/dist/cjs/serialization/types/index.d.ts +3 -0
  43. package/dist/cjs/serialization/types/index.js +3 -0
  44. package/dist/cjs/version.d.ts +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/esm/Client.d.mts +3 -0
  47. package/dist/esm/Client.mjs +7 -2
  48. package/dist/esm/api/resources/graph/client/Client.d.mts +1 -0
  49. package/dist/esm/api/resources/graph/client/Client.mjs +1 -0
  50. package/dist/esm/api/resources/graph/client/requests/AddTripleRequest.d.mts +2 -1
  51. package/dist/esm/api/resources/index.d.mts +1 -0
  52. package/dist/esm/api/resources/index.mjs +1 -0
  53. package/dist/esm/api/resources/task/client/Client.d.mts +48 -0
  54. package/dist/esm/api/resources/task/client/Client.mjs +111 -0
  55. package/dist/esm/api/resources/task/client/index.d.mts +1 -0
  56. package/dist/esm/api/resources/task/client/index.mjs +1 -0
  57. package/dist/esm/api/resources/task/index.d.mts +1 -0
  58. package/dist/esm/api/resources/task/index.mjs +1 -0
  59. package/dist/esm/api/types/AddThreadMessagesResponse.d.mts +1 -0
  60. package/dist/esm/api/types/AddTripleResponse.d.mts +2 -0
  61. package/dist/esm/api/types/CloneGraphResponse.d.mts +2 -0
  62. package/dist/esm/api/types/Episode.d.mts +2 -0
  63. package/dist/esm/api/types/GetTaskResponse.d.mts +15 -0
  64. package/dist/esm/api/types/GetTaskResponse.mjs +4 -0
  65. package/dist/esm/api/types/TaskErrorResponse.d.mts +8 -0
  66. package/dist/esm/api/types/TaskErrorResponse.mjs +4 -0
  67. package/dist/esm/api/types/TaskProgress.d.mts +7 -0
  68. package/dist/esm/api/types/TaskProgress.mjs +4 -0
  69. package/dist/esm/api/types/index.d.mts +3 -0
  70. package/dist/esm/api/types/index.mjs +3 -0
  71. package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.d.mts +1 -1
  72. package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.mjs +1 -1
  73. package/dist/esm/serialization/types/AddThreadMessagesResponse.d.mts +1 -0
  74. package/dist/esm/serialization/types/AddThreadMessagesResponse.mjs +1 -0
  75. package/dist/esm/serialization/types/AddTripleResponse.d.mts +1 -0
  76. package/dist/esm/serialization/types/AddTripleResponse.mjs +1 -0
  77. package/dist/esm/serialization/types/CloneGraphResponse.d.mts +1 -0
  78. package/dist/esm/serialization/types/CloneGraphResponse.mjs +1 -0
  79. package/dist/esm/serialization/types/Episode.d.mts +1 -0
  80. package/dist/esm/serialization/types/Episode.mjs +1 -0
  81. package/dist/esm/serialization/types/GetTaskResponse.d.mts +22 -0
  82. package/dist/esm/serialization/types/GetTaskResponse.mjs +17 -0
  83. package/dist/esm/serialization/types/TaskErrorResponse.d.mts +14 -0
  84. package/dist/esm/serialization/types/TaskErrorResponse.mjs +9 -0
  85. package/dist/esm/serialization/types/TaskProgress.d.mts +13 -0
  86. package/dist/esm/serialization/types/TaskProgress.mjs +8 -0
  87. package/dist/esm/serialization/types/index.d.mts +3 -0
  88. package/dist/esm/serialization/types/index.mjs +3 -0
  89. package/dist/esm/version.d.mts +1 -1
  90. package/dist/esm/version.mjs +1 -1
  91. package/package.json +1 -1
  92. package/reference.md +66 -0
@@ -0,0 +1,14 @@
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
+ export declare const TaskErrorResponse: core.serialization.ObjectSchema<serializers.TaskErrorResponse.Raw, Zep.TaskErrorResponse>;
8
+ export declare namespace TaskErrorResponse {
9
+ interface Raw {
10
+ code?: string | null;
11
+ details?: Record<string, unknown> | null;
12
+ message?: string | null;
13
+ }
14
+ }
@@ -0,0 +1,45 @@
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.TaskErrorResponse = void 0;
40
+ const core = __importStar(require("../../core/index.js"));
41
+ exports.TaskErrorResponse = core.serialization.object({
42
+ code: core.serialization.string().optional(),
43
+ details: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
44
+ message: core.serialization.string().optional(),
45
+ });
@@ -0,0 +1,13 @@
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
+ export declare const TaskProgress: core.serialization.ObjectSchema<serializers.TaskProgress.Raw, Zep.TaskProgress>;
8
+ export declare namespace TaskProgress {
9
+ interface Raw {
10
+ message?: string | null;
11
+ stage?: string | null;
12
+ }
13
+ }
@@ -0,0 +1,44 @@
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.TaskProgress = void 0;
40
+ const core = __importStar(require("../../core/index.js"));
41
+ exports.TaskProgress = core.serialization.object({
42
+ message: core.serialization.string().optional(),
43
+ stage: core.serialization.string().optional(),
44
+ });
@@ -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);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.12.0";
1
+ export declare const SDK_VERSION = "3.13.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.12.0";
4
+ exports.SDK_VERSION = "3.13.0";
@@ -6,6 +6,7 @@ import * as core from "./core/index.mjs";
6
6
  import { Context } from "./api/resources/context/client/Client.mjs";
7
7
  import { Graph } from "./api/resources/graph/client/Client.mjs";
8
8
  import { Project } from "./api/resources/project/client/Client.mjs";
9
+ import { Task } from "./api/resources/task/client/Client.mjs";
9
10
  import { Thread } from "./api/resources/thread/client/Client.mjs";
10
11
  import { User } from "./api/resources/user/client/Client.mjs";
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
  }
@@ -6,6 +6,7 @@ import { mergeHeaders } from "./core/headers.mjs";
6
6
  import { Context } from "./api/resources/context/client/Client.mjs";
7
7
  import { Graph } from "./api/resources/graph/client/Client.mjs";
8
8
  import { Project } from "./api/resources/project/client/Client.mjs";
9
+ import { Task } from "./api/resources/task/client/Client.mjs";
9
10
  import { Thread } from "./api/resources/thread/client/Client.mjs";
10
11
  import { User } from "./api/resources/user/client/Client.mjs";
11
12
  export class ZepClient {
@@ -13,8 +14,8 @@ export class ZepClient {
13
14
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
14
15
  "X-Fern-Language": "JavaScript",
15
16
  "X-Fern-SDK-Name": "zep-cloud",
16
- "X-Fern-SDK-Version": "3.12.0",
17
- "User-Agent": "zep-cloud/3.12.0",
17
+ "X-Fern-SDK-Version": "3.13.0",
18
+ "User-Agent": "zep-cloud/3.13.0",
18
19
  "X-Fern-Runtime": core.RUNTIME.type,
19
20
  "X-Fern-Runtime-Version": core.RUNTIME.version,
20
21
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -31,6 +32,10 @@ export class ZepClient {
31
32
  var _a;
32
33
  return ((_a = this._project) !== null && _a !== void 0 ? _a : (this._project = new Project(this._options)));
33
34
  }
35
+ get task() {
36
+ var _a;
37
+ return ((_a = this._task) !== null && _a !== void 0 ? _a : (this._task = new Task(this._options)));
38
+ }
34
39
  get thread() {
35
40
  var _a;
36
41
  return ((_a = this._thread) !== null && _a !== void 0 ? _a : (this._thread = new Thread(this._options)));
@@ -118,6 +118,7 @@ export declare class Graph {
118
118
  * await client.graph.addFactTriple({
119
119
  * fact: "fact",
120
120
  * factName: "fact_name",
121
+ * sourceNodeName: "source_node_name",
121
122
  * targetNodeName: "target_node_name"
122
123
  * })
123
124
  */
@@ -419,6 +419,7 @@ export class Graph {
419
419
  * await client.graph.addFactTriple({
420
420
  * fact: "fact",
421
421
  * factName: "fact_name",
422
+ * sourceNodeName: "source_node_name",
422
423
  * targetNodeName: "target_node_name"
423
424
  * })
424
425
  */
@@ -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?: string;
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.mjs";
3
3
  export * as context from "./context/index.mjs";
4
4
  export * as graph from "./graph/index.mjs";
5
5
  export * as project from "./project/index.mjs";
6
+ export * as task from "./task/index.mjs";
6
7
  export * as user from "./user/index.mjs";
7
8
  export * from "./context/client/requests/index.mjs";
8
9
  export * from "./graph/client/requests/index.mjs";
@@ -3,6 +3,7 @@ export * from "./thread/types/index.mjs";
3
3
  export * as context from "./context/index.mjs";
4
4
  export * as graph from "./graph/index.mjs";
5
5
  export * as project from "./project/index.mjs";
6
+ export * as task from "./task/index.mjs";
6
7
  export * as user from "./user/index.mjs";
7
8
  export * from "./context/client/requests/index.mjs";
8
9
  export * from "./graph/client/requests/index.mjs";
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.mjs";
5
+ import * as core from "../../../../core/index.mjs";
6
+ import * as Zep from "../../../index.mjs";
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,111 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../environments.mjs";
14
+ import * as core from "../../../../core/index.mjs";
15
+ import * as Zep from "../../../index.mjs";
16
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
+ import * as serializers from "../../../../serialization/index.mjs";
18
+ import * as errors from "../../../../errors/index.mjs";
19
+ export class Task {
20
+ constructor(_options = {}) {
21
+ this._options = _options;
22
+ }
23
+ /**
24
+ * Gets a task by its ID
25
+ *
26
+ * @param {string} taskId - Task ID
27
+ * @param {Task.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Zep.NotFoundError}
30
+ * @throws {@link Zep.InternalServerError}
31
+ *
32
+ * @example
33
+ * await client.task.get("task_id")
34
+ */
35
+ get(taskId, requestOptions) {
36
+ return core.HttpResponsePromise.fromPromise(this.__get(taskId, requestOptions));
37
+ }
38
+ __get(taskId, requestOptions) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ var _a, _b, _c, _d;
41
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
42
+ 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)}`),
43
+ method: "GET",
44
+ headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
45
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
46
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
47
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
48
+ });
49
+ if (_response.ok) {
50
+ return {
51
+ data: serializers.GetTaskResponse.parseOrThrow(_response.body, {
52
+ unrecognizedObjectKeys: "passthrough",
53
+ allowUnrecognizedUnionMembers: true,
54
+ allowUnrecognizedEnumValues: true,
55
+ skipValidation: true,
56
+ breadcrumbsPrefix: ["response"],
57
+ }),
58
+ rawResponse: _response.rawResponse,
59
+ };
60
+ }
61
+ if (_response.error.reason === "status-code") {
62
+ switch (_response.error.statusCode) {
63
+ case 404:
64
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
65
+ unrecognizedObjectKeys: "passthrough",
66
+ allowUnrecognizedUnionMembers: true,
67
+ allowUnrecognizedEnumValues: true,
68
+ skipValidation: true,
69
+ breadcrumbsPrefix: ["response"],
70
+ }), _response.rawResponse);
71
+ case 500:
72
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
73
+ unrecognizedObjectKeys: "passthrough",
74
+ allowUnrecognizedUnionMembers: true,
75
+ allowUnrecognizedEnumValues: true,
76
+ skipValidation: true,
77
+ breadcrumbsPrefix: ["response"],
78
+ }), _response.rawResponse);
79
+ default:
80
+ throw new errors.ZepError({
81
+ statusCode: _response.error.statusCode,
82
+ body: _response.error.body,
83
+ rawResponse: _response.rawResponse,
84
+ });
85
+ }
86
+ }
87
+ switch (_response.error.reason) {
88
+ case "non-json":
89
+ throw new errors.ZepError({
90
+ statusCode: _response.error.statusCode,
91
+ body: _response.error.rawBody,
92
+ rawResponse: _response.rawResponse,
93
+ });
94
+ case "timeout":
95
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /tasks/{task_id}.");
96
+ case "unknown":
97
+ throw new errors.ZepError({
98
+ message: _response.error.errorMessage,
99
+ rawResponse: _response.rawResponse,
100
+ });
101
+ }
102
+ });
103
+ }
104
+ _getCustomAuthorizationHeaders() {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ var _a;
107
+ 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"];
108
+ return { Authorization: `Api-Key ${apiKeyValue}` };
109
+ });
110
+ }
111
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -4,4 +4,5 @@
4
4
  export interface AddThreadMessagesResponse {
5
5
  context?: string;
6
6
  messageUuids?: string[];
7
+ taskId?: string;
7
8
  }
@@ -6,4 +6,6 @@ export interface AddTripleResponse {
6
6
  edge?: Zep.EntityEdge;
7
7
  sourceNode?: Zep.EntityNode;
8
8
  targetNode?: Zep.EntityNode;
9
+ /** Task ID of the add triple task */
10
+ taskId?: string;
9
11
  }
@@ -4,5 +4,7 @@
4
4
  export interface CloneGraphResponse {
5
5
  /** graph_id is the ID of the cloned graph */
6
6
  graphId?: string;
7
+ /** Task ID of the clone graph task */
8
+ taskId?: string;
7
9
  userId?: string;
8
10
  }
@@ -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.mjs";
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
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TaskErrorResponse {
5
+ code?: string;
6
+ details?: Record<string, unknown>;
7
+ message?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TaskProgress {
5
+ message?: string;
6
+ stage?: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -12,6 +12,7 @@ export * from "./EpisodeData.mjs";
12
12
  export * from "./EpisodeMentions.mjs";
13
13
  export * from "./FactRatingExamples.mjs";
14
14
  export * from "./FactRatingInstruction.mjs";
15
+ export * from "./GetTaskResponse.mjs";
15
16
  export * from "./Graph.mjs";
16
17
  export * from "./GraphEdgesRequest.mjs";
17
18
  export * from "./Episode.mjs";
@@ -25,6 +26,8 @@ export * from "./ProjectInfo.mjs";
25
26
  export * from "./ProjectInfoResponse.mjs";
26
27
  export * from "./RoleType.mjs";
27
28
  export * from "./SuccessResponse.mjs";
29
+ export * from "./TaskErrorResponse.mjs";
30
+ export * from "./TaskProgress.mjs";
28
31
  export * from "./Thread.mjs";
29
32
  export * from "./ThreadContextResponse.mjs";
30
33
  export * from "./ThreadListResponse.mjs";
@@ -12,6 +12,7 @@ export * from "./EpisodeData.mjs";
12
12
  export * from "./EpisodeMentions.mjs";
13
13
  export * from "./FactRatingExamples.mjs";
14
14
  export * from "./FactRatingInstruction.mjs";
15
+ export * from "./GetTaskResponse.mjs";
15
16
  export * from "./Graph.mjs";
16
17
  export * from "./GraphEdgesRequest.mjs";
17
18
  export * from "./Episode.mjs";
@@ -25,6 +26,8 @@ export * from "./ProjectInfo.mjs";
25
26
  export * from "./ProjectInfoResponse.mjs";
26
27
  export * from "./RoleType.mjs";
27
28
  export * from "./SuccessResponse.mjs";
29
+ export * from "./TaskErrorResponse.mjs";
30
+ export * from "./TaskProgress.mjs";
28
31
  export * from "./Thread.mjs";
29
32
  export * from "./ThreadContextResponse.mjs";
30
33
  export * from "./ThreadListResponse.mjs";
@@ -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?: string | null;
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;
@@ -10,7 +10,7 @@ export const AddTripleRequest = core.serialization.object({
10
10
  factUuid: core.serialization.property("fact_uuid", core.serialization.string().optional()),
11
11
  graphId: core.serialization.property("graph_id", core.serialization.string().optional()),
12
12
  invalidAt: core.serialization.property("invalid_at", core.serialization.string().optional()),
13
- sourceNodeName: core.serialization.property("source_node_name", core.serialization.string().optional()),
13
+ sourceNodeName: core.serialization.property("source_node_name", core.serialization.string()),
14
14
  sourceNodeSummary: core.serialization.property("source_node_summary", core.serialization.string().optional()),
15
15
  sourceNodeUuid: core.serialization.property("source_node_uuid", core.serialization.string().optional()),
16
16
  targetNodeName: core.serialization.property("target_node_name", core.serialization.string()),
@@ -9,5 +9,6 @@ export declare namespace AddThreadMessagesResponse {
9
9
  interface Raw {
10
10
  context?: string | null;
11
11
  message_uuids?: string[] | null;
12
+ task_id?: string | null;
12
13
  }
13
14
  }
@@ -5,4 +5,5 @@ import * as core from "../../core/index.mjs";
5
5
  export const AddThreadMessagesResponse = core.serialization.object({
6
6
  context: core.serialization.string().optional(),
7
7
  messageUuids: core.serialization.property("message_uuids", core.serialization.list(core.serialization.string()).optional()),
8
+ taskId: core.serialization.property("task_id", core.serialization.string().optional()),
8
9
  });
@@ -12,5 +12,6 @@ export declare namespace AddTripleResponse {
12
12
  edge?: EntityEdge.Raw | null;
13
13
  source_node?: EntityNode.Raw | null;
14
14
  target_node?: EntityNode.Raw | null;
15
+ task_id?: string | null;
15
16
  }
16
17
  }
@@ -8,4 +8,5 @@ export const AddTripleResponse = core.serialization.object({
8
8
  edge: EntityEdge.optional(),
9
9
  sourceNode: core.serialization.property("source_node", EntityNode.optional()),
10
10
  targetNode: core.serialization.property("target_node", EntityNode.optional()),
11
+ taskId: core.serialization.property("task_id", core.serialization.string().optional()),
11
12
  });
@@ -8,6 +8,7 @@ export declare const CloneGraphResponse: core.serialization.ObjectSchema<seriali
8
8
  export declare namespace CloneGraphResponse {
9
9
  interface Raw {
10
10
  graph_id?: string | null;
11
+ task_id?: string | null;
11
12
  user_id?: string | null;
12
13
  }
13
14
  }
@@ -4,5 +4,6 @@
4
4
  import * as core from "../../core/index.mjs";
5
5
  export const CloneGraphResponse = core.serialization.object({
6
6
  graphId: core.serialization.property("graph_id", core.serialization.string().optional()),
7
+ taskId: core.serialization.property("task_id", core.serialization.string().optional()),
7
8
  userId: core.serialization.property("user_id", core.serialization.string().optional()),
8
9
  });