Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Feb 11, 2025
1 parent aefd6ed commit ec02356
Show file tree
Hide file tree
Showing 18 changed files with 123 additions and 417 deletions.
67 changes: 0 additions & 67 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2502,73 +2502,6 @@ await client.graph.add();
</dl>
</details>

<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">addFactTriple</a>({ ...params }) -> Zep.AddTripleResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Add a fact triple for a user or group

</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.graph.addFactTriple({
fact: "fact",
factName: "fact_name",
targetNodeName: "target_node_name",
});
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Zep.AddTripleRequest`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Graph.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">search</a>({ ...params }) -> Zep.GraphSearchResults</code></summary>
<dl>
<dd>
Expand Down
52 changes: 26 additions & 26 deletions src/api/resources/document/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -147,8 +147,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -264,8 +264,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -380,8 +380,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -497,8 +497,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -616,8 +616,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -725,8 +725,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -836,8 +836,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -947,8 +947,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1058,8 +1058,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1167,8 +1167,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1288,8 +1288,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1413,8 +1413,8 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
106 changes: 4 additions & 102 deletions src/api/resources/graph/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export class Graph {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -144,104 +144,6 @@ export class Graph {
}
}

/**
* Add a fact triple for a user or group
*
* @param {Zep.AddTripleRequest} request
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Zep.BadRequestError}
* @throws {@link Zep.InternalServerError}
*
* @example
* await client.graph.addFactTriple({
* fact: "fact",
* factName: "fact_name",
* targetNodeName: "target_node_name"
* })
*/
public async addFactTriple(
request: Zep.AddTripleRequest,
requestOptions?: Graph.RequestOptions,
): Promise<Zep.AddTripleResponse> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.ZepEnvironment.Default,
"graph/add-fact-triple",
),
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
body: serializers.AddTripleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
maxRetries: requestOptions?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return serializers.AddTripleResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
});
}

if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 400:
throw new Zep.BadRequestError(
serializers.ApiError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
);
case 500:
throw new Zep.InternalServerError(
serializers.ApiError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
);
default:
throw new errors.ZepError({
statusCode: _response.error.statusCode,
body: _response.error.body,
});
}
}

switch (_response.error.reason) {
case "non-json":
throw new errors.ZepError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
});
case "timeout":
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/add-fact-triple.");
case "unknown":
throw new errors.ZepError({
message: _response.error.errorMessage,
});
}
}

/**
* Perform a graph search query.
*
Expand Down Expand Up @@ -269,8 +171,8 @@ export class Graph {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.4.0",
"User-Agent": "zep-cloud/2.4.0",
"X-Fern-SDK-Version": "2.3.0",
"User-Agent": "zep-cloud/2.3.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
42 changes: 0 additions & 42 deletions src/api/resources/graph/client/requests/AddTripleRequest.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/api/resources/graph/client/requests/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { type AddDataRequest } from "./AddDataRequest";
export { type AddTripleRequest } from "./AddTripleRequest";
export { type GraphSearchQuery } from "./GraphSearchQuery";
Loading

0 comments on commit ec02356

Please sign in to comment.