diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsernameV1MeUsernamePatch.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsernameV1MeUsernamePatch.g.cs new file mode 100644 index 0000000..ac69d42 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsernameV1MeUsernamePatch.g.cs @@ -0,0 +1,118 @@ + +#nullable enable + +namespace DeepInfra +{ + public partial class DeepInfraApi + { + partial void PrepareAccountSetUsernameV1MeUsernamePatchArguments( + global::System.Net.Http.HttpClient httpClient, + global::DeepInfra.MeUsername request); + partial void PrepareAccountSetUsernameV1MeUsernamePatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::DeepInfra.MeUsername request); + partial void ProcessAccountSetUsernameV1MeUsernamePatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAccountSetUsernameV1MeUsernamePatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Account Set Username + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AccountSetUsernameV1MeUsernamePatchAsync( + global::DeepInfra.MeUsername request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareAccountSetUsernameV1MeUsernamePatchArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/me/username", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.MeUsername), + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareAccountSetUsernameV1MeUsernamePatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessAccountSetUsernameV1MeUsernamePatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessAccountSetUsernameV1MeUsernamePatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.AccountSetUsernameV1MeUsernamePatchResponse) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Account Set Username + /// + /// + /// String with length between 1 and 39 characters. Only alphanumeric characters and dashes allowed. Must contain no leading, trailing or consecutive dashes. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AccountSetUsernameV1MeUsernamePatchAsync( + string username, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::DeepInfra.MeUsername + { + Username = username, + }; + + return await AccountSetUsernameV1MeUsernamePatchAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.g.cs new file mode 100644 index 0000000..62a412f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AccountSetUsernameV1MeUsernamePatchResponse + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.g.cs new file mode 100644 index 0000000..806109c --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.g.cs @@ -0,0 +1,24 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class MeUsername + { + /// + /// String with length between 1 and 39 characters. Only alphanumeric characters and dashes allowed. Must contain no leading, trailing or consecutive dashes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("username")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Username { 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs index f698774..58cbc80 100644 --- a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs @@ -445,342 +445,350 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::DeepInfra.ModelDocBlock? Type108 { get; set; } + public global::DeepInfra.MeUsername? Type108 { get; set; } /// /// /// - public global::DeepInfra.ModelDocBlockKey? Type109 { get; set; } + public global::DeepInfra.ModelDocBlock? Type109 { get; set; } /// /// /// - public global::DeepInfra.ModelFieldInfo? Type110 { get; set; } + public global::DeepInfra.ModelDocBlockKey? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::DeepInfra.ModelFieldInfo? Type111 { get; set; } /// /// /// - public global::DeepInfra.ModelFieldInfoAllowedItem? Type112 { get; set; } + public global::System.Collections.Generic.IList? Type112 { get; set; } /// /// /// - public global::DeepInfra.ModelFieldInfoDefault? Type113 { get; set; } + public global::DeepInfra.ModelFieldInfoAllowedItem? Type113 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type114 { get; set; } + public global::DeepInfra.ModelFieldInfoDefault? Type114 { get; set; } /// /// /// - public global::DeepInfra.ModelFieldInfoExample? Type115 { get; set; } + public global::System.Collections.Generic.IList? Type115 { get; set; } /// /// /// - public global::DeepInfra.ModelInfoOut? Type116 { get; set; } + public global::DeepInfra.ModelFieldInfoExample? Type116 { get; set; } /// /// /// - public global::DeepInfra.ModelInfoOutInSchema? Type117 { get; set; } + public global::DeepInfra.ModelInfoOut? Type117 { get; set; } /// /// /// - public global::DeepInfra.ModelInfoOutOutSchema? Type118 { get; set; } + public global::DeepInfra.ModelInfoOutInSchema? Type118 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type119 { get; set; } + public global::DeepInfra.ModelInfoOutOutSchema? Type119 { get; set; } /// /// /// - public global::System.AnyOf? Type120 { get; set; } + public global::System.Collections.Generic.IList? Type120 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingTime? Type121 { get; set; } + public global::System.AnyOf? Type121 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingUptime? Type122 { get; set; } + public global::DeepInfra.ModelPricingTime? Type122 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingTokens? Type123 { get; set; } + public global::DeepInfra.ModelPricingUptime? Type123 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputLength? Type124 { get; set; } + public global::DeepInfra.ModelPricingTokens? Type124 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputTokens? Type125 { get; set; } + public global::DeepInfra.ModelPricingInputLength? Type125 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputCharacterLength? Type126 { get; set; } + public global::DeepInfra.ModelPricingInputTokens? Type126 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type127 { get; set; } + public global::DeepInfra.ModelPricingInputCharacterLength? Type127 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type128 { get; set; } + public global::System.Collections.Generic.IList? Type128 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariant? Type129 { get; set; } + public global::System.Collections.Generic.IList? Type129 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariantKey? Type130 { get; set; } + public global::DeepInfra.SchemaVariant? Type130 { get; set; } /// /// /// - public global::DeepInfra.ModelInfoOutMeta? Type131 { get; set; } + public global::DeepInfra.SchemaVariantKey? Type131 { get; set; } /// /// /// - public global::DeepInfra.ModelMetaIn? Type132 { get; set; } + public global::DeepInfra.ModelInfoOutMeta? Type132 { get; set; } /// /// /// - public global::System.AllOf? Type133 { get; set; } + public global::DeepInfra.ModelMetaIn? Type133 { get; set; } /// /// /// - public global::DeepInfra.ModelOut? Type134 { get; set; } + public global::System.AllOf? Type134 { get; set; } /// /// /// - public global::System.AnyOf? Type135 { get; set; } + public global::DeepInfra.ModelOut? Type135 { get; set; } /// /// /// - public global::DeepInfra.ModelPublicityIn? Type136 { get; set; } + public global::System.AnyOf? Type136 { get; set; } /// /// /// - public global::DeepInfra.ModelVersionOut? Type137 { get; set; } + public global::DeepInfra.ModelPublicityIn? Type137 { get; set; } /// /// /// - public global::DeepInfra.OpenAIChatCompletionsIn? Type138 { get; set; } + public global::DeepInfra.ModelVersionOut? Type138 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type139 { get; set; } + public global::DeepInfra.OpenAIChatCompletionsIn? Type139 { get; set; } /// /// /// - public global::System.AnyOf? Type140 { get; set; } + public global::System.Collections.Generic.IList>? Type140 { get; set; } /// /// /// - public global::System.AnyOf>? Type141 { get; set; } + public global::System.AnyOf? Type141 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type142 { get; set; } + public global::System.AnyOf>? Type142 { get; set; } /// /// /// - public global::System.AllOf? Type143 { get; set; } + public global::System.Collections.Generic.IList? Type143 { get; set; } /// /// /// - public global::DeepInfra.ResponseFormat4? Type144 { get; set; } + public global::System.AllOf? Type144 { get; set; } /// /// /// - public global::DeepInfra.ResponseFormatType? Type145 { get; set; } + public global::DeepInfra.ResponseFormat4? Type145 { get; set; } /// /// /// - public global::DeepInfra.OpenAICompletionsIn? Type146 { get; set; } + public global::DeepInfra.ResponseFormatType? Type146 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsIn? Type147 { get; set; } + public global::DeepInfra.OpenAICompletionsIn? Type147 { get; set; } /// /// /// - public global::System.AnyOf, string?>? Type148 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsIn? Type148 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type149 { get; set; } + public global::System.AnyOf, string?>? Type149 { get; set; } /// /// /// - public global::DeepInfra.OpenAIModelOut? Type150 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type150 { get; set; } /// /// /// - public object? Type151 { get; set; } + public global::DeepInfra.OpenAIModelOut? Type151 { get; set; } /// /// /// - public global::DeepInfra.OpenAIModelsOut? Type152 { get; set; } + public object? Type152 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type153 { get; set; } + public global::DeepInfra.OpenAIModelsOut? Type153 { get; set; } /// /// /// - public global::DeepInfra.OpenAITextToSpeechIn? Type154 { get; set; } + public global::System.Collections.Generic.IList? Type154 { get; set; } /// /// /// - public global::System.AllOf? Type155 { get; set; } + public global::DeepInfra.OpenAITextToSpeechIn? Type155 { get; set; } /// /// /// - public global::DeepInfra.TtsVoice? Type156 { get; set; } + public global::System.AllOf? Type156 { get; set; } /// /// /// - public global::DeepInfra.RateLimitOut? Type157 { get; set; } + public global::DeepInfra.TtsVoice? Type157 { get; set; } /// /// /// - public global::DeepInfra.RateLimitRequestIn? Type158 { get; set; } + public global::DeepInfra.RateLimitOut? Type158 { get; set; } /// /// /// - public global::DeepInfra.SchemaFieldOut? Type159 { get; set; } + public global::DeepInfra.RateLimitRequestIn? Type159 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type160 { get; set; } + public global::DeepInfra.SchemaFieldOut? Type160 { get; set; } /// /// /// - public global::DeepInfra.SchemaFieldOutAllowedItem? Type161 { get; set; } + public global::System.Collections.Generic.IList? Type161 { get; set; } /// /// /// - public global::DeepInfra.SchemaFieldOutDefault? Type162 { get; set; } + public global::DeepInfra.SchemaFieldOutAllowedItem? Type162 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type163 { get; set; } + public global::DeepInfra.SchemaFieldOutDefault? Type163 { get; set; } /// /// /// - public global::DeepInfra.SchemaFieldOutExample? Type164 { get; set; } + public global::System.Collections.Generic.IList? Type164 { get; set; } /// /// /// - public global::DeepInfra.SchemaOut? Type165 { get; set; } + public global::DeepInfra.SchemaFieldOutExample? Type165 { get; set; } /// /// /// - public global::DeepInfra.SchemaOutSchemaIn? Type166 { get; set; } + public global::DeepInfra.SchemaOut? Type166 { get; set; } /// /// /// - public global::DeepInfra.SchemaOutSchemaOut1? Type167 { get; set; } + public global::DeepInfra.SchemaOutSchemaIn? Type167 { get; set; } /// /// /// - public global::DeepInfra.SchemaOutSchemaStream? Type168 { get; set; } + public global::DeepInfra.SchemaOutSchemaOut1? Type168 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type169 { get; set; } + public global::DeepInfra.SchemaOutSchemaStream? Type169 { get; set; } /// /// /// - public global::DeepInfra.UpdateVoiceIn? Type170 { get; set; } + public global::System.Collections.Generic.IList? Type170 { get; set; } /// /// /// - public global::DeepInfra.CliVersionCliVersionGetResponse? Type171 { get; set; } + public global::DeepInfra.UpdateVoiceIn? Type171 { get; set; } /// /// /// - public global::DeepInfra.AccountUpdateDetailsV1MePatchResponse? Type172 { get; set; } + public global::DeepInfra.CliVersionCliVersionGetResponse? Type172 { get; set; } /// /// /// - public global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse? Type173 { get; set; } + public global::DeepInfra.AccountUpdateDetailsV1MePatchResponse? Type173 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type174 { get; set; } + public global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse? Type174 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type175 { get; set; } + public global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse? Type175 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type176 { get; set; } + public global::System.Collections.Generic.IList? Type176 { get; set; } /// /// /// - public global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse? Type177 { get; set; } + public global::System.Collections.Generic.IList? Type177 { get; set; } /// /// /// - public global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse? Type178 { get; set; } + public global::System.Collections.Generic.IList? Type178 { get; set; } /// /// /// - public global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse? Type179 { get; set; } + public global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse? Type179 { get; set; } /// /// /// - public global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse? Type180 { get; set; } + public global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse? Type180 { get; set; } /// /// /// - public global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse? Type181 { get; set; } + public global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse? Type181 { get; set; } /// /// /// - public global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse? Type182 { get; set; } + public global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse? Type182 { get; set; } /// /// /// - public global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse? Type183 { get; set; } + public global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse? Type183 { get; set; } /// /// /// - public global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse? Type184 { get; set; } + public global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse? Type184 { get; set; } /// /// /// - public global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse? Type185 { get; set; } + public global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse? Type185 { get; set; } /// /// /// - public global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse? Type186 { get; set; } + public global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse? Type186 { get; set; } /// /// /// - public global::DeepInfra.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponse? Type187 { get; set; } + public global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse? Type187 { get; set; } /// /// /// - public global::DeepInfra.DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse? Type188 { get; set; } + public global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse? Type188 { get; set; } /// /// /// - public global::DeepInfra.GithubLoginGithubLoginGetResponse? Type189 { get; set; } + public global::DeepInfra.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponse? Type189 { get; set; } /// /// /// - public global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse? Type190 { get; set; } + public global::DeepInfra.DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse? Type190 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type191 { get; set; } + public global::DeepInfra.GithubLoginGithubLoginGetResponse? Type191 { get; set; } /// /// /// - public global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse? Type192 { get; set; } + public global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse? Type192 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type193 { get; set; } + /// + /// + /// + public global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse? Type194 { get; set; } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/openapi.yaml b/src/libs/DeepInfra/openapi.yaml index 089b487..879a242 100644 --- a/src/libs/DeepInfra/openapi.yaml +++ b/src/libs/DeepInfra/openapi.yaml @@ -66,14 +66,14 @@ paths: content: application/json: schema: { } - '403': - description: Forbidden + '404': + description: Not Found content: application/json: schema: $ref: '#/components/schemas/DeepError' - '404': - description: Not Found + '409': + description: Conflict content: application/json: schema: @@ -86,6 +86,42 @@ paths: $ref: '#/components/schemas/DeepError' security: - HTTPBearer: [ ] + /v1/me/username: + patch: + summary: Account Set Username + operationId: account_set_username_v1_me_username_patch + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MeUsername' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/DeepError' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/DeepError' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + security: + - HTTPBearer: [ ] /v1/me/emails: get: summary: Account Email Values @@ -295,6 +331,12 @@ paths: application/json: schema: $ref: '#/components/schemas/DeepError' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/DeepError' '422': description: Unprocessable Entity content: @@ -3032,6 +3074,19 @@ components: minLength: 1 type: string description: Company website address + MeUsername: + title: MeUsername + required: + - username + type: object + properties: + username: + title: Username + maxLength: 39 + minLength: 1 + pattern: '^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$' + type: string + description: 'String with length between 1 and 39 characters. Only alphanumeric characters and dashes allowed. Must contain no leading, trailing or consecutive dashes.' ModelDocBlock: title: ModelDocBlock required: