From 168c60e6ca912349c7e216fb667c4cd4545c068f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Aug 2026 01:29:37 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...p.EntityClient.GetEntityEdgesForANode.g.cs | 4 +- .../Zep.EntityClient.GetEpisodesForANode.g.cs | 4 +- ...nAnyNodesAndEdgesMentionedInAnEpisode.g.cs | 4 +- .../Zep.GraphClient.GetSubgraph.g.cs | 654 ++++++++++++++++++ .../Zep.GraphEpisodeClient.ListByGraphId.g.cs | 571 +++++++++++++++ .../Zep.GraphEpisodeClient.ListByUserId.g.cs | 571 +++++++++++++++ .../Zep/Generated/Zep.GraphEpisodeClient.g.cs | 136 ++++ .../Zep.GraphNodeClient.GetNeighbors.g.cs | 620 +++++++++++++++++ .../Zep/Generated/Zep.GraphNodeClient.g.cs | 136 ++++ ....IEntityClient.GetEntityEdgesForANode.g.cs | 4 +- ...Zep.IEntityClient.GetEpisodesForANode.g.cs | 4 +- ...nAnyNodesAndEdgesMentionedInAnEpisode.g.cs | 4 +- .../Zep.IGraphClient.GetSubgraph.g.cs | 85 +++ ...Zep.IGraphEpisodeClient.ListByGraphId.g.cs | 73 ++ .../Zep.IGraphEpisodeClient.ListByUserId.g.cs | 73 ++ .../Generated/Zep.IGraphEpisodeClient.g.cs | 48 ++ .../Zep.IGraphNodeClient.GetNeighbors.g.cs | 84 +++ .../Zep/Generated/Zep.IGraphNodeClient.g.cs | 48 ++ .../Generated/Zep.ISearchClient.Graph.g.cs | 5 +- src/libs/Zep/Generated/Zep.IZepClient.g.cs | 10 + .../Generated/Zep.JsonSerializerContext.g.cs | 7 + .../Zep.JsonSerializerContextTypes.g.cs | 128 ++-- ...s.ApidataGraphEpisodeListRequest.Json.g.cs | 141 ++++ ...Models.ApidataGraphEpisodeListRequest.g.cs | 96 +++ ....Models.ApidataGraphNodeNeighbor.Json.g.cs | 141 ++++ .../Zep.Models.ApidataGraphNodeNeighbor.g.cs | 53 ++ ...ApidataGraphNodeNeighborsRequest.Json.g.cs | 141 ++++ ...dels.ApidataGraphNodeNeighborsRequest.g.cs | 121 ++++ ...dels.ApidataGraphSubgraphRequest.Json.g.cs | 141 ++++ ...ep.Models.ApidataGraphSubgraphRequest.g.cs | 142 ++++ ...els.ApidataGraphSubgraphResponse.Json.g.cs | 141 ++++ ...p.Models.ApidataGraphSubgraphResponse.g.cs | 83 +++ .../Zep.Models.GraphitiEntityEdge.g.cs | 58 ++ .../Zep.Models.GraphitiGraphSearchQuery.g.cs | 10 +- .../Zep.Models.GraphitiSearchFilters.g.cs | 62 ++ .../Zep/Generated/Zep.SearchClient.Graph.g.cs | 5 +- src/libs/Zep/Generated/Zep.ZepClient.g.cs | 18 + src/libs/Zep/openapi.json | 480 ++++++++++++- 38 files changed, 5036 insertions(+), 70 deletions(-) create mode 100644 src/libs/Zep/Generated/Zep.GraphClient.GetSubgraph.g.cs create mode 100644 src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByGraphId.g.cs create mode 100644 src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByUserId.g.cs create mode 100644 src/libs/Zep/Generated/Zep.GraphEpisodeClient.g.cs create mode 100644 src/libs/Zep/Generated/Zep.GraphNodeClient.GetNeighbors.g.cs create mode 100644 src/libs/Zep/Generated/Zep.GraphNodeClient.g.cs create mode 100644 src/libs/Zep/Generated/Zep.IGraphClient.GetSubgraph.g.cs create mode 100644 src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByGraphId.g.cs create mode 100644 src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByUserId.g.cs create mode 100644 src/libs/Zep/Generated/Zep.IGraphEpisodeClient.g.cs create mode 100644 src/libs/Zep/Generated/Zep.IGraphNodeClient.GetNeighbors.g.cs create mode 100644 src/libs/Zep/Generated/Zep.IGraphNodeClient.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.Json.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.Json.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.Json.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.Json.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.Json.g.cs create mode 100644 src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.g.cs diff --git a/src/libs/Zep/Generated/Zep.EntityClient.GetEntityEdgesForANode.g.cs b/src/libs/Zep/Generated/Zep.EntityClient.GetEntityEdgesForANode.g.cs index 24402a2..28fa943 100644 --- a/src/libs/Zep/Generated/Zep.EntityClient.GetEntityEdgesForANode.g.cs +++ b/src/libs/Zep/Generated/Zep.EntityClient.GetEntityEdgesForANode.g.cs @@ -43,7 +43,7 @@ partial void ProcessGetEntityEdgesForANodeResponseContent( /// /// Get Entity Edges for a node
- /// Returns all edges for a node + /// Deprecated. Use edge listing with `filters.connected_node_uuids`, or the neighbors endpoint (`POST /graph/node/{node_uuid}/neighbors`), instead. Returns all edges for a node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -64,7 +64,7 @@ partial void ProcessGetEntityEdgesForANodeResponseContent( } /// /// Get Entity Edges for a node
- /// Returns all edges for a node + /// Deprecated. Use edge listing with `filters.connected_node_uuids`, or the neighbors endpoint (`POST /graph/node/{node_uuid}/neighbors`), instead. Returns all edges for a node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Zep/Generated/Zep.EntityClient.GetEpisodesForANode.g.cs b/src/libs/Zep/Generated/Zep.EntityClient.GetEpisodesForANode.g.cs index 060f2b5..591d7b9 100644 --- a/src/libs/Zep/Generated/Zep.EntityClient.GetEpisodesForANode.g.cs +++ b/src/libs/Zep/Generated/Zep.EntityClient.GetEpisodesForANode.g.cs @@ -43,7 +43,7 @@ partial void ProcessGetEpisodesForANodeResponseContent( /// /// Get Episodes for a node
- /// Returns all episodes that mentioned a given node + /// Deprecated. Use episode listing with `mentioned_node_uuids` (`POST /graph/episodes/graph/{graph_id}` or `POST /graph/episodes/user/{user_id}`) instead. Returns episodes that mentioned a given node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -64,7 +64,7 @@ partial void ProcessGetEpisodesForANodeResponseContent( } /// /// Get Episodes for a node
- /// Returns all episodes that mentioned a given node + /// Deprecated. Use episode listing with `mentioned_node_uuids` (`POST /graph/episodes/graph/{graph_id}` or `POST /graph/episodes/user/{user_id}`) instead. Returns episodes that mentioned a given node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Zep/Generated/Zep.EpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs b/src/libs/Zep/Generated/Zep.EpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs index 30fe313..d667f18 100644 --- a/src/libs/Zep/Generated/Zep.EpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs +++ b/src/libs/Zep/Generated/Zep.EpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs @@ -43,7 +43,7 @@ partial void ProcessReturnAnyNodesAndEdgesMentionedInAnEpisodeResponseContent( /// /// Return any nodes and edges mentioned in an episode
- /// Returns nodes and edges mentioned in an episode + /// Deprecated. Use edge and node listing with `filters.episode_uuids` instead. Returns nodes and edges mentioned in an episode, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -64,7 +64,7 @@ partial void ProcessReturnAnyNodesAndEdgesMentionedInAnEpisodeResponseContent( } /// /// Return any nodes and edges mentioned in an episode
- /// Returns nodes and edges mentioned in an episode + /// Deprecated. Use edge and node listing with `filters.episode_uuids` instead. Returns nodes and edges mentioned in an episode, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Zep/Generated/Zep.GraphClient.GetSubgraph.g.cs b/src/libs/Zep/Generated/Zep.GraphClient.GetSubgraph.g.cs new file mode 100644 index 0000000..3d45925 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.GraphClient.GetSubgraph.g.cs @@ -0,0 +1,654 @@ + +#nullable enable + +namespace Zep +{ + public partial class GraphClient + { + + + private static readonly global::Zep.EndPointSecurityRequirement s_GetSubgraphSecurityRequirement0 = + new global::Zep.EndPointSecurityRequirement + { + Authorizations = new global::Zep.EndPointAuthorizationRequirement[] + { new global::Zep.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Zep.EndPointSecurityRequirement[] s_GetSubgraphSecurityRequirements = + new global::Zep.EndPointSecurityRequirement[] + { s_GetSubgraphSecurityRequirement0, + }; + partial void PrepareGetSubgraphArguments( + global::System.Net.Http.HttpClient httpClient, + global::Zep.ApidataGraphSubgraphRequest request); + partial void PrepareGetSubgraphRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Zep.ApidataGraphSubgraphRequest request); + partial void ProcessGetSubgraphResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSubgraphResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Subgraph
+ /// Returns the bounded neighborhood of a set of seed nodes as a single {nodes, edges} payload: breadth-first expansion up to a caller-specified depth, subject to explicit budgets, with explicit truncation reporting. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetSubgraphAsync( + + global::Zep.ApidataGraphSubgraphRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSubgraphAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Subgraph
+ /// Returns the bounded neighborhood of a set of seed nodes as a single {nodes, edges} payload: breadth-first expansion up to a caller-specified depth, subject to explicit budgets, with explicit truncation reporting. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetSubgraphAsResponseAsync( + + global::Zep.ApidataGraphSubgraphRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareGetSubgraphArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Zep.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSubgraphSecurityRequirements, + operationName: "GetSubgraphAsync"); + + using var __timeoutCancellationTokenSource = global::Zep.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Zep.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Zep.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Zep.PathBuilder( + path: "/graph/subgraph", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Zep.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Zep.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetSubgraphRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Zep.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSubgraph", + methodName: "GetSubgraphAsync", + pathTemplate: "\"/graph/subgraph\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSubgraph", + methodName: "GetSubgraphAsync", + pathTemplate: "\"/graph/subgraph\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Zep.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSubgraph", + methodName: "GetSubgraphAsync", + pathTemplate: "\"/graph/subgraph\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetSubgraphResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSubgraph", + methodName: "GetSubgraphAsync", + pathTemplate: "\"/graph/subgraph\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSubgraph", + methodName: "GetSubgraphAsync", + pathTemplate: "\"/graph/subgraph\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Zep.ApidataAPIError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Forbidden + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Zep.ApidataAPIError? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Zep.ApidataAPIError.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Zep.ApidataAPIError.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Zep.ApidataAPIError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Zep.ApidataAPIError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Zep.ApidataAPIError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Internal Server Error + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Zep.ApidataAPIError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSubgraphResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Zep.ApidataGraphSubgraphResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Zep.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Zep.ApidataGraphSubgraphResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Zep.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Get Subgraph
+ /// Returns the bounded neighborhood of a set of seed nodes as a single {nodes, edges} payload: breadth-first expansion up to a caller-specified depth, subject to explicit budgets, with explicit truncation reporting. + ///
+ /// + /// Maximum traversal depth from the seeds. 1-3. Defaults to 1. + /// + /// + /// Edge orientation followed during expansion, relative to each frontier
+ /// node: "in" | "out" | "both". Defaults to "both". + /// + /// + /// graph_id identifies the target named graph. Exactly one of user_id or
+ /// graph_id is required. + /// + /// + /// Maximum number of edges in the response. 1-1000. Defaults to 200. + /// + /// + /// Maximum number of nodes in the response, including admitted seeds.
+ /// 1-500. Defaults to 100. + /// + /// + /// Filters constraining traversed edges and included nodes. Reuses the
+ /// graph.search filter type. search_filters.episode_metadata_filters is
+ /// rejected: it cannot be enforced during graph traversal (spec-2 §9.4). + /// + /// + /// Seed node UUIDs to expand from, in traversal-priority order: seeds are
+ /// admitted before any expansion, in this order, and count toward
+ /// max_nodes first. 1-20 entries, required. Seeds that do not exist in
+ /// the target graph are ignored, not an error. + /// + /// + /// user_id identifies the target user graph. Exactly one of user_id or
+ /// graph_id is required. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetSubgraphAsync( + global::System.Collections.Generic.IList seedNodeUuids, + int? depth = default, + string? direction = default, + string? graphId = default, + int? maxEdges = default, + int? maxNodes = default, + global::Zep.GraphitiSearchFilters? searchFilters = default, + string? userId = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Zep.ApidataGraphSubgraphRequest + { + Depth = depth, + Direction = direction, + GraphId = graphId, + MaxEdges = maxEdges, + MaxNodes = maxNodes, + SearchFilters = searchFilters, + SeedNodeUuids = seedNodeUuids, + UserId = userId, + }; + + return await GetSubgraphAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByGraphId.g.cs b/src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByGraphId.g.cs new file mode 100644 index 0000000..17294bf --- /dev/null +++ b/src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByGraphId.g.cs @@ -0,0 +1,571 @@ + +#nullable enable + +namespace Zep +{ + public partial class GraphEpisodeClient + { + + + private static readonly global::Zep.EndPointSecurityRequirement s_ListByGraphIdSecurityRequirement0 = + new global::Zep.EndPointSecurityRequirement + { + Authorizations = new global::Zep.EndPointAuthorizationRequirement[] + { new global::Zep.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Zep.EndPointSecurityRequirement[] s_ListByGraphIdSecurityRequirements = + new global::Zep.EndPointSecurityRequirement[] + { s_ListByGraphIdSecurityRequirement0, + }; + partial void PrepareListByGraphIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref string graphId, + global::Zep.ApidataGraphEpisodeListRequest request); + partial void PrepareListByGraphIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string graphId, + global::Zep.ApidataGraphEpisodeListRequest request); + partial void ProcessListByGraphIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListByGraphIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Graph Episodes
+ /// Returns a paginated, filterable list of episodes for a graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListByGraphIdAsync( + string graphId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListByGraphIdAsResponseAsync( + graphId: graphId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Graph Episodes
+ /// Returns a paginated, filterable list of episodes for a graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListByGraphIdAsResponseAsync( + string graphId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareListByGraphIdArguments( + httpClient: HttpClient, + graphId: ref graphId, + request: request); + + + var __authorizations = global::Zep.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListByGraphIdSecurityRequirements, + operationName: "ListByGraphIdAsync"); + + using var __timeoutCancellationTokenSource = global::Zep.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Zep.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Zep.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Zep.PathBuilder( + path: $"/graph/episodes/graph/{graphId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Zep.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Zep.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListByGraphIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + graphId: graphId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Zep.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByGraphId", + methodName: "ListByGraphIdAsync", + pathTemplate: "$\"/graph/episodes/graph/{graphId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByGraphId", + methodName: "ListByGraphIdAsync", + pathTemplate: "$\"/graph/episodes/graph/{graphId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Zep.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByGraphId", + methodName: "ListByGraphIdAsync", + pathTemplate: "$\"/graph/episodes/graph/{graphId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListByGraphIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByGraphId", + methodName: "ListByGraphIdAsync", + pathTemplate: "$\"/graph/episodes/graph/{graphId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByGraphId", + methodName: "ListByGraphIdAsync", + pathTemplate: "$\"/graph/episodes/graph/{graphId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Zep.ApidataAPIError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Internal Server Error + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Zep.ApidataAPIError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListByGraphIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Zep.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Zep.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// List Graph Episodes
+ /// Returns a paginated, filterable list of episodes for a graph. + ///
+ /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Sort direction. One of "asc" or "desc". Defaults to "desc". + /// + /// + /// Maximum number of episodes to return. An explicit value is clamped to
+ /// 50; when omitted, the default page size (100) applies. + /// + /// + /// Restricts results to episodes that mention any of the listed node
+ /// UUIDs. At most 256 entries; each must be a syntactically valid UUID. + /// + /// + /// Field to sort by. One of "uuid" or "created_at". Defaults to "uuid". + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListByGraphIdAsync( + string graphId, + string? cursor = default, + string? direction = default, + int? limit = default, + global::System.Collections.Generic.IList? mentionedNodeUuids = default, + string? orderBy = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Zep.ApidataGraphEpisodeListRequest + { + Cursor = cursor, + Direction = direction, + Limit = limit, + MentionedNodeUuids = mentionedNodeUuids, + OrderBy = orderBy, + }; + + return await ListByGraphIdAsync( + graphId: graphId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByUserId.g.cs b/src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByUserId.g.cs new file mode 100644 index 0000000..c7af6ba --- /dev/null +++ b/src/libs/Zep/Generated/Zep.GraphEpisodeClient.ListByUserId.g.cs @@ -0,0 +1,571 @@ + +#nullable enable + +namespace Zep +{ + public partial class GraphEpisodeClient + { + + + private static readonly global::Zep.EndPointSecurityRequirement s_ListByUserIdSecurityRequirement0 = + new global::Zep.EndPointSecurityRequirement + { + Authorizations = new global::Zep.EndPointAuthorizationRequirement[] + { new global::Zep.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Zep.EndPointSecurityRequirement[] s_ListByUserIdSecurityRequirements = + new global::Zep.EndPointSecurityRequirement[] + { s_ListByUserIdSecurityRequirement0, + }; + partial void PrepareListByUserIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref string userId, + global::Zep.ApidataGraphEpisodeListRequest request); + partial void PrepareListByUserIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string userId, + global::Zep.ApidataGraphEpisodeListRequest request); + partial void ProcessListByUserIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListByUserIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List User Episodes
+ /// Returns a paginated, filterable list of episodes for a user's graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListByUserIdAsync( + string userId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListByUserIdAsResponseAsync( + userId: userId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User Episodes
+ /// Returns a paginated, filterable list of episodes for a user's graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListByUserIdAsResponseAsync( + string userId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareListByUserIdArguments( + httpClient: HttpClient, + userId: ref userId, + request: request); + + + var __authorizations = global::Zep.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListByUserIdSecurityRequirements, + operationName: "ListByUserIdAsync"); + + using var __timeoutCancellationTokenSource = global::Zep.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Zep.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Zep.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Zep.PathBuilder( + path: $"/graph/episodes/user/{userId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Zep.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Zep.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListByUserIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + userId: userId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Zep.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByUserId", + methodName: "ListByUserIdAsync", + pathTemplate: "$\"/graph/episodes/user/{userId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByUserId", + methodName: "ListByUserIdAsync", + pathTemplate: "$\"/graph/episodes/user/{userId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Zep.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByUserId", + methodName: "ListByUserIdAsync", + pathTemplate: "$\"/graph/episodes/user/{userId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListByUserIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByUserId", + methodName: "ListByUserIdAsync", + pathTemplate: "$\"/graph/episodes/user/{userId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListByUserId", + methodName: "ListByUserIdAsync", + pathTemplate: "$\"/graph/episodes/user/{userId}\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Zep.ApidataAPIError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Internal Server Error + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Zep.ApidataAPIError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListByUserIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Zep.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Zep.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// List User Episodes
+ /// Returns a paginated, filterable list of episodes for a user's graph. + ///
+ /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Sort direction. One of "asc" or "desc". Defaults to "desc". + /// + /// + /// Maximum number of episodes to return. An explicit value is clamped to
+ /// 50; when omitted, the default page size (100) applies. + /// + /// + /// Restricts results to episodes that mention any of the listed node
+ /// UUIDs. At most 256 entries; each must be a syntactically valid UUID. + /// + /// + /// Field to sort by. One of "uuid" or "created_at". Defaults to "uuid". + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListByUserIdAsync( + string userId, + string? cursor = default, + string? direction = default, + int? limit = default, + global::System.Collections.Generic.IList? mentionedNodeUuids = default, + string? orderBy = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Zep.ApidataGraphEpisodeListRequest + { + Cursor = cursor, + Direction = direction, + Limit = limit, + MentionedNodeUuids = mentionedNodeUuids, + OrderBy = orderBy, + }; + + return await ListByUserIdAsync( + userId: userId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.GraphEpisodeClient.g.cs b/src/libs/Zep/Generated/Zep.GraphEpisodeClient.g.cs new file mode 100644 index 0000000..bdc791c --- /dev/null +++ b/src/libs/Zep/Generated/Zep.GraphEpisodeClient.g.cs @@ -0,0 +1,136 @@ + +#nullable enable + +namespace Zep +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GraphEpisodeClient : global::Zep.IGraphEpisodeClient, global::System.IDisposable + { + /// + /// https://api.getzep.com/api/v2 + /// + public const string DefaultBaseUrl = "https://api.getzep.com/api/v2"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Zep.AutoSDKClientOptions Options { get; } + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Zep.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the GraphEpisodeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GraphEpisodeClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the GraphEpisodeClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GraphEpisodeClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Zep.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the GraphEpisodeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GraphEpisodeClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Zep.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Zep.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.GraphNodeClient.GetNeighbors.g.cs b/src/libs/Zep/Generated/Zep.GraphNodeClient.GetNeighbors.g.cs new file mode 100644 index 0000000..5e4fc7e --- /dev/null +++ b/src/libs/Zep/Generated/Zep.GraphNodeClient.GetNeighbors.g.cs @@ -0,0 +1,620 @@ + +#nullable enable + +namespace Zep +{ + public partial class GraphNodeClient + { + + + private static readonly global::Zep.EndPointSecurityRequirement s_GetNeighborsSecurityRequirement0 = + new global::Zep.EndPointSecurityRequirement + { + Authorizations = new global::Zep.EndPointAuthorizationRequirement[] + { new global::Zep.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "BearerAuth", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Zep.EndPointSecurityRequirement[] s_GetNeighborsSecurityRequirements = + new global::Zep.EndPointSecurityRequirement[] + { s_GetNeighborsSecurityRequirement0, + }; + partial void PrepareGetNeighborsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string nodeUuid, + global::Zep.ApidataGraphNodeNeighborsRequest request); + partial void PrepareGetNeighborsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string nodeUuid, + global::Zep.ApidataGraphNodeNeighborsRequest request); + partial void ProcessGetNeighborsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetNeighborsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Node Neighbors
+ /// Enumerates the distinct entity nodes directly connected to a node, together with the edges connecting each to it. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetNeighborsAsync( + string nodeUuid, + + global::Zep.ApidataGraphNodeNeighborsRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetNeighborsAsResponseAsync( + nodeUuid: nodeUuid, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Node Neighbors
+ /// Enumerates the distinct entity nodes directly connected to a node, together with the edges connecting each to it. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetNeighborsAsResponseAsync( + string nodeUuid, + + global::Zep.ApidataGraphNodeNeighborsRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareGetNeighborsArguments( + httpClient: HttpClient, + nodeUuid: ref nodeUuid, + request: request); + + + var __authorizations = global::Zep.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetNeighborsSecurityRequirements, + operationName: "GetNeighborsAsync"); + + using var __timeoutCancellationTokenSource = global::Zep.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Zep.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Zep.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Zep.PathBuilder( + path: $"/graph/node/{nodeUuid}/neighbors", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Zep.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Zep.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetNeighborsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + nodeUuid: nodeUuid!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Zep.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetNeighbors", + methodName: "GetNeighborsAsync", + pathTemplate: "$\"/graph/node/{nodeUuid}/neighbors\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetNeighbors", + methodName: "GetNeighborsAsync", + pathTemplate: "$\"/graph/node/{nodeUuid}/neighbors\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Zep.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Zep.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetNeighbors", + methodName: "GetNeighborsAsync", + pathTemplate: "$\"/graph/node/{nodeUuid}/neighbors\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Zep.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetNeighborsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetNeighbors", + methodName: "GetNeighborsAsync", + pathTemplate: "$\"/graph/node/{nodeUuid}/neighbors\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Zep.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Zep.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetNeighbors", + methodName: "GetNeighborsAsync", + pathTemplate: "$\"/graph/node/{nodeUuid}/neighbors\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Zep.ApidataAPIError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Zep.ApidataAPIError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Zep.ApidataAPIError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Zep.ApidataAPIError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Zep.ApidataAPIError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Internal Server Error + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Zep.ApidataAPIError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Zep.ApidataAPIError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetNeighborsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Zep.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Zep.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Zep.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Zep.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Get Node Neighbors
+ /// Enumerates the distinct entity nodes directly connected to a node, together with the edges connecting each to it. + ///
+ /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Orientation of the connecting edge relative to the anchor node: "out"
+ /// (anchor is the edge's source), "in" (anchor is the edge's target), or
+ /// "both" (either). Defaults to "both". + /// + /// + /// Sort direction for order_by. One of "asc" or "desc". Defaults to
+ /// "desc". Named direction_sort to avoid clashing with the traversal
+ /// Direction field above. + /// + /// + /// Filters constraining the connecting edges (edge types, dates, and the
+ /// section-3 node-/episode-anchored fields) and the neighbor nodes
+ /// (node_labels/exclude_node_labels). Reuses the graph.search filter
+ /// type. + /// + /// + /// Maximum number of neighbor nodes to return. An explicit value is
+ /// clamped to 50; when omitted, the default page size (100) applies. + /// + /// + /// Field to sort neighbor nodes by. One of "uuid" or "created_at".
+ /// Defaults to "uuid". + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetNeighborsAsync( + string nodeUuid, + string? cursor = default, + string? direction = default, + string? directionSort = default, + global::Zep.GraphitiSearchFilters? filters = default, + int? limit = default, + string? orderBy = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Zep.ApidataGraphNodeNeighborsRequest + { + Cursor = cursor, + Direction = direction, + DirectionSort = directionSort, + Filters = filters, + Limit = limit, + OrderBy = orderBy, + }; + + return await GetNeighborsAsync( + nodeUuid: nodeUuid, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.GraphNodeClient.g.cs b/src/libs/Zep/Generated/Zep.GraphNodeClient.g.cs new file mode 100644 index 0000000..8e70f49 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.GraphNodeClient.g.cs @@ -0,0 +1,136 @@ + +#nullable enable + +namespace Zep +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GraphNodeClient : global::Zep.IGraphNodeClient, global::System.IDisposable + { + /// + /// https://api.getzep.com/api/v2 + /// + public const string DefaultBaseUrl = "https://api.getzep.com/api/v2"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Zep.AutoSDKClientOptions Options { get; } + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Zep.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the GraphNodeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GraphNodeClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the GraphNodeClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GraphNodeClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Zep.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the GraphNodeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GraphNodeClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Zep.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Zep.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.IEntityClient.GetEntityEdgesForANode.g.cs b/src/libs/Zep/Generated/Zep.IEntityClient.GetEntityEdgesForANode.g.cs index 8962b79..09e9b2d 100644 --- a/src/libs/Zep/Generated/Zep.IEntityClient.GetEntityEdgesForANode.g.cs +++ b/src/libs/Zep/Generated/Zep.IEntityClient.GetEntityEdgesForANode.g.cs @@ -6,7 +6,7 @@ public partial interface IEntityClient { /// /// Get Entity Edges for a node
- /// Returns all edges for a node + /// Deprecated. Use edge listing with `filters.connected_node_uuids`, or the neighbors endpoint (`POST /graph/node/{node_uuid}/neighbors`), instead. Returns all edges for a node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -18,7 +18,7 @@ public partial interface IEntityClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Get Entity Edges for a node
- /// Returns all edges for a node + /// Deprecated. Use edge listing with `filters.connected_node_uuids`, or the neighbors endpoint (`POST /graph/node/{node_uuid}/neighbors`), instead. Returns all edges for a node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Zep/Generated/Zep.IEntityClient.GetEpisodesForANode.g.cs b/src/libs/Zep/Generated/Zep.IEntityClient.GetEpisodesForANode.g.cs index 92487b2..5e7826b 100644 --- a/src/libs/Zep/Generated/Zep.IEntityClient.GetEpisodesForANode.g.cs +++ b/src/libs/Zep/Generated/Zep.IEntityClient.GetEpisodesForANode.g.cs @@ -6,7 +6,7 @@ public partial interface IEntityClient { /// /// Get Episodes for a node
- /// Returns all episodes that mentioned a given node + /// Deprecated. Use episode listing with `mentioned_node_uuids` (`POST /graph/episodes/graph/{graph_id}` or `POST /graph/episodes/user/{user_id}`) instead. Returns episodes that mentioned a given node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -18,7 +18,7 @@ public partial interface IEntityClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Get Episodes for a node
- /// Returns all episodes that mentioned a given node + /// Deprecated. Use episode listing with `mentioned_node_uuids` (`POST /graph/episodes/graph/{graph_id}` or `POST /graph/episodes/user/{user_id}`) instead. Returns episodes that mentioned a given node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Zep/Generated/Zep.IEpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs b/src/libs/Zep/Generated/Zep.IEpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs index e6340fb..2b5ee3f 100644 --- a/src/libs/Zep/Generated/Zep.IEpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs +++ b/src/libs/Zep/Generated/Zep.IEpisodesClient.ReturnAnyNodesAndEdgesMentionedInAnEpisode.g.cs @@ -6,7 +6,7 @@ public partial interface IEpisodesClient { /// /// Return any nodes and edges mentioned in an episode
- /// Returns nodes and edges mentioned in an episode + /// Deprecated. Use edge and node listing with `filters.episode_uuids` instead. Returns nodes and edges mentioned in an episode, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -18,7 +18,7 @@ public partial interface IEpisodesClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Return any nodes and edges mentioned in an episode
- /// Returns nodes and edges mentioned in an episode + /// Deprecated. Use edge and node listing with `filters.episode_uuids` instead. Returns nodes and edges mentioned in an episode, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Zep/Generated/Zep.IGraphClient.GetSubgraph.g.cs b/src/libs/Zep/Generated/Zep.IGraphClient.GetSubgraph.g.cs new file mode 100644 index 0000000..6b434bd --- /dev/null +++ b/src/libs/Zep/Generated/Zep.IGraphClient.GetSubgraph.g.cs @@ -0,0 +1,85 @@ +#nullable enable + +namespace Zep +{ + public partial interface IGraphClient + { + /// + /// Get Subgraph
+ /// Returns the bounded neighborhood of a set of seed nodes as a single {nodes, edges} payload: breadth-first expansion up to a caller-specified depth, subject to explicit budgets, with explicit truncation reporting. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetSubgraphAsync( + + global::Zep.ApidataGraphSubgraphRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Subgraph
+ /// Returns the bounded neighborhood of a set of seed nodes as a single {nodes, edges} payload: breadth-first expansion up to a caller-specified depth, subject to explicit budgets, with explicit truncation reporting. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetSubgraphAsResponseAsync( + + global::Zep.ApidataGraphSubgraphRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Subgraph
+ /// Returns the bounded neighborhood of a set of seed nodes as a single {nodes, edges} payload: breadth-first expansion up to a caller-specified depth, subject to explicit budgets, with explicit truncation reporting. + ///
+ /// + /// Maximum traversal depth from the seeds. 1-3. Defaults to 1. + /// + /// + /// Edge orientation followed during expansion, relative to each frontier
+ /// node: "in" | "out" | "both". Defaults to "both". + /// + /// + /// graph_id identifies the target named graph. Exactly one of user_id or
+ /// graph_id is required. + /// + /// + /// Maximum number of edges in the response. 1-1000. Defaults to 200. + /// + /// + /// Maximum number of nodes in the response, including admitted seeds.
+ /// 1-500. Defaults to 100. + /// + /// + /// Filters constraining traversed edges and included nodes. Reuses the
+ /// graph.search filter type. search_filters.episode_metadata_filters is
+ /// rejected: it cannot be enforced during graph traversal (spec-2 §9.4). + /// + /// + /// Seed node UUIDs to expand from, in traversal-priority order: seeds are
+ /// admitted before any expansion, in this order, and count toward
+ /// max_nodes first. 1-20 entries, required. Seeds that do not exist in
+ /// the target graph are ignored, not an error. + /// + /// + /// user_id identifies the target user graph. Exactly one of user_id or
+ /// graph_id is required. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetSubgraphAsync( + global::System.Collections.Generic.IList seedNodeUuids, + int? depth = default, + string? direction = default, + string? graphId = default, + int? maxEdges = default, + int? maxNodes = default, + global::Zep.GraphitiSearchFilters? searchFilters = default, + string? userId = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByGraphId.g.cs b/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByGraphId.g.cs new file mode 100644 index 0000000..e3023b5 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByGraphId.g.cs @@ -0,0 +1,73 @@ +#nullable enable + +namespace Zep +{ + public partial interface IGraphEpisodeClient + { + /// + /// List Graph Episodes
+ /// Returns a paginated, filterable list of episodes for a graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListByGraphIdAsync( + string graphId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Graph Episodes
+ /// Returns a paginated, filterable list of episodes for a graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListByGraphIdAsResponseAsync( + string graphId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Graph Episodes
+ /// Returns a paginated, filterable list of episodes for a graph. + ///
+ /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Sort direction. One of "asc" or "desc". Defaults to "desc". + /// + /// + /// Maximum number of episodes to return. An explicit value is clamped to
+ /// 50; when omitted, the default page size (100) applies. + /// + /// + /// Restricts results to episodes that mention any of the listed node
+ /// UUIDs. At most 256 entries; each must be a syntactically valid UUID. + /// + /// + /// Field to sort by. One of "uuid" or "created_at". Defaults to "uuid". + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListByGraphIdAsync( + string graphId, + string? cursor = default, + string? direction = default, + int? limit = default, + global::System.Collections.Generic.IList? mentionedNodeUuids = default, + string? orderBy = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByUserId.g.cs b/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByUserId.g.cs new file mode 100644 index 0000000..501b1f9 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.ListByUserId.g.cs @@ -0,0 +1,73 @@ +#nullable enable + +namespace Zep +{ + public partial interface IGraphEpisodeClient + { + /// + /// List User Episodes
+ /// Returns a paginated, filterable list of episodes for a user's graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListByUserIdAsync( + string userId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Episodes
+ /// Returns a paginated, filterable list of episodes for a user's graph. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListByUserIdAsResponseAsync( + string userId, + + global::Zep.ApidataGraphEpisodeListRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Episodes
+ /// Returns a paginated, filterable list of episodes for a user's graph. + ///
+ /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Sort direction. One of "asc" or "desc". Defaults to "desc". + /// + /// + /// Maximum number of episodes to return. An explicit value is clamped to
+ /// 50; when omitted, the default page size (100) applies. + /// + /// + /// Restricts results to episodes that mention any of the listed node
+ /// UUIDs. At most 256 entries; each must be a syntactically valid UUID. + /// + /// + /// Field to sort by. One of "uuid" or "created_at". Defaults to "uuid". + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListByUserIdAsync( + string userId, + string? cursor = default, + string? direction = default, + int? limit = default, + global::System.Collections.Generic.IList? mentionedNodeUuids = default, + string? orderBy = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.g.cs b/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.g.cs new file mode 100644 index 0000000..b09c0ee --- /dev/null +++ b/src/libs/Zep/Generated/Zep.IGraphEpisodeClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Zep +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IGraphEpisodeClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Zep.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.IGraphNodeClient.GetNeighbors.g.cs b/src/libs/Zep/Generated/Zep.IGraphNodeClient.GetNeighbors.g.cs new file mode 100644 index 0000000..128d7f6 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.IGraphNodeClient.GetNeighbors.g.cs @@ -0,0 +1,84 @@ +#nullable enable + +namespace Zep +{ + public partial interface IGraphNodeClient + { + /// + /// Get Node Neighbors
+ /// Enumerates the distinct entity nodes directly connected to a node, together with the edges connecting each to it. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetNeighborsAsync( + string nodeUuid, + + global::Zep.ApidataGraphNodeNeighborsRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Node Neighbors
+ /// Enumerates the distinct entity nodes directly connected to a node, together with the edges connecting each to it. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetNeighborsAsResponseAsync( + string nodeUuid, + + global::Zep.ApidataGraphNodeNeighborsRequest request, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Node Neighbors
+ /// Enumerates the distinct entity nodes directly connected to a node, together with the edges connecting each to it. + ///
+ /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Orientation of the connecting edge relative to the anchor node: "out"
+ /// (anchor is the edge's source), "in" (anchor is the edge's target), or
+ /// "both" (either). Defaults to "both". + /// + /// + /// Sort direction for order_by. One of "asc" or "desc". Defaults to
+ /// "desc". Named direction_sort to avoid clashing with the traversal
+ /// Direction field above. + /// + /// + /// Filters constraining the connecting edges (edge types, dates, and the
+ /// section-3 node-/episode-anchored fields) and the neighbor nodes
+ /// (node_labels/exclude_node_labels). Reuses the graph.search filter
+ /// type. + /// + /// + /// Maximum number of neighbor nodes to return. An explicit value is
+ /// clamped to 50; when omitted, the default page size (100) applies. + /// + /// + /// Field to sort neighbor nodes by. One of "uuid" or "created_at".
+ /// Defaults to "uuid". + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetNeighborsAsync( + string nodeUuid, + string? cursor = default, + string? direction = default, + string? directionSort = default, + global::Zep.GraphitiSearchFilters? filters = default, + int? limit = default, + string? orderBy = default, + global::Zep.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.IGraphNodeClient.g.cs b/src/libs/Zep/Generated/Zep.IGraphNodeClient.g.cs new file mode 100644 index 0000000..a6d66fe --- /dev/null +++ b/src/libs/Zep/Generated/Zep.IGraphNodeClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Zep +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IGraphNodeClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Zep.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.ISearchClient.Graph.g.cs b/src/libs/Zep/Generated/Zep.ISearchClient.Graph.g.cs index a8d0fee..c35d828 100644 --- a/src/libs/Zep/Generated/Zep.ISearchClient.Graph.g.cs +++ b/src/libs/Zep/Generated/Zep.ISearchClient.Graph.g.cs @@ -57,7 +57,10 @@ public partial interface ISearchClient /// /// /// Defaults to RRF. Ignored when scope=auto except node_distance and episode_mentions are rejected;
- /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval. + /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval.
+ /// episode_mentions ranks edge candidates by how many of the episodes listed
+ /// in search_filters.episode_uuids mention them; without episode_uuids it has
+ /// no effect and results are ranked as if no reranker were specified. /// /// /// When scope=auto, include the selected raw graph results alongside the materialized context block.
diff --git a/src/libs/Zep/Generated/Zep.IZepClient.g.cs b/src/libs/Zep/Generated/Zep.IZepClient.g.cs index 1340da4..064b47f 100644 --- a/src/libs/Zep/Generated/Zep.IZepClient.g.cs +++ b/src/libs/Zep/Generated/Zep.IZepClient.g.cs @@ -74,6 +74,16 @@ public partial interface IZepClient : global::System.IDisposable /// public GraphClient Graph { get; } + /// + /// + /// + public GraphEpisodeClient GraphEpisode { get; } + + /// + /// + /// + public GraphNodeClient GraphNode { get; } + /// /// /// diff --git a/src/libs/Zep/Generated/Zep.JsonSerializerContext.g.cs b/src/libs/Zep/Generated/Zep.JsonSerializerContext.g.cs index 26aedc8..25a08a3 100644 --- a/src/libs/Zep/Generated/Zep.JsonSerializerContext.g.cs +++ b/src/libs/Zep/Generated/Zep.JsonSerializerContext.g.cs @@ -183,10 +183,13 @@ namespace Zep [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphSubgraphRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphSubgraphResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataUpdateGraphRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphEdgesRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataUpdateEdgeRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphEpisodeResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphEpisodeListRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataUpdateEpisodeRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataEpisodeMentions))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.GraphitiAddNodeItem))] @@ -196,6 +199,8 @@ namespace Zep [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.GraphitiAddNodesResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphNodesRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphNodeNeighborsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataGraphNodeNeighbor))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataUpdateNodeRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataCustomInstruction))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataListCustomInstructionsResponse))] @@ -231,6 +236,7 @@ namespace Zep [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.ApidataBatchItemListResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Zep.SetOntologyRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -266,6 +272,7 @@ namespace Zep [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { diff --git a/src/libs/Zep/Generated/Zep.JsonSerializerContextTypes.g.cs b/src/libs/Zep/Generated/Zep.JsonSerializerContextTypes.g.cs index 67981c2..92545ad 100644 --- a/src/libs/Zep/Generated/Zep.JsonSerializerContextTypes.g.cs +++ b/src/libs/Zep/Generated/Zep.JsonSerializerContextTypes.g.cs @@ -504,199 +504,223 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Zep.ApidataUpdateGraphRequest? Type119 { get; set; } + public global::Zep.ApidataGraphSubgraphRequest? Type119 { get; set; } /// /// /// - public global::Zep.ApidataGraphEdgesRequest? Type120 { get; set; } + public global::Zep.ApidataGraphSubgraphResponse? Type120 { get; set; } /// /// /// - public global::Zep.ApidataUpdateEdgeRequest? Type121 { get; set; } + public global::Zep.ApidataUpdateGraphRequest? Type121 { get; set; } /// /// /// - public global::Zep.ApidataGraphEpisodeResponse? Type122 { get; set; } + public global::Zep.ApidataGraphEdgesRequest? Type122 { get; set; } /// /// /// - public global::Zep.ApidataUpdateEpisodeRequest? Type123 { get; set; } + public global::Zep.ApidataUpdateEdgeRequest? Type123 { get; set; } /// /// /// - public global::Zep.ApidataEpisodeMentions? Type124 { get; set; } + public global::Zep.ApidataGraphEpisodeResponse? Type124 { get; set; } /// /// /// - public global::Zep.GraphitiAddNodeItem? Type125 { get; set; } + public global::Zep.ApidataGraphEpisodeListRequest? Type125 { get; set; } /// /// /// - public global::Zep.GraphitiAddNodesRequest? Type126 { get; set; } + public global::Zep.ApidataUpdateEpisodeRequest? Type126 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type127 { get; set; } + public global::Zep.ApidataEpisodeMentions? Type127 { get; set; } /// /// /// - public global::Zep.GraphitiAddedNode? Type128 { get; set; } + public global::Zep.GraphitiAddNodeItem? Type128 { get; set; } /// /// /// - public global::Zep.GraphitiAddNodesResponse? Type129 { get; set; } + public global::Zep.GraphitiAddNodesRequest? Type129 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type130 { get; set; } + public global::System.Collections.Generic.IList? Type130 { get; set; } /// /// /// - public global::Zep.ApidataGraphNodesRequest? Type131 { get; set; } + public global::Zep.GraphitiAddedNode? Type131 { get; set; } /// /// /// - public global::Zep.ApidataUpdateNodeRequest? Type132 { get; set; } + public global::Zep.GraphitiAddNodesResponse? Type132 { get; set; } /// /// /// - public global::Zep.ApidataCustomInstruction? Type133 { get; set; } + public global::System.Collections.Generic.IList? Type133 { get; set; } /// /// /// - public global::Zep.ApidataListCustomInstructionsResponse? Type134 { get; set; } + public global::Zep.ApidataGraphNodesRequest? Type134 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type135 { get; set; } + public global::Zep.ApidataGraphNodeNeighborsRequest? Type135 { get; set; } /// /// /// - public global::Zep.ApidataAddCustomInstructionsRequest? Type136 { get; set; } + public global::Zep.ApidataGraphNodeNeighbor? Type136 { get; set; } /// /// /// - public global::Zep.ApidataDeleteCustomInstructionsRequest? Type137 { get; set; } + public global::Zep.ApidataUpdateNodeRequest? Type137 { get; set; } /// /// /// - public global::Zep.ApidataGraphObservationsRequest? Type138 { get; set; } + public global::Zep.ApidataCustomInstruction? Type138 { get; set; } /// /// /// - public global::Zep.ApidataGraphThreadSummariesRequest? Type139 { get; set; } + public global::Zep.ApidataListCustomInstructionsResponse? Type139 { get; set; } /// /// /// - public global::Zep.ApidataProjectInfo? Type140 { get; set; } + public global::System.Collections.Generic.IList? Type140 { get; set; } /// /// /// - public global::Zep.ApidataProjectInfoResponse? Type141 { get; set; } + public global::Zep.ApidataAddCustomInstructionsRequest? Type141 { get; set; } /// /// /// - public global::Zep.ApidataUpdateProjectInfoRequest? Type142 { get; set; } + public global::Zep.ApidataDeleteCustomInstructionsRequest? Type142 { get; set; } /// /// /// - public global::Zep.ApidataObservationType? Type143 { get; set; } + public global::Zep.ApidataGraphObservationsRequest? Type143 { get; set; } /// /// /// - public global::Zep.ApidataObservationSteeringConfig? Type144 { get; set; } + public global::Zep.ApidataGraphThreadSummariesRequest? Type144 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type145 { get; set; } + public global::Zep.ApidataProjectInfo? Type145 { get; set; } /// /// /// - public global::Zep.ApidataTaskErrorResponse? Type146 { get; set; } + public global::Zep.ApidataProjectInfoResponse? Type146 { get; set; } /// /// /// - public global::Zep.ApidataTaskProgress? Type147 { get; set; } + public global::Zep.ApidataUpdateProjectInfoRequest? Type147 { get; set; } /// /// /// - public global::Zep.ApidataGetTaskResponse? Type148 { get; set; } + public global::Zep.ApidataObservationType? Type148 { get; set; } /// /// /// - public global::Zep.ApidataCreateBatchRequest? Type149 { get; set; } + public global::Zep.ApidataObservationSteeringConfig? Type149 { get; set; } /// /// /// - public global::Zep.ApidataBatchProgress? Type150 { get; set; } + public global::System.Collections.Generic.IList? Type150 { get; set; } /// /// /// - public global::Zep.ModelsBatchStatus? Type151 { get; set; } + public global::Zep.ApidataTaskErrorResponse? Type151 { get; set; } /// /// /// - public global::Zep.ApidataBatchSummary? Type152 { get; set; } + public global::Zep.ApidataTaskProgress? Type152 { get; set; } /// /// /// - public global::Zep.ModelsBatchItemKind? Type153 { get; set; } + public global::Zep.ApidataGetTaskResponse? Type153 { get; set; } /// /// /// - public global::Zep.ApidataBatchAddItem? Type154 { get; set; } + public global::Zep.ApidataCreateBatchRequest? Type154 { get; set; } /// /// /// - public global::Zep.ApidataAddBatchItemsRequest? Type155 { get; set; } + public global::Zep.ApidataBatchProgress? Type155 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type156 { get; set; } + public global::Zep.ModelsBatchStatus? Type156 { get; set; } /// /// /// - public global::Zep.ModelsBatchItemStatus? Type157 { get; set; } + public global::Zep.ApidataBatchSummary? Type157 { get; set; } /// /// /// - public global::Zep.ApidataBatchItemDetail? Type158 { get; set; } + public global::Zep.ModelsBatchItemKind? Type158 { get; set; } /// /// /// - public global::Zep.ApidataBatchInvalidItem? Type159 { get; set; } + public global::Zep.ApidataBatchAddItem? Type159 { get; set; } /// /// /// - public global::Zep.ApidataBatchInvalidReferencesError? Type160 { get; set; } + public global::Zep.ApidataAddBatchItemsRequest? Type160 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type161 { get; set; } + public global::System.Collections.Generic.IList? Type161 { get; set; } /// /// /// - public global::Zep.ApidataBatchListResponse? Type162 { get; set; } + public global::Zep.ModelsBatchItemStatus? Type162 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type163 { get; set; } + public global::Zep.ApidataBatchItemDetail? Type163 { get; set; } /// /// /// - public global::Zep.ApidataBatchItemListResponse? Type164 { get; set; } + public global::Zep.ApidataBatchInvalidItem? Type164 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type165 { get; set; } + public global::Zep.ApidataBatchInvalidReferencesError? Type165 { get; set; } /// /// /// - public global::Zep.SetOntologyRequest? Type166 { get; set; } + public global::System.Collections.Generic.IList? Type166 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type167 { get; set; } + public global::Zep.ApidataBatchListResponse? Type167 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type168 { get; set; } + /// + /// + /// + public global::Zep.ApidataBatchItemListResponse? Type169 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type170 { get; set; } + /// + /// + /// + public global::Zep.SetOntologyRequest? Type171 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type172 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type173 { get; set; } /// /// @@ -837,6 +861,10 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType34 { get; set; } + public global::System.Collections.Generic.List? ListType34 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType35 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.Json.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.Json.g.cs new file mode 100644 index 0000000..0924e48 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Zep +{ + public sealed partial class ApidataGraphEpisodeListRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Zep.ApidataGraphEpisodeListRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Zep.ApidataGraphEpisodeListRequest), + jsonSerializerContext) as global::Zep.ApidataGraphEpisodeListRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Zep.ApidataGraphEpisodeListRequest? FromJson( + string json) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Zep.ApidataGraphEpisodeListRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Zep.ApidataGraphEpisodeListRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Zep.ApidataGraphEpisodeListRequest; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.g.cs new file mode 100644 index 0000000..b59f3a5 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphEpisodeListRequest.g.cs @@ -0,0 +1,96 @@ + +#nullable enable + +namespace Zep +{ + /// + /// + /// + public sealed partial class ApidataGraphEpisodeListRequest + { + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("cursor")] + public string? Cursor { get; set; } + + /// + /// Sort direction. One of "asc" or "desc". Defaults to "desc". + /// + [global::System.Text.Json.Serialization.JsonPropertyName("direction")] + public string? Direction { get; set; } + + /// + /// Maximum number of episodes to return. An explicit value is clamped to
+ /// 50; when omitted, the default page size (100) applies. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + + /// + /// Restricts results to episodes that mention any of the listed node
+ /// UUIDs. At most 256 entries; each must be a syntactically valid UUID. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mentioned_node_uuids")] + public global::System.Collections.Generic.IList? MentionedNodeUuids { get; set; } + + /// + /// Field to sort by. One of "uuid" or "created_at". Defaults to "uuid". + /// + [global::System.Text.Json.Serialization.JsonPropertyName("order_by")] + public string? OrderBy { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Sort direction. One of "asc" or "desc". Defaults to "desc". + /// + /// + /// Maximum number of episodes to return. An explicit value is clamped to
+ /// 50; when omitted, the default page size (100) applies. + /// + /// + /// Restricts results to episodes that mention any of the listed node
+ /// UUIDs. At most 256 entries; each must be a syntactically valid UUID. + /// + /// + /// Field to sort by. One of "uuid" or "created_at". Defaults to "uuid". + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApidataGraphEpisodeListRequest( + string? cursor, + string? direction, + int? limit, + global::System.Collections.Generic.IList? mentionedNodeUuids, + string? orderBy) + { + this.Cursor = cursor; + this.Direction = direction; + this.Limit = limit; + this.MentionedNodeUuids = mentionedNodeUuids; + this.OrderBy = orderBy; + } + + /// + /// Initializes a new instance of the class. + /// + public ApidataGraphEpisodeListRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.Json.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.Json.g.cs new file mode 100644 index 0000000..8bddf36 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Zep +{ + public sealed partial class ApidataGraphNodeNeighbor + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Zep.ApidataGraphNodeNeighbor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Zep.ApidataGraphNodeNeighbor), + jsonSerializerContext) as global::Zep.ApidataGraphNodeNeighbor; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Zep.ApidataGraphNodeNeighbor? FromJson( + string json) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Zep.ApidataGraphNodeNeighbor? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Zep.ApidataGraphNodeNeighbor), + jsonSerializerContext).ConfigureAwait(false)) as global::Zep.ApidataGraphNodeNeighbor; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.g.cs new file mode 100644 index 0000000..187a0d2 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighbor.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace Zep +{ + /// + /// + /// + public sealed partial class ApidataGraphNodeNeighbor + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("edges")] + public global::System.Collections.Generic.IList? Edges { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("node")] + public global::Zep.GraphitiEntityNode? Node { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApidataGraphNodeNeighbor( + global::System.Collections.Generic.IList? edges, + global::Zep.GraphitiEntityNode? node) + { + this.Edges = edges; + this.Node = node; + } + + /// + /// Initializes a new instance of the class. + /// + public ApidataGraphNodeNeighbor() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.Json.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.Json.g.cs new file mode 100644 index 0000000..cb6ce25 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Zep +{ + public sealed partial class ApidataGraphNodeNeighborsRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Zep.ApidataGraphNodeNeighborsRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Zep.ApidataGraphNodeNeighborsRequest), + jsonSerializerContext) as global::Zep.ApidataGraphNodeNeighborsRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Zep.ApidataGraphNodeNeighborsRequest? FromJson( + string json) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Zep.ApidataGraphNodeNeighborsRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Zep.ApidataGraphNodeNeighborsRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Zep.ApidataGraphNodeNeighborsRequest; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.g.cs new file mode 100644 index 0000000..e71944a --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphNodeNeighborsRequest.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Zep +{ + /// + /// + /// + public sealed partial class ApidataGraphNodeNeighborsRequest + { + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("cursor")] + public string? Cursor { get; set; } + + /// + /// Orientation of the connecting edge relative to the anchor node: "out"
+ /// (anchor is the edge's source), "in" (anchor is the edge's target), or
+ /// "both" (either). Defaults to "both". + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("direction")] + public string? Direction { get; set; } + + /// + /// Sort direction for order_by. One of "asc" or "desc". Defaults to
+ /// "desc". Named direction_sort to avoid clashing with the traversal
+ /// Direction field above. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("direction_sort")] + public string? DirectionSort { get; set; } + + /// + /// Filters constraining the connecting edges (edge types, dates, and the
+ /// section-3 node-/episode-anchored fields) and the neighbor nodes
+ /// (node_labels/exclude_node_labels). Reuses the graph.search filter
+ /// type. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("filters")] + public global::Zep.GraphitiSearchFilters? Filters { get; set; } + + /// + /// Maximum number of neighbor nodes to return. An explicit value is
+ /// clamped to 50; when omitted, the default page size (100) applies. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + + /// + /// Field to sort neighbor nodes by. One of "uuid" or "created_at".
+ /// Defaults to "uuid". + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("order_by")] + public string? OrderBy { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Opaque cursor for pagination, obtained from the Zep-Next-Cursor
+ /// response header of the previous page. + /// + /// + /// Orientation of the connecting edge relative to the anchor node: "out"
+ /// (anchor is the edge's source), "in" (anchor is the edge's target), or
+ /// "both" (either). Defaults to "both". + /// + /// + /// Sort direction for order_by. One of "asc" or "desc". Defaults to
+ /// "desc". Named direction_sort to avoid clashing with the traversal
+ /// Direction field above. + /// + /// + /// Filters constraining the connecting edges (edge types, dates, and the
+ /// section-3 node-/episode-anchored fields) and the neighbor nodes
+ /// (node_labels/exclude_node_labels). Reuses the graph.search filter
+ /// type. + /// + /// + /// Maximum number of neighbor nodes to return. An explicit value is
+ /// clamped to 50; when omitted, the default page size (100) applies. + /// + /// + /// Field to sort neighbor nodes by. One of "uuid" or "created_at".
+ /// Defaults to "uuid". + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApidataGraphNodeNeighborsRequest( + string? cursor, + string? direction, + string? directionSort, + global::Zep.GraphitiSearchFilters? filters, + int? limit, + string? orderBy) + { + this.Cursor = cursor; + this.Direction = direction; + this.DirectionSort = directionSort; + this.Filters = filters; + this.Limit = limit; + this.OrderBy = orderBy; + } + + /// + /// Initializes a new instance of the class. + /// + public ApidataGraphNodeNeighborsRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.Json.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.Json.g.cs new file mode 100644 index 0000000..6866c53 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Zep +{ + public sealed partial class ApidataGraphSubgraphRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Zep.ApidataGraphSubgraphRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Zep.ApidataGraphSubgraphRequest), + jsonSerializerContext) as global::Zep.ApidataGraphSubgraphRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Zep.ApidataGraphSubgraphRequest? FromJson( + string json) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Zep.ApidataGraphSubgraphRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Zep.ApidataGraphSubgraphRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Zep.ApidataGraphSubgraphRequest; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.g.cs new file mode 100644 index 0000000..f166d2c --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphRequest.g.cs @@ -0,0 +1,142 @@ + +#nullable enable + +namespace Zep +{ + /// + /// + /// + public sealed partial class ApidataGraphSubgraphRequest + { + /// + /// Maximum traversal depth from the seeds. 1-3. Defaults to 1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("depth")] + public int? Depth { get; set; } + + /// + /// Edge orientation followed during expansion, relative to each frontier
+ /// node: "in" | "out" | "both". Defaults to "both". + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("direction")] + public string? Direction { get; set; } + + /// + /// graph_id identifies the target named graph. Exactly one of user_id or
+ /// graph_id is required. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("graph_id")] + public string? GraphId { get; set; } + + /// + /// Maximum number of edges in the response. 1-1000. Defaults to 200. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_edges")] + public int? MaxEdges { get; set; } + + /// + /// Maximum number of nodes in the response, including admitted seeds.
+ /// 1-500. Defaults to 100. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_nodes")] + public int? MaxNodes { get; set; } + + /// + /// Filters constraining traversed edges and included nodes. Reuses the
+ /// graph.search filter type. search_filters.episode_metadata_filters is
+ /// rejected: it cannot be enforced during graph traversal (spec-2 §9.4). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("search_filters")] + public global::Zep.GraphitiSearchFilters? SearchFilters { get; set; } + + /// + /// Seed node UUIDs to expand from, in traversal-priority order: seeds are
+ /// admitted before any expansion, in this order, and count toward
+ /// max_nodes first. 1-20 entries, required. Seeds that do not exist in
+ /// the target graph are ignored, not an error. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("seed_node_uuids")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList SeedNodeUuids { get; set; } + + /// + /// user_id identifies the target user graph. Exactly one of user_id or
+ /// graph_id is required. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Seed node UUIDs to expand from, in traversal-priority order: seeds are
+ /// admitted before any expansion, in this order, and count toward
+ /// max_nodes first. 1-20 entries, required. Seeds that do not exist in
+ /// the target graph are ignored, not an error. + /// + /// + /// Maximum traversal depth from the seeds. 1-3. Defaults to 1. + /// + /// + /// Edge orientation followed during expansion, relative to each frontier
+ /// node: "in" | "out" | "both". Defaults to "both". + /// + /// + /// graph_id identifies the target named graph. Exactly one of user_id or
+ /// graph_id is required. + /// + /// + /// Maximum number of edges in the response. 1-1000. Defaults to 200. + /// + /// + /// Maximum number of nodes in the response, including admitted seeds.
+ /// 1-500. Defaults to 100. + /// + /// + /// Filters constraining traversed edges and included nodes. Reuses the
+ /// graph.search filter type. search_filters.episode_metadata_filters is
+ /// rejected: it cannot be enforced during graph traversal (spec-2 §9.4). + /// + /// + /// user_id identifies the target user graph. Exactly one of user_id or
+ /// graph_id is required. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApidataGraphSubgraphRequest( + global::System.Collections.Generic.IList seedNodeUuids, + int? depth, + string? direction, + string? graphId, + int? maxEdges, + int? maxNodes, + global::Zep.GraphitiSearchFilters? searchFilters, + string? userId) + { + this.Depth = depth; + this.Direction = direction; + this.GraphId = graphId; + this.MaxEdges = maxEdges; + this.MaxNodes = maxNodes; + this.SearchFilters = searchFilters; + this.SeedNodeUuids = seedNodeUuids ?? throw new global::System.ArgumentNullException(nameof(seedNodeUuids)); + this.UserId = userId; + } + + /// + /// Initializes a new instance of the class. + /// + public ApidataGraphSubgraphRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.Json.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.Json.g.cs new file mode 100644 index 0000000..800e2c4 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Zep +{ + public sealed partial class ApidataGraphSubgraphResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Zep.ApidataGraphSubgraphResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Zep.ApidataGraphSubgraphResponse), + jsonSerializerContext) as global::Zep.ApidataGraphSubgraphResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Zep.ApidataGraphSubgraphResponse? FromJson( + string json) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Zep.ApidataGraphSubgraphResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Zep.ApidataGraphSubgraphResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Zep.ApidataGraphSubgraphResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Zep.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.g.cs b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.g.cs new file mode 100644 index 0000000..0dc0b89 --- /dev/null +++ b/src/libs/Zep/Generated/Zep.Models.ApidataGraphSubgraphResponse.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace Zep +{ + /// + /// + /// + public sealed partial class ApidataGraphSubgraphResponse + { + /// + /// Every traversed edge that passed the request filters. Both endpoints
+ /// of every edge are present in Nodes (edge-endpoint closure). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("edges")] + public global::System.Collections.Generic.IList? Edges { get; set; } + + /// + /// Every admitted seed and every node reached within budget. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("nodes")] + public global::System.Collections.Generic.IList? Nodes { get; set; } + + /// + /// True whenever any budget or internal limit reduced the result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("truncated")] + public bool? Truncated { get; set; } + + /// + /// Names the binding limit (for example "max_nodes", "max_edges") when
+ /// Truncated is true; nil otherwise. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("truncation_reason")] + public string? TruncationReason { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Every traversed edge that passed the request filters. Both endpoints
+ /// of every edge are present in Nodes (edge-endpoint closure). + /// + /// + /// Every admitted seed and every node reached within budget. + /// + /// + /// True whenever any budget or internal limit reduced the result. + /// + /// + /// Names the binding limit (for example "max_nodes", "max_edges") when
+ /// Truncated is true; nil otherwise. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApidataGraphSubgraphResponse( + global::System.Collections.Generic.IList? edges, + global::System.Collections.Generic.IList? nodes, + bool? truncated, + string? truncationReason) + { + this.Edges = edges; + this.Nodes = nodes; + this.Truncated = truncated; + this.TruncationReason = truncationReason; + } + + /// + /// Initializes a new instance of the class. + /// + public ApidataGraphSubgraphResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Zep/Generated/Zep.Models.GraphitiEntityEdge.g.cs b/src/libs/Zep/Generated/Zep.Models.GraphitiEntityEdge.g.cs index c5287e5..257a86b 100644 --- a/src/libs/Zep/Generated/Zep.Models.GraphitiEntityEdge.g.cs +++ b/src/libs/Zep/Generated/Zep.Models.GraphitiEntityEdge.g.cs @@ -78,6 +78,23 @@ public sealed partial class GraphitiEntityEdge [global::System.Text.Json.Serialization.JsonPropertyName("selection_rank")] public int? SelectionRank { get; set; } + /// + /// SourceNodeLabels are the labels of the source node at read time. Same
+ /// read-time-projection semantics as SourceNodeName (spec-2 §4). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("source_node_labels")] + public global::System.Collections.Generic.IList? SourceNodeLabels { get; set; } + + /// + /// SourceNodeName is the name of the source node at read time. It is a
+ /// read-time projection of current node state, not a stored edge
+ /// attribute: a subsequent node rename is reflected on the next read.
+ /// Omitted (the edge is still returned) if the source node cannot be
+ /// resolved, for example if it was deleted concurrently (spec-2 §4). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("source_node_name")] + public string? SourceNodeName { get; set; } + /// /// UUID of the source node /// @@ -85,6 +102,20 @@ public sealed partial class GraphitiEntityEdge [global::System.Text.Json.Serialization.JsonRequired] public required string SourceNodeUuid { get; set; } + /// + /// TargetNodeLabels are the labels of the target node at read time. Same
+ /// read-time-projection semantics as SourceNodeName (spec-2 §4). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("target_node_labels")] + public global::System.Collections.Generic.IList? TargetNodeLabels { get; set; } + + /// + /// TargetNodeName is the name of the target node at read time. Same
+ /// read-time-projection semantics as SourceNodeName (spec-2 §4). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("target_node_name")] + public string? TargetNodeName { get; set; } + /// /// UUID of the target node /// @@ -157,6 +188,25 @@ public sealed partial class GraphitiEntityEdge /// /// SelectionRank is the global cross-scope rank assigned by auto scope selection. /// + /// + /// SourceNodeLabels are the labels of the source node at read time. Same
+ /// read-time-projection semantics as SourceNodeName (spec-2 §4). + /// + /// + /// SourceNodeName is the name of the source node at read time. It is a
+ /// read-time projection of current node state, not a stored edge
+ /// attribute: a subsequent node rename is reflected on the next read.
+ /// Omitted (the edge is still returned) if the source node cannot be
+ /// resolved, for example if it was deleted concurrently (spec-2 §4). + /// + /// + /// TargetNodeLabels are the labels of the target node at read time. Same
+ /// read-time-projection semantics as SourceNodeName (spec-2 §4). + /// + /// + /// TargetNodeName is the name of the target node at read time. Same
+ /// read-time-projection semantics as SourceNodeName (spec-2 §4). + /// /// /// Datetime of when the fact became true /// @@ -178,6 +228,10 @@ public GraphitiEntityEdge( string? scope, double? score, int? selectionRank, + global::System.Collections.Generic.IList? sourceNodeLabels, + string? sourceNodeName, + global::System.Collections.Generic.IList? targetNodeLabels, + string? targetNodeName, string? validAt) { this.Attributes = attributes; @@ -191,7 +245,11 @@ public GraphitiEntityEdge( this.Scope = scope; this.Score = score; this.SelectionRank = selectionRank; + this.SourceNodeLabels = sourceNodeLabels; + this.SourceNodeName = sourceNodeName; this.SourceNodeUuid = sourceNodeUuid ?? throw new global::System.ArgumentNullException(nameof(sourceNodeUuid)); + this.TargetNodeLabels = targetNodeLabels; + this.TargetNodeName = targetNodeName; this.TargetNodeUuid = targetNodeUuid ?? throw new global::System.ArgumentNullException(nameof(targetNodeUuid)); this.Uuid = uuid ?? throw new global::System.ArgumentNullException(nameof(uuid)); this.ValidAt = validAt; diff --git a/src/libs/Zep/Generated/Zep.Models.GraphitiGraphSearchQuery.g.cs b/src/libs/Zep/Generated/Zep.Models.GraphitiGraphSearchQuery.g.cs index 103e0bf..ac0d2f3 100644 --- a/src/libs/Zep/Generated/Zep.Models.GraphitiGraphSearchQuery.g.cs +++ b/src/libs/Zep/Generated/Zep.Models.GraphitiGraphSearchQuery.g.cs @@ -53,7 +53,10 @@ public sealed partial class GraphitiGraphSearchQuery /// /// Defaults to RRF. Ignored when scope=auto except node_distance and episode_mentions are rejected;
- /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval. + /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval.
+ /// episode_mentions ranks edge candidates by how many of the episodes listed
+ /// in search_filters.episode_uuids mention them; without episode_uuids it has
+ /// no effect and results are ranked as if no reranker were specified. ///
[global::System.Text.Json.Serialization.JsonPropertyName("reranker")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Zep.JsonConverters.GraphitiRerankerJsonConverter))] @@ -118,7 +121,10 @@ public sealed partial class GraphitiGraphSearchQuery /// /// /// Defaults to RRF. Ignored when scope=auto except node_distance and episode_mentions are rejected;
- /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval. + /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval.
+ /// episode_mentions ranks edge candidates by how many of the episodes listed
+ /// in search_filters.episode_uuids mention them; without episode_uuids it has
+ /// no effect and results are ranked as if no reranker were specified. /// /// /// When scope=auto, include the selected raw graph results alongside the materialized context block.
diff --git a/src/libs/Zep/Generated/Zep.Models.GraphitiSearchFilters.g.cs b/src/libs/Zep/Generated/Zep.Models.GraphitiSearchFilters.g.cs index 5d7d348..7173679 100644 --- a/src/libs/Zep/Generated/Zep.Models.GraphitiSearchFilters.g.cs +++ b/src/libs/Zep/Generated/Zep.Models.GraphitiSearchFilters.g.cs @@ -8,6 +8,14 @@ namespace Zep ///
public sealed partial class GraphitiSearchFilters { + /// + /// List of node UUIDs to filter edges on: an edge matches if its source OR
+ /// target node UUID is in this list. Applies to edges only; rejected on
+ /// requests whose result type contains no edges. Max 256 entries. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("connected_node_uuids")] + public global::System.Collections.Generic.IList? ConnectedNodeUuids { get; set; } + /// /// 2D array of date filters for the created_at field.
/// The outer array elements are combined with OR logic.
@@ -37,6 +45,15 @@ public sealed partial class GraphitiSearchFilters [global::System.Text.Json.Serialization.JsonPropertyName("episode_metadata_filters")] public global::Zep.GraphitiMetadataFilterGroup? EpisodeMetadataFilters { get; set; } + /// + /// List of episode UUIDs to filter on. An edge matches if it was derived
+ /// from any listed episode; a node matches if it is mentioned by any
+ /// listed episode. Valid for both edge and node result types. Max 256
+ /// entries. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("episode_uuids")] + public global::System.Collections.Generic.IList? EpisodeUuids { get; set; } + /// /// List of edge types to exclude from results /// @@ -81,6 +98,22 @@ public sealed partial class GraphitiSearchFilters [global::System.Text.Json.Serialization.JsonPropertyName("property_filters")] public global::System.Collections.Generic.IList? PropertyFilters { get; set; } + /// + /// List of node UUIDs to filter edges on: an edge matches if its source
+ /// node UUID is in this list. Applies to edges only; rejected on requests
+ /// whose result type contains no edges. Max 256 entries. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("source_node_uuids")] + public global::System.Collections.Generic.IList? SourceNodeUuids { get; set; } + + /// + /// List of node UUIDs to filter edges on: an edge matches if its target
+ /// node UUID is in this list. Applies to edges only; rejected on requests
+ /// whose result type contains no edges. Max 256 entries. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("target_node_uuids")] + public global::System.Collections.Generic.IList? TargetNodeUuids { get; set; } + /// /// 2D array of date filters for the valid_at field.
/// The outer array elements are combined with OR logic.
@@ -100,6 +133,11 @@ public sealed partial class GraphitiSearchFilters /// /// Initializes a new instance of the class. /// + /// + /// List of node UUIDs to filter edges on: an edge matches if its source OR
+ /// target node UUID is in this list. Applies to edges only; rejected on
+ /// requests whose result type contains no edges. Max 256 entries. + /// /// /// 2D array of date filters for the created_at field.
/// The outer array elements are combined with OR logic.
@@ -117,6 +155,12 @@ public sealed partial class GraphitiSearchFilters /// [Experimental] Episode metadata filter. Restricts results to edges/nodes derived from episodes
/// matching the metadata predicates. Uses explicit AND/OR groups. This feature is experimental and may change in future releases. /// + /// + /// List of episode UUIDs to filter on. An edge matches if it was derived
+ /// from any listed episode; a node matches if it is mentioned by any
+ /// listed episode. Valid for both edge and node result types. Max 256
+ /// entries. + /// /// /// List of edge types to exclude from results /// @@ -143,6 +187,16 @@ public sealed partial class GraphitiSearchFilters /// /// List of property filters to apply to nodes and edges /// + /// + /// List of node UUIDs to filter edges on: an edge matches if its source
+ /// node UUID is in this list. Applies to edges only; rejected on requests
+ /// whose result type contains no edges. Max 256 entries. + /// + /// + /// List of node UUIDs to filter edges on: an edge matches if its target
+ /// node UUID is in this list. Applies to edges only; rejected on requests
+ /// whose result type contains no edges. Max 256 entries. + /// /// /// 2D array of date filters for the valid_at field.
/// The outer array elements are combined with OR logic.
@@ -154,28 +208,36 @@ public sealed partial class GraphitiSearchFilters [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GraphitiSearchFilters( + global::System.Collections.Generic.IList? connectedNodeUuids, global::System.Collections.Generic.IList>? createdAt, global::System.Collections.Generic.IList? edgeTypes, global::System.Collections.Generic.IList? edgeUuids, global::Zep.GraphitiMetadataFilterGroup? episodeMetadataFilters, + global::System.Collections.Generic.IList? episodeUuids, global::System.Collections.Generic.IList? excludeEdgeTypes, global::System.Collections.Generic.IList? excludeNodeLabels, global::System.Collections.Generic.IList>? expiredAt, global::System.Collections.Generic.IList>? invalidAt, global::System.Collections.Generic.IList? nodeLabels, global::System.Collections.Generic.IList? propertyFilters, + global::System.Collections.Generic.IList? sourceNodeUuids, + global::System.Collections.Generic.IList? targetNodeUuids, global::System.Collections.Generic.IList>? validAt) { + this.ConnectedNodeUuids = connectedNodeUuids; this.CreatedAt = createdAt; this.EdgeTypes = edgeTypes; this.EdgeUuids = edgeUuids; this.EpisodeMetadataFilters = episodeMetadataFilters; + this.EpisodeUuids = episodeUuids; this.ExcludeEdgeTypes = excludeEdgeTypes; this.ExcludeNodeLabels = excludeNodeLabels; this.ExpiredAt = expiredAt; this.InvalidAt = invalidAt; this.NodeLabels = nodeLabels; this.PropertyFilters = propertyFilters; + this.SourceNodeUuids = sourceNodeUuids; + this.TargetNodeUuids = targetNodeUuids; this.ValidAt = validAt; } diff --git a/src/libs/Zep/Generated/Zep.SearchClient.Graph.g.cs b/src/libs/Zep/Generated/Zep.SearchClient.Graph.g.cs index 90f1cd2..eecd067 100644 --- a/src/libs/Zep/Generated/Zep.SearchClient.Graph.g.cs +++ b/src/libs/Zep/Generated/Zep.SearchClient.Graph.g.cs @@ -534,7 +534,10 @@ partial void ProcessGraphResponseContent( /// /// /// Defaults to RRF. Ignored when scope=auto except node_distance and episode_mentions are rejected;
- /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval. + /// auto search always uses RRF retrieval and applies its own internal rerank after retrieval.
+ /// episode_mentions ranks edge candidates by how many of the episodes listed
+ /// in search_filters.episode_uuids mention them; without episode_uuids it has
+ /// no effect and results are ranked as if no reranker were specified. /// /// /// When scope=auto, include the selected raw graph results alongside the materialized context block.
diff --git a/src/libs/Zep/Generated/Zep.ZepClient.g.cs b/src/libs/Zep/Generated/Zep.ZepClient.g.cs index 9023e11..0c37c6c 100644 --- a/src/libs/Zep/Generated/Zep.ZepClient.g.cs +++ b/src/libs/Zep/Generated/Zep.ZepClient.g.cs @@ -93,6 +93,24 @@ public sealed partial class ZepClient : global::Zep.IZepClient, global::System.I JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public GraphEpisodeClient GraphEpisode => new GraphEpisodeClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + + /// + /// + /// + public GraphNodeClient GraphNode => new GraphNodeClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// diff --git a/src/libs/Zep/openapi.json b/src/libs/Zep/openapi.json index 47e85ec..a1f00b0 100644 --- a/src/libs/Zep/openapi.json +++ b/src/libs/Zep/openapi.json @@ -3127,6 +3127,78 @@ } } }, + "/graph/subgraph": { + "post": { + "operationId": "get-subgraph", + "summary": "Get Subgraph", + "description": "Returns the bounded neighborhood of a set of seed nodes as a single {nodes, edges} payload: breadth-first expansion up to a caller-specified depth, subject to explicit budgets, with explicit truncation reporting.", + "tags": [ + "graph" + ], + "responses": { + "200": { + "description": "Subgraph", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataGraphSubgraphResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + } + }, + "requestBody": { + "description": "Subgraph request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataGraphSubgraphRequest" + } + } + } + } + } + }, "/graph/{graphId}": { "get": { "operationId": "get-graph", @@ -3752,6 +3824,70 @@ } } } + }, + "post": { + "operationId": "list-by-graph-id", + "summary": "List Graph Episodes", + "description": "Returns a paginated, filterable list of episodes for a graph.", + "tags": [ + "graph > episode" + ], + "parameters": [ + { + "name": "graph_id", + "in": "path", + "description": "Graph ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Episodes", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApidataGraphEpisode" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + } + }, + "requestBody": { + "description": "Episode listing request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataGraphEpisodeListRequest" + } + } + } + } } }, "/graph/episodes/user/{user_id}": { @@ -3814,6 +3950,70 @@ } } } + }, + "post": { + "operationId": "list-by-user-id", + "summary": "List User Episodes", + "description": "Returns a paginated, filterable list of episodes for a user's graph.", + "tags": [ + "graph > episode" + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "description": "User ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Episodes", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApidataGraphEpisode" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + } + }, + "requestBody": { + "description": "Episode listing request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataGraphEpisodeListRequest" + } + } + } + } } }, "/graph/episodes/{uuid}": { @@ -4015,7 +4215,7 @@ "get": { "operationId": "return-any-nodes-and-edges-mentioned-in-an-episode", "summary": "Return any nodes and edges mentioned in an episode", - "description": "Returns nodes and edges mentioned in an episode", + "description": "Deprecated. Use edge and node listing with `filters.episode_uuids` instead. Returns nodes and edges mentioned in an episode, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header.", "tags": [ "episodes" ], @@ -4252,7 +4452,7 @@ "get": { "operationId": "get-entity-edges-for-a-node", "summary": "Get Entity Edges for a node", - "description": "Returns all edges for a node", + "description": "Deprecated. Use edge listing with `filters.connected_node_uuids`, or the neighbors endpoint (`POST /graph/node/{node_uuid}/neighbors`), instead. Returns all edges for a node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header.", "tags": [ "entity" ], @@ -4308,7 +4508,7 @@ "get": { "operationId": "get-episodes-for-a-node", "summary": "Get Episodes for a node", - "description": "Returns all episodes that mentioned a given node", + "description": "Deprecated. Use episode listing with `mentioned_node_uuids` (`POST /graph/episodes/graph/{graph_id}` or `POST /graph/episodes/user/{user_id}`) instead. Returns episodes that mentioned a given node, subject to an internal cap; responses reduced by that cap set the Zep-Truncated header.", "tags": [ "entity" ], @@ -4357,6 +4557,82 @@ } } }, + "/graph/node/{node_uuid}/neighbors": { + "post": { + "operationId": "get-neighbors", + "summary": "Get Node Neighbors", + "description": "Enumerates the distinct entity nodes directly connected to a node, together with the edges connecting each to it.", + "tags": [ + "graph > node" + ], + "parameters": [ + { + "name": "node_uuid", + "in": "path", + "description": "Node UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Neighbors", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApidataGraphNodeNeighbor" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataAPIError" + } + } + } + } + }, + "requestBody": { + "description": "Neighbors request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApidataGraphNodeNeighborsRequest" + } + } + } + } + } + }, "/graph/node/{uuid}": { "get": { "operationId": "get-node", @@ -7328,10 +7604,32 @@ "type": "integer", "description": "SelectionRank is the global cross-scope rank assigned by auto scope selection." }, + "source_node_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "SourceNodeLabels are the labels of the source node at read time. Same\nread-time-projection semantics as SourceNodeName (spec-2 \u00a74)." + }, + "source_node_name": { + "type": "string", + "description": "SourceNodeName is the name of the source node at read time. It is a\nread-time projection of current node state, not a stored edge\nattribute: a subsequent node rename is reflected on the next read.\nOmitted (the edge is still returned) if the source node cannot be\nresolved, for example if it was deleted concurrently (spec-2 \u00a74)." + }, "source_node_uuid": { "type": "string", "description": "UUID of the source node" }, + "target_node_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "TargetNodeLabels are the labels of the target node at read time. Same\nread-time-projection semantics as SourceNodeName (spec-2 \u00a74)." + }, + "target_node_name": { + "type": "string", + "description": "TargetNodeName is the name of the target node at read time. Same\nread-time-projection semantics as SourceNodeName (spec-2 \u00a74)." + }, "target_node_uuid": { "type": "string", "description": "UUID of the target node" @@ -7688,6 +7986,13 @@ "GraphitiSearchFilters": { "type": "object", "properties": { + "connected_node_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of node UUIDs to filter edges on: an edge matches if its source OR\ntarget node UUID is in this list. Applies to edges only; rejected on\nrequests whose result type contains no edges. Max 256 entries." + }, "created_at": { "type": "array", "items": { @@ -7716,6 +8021,13 @@ "$ref": "#/components/schemas/GraphitiMetadataFilterGroup", "description": "[Experimental] Episode metadata filter. Restricts results to edges/nodes derived from episodes\nmatching the metadata predicates. Uses explicit AND/OR groups. This feature is experimental and may change in future releases." }, + "episode_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of episode UUIDs to filter on. An edge matches if it was derived\nfrom any listed episode; a node matches if it is mentioned by any\nlisted episode. Valid for both edge and node result types. Max 256\nentries." + }, "exclude_edge_types": { "type": "array", "items": { @@ -7764,6 +8076,20 @@ }, "description": "List of property filters to apply to nodes and edges" }, + "source_node_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of node UUIDs to filter edges on: an edge matches if its source\nnode UUID is in this list. Applies to edges only; rejected on requests\nwhose result type contains no edges. Max 256 entries." + }, + "target_node_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of node UUIDs to filter edges on: an edge matches if its target\nnode UUID is in this list. Applies to edges only; rejected on requests\nwhose result type contains no edges. Max 256 entries." + }, "valid_at": { "type": "array", "items": { @@ -8004,7 +8330,7 @@ }, "reranker": { "$ref": "#/components/schemas/GraphitiReranker", - "description": "Defaults to RRF. Ignored when scope=auto except node_distance and episode_mentions are rejected;\nauto search always uses RRF retrieval and applies its own internal rerank after retrieval." + "description": "Defaults to RRF. Ignored when scope=auto except node_distance and episode_mentions are rejected;\nauto search always uses RRF retrieval and applies its own internal rerank after retrieval.\nepisode_mentions ranks edge candidates by how many of the episodes listed\nin search_filters.episode_uuids mention them; without episode_uuids it has\nno effect and results are ranked as if no reranker were specified." }, "return_raw_results": { "type": "boolean", @@ -8210,6 +8536,78 @@ }, "title": "ApidataGraphSearchResults" }, + "ApidataGraphSubgraphRequest": { + "type": "object", + "properties": { + "depth": { + "type": "integer", + "description": "Maximum traversal depth from the seeds. 1-3. Defaults to 1." + }, + "direction": { + "type": "string", + "description": "Edge orientation followed during expansion, relative to each frontier\nnode: \"in\" | \"out\" | \"both\". Defaults to \"both\"." + }, + "graph_id": { + "type": "string", + "description": "graph_id identifies the target named graph. Exactly one of user_id or\ngraph_id is required." + }, + "max_edges": { + "type": "integer", + "description": "Maximum number of edges in the response. 1-1000. Defaults to 200." + }, + "max_nodes": { + "type": "integer", + "description": "Maximum number of nodes in the response, including admitted seeds.\n1-500. Defaults to 100." + }, + "search_filters": { + "$ref": "#/components/schemas/GraphitiSearchFilters", + "description": "Filters constraining traversed edges and included nodes. Reuses the\ngraph.search filter type. search_filters.episode_metadata_filters is\nrejected: it cannot be enforced during graph traversal (spec-2 \u00a79.4)." + }, + "seed_node_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Seed node UUIDs to expand from, in traversal-priority order: seeds are\nadmitted before any expansion, in this order, and count toward\nmax_nodes first. 1-20 entries, required. Seeds that do not exist in\nthe target graph are ignored, not an error." + }, + "user_id": { + "type": "string", + "description": "user_id identifies the target user graph. Exactly one of user_id or\ngraph_id is required." + } + }, + "required": [ + "seed_node_uuids" + ], + "title": "ApidataGraphSubgraphRequest" + }, + "ApidataGraphSubgraphResponse": { + "type": "object", + "properties": { + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphitiEntityEdge" + }, + "description": "Every traversed edge that passed the request filters. Both endpoints\nof every edge are present in Nodes (edge-endpoint closure)." + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphitiEntityNode" + }, + "description": "Every admitted seed and every node reached within budget." + }, + "truncated": { + "type": "boolean", + "description": "True whenever any budget or internal limit reduced the result." + }, + "truncation_reason": { + "type": "string", + "description": "Names the binding limit (for example \"max_nodes\", \"max_edges\") when\nTruncated is true; nil otherwise." + } + }, + "title": "ApidataGraphSubgraphResponse" + }, "ApidataUpdateGraphRequest": { "type": "object", "properties": { @@ -8310,6 +8708,35 @@ }, "title": "ApidataGraphEpisodeResponse" }, + "ApidataGraphEpisodeListRequest": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "description": "Opaque cursor for pagination, obtained from the Zep-Next-Cursor\nresponse header of the previous page." + }, + "direction": { + "type": "string", + "description": "Sort direction. One of \"asc\" or \"desc\". Defaults to \"desc\"." + }, + "limit": { + "type": "integer", + "description": "Maximum number of episodes to return. An explicit value is clamped to\n50; when omitted, the default page size (100) applies." + }, + "mentioned_node_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Restricts results to episodes that mention any of the listed node\nUUIDs. At most 256 entries; each must be a syntactically valid UUID." + }, + "order_by": { + "type": "string", + "description": "Field to sort by. One of \"uuid\" or \"created_at\". Defaults to \"uuid\"." + } + }, + "title": "ApidataGraphEpisodeListRequest" + }, "ApidataUpdateEpisodeRequest": { "type": "object", "properties": { @@ -8495,6 +8922,51 @@ }, "title": "ApidataGraphNodesRequest" }, + "ApidataGraphNodeNeighborsRequest": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "description": "Opaque cursor for pagination, obtained from the Zep-Next-Cursor\nresponse header of the previous page." + }, + "direction": { + "type": "string", + "description": "Orientation of the connecting edge relative to the anchor node: \"out\"\n(anchor is the edge's source), \"in\" (anchor is the edge's target), or\n\"both\" (either). Defaults to \"both\"." + }, + "direction_sort": { + "type": "string", + "description": "Sort direction for order_by. One of \"asc\" or \"desc\". Defaults to\n\"desc\". Named direction_sort to avoid clashing with the traversal\nDirection field above." + }, + "filters": { + "$ref": "#/components/schemas/GraphitiSearchFilters", + "description": "Filters constraining the connecting edges (edge types, dates, and the\nsection-3 node-/episode-anchored fields) and the neighbor nodes\n(node_labels/exclude_node_labels). Reuses the graph.search filter\ntype." + }, + "limit": { + "type": "integer", + "description": "Maximum number of neighbor nodes to return. An explicit value is\nclamped to 50; when omitted, the default page size (100) applies." + }, + "order_by": { + "type": "string", + "description": "Field to sort neighbor nodes by. One of \"uuid\" or \"created_at\".\nDefaults to \"uuid\"." + } + }, + "title": "ApidataGraphNodeNeighborsRequest" + }, + "ApidataGraphNodeNeighbor": { + "type": "object", + "properties": { + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphitiEntityEdge" + } + }, + "node": { + "$ref": "#/components/schemas/GraphitiEntityNode" + } + }, + "title": "ApidataGraphNodeNeighbor" + }, "ApidataUpdateNodeRequest": { "type": "object", "properties": {