From 9f214bd0a1467aeeb1fcb91358faaaaa7a2db160 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Apr 2026 13:51:31 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...perAI.AudiencesClient.GetAudienceById.g.cs | 29 +++- ...JasperAI.AudiencesClient.GetAudiences.g.cs | 29 +++- .../JasperAI.CommandClient.Command.g.cs | 29 +++- ...sperAI.DocumentsClient.CreateDocument.g.cs | 29 +++- ...AI.DocumentsClient.DeleteDocumentById.g.cs | 29 +++- ...perAI.DocumentsClient.GetAllDocuments.g.cs | 29 +++- ...perAI.DocumentsClient.GetDocumentById.g.cs | 29 +++- ...sperAI.DocumentsClient.UpdateDocument.g.cs | 29 +++- ...IClient.Authorizations.ApiKeyInHeader.g.cs | 1 + ...IClient.Authorizations.ApiKeyInHeader.g.cs | 13 +- ...rAIClient.Constructors.ApiKeyInHeader.g.cs | 1 + ...owledgeClient.DeleteKnowledgeDocument.g.cs | 29 +++- ....KnowledgeClient.GetKnowledgeDocument.g.cs | 29 +++- ...KnowledgeClient.GetKnowledgeDocuments.g.cs | 29 +++- ...perAI.KnowledgeClient.SearchKnowledge.g.cs | 29 +++- ...owledgeClient.UpdateKnowledgeDocument.g.cs | 29 +++- ...owledgeClient.UploadKnowledgeDocument.g.cs | 29 +++- .../Generated/JasperAI.PathBuilder.g.cs | 34 ++++ .../JasperAI/Generated/JasperAI.Security.g.cs | 145 ++++++++++++++++++ .../JasperAI.StylesClient.GetStyleById.g.cs | 29 +++- .../JasperAI.StylesClient.GetStyles.g.cs | 29 +++- .../JasperAI.TasksClient.GetTaskById.g.cs | 29 +++- .../JasperAI.TasksClient.ListTasks.g.cs | 29 +++- .../JasperAI.TasksClient.RunTask.g.cs | 29 +++- .../JasperAI.UsageClient.GetUsage.g.cs | 29 +++- .../JasperAI.UsersClient.GetAllUsers.g.cs | 29 +++- .../JasperAI.UsersClient.GetUser.g.cs | 29 +++- .../JasperAI.VoicesClient.CreateTone.g.cs | 29 +++- .../JasperAI.VoicesClient.DeleteTone.g.cs | 29 +++- .../JasperAI.VoicesClient.GetAllTones.g.cs | 29 +++- .../JasperAI.VoicesClient.GetTone.g.cs | 29 +++- .../JasperAI.VoicesClient.UpdateTone.g.cs | 29 +++- 32 files changed, 922 insertions(+), 55 deletions(-) create mode 100644 src/libs/JasperAI/Generated/JasperAI.Security.g.cs diff --git a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs index 9c54b75..1c42a2b 100644 --- a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudienceById.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class AudiencesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetAudienceByIdSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetAudienceByIdSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetAudienceByIdSecurityRequirement0, + }; partial void PrepareGetAudienceByIdArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -38,9 +57,15 @@ partial void ProcessGetAudienceByIdResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAudienceByIdSecurityRequirements, + operationName: "GetAudienceByIdAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/audiences/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -50,7 +75,7 @@ partial void ProcessGetAudienceByIdResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs index d07b3cf..392c64a 100644 --- a/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.AudiencesClient.GetAudiences.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class AudiencesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetAudiencesSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetAudiencesSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetAudiencesSecurityRequirement0, + }; partial void PrepareGetAudiencesArguments( global::System.Net.Http.HttpClient httpClient); partial void PrepareGetAudiencesRequest( @@ -33,9 +52,15 @@ partial void ProcessGetAudiencesResponseContent( PrepareGetAudiencesArguments( httpClient: HttpClient); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAudiencesSecurityRequirements, + operationName: "GetAudiencesAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/audiences", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -45,7 +70,7 @@ partial void ProcessGetAudiencesResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs b/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs index 2f0b4f4..0594aab 100644 --- a/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.CommandClient.Command.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class CommandClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_CommandSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_CommandSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_CommandSecurityRequirement0, + }; partial void PrepareCommandArguments( global::System.Net.Http.HttpClient httpClient, global::JasperAI.CommandRequest request); @@ -41,9 +60,15 @@ partial void ProcessCommandResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CommandSecurityRequirements, + operationName: "CommandAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/command", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -53,7 +78,7 @@ partial void ProcessCommandResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs index 4eaab60..9dee519 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.CreateDocument.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class DocumentsClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_CreateDocumentSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_CreateDocumentSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_CreateDocumentSecurityRequirement0, + }; partial void PrepareCreateDocumentArguments( global::System.Net.Http.HttpClient httpClient, global::JasperAI.DocumentCreateRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateDocumentResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateDocumentSecurityRequirements, + operationName: "CreateDocumentAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/documents", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -53,7 +78,7 @@ partial void ProcessCreateDocumentResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs index 922dcdf..3669a01 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.DeleteDocumentById.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class DocumentsClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_DeleteDocumentByIdSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_DeleteDocumentByIdSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_DeleteDocumentByIdSecurityRequirement0, + }; partial void PrepareDeleteDocumentByIdArguments( global::System.Net.Http.HttpClient httpClient, ref string documentId); @@ -33,9 +52,15 @@ partial void ProcessDeleteDocumentByIdResponse( httpClient: HttpClient, documentId: ref documentId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteDocumentByIdSecurityRequirements, + operationName: "DeleteDocumentByIdAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/documents/{documentId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, @@ -45,7 +70,7 @@ partial void ProcessDeleteDocumentByIdResponse( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs index cba728a..450c184 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetAllDocuments.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class DocumentsClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetAllDocumentsSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetAllDocumentsSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetAllDocumentsSecurityRequirement0, + }; partial void PrepareGetAllDocumentsArguments( global::System.Net.Http.HttpClient httpClient, ref string? userId, @@ -77,6 +96,12 @@ partial void ProcessGetAllDocumentsResponseContent( createdAtStart: ref createdAtStart, createdAtEnd: ref createdAtEnd); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAllDocumentsSecurityRequirements, + operationName: "GetAllDocumentsAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/documents", baseUri: HttpClient.BaseAddress); @@ -89,7 +114,7 @@ partial void ProcessGetAllDocumentsResponseContent( .AddOptionalParameter("statuses", statuses) .AddOptionalParameter("createdAtStart", createdAtStart?.ToString("yyyy-MM-ddTHH:mm:ssZ")) .AddOptionalParameter("createdAtEnd", createdAtEnd?.ToString("yyyy-MM-ddTHH:mm:ssZ")) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -99,7 +124,7 @@ partial void ProcessGetAllDocumentsResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs index 7aa1270..bfc05e2 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.GetDocumentById.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class DocumentsClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetDocumentByIdSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetDocumentByIdSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetDocumentByIdSecurityRequirement0, + }; partial void PrepareGetDocumentByIdArguments( global::System.Net.Http.HttpClient httpClient, ref string documentId); @@ -38,9 +57,15 @@ partial void ProcessGetDocumentByIdResponseContent( httpClient: HttpClient, documentId: ref documentId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetDocumentByIdSecurityRequirements, + operationName: "GetDocumentByIdAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/documents/{documentId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -50,7 +75,7 @@ partial void ProcessGetDocumentByIdResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs index e797ef5..36eee52 100644 --- a/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.DocumentsClient.UpdateDocument.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class DocumentsClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_UpdateDocumentSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_UpdateDocumentSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_UpdateDocumentSecurityRequirement0, + }; partial void PrepareUpdateDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string documentId, @@ -46,9 +65,15 @@ partial void ProcessUpdateDocumentResponseContent( documentId: ref documentId, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateDocumentSecurityRequirements, + operationName: "UpdateDocumentAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/documents/{documentId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), @@ -58,7 +83,7 @@ partial void ProcessUpdateDocumentResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.IJasperAIClient.Authorizations.ApiKeyInHeader.g.cs b/src/libs/JasperAI/Generated/JasperAI.IJasperAIClient.Authorizations.ApiKeyInHeader.g.cs index c868757..c4bb1c1 100644 --- a/src/libs/JasperAI/Generated/JasperAI.IJasperAIClient.Authorizations.ApiKeyInHeader.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.IJasperAIClient.Authorizations.ApiKeyInHeader.g.cs @@ -9,6 +9,7 @@ public partial interface IJasperAIClient /// Authorize using ApiKey authentication. /// /// + public void AuthorizeUsingApiKeyInHeader( string apiKey); } diff --git a/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Authorizations.ApiKeyInHeader.g.cs b/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Authorizations.ApiKeyInHeader.g.cs index 68c9094..1fd6bf7 100644 --- a/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Authorizations.ApiKeyInHeader.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Authorizations.ApiKeyInHeader.g.cs @@ -5,13 +5,24 @@ namespace JasperAI { public sealed partial class JasperAIClient { + /// public void AuthorizeUsingApiKeyInHeader( string apiKey) { apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); - Authorizations.Clear(); + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header" && + __authorization.Name == "X-API-Key") + { + Authorizations.RemoveAt(i); + } + } + Authorizations.Add(new global::JasperAI.EndPointAuthorization { Type = "ApiKey", diff --git a/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Constructors.ApiKeyInHeader.g.cs b/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Constructors.ApiKeyInHeader.g.cs index 396fd69..90e6fbc 100644 --- a/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Constructors.ApiKeyInHeader.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.JasperAIClient.Constructors.ApiKeyInHeader.g.cs @@ -6,6 +6,7 @@ namespace JasperAI public sealed partial class JasperAIClient { /// + public JasperAIClient( string apiKey, global::System.Net.Http.HttpClient? httpClient = null, diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs index aa0d929..b03590a 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.DeleteKnowledgeDocument.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class KnowledgeClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_DeleteKnowledgeDocumentSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_DeleteKnowledgeDocumentSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_DeleteKnowledgeDocumentSecurityRequirement0, + }; partial void PrepareDeleteKnowledgeDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string knowledgeId); @@ -33,9 +52,15 @@ partial void ProcessDeleteKnowledgeDocumentResponse( httpClient: HttpClient, knowledgeId: ref knowledgeId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteKnowledgeDocumentSecurityRequirements, + operationName: "DeleteKnowledgeDocumentAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/knowledge/{knowledgeId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, @@ -45,7 +70,7 @@ partial void ProcessDeleteKnowledgeDocumentResponse( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs index 8b10cc2..2ee450e 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocument.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class KnowledgeClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetKnowledgeDocumentSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetKnowledgeDocumentSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetKnowledgeDocumentSecurityRequirement0, + }; partial void PrepareGetKnowledgeDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string knowledgeId); @@ -38,9 +57,15 @@ partial void ProcessGetKnowledgeDocumentResponseContent( httpClient: HttpClient, knowledgeId: ref knowledgeId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetKnowledgeDocumentSecurityRequirements, + operationName: "GetKnowledgeDocumentAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/knowledge/{knowledgeId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -50,7 +75,7 @@ partial void ProcessGetKnowledgeDocumentResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs index 64aafaf..7d5d2c6 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.GetKnowledgeDocuments.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class KnowledgeClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetKnowledgeDocumentsSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetKnowledgeDocumentsSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetKnowledgeDocumentsSecurityRequirement0, + }; partial void PrepareGetKnowledgeDocumentsArguments( global::System.Net.Http.HttpClient httpClient, ref string? search, @@ -48,6 +67,12 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( size: ref size, page: ref page); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetKnowledgeDocumentsSecurityRequirements, + operationName: "GetKnowledgeDocumentsAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/knowledge", baseUri: HttpClient.BaseAddress); @@ -55,7 +80,7 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( .AddOptionalParameter("search", search) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("page", page?.ToString()) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -65,7 +90,7 @@ partial void ProcessGetKnowledgeDocumentsResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs index 448ca43..0f0c953 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.SearchKnowledge.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class KnowledgeClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_SearchKnowledgeSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_SearchKnowledgeSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_SearchKnowledgeSecurityRequirement0, + }; partial void PrepareSearchKnowledgeArguments( global::System.Net.Http.HttpClient httpClient, global::JasperAI.KnowledgeSearchRequest request); @@ -41,9 +60,15 @@ partial void ProcessSearchKnowledgeResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_SearchKnowledgeSecurityRequirements, + operationName: "SearchKnowledgeAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/knowledge/search", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -53,7 +78,7 @@ partial void ProcessSearchKnowledgeResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs index a55a736..3d564c6 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UpdateKnowledgeDocument.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class KnowledgeClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_UpdateKnowledgeDocumentSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_UpdateKnowledgeDocumentSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_UpdateKnowledgeDocumentSecurityRequirement0, + }; partial void PrepareUpdateKnowledgeDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string knowledgeId, @@ -46,9 +65,15 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( knowledgeId: ref knowledgeId, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateKnowledgeDocumentSecurityRequirements, + operationName: "UpdateKnowledgeDocumentAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/knowledge/{knowledgeId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), @@ -58,7 +83,7 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs index 8d7333d..8ec0e45 100644 --- a/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.KnowledgeClient.UploadKnowledgeDocument.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class KnowledgeClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_UploadKnowledgeDocumentSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_UploadKnowledgeDocumentSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_UploadKnowledgeDocumentSecurityRequirement0, + }; partial void PrepareUploadKnowledgeDocumentArguments( global::System.Net.Http.HttpClient httpClient, global::JasperAI.UploadKnowledgeDocumentRequest request); @@ -41,9 +60,15 @@ partial void ProcessUploadKnowledgeDocumentResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadKnowledgeDocumentSecurityRequirements, + operationName: "UploadKnowledgeDocumentAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/knowledge", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -53,7 +78,7 @@ partial void ProcessUploadKnowledgeDocumentResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.PathBuilder.g.cs b/src/libs/JasperAI/Generated/JasperAI.PathBuilder.g.cs index 031baf8..2238693 100644 --- a/src/libs/JasperAI/Generated/JasperAI.PathBuilder.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.PathBuilder.g.cs @@ -224,6 +224,40 @@ public PathBuilder AddOptionalParameter( return this; } + /// + /// Adds a pre-serialized query string fragment to the URL. + /// + /// The serialized query string value. + /// The current instance. + public PathBuilder AddRawQueryString( + string value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return this; + } + + value = value.TrimStart('?', '&'); + if (value.Length == 0) + { + return this; + } + + if (_firstParameter) + { + _stringBuilder.Append('?'); + _firstParameter = false; + } + else + { + _stringBuilder.Append('&'); + } + + _stringBuilder.Append(value); + + return this; + } + /// /// Returns the constructed URL as a string. /// diff --git a/src/libs/JasperAI/Generated/JasperAI.Security.g.cs b/src/libs/JasperAI/Generated/JasperAI.Security.g.cs new file mode 100644 index 0000000..abdffd1 --- /dev/null +++ b/src/libs/JasperAI/Generated/JasperAI.Security.g.cs @@ -0,0 +1,145 @@ +#nullable enable + +namespace JasperAI +{ + internal sealed class EndPointAuthorizationRequirement + { + internal string Type { get; set; } = string.Empty; + + internal string Location { get; set; } = string.Empty; + + internal string Name { get; set; } = string.Empty; + + internal string FriendlyName { get; set; } = string.Empty; + } + + internal sealed class EndPointSecurityRequirement + { + internal global::System.Collections.Generic.IReadOnlyList Authorizations { get; set; } = + global::System.Array.Empty(); + } + + internal static class EndPointSecurityResolver + { + internal static global::System.Collections.Generic.List ResolveAuthorizations( + global::System.Collections.Generic.IReadOnlyList availableAuthorizations, + global::System.Collections.Generic.IReadOnlyList securityRequirements, + string operationName) + { + availableAuthorizations = availableAuthorizations ?? throw new global::System.ArgumentNullException(nameof(availableAuthorizations)); + securityRequirements = securityRequirements ?? throw new global::System.ArgumentNullException(nameof(securityRequirements)); + operationName = operationName ?? throw new global::System.ArgumentNullException(nameof(operationName)); + + if (securityRequirements.Count == 0) + { + return new global::System.Collections.Generic.List(); + } + + var allowsAnonymous = false; + + foreach (var requirement in securityRequirements) + { + if (requirement.Authorizations.Count == 0) + { + allowsAnonymous = true; + continue; + } + + var selected = new global::System.Collections.Generic.List(requirement.Authorizations.Count); + var satisfied = true; + + foreach (var requiredAuthorization in requirement.Authorizations) + { + var found = false; + + for (var i = 0; i < availableAuthorizations.Count; i++) + { + if (!Matches(availableAuthorizations[i], requiredAuthorization)) + { + continue; + } + + selected.Add(availableAuthorizations[i]); + found = true; + break; + } + + if (!found) + { + satisfied = false; + break; + } + } + + if (satisfied) + { + return selected; + } + } + + if (allowsAnonymous) + { + return new global::System.Collections.Generic.List(); + } + + throw new global::System.InvalidOperationException( + $"Operation '{operationName}' requires one of the configured security alternatives: {DescribeRequirements(securityRequirements)}."); + } + + private static bool Matches( + EndPointAuthorization availableAuthorization, + EndPointAuthorizationRequirement requiredAuthorization) + { + if (!string.Equals(availableAuthorization.Type, requiredAuthorization.Type, global::System.StringComparison.Ordinal)) + { + return false; + } + + return requiredAuthorization.Type switch + { + "OAuth2" => true, + "Http" => string.Equals( + availableAuthorization.Name, + requiredAuthorization.Name, + global::System.StringComparison.Ordinal), + "ApiKey" => string.Equals( + availableAuthorization.Location, + requiredAuthorization.Location, + global::System.StringComparison.Ordinal) && + string.Equals( + availableAuthorization.Name, + requiredAuthorization.Name, + global::System.StringComparison.Ordinal), + _ => string.Equals( + availableAuthorization.Location, + requiredAuthorization.Location, + global::System.StringComparison.Ordinal) && + string.Equals( + availableAuthorization.Name, + requiredAuthorization.Name, + global::System.StringComparison.Ordinal), + }; + } + + private static string DescribeRequirements( + global::System.Collections.Generic.IReadOnlyList securityRequirements) + { + var parts = new global::System.Collections.Generic.List(securityRequirements.Count); + + foreach (var requirement in securityRequirements) + { + if (requirement.Authorizations.Count == 0) + { + parts.Add("anonymous"); + continue; + } + + parts.Add(string.Join( + " + ", + global::System.Linq.Enumerable.Select(requirement.Authorizations, static x => x.FriendlyName))); + } + + return string.Join(" or ", parts); + } + } +} \ No newline at end of file diff --git a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs index 0ed80c8..e610c6a 100644 --- a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyleById.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class StylesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetStyleByIdSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetStyleByIdSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetStyleByIdSecurityRequirement0, + }; partial void PrepareGetStyleByIdArguments( global::System.Net.Http.HttpClient httpClient, ref string styleId); @@ -38,9 +57,15 @@ partial void ProcessGetStyleByIdResponseContent( httpClient: HttpClient, styleId: ref styleId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetStyleByIdSecurityRequirements, + operationName: "GetStyleByIdAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/styles/{styleId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -50,7 +75,7 @@ partial void ProcessGetStyleByIdResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs index 816e846..fef7815 100644 --- a/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.StylesClient.GetStyles.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class StylesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetStylesSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetStylesSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetStylesSecurityRequirement0, + }; partial void PrepareGetStylesArguments( global::System.Net.Http.HttpClient httpClient); partial void PrepareGetStylesRequest( @@ -33,9 +52,15 @@ partial void ProcessGetStylesResponseContent( PrepareGetStylesArguments( httpClient: HttpClient); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetStylesSecurityRequirements, + operationName: "GetStylesAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/styles", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -45,7 +70,7 @@ partial void ProcessGetStylesResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs index 57d4309..ba28169 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.GetTaskById.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class TasksClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetTaskByIdSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetTaskByIdSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetTaskByIdSecurityRequirement0, + }; partial void PrepareGetTaskByIdArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -43,12 +62,18 @@ partial void ProcessGetTaskByIdResponseContent( id: ref id, version: ref version); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetTaskByIdSecurityRequirements, + operationName: "GetTaskByIdAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/tasks/{id}", baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("version", version?.ToString()) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -58,7 +83,7 @@ partial void ProcessGetTaskByIdResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs index d1234c0..e61d883 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.ListTasks.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class TasksClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_ListTasksSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_ListTasksSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_ListTasksSecurityRequirement0, + }; partial void PrepareListTasksArguments( global::System.Net.Http.HttpClient httpClient, ref int? size, @@ -71,6 +90,12 @@ partial void ProcessListTasksResponseContent( includeCategories: ref includeCategories, searchTerm: ref searchTerm); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListTasksSecurityRequirements, + operationName: "ListTasksAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/tasks", baseUri: HttpClient.BaseAddress); @@ -81,7 +106,7 @@ partial void ProcessListTasksResponseContent( .AddOptionalParameter("includeContextItems", includeContextItems?.ToString().ToLowerInvariant()) .AddOptionalParameter("includeCategories", includeCategories?.ToString().ToLowerInvariant()) .AddOptionalParameter("searchTerm", searchTerm) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -91,7 +116,7 @@ partial void ProcessListTasksResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs b/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs index 420572b..e987ceb 100644 --- a/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.TasksClient.RunTask.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class TasksClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_RunTaskSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_RunTaskSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_RunTaskSecurityRequirement0, + }; partial void PrepareRunTaskArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -46,9 +65,15 @@ partial void ProcessRunTaskResponseContent( id: ref id, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_RunTaskSecurityRequirements, + operationName: "RunTaskAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/tasks/{id}/run", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -58,7 +83,7 @@ partial void ProcessRunTaskResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs index 1c2e78a..86783cb 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsageClient.GetUsage.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class UsageClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetUsageSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetUsageSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetUsageSecurityRequirement0, + }; partial void PrepareGetUsageArguments( global::System.Net.Http.HttpClient httpClient); partial void PrepareGetUsageRequest( @@ -33,9 +52,15 @@ partial void ProcessGetUsageResponseContent( PrepareGetUsageArguments( httpClient: HttpClient); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetUsageSecurityRequirements, + operationName: "GetUsageAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/usage", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -45,7 +70,7 @@ partial void ProcessGetUsageResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs index 9e3eed7..0d05c28 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetAllUsers.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class UsersClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetAllUsersSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetAllUsersSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetAllUsersSecurityRequirement0, + }; partial void PrepareGetAllUsersArguments( global::System.Net.Http.HttpClient httpClient, ref int? limit, @@ -43,13 +62,19 @@ partial void ProcessGetAllUsersResponseContent( limit: ref limit, page: ref page); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAllUsersSecurityRequirements, + operationName: "GetAllUsersAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/users", baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page?.ToString()) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -59,7 +84,7 @@ partial void ProcessGetAllUsersResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs index 325b2b2..d77c0b6 100644 --- a/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.UsersClient.GetUser.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class UsersClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetUserSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetUserSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetUserSecurityRequirement0, + }; partial void PrepareGetUserArguments( global::System.Net.Http.HttpClient httpClient, ref string userId); @@ -38,9 +57,15 @@ partial void ProcessGetUserResponseContent( httpClient: HttpClient, userId: ref userId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetUserSecurityRequirements, + operationName: "GetUserAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/users/{userId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -50,7 +75,7 @@ partial void ProcessGetUserResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs index 9ee9150..18515e4 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.CreateTone.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class VoicesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_CreateToneSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_CreateToneSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_CreateToneSecurityRequirement0, + }; partial void PrepareCreateToneArguments( global::System.Net.Http.HttpClient httpClient, global::JasperAI.VoiceCreateRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateToneResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateToneSecurityRequirements, + operationName: "CreateToneAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/tones", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -53,7 +78,7 @@ partial void ProcessCreateToneResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs index bfe38e0..f2c19c3 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.DeleteTone.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class VoicesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_DeleteToneSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_DeleteToneSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_DeleteToneSecurityRequirement0, + }; partial void PrepareDeleteToneArguments( global::System.Net.Http.HttpClient httpClient, ref string toneId); @@ -33,9 +52,15 @@ partial void ProcessDeleteToneResponse( httpClient: HttpClient, toneId: ref toneId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteToneSecurityRequirements, + operationName: "DeleteToneAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/tones/{toneId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, @@ -45,7 +70,7 @@ partial void ProcessDeleteToneResponse( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs index a476242..3e569ab 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetAllTones.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class VoicesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetAllTonesSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetAllTonesSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetAllTonesSecurityRequirement0, + }; partial void PrepareGetAllTonesArguments( global::System.Net.Http.HttpClient httpClient); partial void PrepareGetAllTonesRequest( @@ -33,9 +52,15 @@ partial void ProcessGetAllTonesResponseContent( PrepareGetAllTonesArguments( httpClient: HttpClient); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAllTonesSecurityRequirements, + operationName: "GetAllTonesAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: "/tones", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -45,7 +70,7 @@ partial void ProcessGetAllTonesResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs index f56330f..d229745 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.GetTone.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class VoicesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_GetToneSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_GetToneSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_GetToneSecurityRequirement0, + }; partial void PrepareGetToneArguments( global::System.Net.Http.HttpClient httpClient, ref string toneId); @@ -38,9 +57,15 @@ partial void ProcessGetToneResponseContent( httpClient: HttpClient, toneId: ref toneId); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetToneSecurityRequirements, + operationName: "GetToneAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/tones/{toneId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -50,7 +75,7 @@ partial void ProcessGetToneResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs index 12b5606..e87f7e9 100644 --- a/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs +++ b/src/libs/JasperAI/Generated/JasperAI.VoicesClient.UpdateTone.g.cs @@ -5,6 +5,25 @@ namespace JasperAI { public partial class VoicesClient { + + + private static readonly global::JasperAI.EndPointSecurityRequirement s_UpdateToneSecurityRequirement0 = + new global::JasperAI.EndPointSecurityRequirement + { + Authorizations = new global::JasperAI.EndPointAuthorizationRequirement[] + { new global::JasperAI.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::JasperAI.EndPointSecurityRequirement[] s_UpdateToneSecurityRequirements = + new global::JasperAI.EndPointSecurityRequirement[] + { s_UpdateToneSecurityRequirement0, + }; partial void PrepareUpdateToneArguments( global::System.Net.Http.HttpClient httpClient, ref string toneId, @@ -46,9 +65,15 @@ partial void ProcessUpdateToneResponseContent( toneId: ref toneId, request: request); + + var __authorizations = global::JasperAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateToneSecurityRequirements, + operationName: "UpdateToneAsync"); + var __pathBuilder = new global::JasperAI.PathBuilder( path: $"/tones/{toneId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), @@ -58,7 +83,7 @@ partial void ProcessUpdateToneResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2")