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 Oct 15, 2024
1 parent 0a51e9b commit 4926958
Show file tree
Hide file tree
Showing 114 changed files with 2,573 additions and 238 deletions.
14 changes: 14 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import * as environments from "./environments";
import * as core from "./core";
import { Document } from "./api/resources/document/client/Client";
import { Memory } from "./api/resources/memory/client/Client";
import { Graph } from "./api/resources/graph/client/Client";
import { Group } from "./api/resources/group/client/Client";
import { User } from "./api/resources/user/client/Client";

export declare namespace ZepClient {
Expand Down Expand Up @@ -37,6 +39,18 @@ export class ZepClient {
return (this._memory ??= new Memory(this._options));
}

protected _graph: Graph | undefined;

public get graph(): Graph {
return (this._graph ??= new Graph(this._options));
}

protected _group: Group | undefined;

public get group(): Group {
return (this._group ??= new Group(this._options));
}

protected _user: User | undefined;

public get user(): User {
Expand Down
54 changes: 26 additions & 28 deletions src/api/resources/document/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export class Document {
* @example
* await zep.document.listCollections()
*/
public async listCollections(
requestOptions?: Document.RequestOptions
): Promise<Zep.DocumentCollectionResponse[][]> {
public async listCollections(requestOptions?: Document.RequestOptions): Promise<Zep.ApidataDocumentCollection[][]> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.ZepEnvironment.Default,
Expand All @@ -49,7 +47,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -131,7 +129,7 @@ export class Document {
public async getCollection(
collectionName: string,
requestOptions?: Document.RequestOptions
): Promise<Zep.DocumentCollectionResponse> {
): Promise<Zep.ApidataDocumentCollection> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.ZepEnvironment.Default,
Expand All @@ -141,7 +139,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand All @@ -152,7 +150,7 @@ export class Document {
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return await serializers.DocumentCollectionResponse.parseOrThrow(_response.body, {
return await serializers.ApidataDocumentCollection.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
Expand Down Expand Up @@ -255,7 +253,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -370,7 +368,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -484,7 +482,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -592,7 +590,7 @@ export class Document {
collectionName: string,
request: Zep.CreateDocumentRequest[],
requestOptions?: Document.RequestOptions
): Promise<string[]> {
): Promise<string[][]> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.ZepEnvironment.Default,
Expand All @@ -602,7 +600,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -708,7 +706,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -804,7 +802,7 @@ export class Document {
collectionName: string,
request: Zep.GetDocumentListRequest = {},
requestOptions?: Document.RequestOptions
): Promise<Zep.DocumentResponse[]> {
): Promise<Zep.ApidataDocument[][]> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.ZepEnvironment.Default,
Expand All @@ -814,7 +812,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -920,7 +918,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1010,13 +1008,13 @@ export class Document {
* @throws {@link Zep.InternalServerError}
*
* @example
* await zep.document.getsADocumentFromADocumentCollectionByUuid("collectionName", "documentUUID")
* await zep.document.getsADocumentFromADocumentCollectionByUuidCloudOnly("collectionName", "documentUUID")
*/
public async getsADocumentFromADocumentCollectionByUuid(
public async getsADocumentFromADocumentCollectionByUuidCloudOnly(
collectionName: string,
documentUuid: string,
requestOptions?: Document.RequestOptions
): Promise<Zep.DocumentResponse> {
): Promise<Zep.ApidataDocument> {
const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.ZepEnvironment.Default,
Expand All @@ -1026,7 +1024,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand All @@ -1037,7 +1035,7 @@ export class Document {
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return await serializers.DocumentResponse.parseOrThrow(_response.body, {
return await serializers.ApidataDocument.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
Expand Down Expand Up @@ -1130,7 +1128,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1229,9 +1227,9 @@ export class Document {
* @throws {@link Zep.InternalServerError}
*
* @example
* await zep.document.updatesADocument("collectionName", "documentUUID")
* await zep.document.updatesADocumentCloudOnly("collectionName", "documentUUID")
*/
public async updatesADocument(
public async updatesADocumentCloudOnly(
collectionName: string,
documentUuid: string,
request: Zep.UpdateDocumentRequest = {},
Expand All @@ -1246,7 +1244,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1350,7 +1348,7 @@ export class Document {
collectionName: string,
request: Zep.DocumentSearchPayload = {},
requestOptions?: Document.RequestOptions
): Promise<Zep.DocumentSearchResultPage> {
): Promise<Zep.ApidataDocumentSearchResponse> {
const { limit, ..._body } = request;
const _queryParams: Record<string, string | string[] | object | object[]> = {};
if (limit != null) {
Expand All @@ -1366,7 +1364,7 @@ export class Document {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand All @@ -1379,7 +1377,7 @@ export class Document {
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return await serializers.DocumentSearchResultPage.parseOrThrow(_response.body, {
return await serializers.ApidataDocumentSearchResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
Expand Down
Loading

0 comments on commit 4926958

Please sign in to comment.