Skip to content

Commit da37beb

Browse files
committed
SDK regeneration
1 parent a0dd9e5 commit da37beb

File tree

16 files changed

+137
-22
lines changed

16 files changed

+137
-22
lines changed

reference.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ await client.graph.add({
10951095
</dl>
10961096
</details>
10971097

1098-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">addBatch</a>({ ...params }) -> Zep.Episode</code></summary>
1098+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">addBatch</a>({ ...params }) -> Zep.Episode[]</code></summary>
10991099
<dl>
11001100
<dd>
11011101

@@ -1124,8 +1124,12 @@ Add data to the graph in batch mode (each episode processed concurrently). Note:
11241124

11251125
```typescript
11261126
await client.graph.addBatch({
1127-
data: "data",
1128-
type: "text",
1127+
episodes: [
1128+
{
1129+
data: "data",
1130+
type: "text",
1131+
},
1132+
],
11291133
});
11301134
```
11311135

@@ -1142,7 +1146,7 @@ await client.graph.addBatch({
11421146
<dl>
11431147
<dd>
11441148

1145-
**request:** `Zep.AddDataRequest`
1149+
**request:** `Zep.AddDataBatchRequest`
11461150

11471151
</dd>
11481152
</dl>

src/api/resources/graph/client/Client.ts

+11-6
Original file line numberDiff line numberDiff line change
@@ -330,19 +330,24 @@ export class Graph {
330330
/**
331331
* Add data to the graph in batch mode (each episode processed concurrently). Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
332332
*
333-
* @param {Zep.AddDataRequest} request
333+
* @param {Zep.AddDataBatchRequest} request
334334
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
335335
*
336336
* @throws {@link Zep.BadRequestError}
337337
* @throws {@link Zep.InternalServerError}
338338
*
339339
* @example
340340
* await client.graph.addBatch({
341-
* data: "data",
342-
* type: "text"
341+
* episodes: [{
342+
* data: "data",
343+
* type: "text"
344+
* }]
343345
* })
344346
*/
345-
public async addBatch(request: Zep.AddDataRequest, requestOptions?: Graph.RequestOptions): Promise<Zep.Episode> {
347+
public async addBatch(
348+
request: Zep.AddDataBatchRequest,
349+
requestOptions?: Graph.RequestOptions,
350+
): Promise<Zep.Episode[]> {
346351
const _response = await (this._options.fetcher ?? core.fetcher)({
347352
url: urlJoin(
348353
(await core.Supplier.get(this._options.environment)) ?? environments.ZepEnvironment.Default,
@@ -361,13 +366,13 @@ export class Graph {
361366
},
362367
contentType: "application/json",
363368
requestType: "json",
364-
body: serializers.AddDataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
369+
body: serializers.AddDataBatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
365370
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
366371
maxRetries: requestOptions?.maxRetries,
367372
abortSignal: requestOptions?.abortSignal,
368373
});
369374
if (_response.ok) {
370-
return serializers.Episode.parseOrThrow(_response.body, {
375+
return serializers.graph.addBatch.Response.parseOrThrow(_response.body, {
371376
unrecognizedObjectKeys: "passthrough",
372377
allowUnrecognizedUnionMembers: true,
373378
allowUnrecognizedEnumValues: true,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Zep from "../../../../index";
6+
7+
/**
8+
* @example
9+
* {
10+
* episodes: [{
11+
* data: "data",
12+
* type: "text"
13+
* }]
14+
* }
15+
*/
16+
export interface AddDataBatchRequest {
17+
episodes: Zep.EpisodeData[];
18+
groupId?: string;
19+
userId?: string;
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Zep from "../../../../index";
6+
7+
/**
8+
* @example
9+
* {
10+
* data: "data",
11+
* type: "text"
12+
* }
13+
*/
14+
export interface AddDataRequest {
15+
data: string;
16+
groupId?: string;
17+
sourceDescription?: string;
18+
type: Zep.GraphDataType;
19+
userId?: string;
20+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export { type EntityTypeRequest } from "./EntityTypeRequest";
2+
export { type AddDataRequest } from "./AddDataRequest";
3+
export { type AddDataBatchRequest } from "./AddDataBatchRequest";
24
export { type AddTripleRequest } from "./AddTripleRequest";
35
export { type GraphSearchQuery } from "./GraphSearchQuery";

src/api/types/AddDataRequest.ts renamed to src/api/types/EpisodeData.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
import * as Zep from "../index";
66

7-
export interface AddDataRequest {
7+
export interface EpisodeData {
88
data: string;
9-
groupId?: string;
109
sourceDescription?: string;
1110
type: Zep.GraphDataType;
12-
userId?: string;
1311
}

src/api/types/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./ApiError";
2-
export * from "./AddDataRequest";
32
export * from "./AddMemoryResponse";
43
export * from "./ApidataDocument";
54
export * from "./ApidataDocumentCollection";
@@ -10,6 +9,7 @@ export * from "./EndSessionsResponse";
109
export * from "./EntityProperty";
1110
export * from "./EntityType";
1211
export * from "./EntityTypeResponse";
12+
export * from "./EpisodeData";
1313
export * from "./Fact";
1414
export * from "./FactRatingInstruction";
1515
export * from "./FactResponse";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as serializers from "../../../index";
6+
import * as Zep from "../../../../api/index";
7+
import * as core from "../../../../core";
8+
import { Episode } from "../../../types/Episode";
9+
10+
export const Response: core.serialization.Schema<serializers.graph.addBatch.Response.Raw, Zep.Episode[]> =
11+
core.serialization.list(Episode);
12+
13+
export declare namespace Response {
14+
export type Raw = Episode.Raw[];
15+
}
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
export * as addBatch from "./addBatch";
12
export * from "./requests";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as serializers from "../../../../index";
6+
import * as Zep from "../../../../../api/index";
7+
import * as core from "../../../../../core";
8+
import { EpisodeData } from "../../../../types/EpisodeData";
9+
10+
export const AddDataBatchRequest: core.serialization.Schema<
11+
serializers.AddDataBatchRequest.Raw,
12+
Zep.AddDataBatchRequest
13+
> = core.serialization.object({
14+
episodes: core.serialization.list(EpisodeData),
15+
groupId: core.serialization.property("group_id", core.serialization.string().optional()),
16+
userId: core.serialization.property("user_id", core.serialization.string().optional()),
17+
});
18+
19+
export declare namespace AddDataBatchRequest {
20+
export interface Raw {
21+
episodes: EpisodeData.Raw[];
22+
group_id?: string | null;
23+
user_id?: string | null;
24+
}
25+
}

src/serialization/types/AddDataRequest.ts renamed to src/serialization/resources/graph/client/requests/AddDataRequest.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5-
import * as serializers from "../index";
6-
import * as Zep from "../../api/index";
7-
import * as core from "../../core";
8-
import { GraphDataType } from "./GraphDataType";
5+
import * as serializers from "../../../../index";
6+
import * as Zep from "../../../../../api/index";
7+
import * as core from "../../../../../core";
8+
import { GraphDataType } from "../../../../types/GraphDataType";
99

10-
export const AddDataRequest: core.serialization.ObjectSchema<serializers.AddDataRequest.Raw, Zep.AddDataRequest> =
10+
export const AddDataRequest: core.serialization.Schema<serializers.AddDataRequest.Raw, Zep.AddDataRequest> =
1111
core.serialization.object({
1212
data: core.serialization.string(),
1313
groupId: core.serialization.property("group_id", core.serialization.string().optional()),
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export { EntityTypeRequest } from "./EntityTypeRequest";
2+
export { AddDataRequest } from "./AddDataRequest";
3+
export { AddDataBatchRequest } from "./AddDataBatchRequest";
24
export { AddTripleRequest } from "./AddTripleRequest";
35
export { GraphSearchQuery } from "./GraphSearchQuery";
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from "./resources";
21
export * from "./client";
2+
export * from "./resources";

src/serialization/resources/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export * as document from "./document";
2+
export * as graph from "./graph";
23
export * as memory from "./memory";
34
export * as user from "./user";
4-
export * as graph from "./graph";
55
export * from "./document/client/requests";
66
export * from "./graph/client/requests";
77
export * from "./memory/client/requests";
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as serializers from "../index";
6+
import * as Zep from "../../api/index";
7+
import * as core from "../../core";
8+
import { GraphDataType } from "./GraphDataType";
9+
10+
export const EpisodeData: core.serialization.ObjectSchema<serializers.EpisodeData.Raw, Zep.EpisodeData> =
11+
core.serialization.object({
12+
data: core.serialization.string(),
13+
sourceDescription: core.serialization.property("source_description", core.serialization.string().optional()),
14+
type: GraphDataType,
15+
});
16+
17+
export declare namespace EpisodeData {
18+
export interface Raw {
19+
data: string;
20+
source_description?: string | null;
21+
type: GraphDataType.Raw;
22+
}
23+
}

src/serialization/types/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./ApiError";
2-
export * from "./AddDataRequest";
32
export * from "./AddMemoryResponse";
43
export * from "./ApidataDocument";
54
export * from "./ApidataDocumentCollection";
@@ -10,6 +9,7 @@ export * from "./EndSessionsResponse";
109
export * from "./EntityProperty";
1110
export * from "./EntityType";
1211
export * from "./EntityTypeResponse";
12+
export * from "./EpisodeData";
1313
export * from "./Fact";
1414
export * from "./FactRatingInstruction";
1515
export * from "./FactResponse";

0 commit comments

Comments
 (0)