From 74cdc49cae33252aebdde00f4a00e5308594fe2b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 13:21:01 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...e.AgentClient.CreateAndEscalateThread.g.cs | 60 ++++- .../Helicone.AgentClient.DeleteThread.g.cs | 63 ++++- .../Helicone.AgentClient.EscalateThread.g.cs | 63 ++++- .../Helicone.AgentClient.Generate.g.cs | 65 ++++- .../Helicone.AgentClient.GetAllThreads.g.cs | 60 ++++- .../Helicone.AgentClient.GetThread.g.cs | 63 ++++- .../Helicone.AgentClient.ReopenThread.g.cs | 63 ++++- .../Helicone.AgentClient.SearchDocs.g.cs | 65 ++++- ...icone.AgentClient.UpsertThreadMessage.g.cs | 68 +++++- .../Generated/Helicone.AgentClient.g.cs | 8 +- .../Helicone.ApiKeyClient.CreateAPIKey.g.cs | 65 ++++- ...licone.ApiKeyClient.CreateProviderKey.g.cs | 65 ++++- .../Helicone.ApiKeyClient.CreateProxyKey.g.cs | 65 ++++- .../Helicone.ApiKeyClient.DeleteAPIKey.g.cs | 63 ++++- ...licone.ApiKeyClient.DeleteProviderKey.g.cs | 63 ++++- .../Helicone.ApiKeyClient.GetAPIKeys.g.cs | 60 ++++- .../Helicone.ApiKeyClient.GetProviderKey.g.cs | 63 ++++- ...Helicone.ApiKeyClient.GetProviderKeys.g.cs | 60 ++++- .../Helicone.ApiKeyClient.UpdateAPIKey.g.cs | 68 +++++- ...licone.ApiKeyClient.UpdateProviderKey.g.cs | 68 +++++- .../Generated/Helicone.ApiKeyClient.g.cs | 8 +- .../Helicone.AutoSDKHttpResponse.g.cs | 121 +++++++++ ...e.ComparisonClient.GetModelComparison.g.cs | 65 ++++- .../Generated/Helicone.ComparisonClient.g.cs | 8 +- ...icone.CreditsClient.GetCreditsBalance.g.cs | 60 ++++- .../Helicone.CreditsClient.GetDiscounts.g.cs | 60 ++++- ...icone.CreditsClient.GetSpendBreakdown.g.cs | 73 +++++- .../Helicone.CreditsClient.GetTotalSpend.g.cs | 60 ++++- .../Helicone.CreditsClient.ListInvoices.g.cs | 60 ++++- ....CreditsClient.ListTokenUsagePayments.g.cs | 70 +++++- .../Generated/Helicone.CreditsClient.g.cs | 8 +- ...icone.CustomerClient.GetCustomerUsage.g.cs | 68 +++++- .../Helicone.CustomerClient.GetCustomers.g.cs | 65 ++++- .../Generated/Helicone.CustomerClient.g.cs | 8 +- ...one.DashboardClient.GetScoresOverTime.g.cs | 65 ++++- .../Generated/Helicone.DashboardClient.g.cs | 8 +- .../Helicone.DatasetClient.AddDataset.g.cs | 65 ++++- ...cone.DatasetClient.AddHeliconeDataset.g.cs | 65 ++++- ...licone.DatasetClient.AddRandomDataset.g.cs | 65 ++++- ...atasetClient.CountHeliconeDatasetRows.g.cs | 63 ++++- ...licone.DatasetClient.CreateDatasetRow.g.cs | 71 +++++- ...e.DatasetClient.DeleteHeliconeDataset.g.cs | 63 ++++- .../Helicone.DatasetClient.GetDataset.g.cs | 63 ++++- .../Helicone.DatasetClient.GetDatasets.g.cs | 65 ++++- ...licone.DatasetClient.InsertDatasetRow.g.cs | 68 +++++- .../Helicone.DatasetClient.MutateDataset.g.cs | 68 +++++- ...e.DatasetClient.MutateHeliconeDataset.g.cs | 68 +++++- ...ne.DatasetClient.QueryHeliconeDataset.g.cs | 65 ++++- ...atasetClient.QueryHeliconeDatasetRows.g.cs | 68 +++++- ...etClient.UpdateHeliconeDatasetRequest.g.cs | 71 +++++- .../Generated/Helicone.DatasetClient.g.cs | 8 +- .../Helicone.EvalsClient.AddEval.g.cs | 68 +++++- .../Helicone.EvalsClient.GetEvalScores.g.cs | 60 ++++- .../Helicone.EvalsClient.QueryEvals.g.cs | 65 ++++- ...e.EvalsClient.QueryScoreDistributions.g.cs | 65 ++++- .../Generated/Helicone.EvalsClient.g.cs | 8 +- ...icone.EvaluatorClient.CreateEvaluator.g.cs | 65 ++++- ...EvaluatorClient.CreateOnlineEvaluator.g.cs | 68 +++++- ...icone.EvaluatorClient.DeleteEvaluator.g.cs | 63 ++++- ...EvaluatorClient.DeleteOnlineEvaluator.g.cs | 66 ++++- ...Helicone.EvaluatorClient.GetEvaluator.g.cs | 63 ++++- ...one.EvaluatorClient.GetEvaluatorStats.g.cs | 63 ++++- ...atorClient.GetExperimentsForEvaluator.g.cs | 63 ++++- ...e.EvaluatorClient.GetOnlineEvaluators.g.cs | 63 ++++- ...icone.EvaluatorClient.QueryEvaluators.g.cs | 65 ++++- ...cone.EvaluatorClient.TestLLMEvaluator.g.cs | 65 ++++- ...EvaluatorClient.TestLastMileEvaluator.g.cs | 65 ++++- ...e.EvaluatorClient.TestPythonEvaluator.g.cs | 65 ++++- ...icone.EvaluatorClient.UpdateEvaluator.g.cs | 68 +++++- .../Generated/Helicone.EvaluatorClient.g.cs | 8 +- ...rimentClient.AddManualRowToExperiment.g.cs | 68 +++++- ...Client.AddManualRowsToExperimentBatch.g.cs | 68 +++++- ...xperimentClient.CreateEmptyExperiment.g.cs | 60 ++++- ...ExperimentClient.CreateExperimentCell.g.cs | 68 +++++- ...perimentClient.CreateExperimentColumn.g.cs | 68 +++++- ...imentClient.CreateExperimentEvaluator.g.cs | 68 +++++- ...ntClient.CreateExperimentEvaluatorOld.g.cs | 68 +++++- ...entClient.CreateExperimentFromRequest.g.cs | 63 ++++- ...rimentClient.CreateExperimentTableRow.g.cs | 68 +++++- ...tClient.CreateExperimentTableRowBatch.g.cs | 68 +++++- ...t.CreateExperimentTableRowFromDataset.g.cs | 66 ++++- ...reateExperimentTableRowWithCellsBatch.g.cs | 68 +++++- ...rimentClient.CreateNewEmptyExperiment.g.cs | 65 ++++- ....ExperimentClient.CreateNewExperiment.g.cs | 65 ++++- ...tClient.CreateNewExperimentHypothesis.g.cs | 65 ++++- ...perimentClient.CreateNewExperimentOld.g.cs | 65 ++++- ...rimentClient.CreateNewExperimentTable.g.cs | 65 ++++- ...t.CreateNewPromptVersionForExperiment.g.cs | 68 +++++- ...one.ExperimentClient.DeleteExperiment.g.cs | 63 ++++- ...imentClient.DeleteExperimentEvaluator.g.cs | 66 ++++- ...ntClient.DeleteExperimentEvaluatorOld.g.cs | 66 ++++- ...rimentClient.DeleteExperimentTableRow.g.cs | 66 ++++- ...imentClient.DeleteExperimentTableRows.g.cs | 68 +++++- ....ExperimentClient.DeletePromptVersion.g.cs | 66 ++++- ...ne.ExperimentClient.GetExperimentById.g.cs | 63 ++++- ...erimentClient.GetExperimentEvaluators.g.cs | 63 ++++- ...rimentClient.GetExperimentEvaluators2.g.cs | 63 ++++- ...tClient.GetExperimentHypothesisScores.g.cs | 63 ++++- ...ient.GetExperimentPromptVersionScores.g.cs | 66 ++++- ...e.ExperimentClient.GetExperimentScore.g.cs | 69 +++++- ...perimentClient.GetExperimentTableById.g.cs | 63 ++++- ...mentClient.GetExperimentTableMetadata.g.cs | 63 ++++- ....ExperimentClient.GetExperimentTables.g.cs | 60 ++++- ...icone.ExperimentClient.GetExperiments.g.cs | 60 ++++- ...ne.ExperimentClient.GetExperimentsOld.g.cs | 65 ++++- ...imentClient.GetInputKeysForExperiment.g.cs | 63 ++++- ...Client.GetPromptVersionsForExperiment.g.cs | 63 ++++- ...erimentClient.RunExperimentEvaluators.g.cs | 63 ++++- ...mentClient.RunExperimentEvaluatorsOld.g.cs | 63 ++++- ...licone.ExperimentClient.RunHypothesis.g.cs | 68 +++++- ....ExperimentClient.ShouldRunEvaluators.g.cs | 63 ++++- ...ExperimentClient.UpdateExperimentCell.g.cs | 68 +++++- ...ExperimentClient.UpdateExperimentMeta.g.cs | 65 ++++- ...rimentClient.UpdateExperimentTableRow.g.cs | 68 +++++- .../Generated/Helicone.ExperimentClient.g.cs | 8 +- .../Generated/Helicone.HeliconeClient.g.cs | 74 +++--- ...iconeSqlClient.BulkDeleteSavedQueries.g.cs | 66 ++++- ...ne.HeliconeSqlClient.CreateSavedQuery.g.cs | 66 ++++- ...ne.HeliconeSqlClient.DeleteSavedQuery.g.cs | 64 ++++- ...elicone.HeliconeSqlClient.DownloadCsv.g.cs | 66 ++++- ...Helicone.HeliconeSqlClient.ExecuteSql.g.cs | 66 ++++- ...HeliconeSqlClient.GetClickHouseSchema.g.cs | 61 ++++- ...one.HeliconeSqlClient.GetSavedQueries.g.cs | 61 ++++- ...icone.HeliconeSqlClient.GetSavedQuery.g.cs | 64 ++++- ...ne.HeliconeSqlClient.UpdateSavedQuery.g.cs | 69 +++++- .../Generated/Helicone.HeliconeSqlClient.g.cs | 8 +- ....IAgentClient.CreateAndEscalateThread.g.cs | 9 + .../Helicone.IAgentClient.DeleteThread.g.cs | 11 + .../Helicone.IAgentClient.EscalateThread.g.cs | 11 + .../Helicone.IAgentClient.Generate.g.cs | 12 + .../Helicone.IAgentClient.GetAllThreads.g.cs | 9 + .../Helicone.IAgentClient.GetThread.g.cs | 11 + .../Helicone.IAgentClient.ReopenThread.g.cs | 11 + .../Helicone.IAgentClient.SearchDocs.g.cs | 12 + ...cone.IAgentClient.UpsertThreadMessage.g.cs | 14 ++ .../Helicone.IApiKeyClient.CreateAPIKey.g.cs | 12 + ...icone.IApiKeyClient.CreateProviderKey.g.cs | 12 + ...Helicone.IApiKeyClient.CreateProxyKey.g.cs | 12 + .../Helicone.IApiKeyClient.DeleteAPIKey.g.cs | 11 + ...icone.IApiKeyClient.DeleteProviderKey.g.cs | 11 + .../Helicone.IApiKeyClient.GetAPIKeys.g.cs | 9 + ...Helicone.IApiKeyClient.GetProviderKey.g.cs | 11 + ...elicone.IApiKeyClient.GetProviderKeys.g.cs | 9 + .../Helicone.IApiKeyClient.UpdateAPIKey.g.cs | 14 ++ ...icone.IApiKeyClient.UpdateProviderKey.g.cs | 14 ++ ....IComparisonClient.GetModelComparison.g.cs | 12 + ...cone.ICreditsClient.GetCreditsBalance.g.cs | 9 + .../Helicone.ICreditsClient.GetDiscounts.g.cs | 9 + ...cone.ICreditsClient.GetSpendBreakdown.g.cs | 15 ++ ...Helicone.ICreditsClient.GetTotalSpend.g.cs | 9 + .../Helicone.ICreditsClient.ListInvoices.g.cs | 9 + ...ICreditsClient.ListTokenUsagePayments.g.cs | 13 + ...cone.ICustomerClient.GetCustomerUsage.g.cs | 14 ++ ...Helicone.ICustomerClient.GetCustomers.g.cs | 12 + ...ne.IDashboardClient.GetScoresOverTime.g.cs | 12 + .../Helicone.IDatasetClient.AddDataset.g.cs | 12 + ...one.IDatasetClient.AddHeliconeDataset.g.cs | 12 + ...icone.IDatasetClient.AddRandomDataset.g.cs | 12 + ...atasetClient.CountHeliconeDatasetRows.g.cs | 11 + ...icone.IDatasetClient.CreateDatasetRow.g.cs | 16 ++ ....IDatasetClient.DeleteHeliconeDataset.g.cs | 11 + .../Helicone.IDatasetClient.GetDataset.g.cs | 11 + .../Helicone.IDatasetClient.GetDatasets.g.cs | 12 + ...icone.IDatasetClient.InsertDatasetRow.g.cs | 14 ++ ...Helicone.IDatasetClient.MutateDataset.g.cs | 14 ++ ....IDatasetClient.MutateHeliconeDataset.g.cs | 14 ++ ...e.IDatasetClient.QueryHeliconeDataset.g.cs | 12 + ...atasetClient.QueryHeliconeDatasetRows.g.cs | 14 ++ ...etClient.UpdateHeliconeDatasetRequest.g.cs | 16 ++ .../Helicone.IEvalsClient.AddEval.g.cs | 14 ++ .../Helicone.IEvalsClient.GetEvalScores.g.cs | 9 + .../Helicone.IEvalsClient.QueryEvals.g.cs | 12 + ....IEvalsClient.QueryScoreDistributions.g.cs | 12 + ...cone.IEvaluatorClient.CreateEvaluator.g.cs | 12 + ...EvaluatorClient.CreateOnlineEvaluator.g.cs | 14 ++ ...cone.IEvaluatorClient.DeleteEvaluator.g.cs | 11 + ...EvaluatorClient.DeleteOnlineEvaluator.g.cs | 13 + ...elicone.IEvaluatorClient.GetEvaluator.g.cs | 11 + ...ne.IEvaluatorClient.GetEvaluatorStats.g.cs | 11 + ...atorClient.GetExperimentsForEvaluator.g.cs | 11 + ....IEvaluatorClient.GetOnlineEvaluators.g.cs | 11 + ...cone.IEvaluatorClient.QueryEvaluators.g.cs | 12 + ...one.IEvaluatorClient.TestLLMEvaluator.g.cs | 12 + ...EvaluatorClient.TestLastMileEvaluator.g.cs | 12 + ....IEvaluatorClient.TestPythonEvaluator.g.cs | 12 + ...cone.IEvaluatorClient.UpdateEvaluator.g.cs | 14 ++ ...rimentClient.AddManualRowToExperiment.g.cs | 14 ++ ...Client.AddManualRowsToExperimentBatch.g.cs | 14 ++ ...xperimentClient.CreateEmptyExperiment.g.cs | 9 + ...ExperimentClient.CreateExperimentCell.g.cs | 14 ++ ...perimentClient.CreateExperimentColumn.g.cs | 14 ++ ...imentClient.CreateExperimentEvaluator.g.cs | 14 ++ ...ntClient.CreateExperimentEvaluatorOld.g.cs | 14 ++ ...entClient.CreateExperimentFromRequest.g.cs | 11 + ...rimentClient.CreateExperimentTableRow.g.cs | 14 ++ ...tClient.CreateExperimentTableRowBatch.g.cs | 14 ++ ...t.CreateExperimentTableRowFromDataset.g.cs | 13 + ...reateExperimentTableRowWithCellsBatch.g.cs | 14 ++ ...rimentClient.CreateNewEmptyExperiment.g.cs | 12 + ...IExperimentClient.CreateNewExperiment.g.cs | 12 + ...tClient.CreateNewExperimentHypothesis.g.cs | 12 + ...perimentClient.CreateNewExperimentOld.g.cs | 12 + ...rimentClient.CreateNewExperimentTable.g.cs | 12 + ...t.CreateNewPromptVersionForExperiment.g.cs | 14 ++ ...ne.IExperimentClient.DeleteExperiment.g.cs | 11 + ...imentClient.DeleteExperimentEvaluator.g.cs | 13 + ...ntClient.DeleteExperimentEvaluatorOld.g.cs | 13 + ...rimentClient.DeleteExperimentTableRow.g.cs | 13 + ...imentClient.DeleteExperimentTableRows.g.cs | 14 ++ ...IExperimentClient.DeletePromptVersion.g.cs | 13 + ...e.IExperimentClient.GetExperimentById.g.cs | 11 + ...erimentClient.GetExperimentEvaluators.g.cs | 11 + ...rimentClient.GetExperimentEvaluators2.g.cs | 11 + ...tClient.GetExperimentHypothesisScores.g.cs | 11 + ...ient.GetExperimentPromptVersionScores.g.cs | 13 + ....IExperimentClient.GetExperimentScore.g.cs | 15 ++ ...perimentClient.GetExperimentTableById.g.cs | 11 + ...mentClient.GetExperimentTableMetadata.g.cs | 11 + ...IExperimentClient.GetExperimentTables.g.cs | 9 + ...cone.IExperimentClient.GetExperiments.g.cs | 9 + ...e.IExperimentClient.GetExperimentsOld.g.cs | 12 + ...imentClient.GetInputKeysForExperiment.g.cs | 11 + ...Client.GetPromptVersionsForExperiment.g.cs | 11 + ...erimentClient.RunExperimentEvaluators.g.cs | 11 + ...mentClient.RunExperimentEvaluatorsOld.g.cs | 11 + ...icone.IExperimentClient.RunHypothesis.g.cs | 14 ++ ...IExperimentClient.ShouldRunEvaluators.g.cs | 11 + ...ExperimentClient.UpdateExperimentCell.g.cs | 14 ++ ...ExperimentClient.UpdateExperimentMeta.g.cs | 12 + ...rimentClient.UpdateExperimentTableRow.g.cs | 14 ++ ...iconeSqlClient.BulkDeleteSavedQueries.g.cs | 13 + ...e.IHeliconeSqlClient.CreateSavedQuery.g.cs | 13 + ...e.IHeliconeSqlClient.DeleteSavedQuery.g.cs | 12 + ...licone.IHeliconeSqlClient.DownloadCsv.g.cs | 13 + ...elicone.IHeliconeSqlClient.ExecuteSql.g.cs | 13 + ...HeliconeSqlClient.GetClickHouseSchema.g.cs | 10 + ...ne.IHeliconeSqlClient.GetSavedQueries.g.cs | 10 + ...cone.IHeliconeSqlClient.GetSavedQuery.g.cs | 12 + ...e.IHeliconeSqlClient.UpdateSavedQuery.g.cs | 15 ++ ....IIntegrationClient.CreateIntegration.g.cs | 12 + ...one.IIntegrationClient.GetIntegration.g.cs | 11 + ...ntegrationClient.GetIntegrationByType.g.cs | 11 + ...ne.IIntegrationClient.GetIntegrations.g.cs | 9 + ...e.IIntegrationClient.GetSlackChannels.g.cs | 9 + ...e.IIntegrationClient.GetSlackSettings.g.cs | 9 + ...ntegrationClient.TestStripeMeterEvent.g.cs | 14 ++ ....IIntegrationClient.UpdateIntegration.g.cs | 14 ++ ...elicone.IMetricsClient.GetActiveUsers.g.cs | 12 + ...cone.IMetricsClient.GetAverageLatency.g.cs | 12 + ...ricsClient.GetAverageTimeToFirstToken.g.cs | 12 + ...ricsClient.GetAverageTokensPerRequest.g.cs | 12 + ...licone.IMetricsClient.GetCostOverTime.g.cs | 12 + ...cone.IMetricsClient.GetCountryMetrics.g.cs | 12 + ...cone.IMetricsClient.GetErrorsOverTime.g.cs | 12 + ...one.IMetricsClient.GetLatencyOverTime.g.cs | 12 + ...licone.IMetricsClient.GetModelMetrics.g.cs | 12 + .../Helicone.IMetricsClient.GetQuantiles.g.cs | 12 + ...licone.IMetricsClient.GetRequestCount.g.cs | 12 + ...etricsClient.GetRequestStatusOverTime.g.cs | 12 + ...ne.IMetricsClient.GetRequestsOverTime.g.cs | 12 + ...one.IMetricsClient.GetThreatsOverTime.g.cs | 12 + ...icsClient.GetTimeToFirstTokenOverTime.g.cs | 12 + ...cone.IMetricsClient.GetTokensOverTime.g.cs | 12 + .../Helicone.IMetricsClient.GetTotalCost.g.cs | 12 + ...icone.IMetricsClient.GetTotalRequests.g.cs | 12 + ...licone.IMetricsClient.GetTotalThreats.g.cs | 12 + ...icone.IMetricsClient.GetUsersOverTime.g.cs | 12 + ...IModelRegistryClient.GetModelRegistry.g.cs | 10 + .../Helicone.IModelsClient.GetModels.g.cs | 9 + ...one.IModelsClient.GetMultimodalModels.g.cs | 9 + .../Helicone.IPiClient.AddSession.g.cs | 12 + .../Helicone.IPiClient.GetApiKey.g.cs | 12 + .../Helicone.IPiClient.GetCostsOverTime.g.cs | 12 + .../Helicone.IPiClient.GetOrgName.g.cs | 9 + .../Helicone.IPiClient.GetTotalCosts.g.cs | 9 + ...Helicone.IPiClient.PiGetTotalRequests.g.cs | 9 + .../Helicone.IPlaygroundClient.Generate.g.cs | 12 + ...oundClient.GetRequestsThroughHelicone.g.cs | 9 + ...ygroundClient.RequestsThroughHelicone.g.cs | 12 + ...ne.IPrompt2025Client.CreatePrompt2025.g.cs | 12 + ...ne.IPrompt2025Client.DeletePrompt2025.g.cs | 11 + ...mpt2025Client.DeletePrompt2025Version.g.cs | 13 + ...icone.IPrompt2025Client.GetPrompt2025.g.cs | 11 + ....IPrompt2025Client.GetPrompt2025Count.g.cs | 9 + ...lient.GetPrompt2025EnvironmentVersion.g.cs | 12 + ...t2025Client.GetPrompt2025Environments.g.cs | 9 + ...IPrompt2025Client.GetPrompt2025Inputs.g.cs | 15 ++ ...Client.GetPrompt2025ProductionVersion.g.cs | 12 + ...e.IPrompt2025Client.GetPrompt2025Tags.g.cs | 9 + ...2025Client.GetPrompt2025TotalVersions.g.cs | 12 + ...Prompt2025Client.GetPrompt2025Version.g.cs | 12 + ...pt2025Client.GetPrompt2025VersionBody.g.cs | 11 + ...rompt2025Client.GetPrompt2025Versions.g.cs | 12 + ...cone.IPrompt2025Client.GetPrompts2025.g.cs | 12 + ...25Client.RemoveEnvironmentFromVersion.g.cs | 12 + ...ne.IPrompt2025Client.RenamePrompt2025.g.cs | 14 ++ ...025Client.SetPromptVersionEnvironment.g.cs | 12 + ...ne.IPrompt2025Client.UpdatePrompt2025.g.cs | 12 + ...Prompt2025Client.UpdatePrompt2025Tags.g.cs | 14 ++ ...lient.GetPrompt2025EnvironmentVersion.g.cs | 12 + ...Client.GetPrompt2025ProductionVersion.g.cs | 12 + ...ompt2025V2Client.GetPrompt2025Version.g.cs | 12 + .../Helicone.IPromptClient.CreatePrompt.g.cs | 12 + ...licone.IPromptClient.CreateSubversion.g.cs | 14 ++ ....IPromptClient.CreateSubversionFromUi.g.cs | 14 ++ .../Helicone.IPromptClient.DeletePrompt.g.cs | 11 + ...one.IPromptClient.DeletePromptVersion.g.cs | 11 + ....IPromptClient.EditPromptVersionLabel.g.cs | 14 ++ ...romptClient.EditPromptVersionTemplate.g.cs | 14 ++ .../Helicone.IPromptClient.GetInputs.g.cs | 14 ++ .../Helicone.IPromptClient.GetPrompt.g.cs | 14 ++ ...ne.IPromptClient.GetPromptExperiments.g.cs | 11 + ...licone.IPromptClient.GetPromptVersion.g.cs | 11 + ...romptClient.GetPromptVersionTemplates.g.cs | 14 ++ ...icone.IPromptClient.GetPromptVersions.g.cs | 14 ++ ...romptClient.GetPromptVersionsCompiled.g.cs | 14 ++ .../Helicone.IPromptClient.GetPrompts.g.cs | 12 + .../Helicone.IPromptClient.HasPrompts.g.cs | 9 + ...ient.PromotePromptVersionToProduction.g.cs | 14 ++ ...romptClient.UpdatePromptUserDefinedId.g.cs | 14 ++ ...e.IPropertyClient.GetHiddenProperties.g.cs | 9 + ...elicone.IPropertyClient.GetProperties.g.cs | 12 + ...IPropertyClient.GetPropertiesOverTime.g.cs | 12 + .../Helicone.IPropertyClient.GetTopCosts.g.cs | 14 ++ ...licone.IPropertyClient.GetTopRequests.g.cs | 14 ++ ...Helicone.IPropertyClient.HideProperty.g.cs | 12 + ...icone.IPropertyClient.RestoreProperty.g.cs | 12 + ...cone.IPropertyClient.SearchProperties.g.cs | 14 ++ ...elicone.IProvidersClient.GetProviders.g.cs | 12 + .../Helicone.IRequestClient.AddScores.g.cs | 14 ++ ...licone.IRequestClient.FeedbackRequest.g.cs | 14 ++ ...ne.IRequestClient.GetRequestAssetById.g.cs | 13 + ...elicone.IRequestClient.GetRequestById.g.cs | 15 ++ ...licone.IRequestClient.GetRequestCount.g.cs | 12 + ...icone.IRequestClient.GetRequestInputs.g.cs | 11 + .../Helicone.IRequestClient.GetRequests.g.cs | 12 + ...icone.IRequestClient.GetRequestsByIds.g.cs | 12 + ....IRequestClient.GetRequestsClickhouse.g.cs | 12 + .../Helicone.IRequestClient.PutProperty.g.cs | 14 ++ .../Helicone.ISecurityClient.GetSecurity.g.cs | 12 + .../Helicone.ISessionClient.GetMetrics.g.cs | 12 + .../Helicone.ISessionClient.GetNames.g.cs | 12 + ...Helicone.ISessionClient.GetSessionTag.g.cs | 11 + .../Helicone.ISessionClient.GetSessions.g.cs | 12 + ...icone.ISessionClient.GetSessionsCount.g.cs | 12 + ....ISessionClient.UpdateSessionFeedback.g.cs | 14 ++ ...icone.ISessionClient.UpdateSessionTag.g.cs | 14 ++ ...ne.IStatusClient.GetAllProviderStatus.g.cs | 9 + ...icone.IStatusClient.GetProviderStatus.g.cs | 13 + .../Helicone.IStripeClient.AddOns.g.cs | 11 + ...cone.IStripeClient.CancelSubscription.g.cs | 9 + ...ent.CreateCloudGatewayCheckoutSession.g.cs | 12 + ...cone.IStripeClient.CreateSetupSession.g.cs | 12 + .../Helicone.IStripeClient.DeleteAddOns.g.cs | 11 + ...icone.IStripeClient.DisableAutoTopoff.g.cs | 9 + ...e.IStripeClient.GetAutoTopoffSettings.g.cs | 9 + ...elicone.IStripeClient.GetCostForEvals.g.cs | 9 + ...e.IStripeClient.GetCostForExperiments.g.cs | 9 + ...icone.IStripeClient.GetCostForPrompts.g.cs | 9 + .../Helicone.IStripeClient.GetFreeUsage.g.cs | 9 + ...icone.IStripeClient.GetPaymentMethods.g.cs | 9 + ...elicone.IStripeClient.GetSubscription.g.cs | 9 + .../Helicone.IStripeClient.GetUsageStats.g.cs | 9 + ...cone.IStripeClient.ManageSubscription.g.cs | 9 + .../Helicone.IStripeClient.MigrateToPro.g.cs | 9 + ...Helicone.IStripeClient.PreviewInvoice.g.cs | 9 + ...one.IStripeClient.RemovePaymentMethod.g.cs | 11 + ...ne.IStripeClient.SearchPaymentIntents.g.cs | 15 ++ ....IStripeClient.UndoCancelSubscription.g.cs | 9 + ...StripeClient.UpdateAutoTopoffSettings.g.cs | 12 + ...IStripeClient.UpgradeExistingCustomer.g.cs | 12 + ...t.UpgradeExistingCustomerToTeamBundle.g.cs | 12 + .../Helicone.IStripeClient.UpgradeToPro.g.cs | 12 + ...one.IStripeClient.UpgradeToTeamBundle.g.cs | 12 + .../Helicone.ITestClient.SendTestRequest.g.cs | 12 + .../Helicone.ITraceClient.LogCustomTrace.g.cs | 12 + ...one.ITraceClient.LogCustomTraceLegacy.g.cs | 12 + ...cone.ITraceClient.LogCustomTraceTyped.g.cs | 12 + .../Helicone.ITraceClient.LogPythonTrace.g.cs | 12 + .../Helicone.ITraceClient.LogTrace.g.cs | 12 + .../Helicone.IUserClient.GetUserMetrics.g.cs | 12 + ...ne.IUserClient.GetUserMetricsOverview.g.cs | 12 + .../Helicone.IUserClient.GetUsers.g.cs | 12 + .../Helicone.IVaultClient.AddKey.g.cs | 12 + .../Helicone.IVaultClient.GetKeyById.g.cs | 11 + .../Helicone.IVaultClient.GetKeys.g.cs | 9 + .../Helicone.IVaultClient.UpdateKey.g.cs | 14 ++ ...elicone.IWebhooksClient.DeleteWebhook.g.cs | 11 + .../Helicone.IWebhooksClient.GetWebhooks.g.cs | 9 + .../Helicone.IWebhooksClient.NewWebhook.g.cs | 12 + .../Helicone.IWebhooksClient.TestWebhook.g.cs | 11 + ...WrappedClient.CheckHasWrapped2025Data.g.cs | 9 + ...ne.IWrappedClient.GetWrapped2025Stats.g.cs | 9 + ...e.IntegrationClient.CreateIntegration.g.cs | 65 ++++- ...cone.IntegrationClient.GetIntegration.g.cs | 63 ++++- ...ntegrationClient.GetIntegrationByType.g.cs | 63 ++++- ...one.IntegrationClient.GetIntegrations.g.cs | 60 ++++- ...ne.IntegrationClient.GetSlackChannels.g.cs | 60 ++++- ...ne.IntegrationClient.GetSlackSettings.g.cs | 60 ++++- ...ntegrationClient.TestStripeMeterEvent.g.cs | 68 +++++- ...e.IntegrationClient.UpdateIntegration.g.cs | 68 +++++- .../Generated/Helicone.IntegrationClient.g.cs | 8 +- ...Helicone.MetricsClient.GetActiveUsers.g.cs | 65 ++++- ...icone.MetricsClient.GetAverageLatency.g.cs | 65 ++++- ...ricsClient.GetAverageTimeToFirstToken.g.cs | 65 ++++- ...ricsClient.GetAverageTokensPerRequest.g.cs | 65 ++++- ...elicone.MetricsClient.GetCostOverTime.g.cs | 65 ++++- ...icone.MetricsClient.GetCountryMetrics.g.cs | 65 ++++- ...icone.MetricsClient.GetErrorsOverTime.g.cs | 65 ++++- ...cone.MetricsClient.GetLatencyOverTime.g.cs | 65 ++++- ...elicone.MetricsClient.GetModelMetrics.g.cs | 65 ++++- .../Helicone.MetricsClient.GetQuantiles.g.cs | 65 ++++- ...elicone.MetricsClient.GetRequestCount.g.cs | 65 ++++- ...etricsClient.GetRequestStatusOverTime.g.cs | 65 ++++- ...one.MetricsClient.GetRequestsOverTime.g.cs | 65 ++++- ...cone.MetricsClient.GetThreatsOverTime.g.cs | 65 ++++- ...icsClient.GetTimeToFirstTokenOverTime.g.cs | 65 ++++- ...icone.MetricsClient.GetTokensOverTime.g.cs | 65 ++++- .../Helicone.MetricsClient.GetTotalCost.g.cs | 65 ++++- ...licone.MetricsClient.GetTotalRequests.g.cs | 65 ++++- ...elicone.MetricsClient.GetTotalThreats.g.cs | 65 ++++- ...licone.MetricsClient.GetUsersOverTime.g.cs | 65 ++++- .../Generated/Helicone.MetricsClient.g.cs | 8 +- ....ModelRegistryClient.GetModelRegistry.g.cs | 61 ++++- .../Helicone.ModelRegistryClient.g.cs | 8 +- .../Helicone.ModelsClient.GetModels.g.cs | 60 ++++- ...cone.ModelsClient.GetMultimodalModels.g.cs | 60 ++++- .../Generated/Helicone.ModelsClient.g.cs | 8 +- .../Generated/Helicone.OptionsSupport.g.cs | 231 +++++++++++++++++- .../Helicone.PiClient.AddSession.g.cs | 65 ++++- .../Helicone.PiClient.GetApiKey.g.cs | 65 ++++- .../Helicone.PiClient.GetCostsOverTime.g.cs | 65 ++++- .../Helicone.PiClient.GetOrgName.g.cs | 60 ++++- .../Helicone.PiClient.GetTotalCosts.g.cs | 60 ++++- .../Helicone.PiClient.PiGetTotalRequests.g.cs | 60 ++++- .../Helicone/Generated/Helicone.PiClient.g.cs | 8 +- .../Helicone.PlaygroundClient.Generate.g.cs | 65 ++++- ...oundClient.GetRequestsThroughHelicone.g.cs | 60 ++++- ...ygroundClient.RequestsThroughHelicone.g.cs | 65 ++++- .../Generated/Helicone.PlaygroundClient.g.cs | 8 +- ...one.Prompt2025Client.CreatePrompt2025.g.cs | 65 ++++- ...one.Prompt2025Client.DeletePrompt2025.g.cs | 63 ++++- ...mpt2025Client.DeletePrompt2025Version.g.cs | 66 ++++- ...licone.Prompt2025Client.GetPrompt2025.g.cs | 63 ++++- ...e.Prompt2025Client.GetPrompt2025Count.g.cs | 60 ++++- ...lient.GetPrompt2025EnvironmentVersion.g.cs | 65 ++++- ...t2025Client.GetPrompt2025Environments.g.cs | 60 ++++- ....Prompt2025Client.GetPrompt2025Inputs.g.cs | 73 +++++- ...Client.GetPrompt2025ProductionVersion.g.cs | 65 ++++- ...ne.Prompt2025Client.GetPrompt2025Tags.g.cs | 60 ++++- ...2025Client.GetPrompt2025TotalVersions.g.cs | 65 ++++- ...Prompt2025Client.GetPrompt2025Version.g.cs | 65 ++++- ...pt2025Client.GetPrompt2025VersionBody.g.cs | 63 ++++- ...rompt2025Client.GetPrompt2025Versions.g.cs | 65 ++++- ...icone.Prompt2025Client.GetPrompts2025.g.cs | 65 ++++- ...25Client.RemoveEnvironmentFromVersion.g.cs | 65 ++++- ...one.Prompt2025Client.RenamePrompt2025.g.cs | 68 +++++- ...025Client.SetPromptVersionEnvironment.g.cs | 65 ++++- ...one.Prompt2025Client.UpdatePrompt2025.g.cs | 65 ++++- ...Prompt2025Client.UpdatePrompt2025Tags.g.cs | 68 +++++- .../Generated/Helicone.Prompt2025Client.g.cs | 8 +- ...lient.GetPrompt2025EnvironmentVersion.g.cs | 65 ++++- ...Client.GetPrompt2025ProductionVersion.g.cs | 65 ++++- ...ompt2025V2Client.GetPrompt2025Version.g.cs | 65 ++++- .../Helicone.Prompt2025V2Client.g.cs | 8 +- .../Helicone.PromptClient.CreatePrompt.g.cs | 65 ++++- ...elicone.PromptClient.CreateSubversion.g.cs | 68 +++++- ...e.PromptClient.CreateSubversionFromUi.g.cs | 68 +++++- .../Helicone.PromptClient.DeletePrompt.g.cs | 53 +++- ...cone.PromptClient.DeletePromptVersion.g.cs | 63 ++++- ...e.PromptClient.EditPromptVersionLabel.g.cs | 68 +++++- ...romptClient.EditPromptVersionTemplate.g.cs | 68 +++++- .../Helicone.PromptClient.GetInputs.g.cs | 68 +++++- .../Helicone.PromptClient.GetPrompt.g.cs | 68 +++++- ...one.PromptClient.GetPromptExperiments.g.cs | 63 ++++- ...elicone.PromptClient.GetPromptVersion.g.cs | 63 ++++- ...romptClient.GetPromptVersionTemplates.g.cs | 68 +++++- ...licone.PromptClient.GetPromptVersions.g.cs | 68 +++++- ...romptClient.GetPromptVersionsCompiled.g.cs | 68 +++++- .../Helicone.PromptClient.GetPrompts.g.cs | 65 ++++- .../Helicone.PromptClient.HasPrompts.g.cs | 60 ++++- ...ient.PromotePromptVersionToProduction.g.cs | 68 +++++- ...romptClient.UpdatePromptUserDefinedId.g.cs | 68 +++++- .../Generated/Helicone.PromptClient.g.cs | 8 +- ...ne.PropertyClient.GetHiddenProperties.g.cs | 60 ++++- ...Helicone.PropertyClient.GetProperties.g.cs | 65 ++++- ....PropertyClient.GetPropertiesOverTime.g.cs | 65 ++++- .../Helicone.PropertyClient.GetTopCosts.g.cs | 68 +++++- ...elicone.PropertyClient.GetTopRequests.g.cs | 68 +++++- .../Helicone.PropertyClient.HideProperty.g.cs | 65 ++++- ...licone.PropertyClient.RestoreProperty.g.cs | 65 ++++- ...icone.PropertyClient.SearchProperties.g.cs | 68 +++++- .../Generated/Helicone.PropertyClient.g.cs | 8 +- ...Helicone.ProvidersClient.GetProviders.g.cs | 65 ++++- .../Generated/Helicone.ProvidersClient.g.cs | 8 +- .../Helicone.RequestClient.AddScores.g.cs | 68 +++++- ...elicone.RequestClient.FeedbackRequest.g.cs | 68 +++++- ...one.RequestClient.GetRequestAssetById.g.cs | 66 ++++- ...Helicone.RequestClient.GetRequestById.g.cs | 72 +++++- ...elicone.RequestClient.GetRequestCount.g.cs | 65 ++++- ...licone.RequestClient.GetRequestInputs.g.cs | 63 ++++- .../Helicone.RequestClient.GetRequests.g.cs | 65 ++++- ...licone.RequestClient.GetRequestsByIds.g.cs | 65 ++++- ...e.RequestClient.GetRequestsClickhouse.g.cs | 65 ++++- .../Helicone.RequestClient.PutProperty.g.cs | 68 +++++- .../Generated/Helicone.RequestClient.g.cs | 8 +- .../Helicone.SecurityClient.GetSecurity.g.cs | 65 ++++- .../Generated/Helicone.SecurityClient.g.cs | 8 +- .../Helicone.SessionClient.GetMetrics.g.cs | 65 ++++- .../Helicone.SessionClient.GetNames.g.cs | 65 ++++- .../Helicone.SessionClient.GetSessionTag.g.cs | 63 ++++- .../Helicone.SessionClient.GetSessions.g.cs | 65 ++++- ...licone.SessionClient.GetSessionsCount.g.cs | 65 ++++- ...e.SessionClient.UpdateSessionFeedback.g.cs | 68 +++++- ...licone.SessionClient.UpdateSessionTag.g.cs | 68 +++++- .../Generated/Helicone.SessionClient.g.cs | 8 +- ...one.StatusClient.GetAllProviderStatus.g.cs | 60 ++++- ...licone.StatusClient.GetProviderStatus.g.cs | 70 +++++- .../Generated/Helicone.StatusClient.g.cs | 8 +- .../Helicone.StripeClient.AddOns.g.cs | 63 ++++- ...icone.StripeClient.CancelSubscription.g.cs | 60 ++++- ...ent.CreateCloudGatewayCheckoutSession.g.cs | 65 ++++- ...icone.StripeClient.CreateSetupSession.g.cs | 65 ++++- .../Helicone.StripeClient.DeleteAddOns.g.cs | 63 ++++- ...licone.StripeClient.DisableAutoTopoff.g.cs | 60 ++++- ...ne.StripeClient.GetAutoTopoffSettings.g.cs | 60 ++++- ...Helicone.StripeClient.GetCostForEvals.g.cs | 60 ++++- ...ne.StripeClient.GetCostForExperiments.g.cs | 60 ++++- ...licone.StripeClient.GetCostForPrompts.g.cs | 60 ++++- .../Helicone.StripeClient.GetFreeUsage.g.cs | 60 ++++- ...licone.StripeClient.GetPaymentMethods.g.cs | 60 ++++- ...Helicone.StripeClient.GetSubscription.g.cs | 60 ++++- .../Helicone.StripeClient.GetUsageStats.g.cs | 60 ++++- ...icone.StripeClient.ManageSubscription.g.cs | 56 ++++- .../Helicone.StripeClient.MigrateToPro.g.cs | 56 ++++- .../Helicone.StripeClient.PreviewInvoice.g.cs | 60 ++++- ...cone.StripeClient.RemovePaymentMethod.g.cs | 63 ++++- ...one.StripeClient.SearchPaymentIntents.g.cs | 73 +++++- ...e.StripeClient.UndoCancelSubscription.g.cs | 60 ++++- ...StripeClient.UpdateAutoTopoffSettings.g.cs | 65 ++++- ....StripeClient.UpgradeExistingCustomer.g.cs | 61 ++++- ...t.UpgradeExistingCustomerToTeamBundle.g.cs | 61 ++++- .../Helicone.StripeClient.UpgradeToPro.g.cs | 61 ++++- ...cone.StripeClient.UpgradeToTeamBundle.g.cs | 61 ++++- .../Generated/Helicone.StripeClient.g.cs | 8 +- .../Helicone.TestClient.SendTestRequest.g.cs | 65 ++++- .../Generated/Helicone.TestClient.g.cs | 8 +- .../Helicone.TraceClient.LogCustomTrace.g.cs | 55 ++++- ...cone.TraceClient.LogCustomTraceLegacy.g.cs | 55 ++++- ...icone.TraceClient.LogCustomTraceTyped.g.cs | 65 ++++- .../Helicone.TraceClient.LogPythonTrace.g.cs | 55 ++++- .../Helicone.TraceClient.LogTrace.g.cs | 55 ++++- .../Generated/Helicone.TraceClient.g.cs | 8 +- .../Helicone.UserClient.GetUserMetrics.g.cs | 65 ++++- ...one.UserClient.GetUserMetricsOverview.g.cs | 65 ++++- .../Helicone.UserClient.GetUsers.g.cs | 65 ++++- .../Generated/Helicone.UserClient.g.cs | 8 +- .../Helicone.VaultClient.AddKey.g.cs | 65 ++++- .../Helicone.VaultClient.GetKeyById.g.cs | 63 ++++- .../Helicone.VaultClient.GetKeys.g.cs | 60 ++++- .../Helicone.VaultClient.UpdateKey.g.cs | 68 +++++- .../Generated/Helicone.VaultClient.g.cs | 8 +- ...Helicone.WebhooksClient.DeleteWebhook.g.cs | 63 ++++- .../Helicone.WebhooksClient.GetWebhooks.g.cs | 60 ++++- .../Helicone.WebhooksClient.NewWebhook.g.cs | 65 ++++- .../Helicone.WebhooksClient.TestWebhook.g.cs | 63 ++++- .../Generated/Helicone.WebhooksClient.g.cs | 8 +- ...WrappedClient.CheckHasWrapped2025Data.g.cs | 60 ++++- ...one.WrappedClient.GetWrapped2025Stats.g.cs | 60 ++++- .../Generated/Helicone.WrappedClient.g.cs | 8 +- 570 files changed, 18729 insertions(+), 2291 deletions(-) create mode 100644 src/libs/Helicone/Generated/Helicone.AutoSDKHttpResponse.g.cs diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.CreateAndEscalateThread.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.CreateAndEscalateThread.g.cs index 2ca3a739..4ed9340b 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.CreateAndEscalateThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.CreateAndEscalateThread.g.cs @@ -61,6 +61,23 @@ partial void ProcessCreateAndEscalateThreadResponseContent( public async global::System.Threading.Tasks.Task CreateAndEscalateThreadAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateAndEscalateThreadAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> CreateAndEscalateThreadAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessCreateAndEscalateThreadResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/agent/thread/create-and-escalate", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessCreateAndEscalateThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessCreateAndEscalateThreadResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessCreateAndEscalateThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessCreateAndEscalateThreadResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessCreateAndEscalateThreadResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessCreateAndEscalateThreadResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessCreateAndEscalateThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessCreateAndEscalateThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessCreateAndEscalateThreadResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessCreateAndEscalateThreadResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.DeleteThread.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.DeleteThread.g.cs index 6fb04b05..3f4b4853 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.DeleteThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.DeleteThread.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteThreadResponseContent( string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteThreadAsResponseAsync( + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeleteThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteThreadResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/agent/thread/{sessionId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteThreadResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteThreadResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteThreadResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteThreadResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteThreadResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultSuccessBooleanString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultSuccessBooleanString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteThreadResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultSuccessBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultSuccessBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.EscalateThread.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.EscalateThread.g.cs index 70979a40..f2ba5d13 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.EscalateThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.EscalateThread.g.cs @@ -65,6 +65,26 @@ partial void ProcessEscalateThreadResponseContent( string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EscalateThreadAsResponseAsync( + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> EscalateThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessEscalateThreadResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/agent/thread/{sessionId}/escalate", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessEscalateThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessEscalateThreadResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessEscalateThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessEscalateThreadResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessEscalateThreadResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessEscalateThreadResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessEscalateThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessEscalateThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessEscalateThreadResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessEscalateThreadResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.Generate.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.Generate.g.cs index c215cfac..6f7f2a62 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.Generate.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.Generate.g.cs @@ -63,6 +63,28 @@ partial void ProcessGenerateResponseContent( /// public async global::System.Threading.Tasks.Task GenerateAsync( + global::Helicone.AllOf request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GenerateAsResponseAsync( + global::Helicone.AllOf request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +117,7 @@ partial void ProcessGenerateResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/agent/generate", baseUri: ResolveBaseUri( @@ -176,6 +199,8 @@ partial void ProcessGenerateResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +211,11 @@ partial void ProcessGenerateResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +233,8 @@ partial void ProcessGenerateResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +244,7 @@ partial void ProcessGenerateResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +253,11 @@ partial void ProcessGenerateResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +274,15 @@ partial void ProcessGenerateResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +322,8 @@ partial void ProcessGenerateResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +344,8 @@ partial void ProcessGenerateResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -329,9 +370,13 @@ partial void ProcessGenerateResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -359,9 +404,13 @@ partial void ProcessGenerateResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.GetAllThreads.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.GetAllThreads.g.cs index 95d6c1d2..d734a981 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.GetAllThreads.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.GetAllThreads.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetAllThreadsResponseContent( public async global::System.Threading.Tasks.Task GetAllThreadsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllThreadsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetAllThreadsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetAllThreadsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/agent/threads", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetAllThreadsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetAllThreadsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetAllThreadsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetAllThreadsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetAllThreadsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetAllThreadsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetAllThreadsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetAllThreadsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetAllThreadsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultThreadSummaryArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultThreadSummaryArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetAllThreadsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultThreadSummaryArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultThreadSummaryArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.GetThread.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.GetThread.g.cs index 3cd95407..01754d12 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.GetThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.GetThread.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetThreadResponseContent( string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetThreadAsResponseAsync( + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetThreadResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/agent/thread/{sessionId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetThreadResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetThreadResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetThreadResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetThreadResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetThreadResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetThreadResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.ReopenThread.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.ReopenThread.g.cs index 662080a9..9ebd3fe6 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.ReopenThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.ReopenThread.g.cs @@ -65,6 +65,26 @@ partial void ProcessReopenThreadResponseContent( string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ReopenThreadAsResponseAsync( + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> ReopenThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessReopenThreadResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/agent/thread/{sessionId}/reopen", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessReopenThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessReopenThreadResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessReopenThreadResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessReopenThreadResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessReopenThreadResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessReopenThreadResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessReopenThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessReopenThreadResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessReopenThreadResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessReopenThreadResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.SearchDocs.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.SearchDocs.g.cs index 9b3d6a55..16b4ef34 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.SearchDocs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.SearchDocs.g.cs @@ -63,6 +63,28 @@ partial void ProcessSearchDocsResponseContent( /// public async global::System.Threading.Tasks.Task SearchDocsAsync( + global::Helicone.SearchDocsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SearchDocsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> SearchDocsAsResponseAsync( + global::Helicone.SearchDocsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessSearchDocsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/agent/mcp/search", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessSearchDocsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessSearchDocsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessSearchDocsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessSearchDocsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessSearchDocsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessSearchDocsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessSearchDocsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessSearchDocsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessSearchDocsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessSearchDocsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.UpsertThreadMessage.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.UpsertThreadMessage.g.cs index 4df6b3b3..8a25b2c2 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.UpsertThreadMessage.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.UpsertThreadMessage.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpsertThreadMessageResponseContent( public async global::System.Threading.Tasks.Task UpsertThreadMessageAsync( string sessionId, + global::Helicone.UpsertThreadMessageRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertThreadMessageAsResponseAsync( + sessionId: sessionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpsertThreadMessageAsResponseAsync( + string sessionId, + global::Helicone.UpsertThreadMessageRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpsertThreadMessageResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/agent/thread/{sessionId}/message", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpsertThreadMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpsertThreadMessageResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpsertThreadMessageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpsertThreadMessageResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpsertThreadMessageResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpsertThreadMessageResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpsertThreadMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpsertThreadMessageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpsertThreadMessageResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpsertThreadMessageResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.AgentClient.g.cs b/src/libs/Helicone/Generated/Helicone.AgentClient.g.cs index a37a800a..70d7edfb 100644 --- a/src/libs/Helicone/Generated/Helicone.AgentClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.AgentClient.g.cs @@ -103,10 +103,10 @@ public AgentClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public AgentClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateAPIKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateAPIKey.g.cs index d692a205..8c62854b 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateAPIKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateAPIKey.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateAPIKeyResponseContent( /// public async global::System.Threading.Tasks.Task> CreateAPIKeyAsync( + global::Helicone.CreateAPIKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateAPIKeyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> CreateAPIKeyAsResponseAsync( + global::Helicone.CreateAPIKeyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateAPIKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/api-keys", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateAPIKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateAPIKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateAPIKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateAPIKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateAPIKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateAPIKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateAPIKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateAPIKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateAPIKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateAPIKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProviderKey.g.cs index e4690514..7f1d6fec 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProviderKey.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateProviderKeyResponseContent( /// public async global::System.Threading.Tasks.Task> CreateProviderKeyAsync( + global::Helicone.CreateProviderKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateProviderKeyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> CreateProviderKeyAsResponseAsync( + global::Helicone.CreateProviderKeyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateProviderKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/api-keys/provider-key", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateProviderKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateProviderKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateProviderKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateProviderKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateProviderKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateProviderKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProxyKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProxyKey.g.cs index 8326e917..46b08c6a 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProxyKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.CreateProxyKey.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateProxyKeyResponseContent( /// public async global::System.Threading.Tasks.Task> CreateProxyKeyAsync( + global::Helicone.CreateProxyKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateProxyKeyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> CreateProxyKeyAsResponseAsync( + global::Helicone.CreateProxyKeyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateProxyKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/api-keys/proxy-key", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateProxyKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateProxyKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateProxyKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateProxyKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateProxyKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateProxyKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateProxyKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateProxyKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateProxyKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateProxyKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteAPIKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteAPIKey.g.cs index e6b275c5..d653f08d 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteAPIKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteAPIKey.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteAPIKeyResponseContent( double apiKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteAPIKeyAsResponseAsync( + apiKeyId: apiKeyId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> DeleteAPIKeyAsResponseAsync( + double apiKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteAPIKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/api-keys/{apiKeyId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteAPIKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteAPIKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteAPIKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteAPIKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteAPIKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteAPIKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteAPIKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteAPIKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteAPIKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteAPIKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteProviderKey.g.cs index c3f59f8d..3fd4f295 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.DeleteProviderKey.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteProviderKeyResponseContent( string providerKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteProviderKeyAsResponseAsync( + providerKeyId: providerKeyId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> DeleteProviderKeyAsResponseAsync( + string providerKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteProviderKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/api-keys/provider-key/{providerKeyId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteProviderKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteProviderKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteProviderKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteProviderKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteProviderKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteProviderKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetAPIKeys.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetAPIKeys.g.cs index 2c13a342..83c23944 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetAPIKeys.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetAPIKeys.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetAPIKeysResponseContent( public async global::System.Threading.Tasks.Task GetAPIKeysAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAPIKeysAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetAPIKeysAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetAPIKeysResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/api-keys", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetAPIKeysResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetAPIKeysResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetAPIKeysResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetAPIKeysResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetAPIKeysResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetAPIKeysResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetAPIKeysResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetAPIKeysResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetAPIKeysResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultApiKeyHashStringApiKeyNameStringCreatedAtStringGovernanceBooleanIdNumberKeyPermissionsStringOrganizationIdStringSoftDeleteBooleanTempKeyBooleanUpdatedAtStringUserIdStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultApiKeyHashStringApiKeyNameStringCreatedAtStringGovernanceBooleanIdNumberKeyPermissionsStringOrganizationIdStringSoftDeleteBooleanTempKeyBooleanUpdatedAtStringUserIdStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetAPIKeysResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultApiKeyHashStringApiKeyNameStringCreatedAtStringGovernanceBooleanIdNumberKeyPermissionsStringOrganizationIdStringSoftDeleteBooleanTempKeyBooleanUpdatedAtStringUserIdStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultApiKeyHashStringApiKeyNameStringCreatedAtStringGovernanceBooleanIdNumberKeyPermissionsStringOrganizationIdStringSoftDeleteBooleanTempKeyBooleanUpdatedAtStringUserIdStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKey.g.cs index 9d75b5d3..ab204512 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKey.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetProviderKeyResponseContent( string providerKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProviderKeyAsResponseAsync( + providerKeyId: providerKeyId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> GetProviderKeyAsResponseAsync( + string providerKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetProviderKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/api-keys/provider-key/{providerKeyId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetProviderKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetProviderKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetProviderKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetProviderKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetProviderKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetProviderKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKeys.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKeys.g.cs index c7d5d32e..dc76ce3a 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKeys.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.GetProviderKeys.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetProviderKeysResponseContent( public async global::System.Threading.Tasks.Task, global::Helicone.GetProviderKeysResponse2>> GetProviderKeysAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProviderKeysAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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, global::Helicone.GetProviderKeysResponse2>>> GetProviderKeysAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetProviderKeysResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/api-keys/provider-keys", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetProviderKeysResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetProviderKeysResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetProviderKeysResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetProviderKeysResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetProviderKeysResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetProviderKeysResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetProviderKeysResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetProviderKeysResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetProviderKeysResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf, global::Helicone.GetProviderKeysResponse2>.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf, global::Helicone.GetProviderKeysResponse2>.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse, global::Helicone.GetProviderKeysResponse2>>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetProviderKeysResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf, global::Helicone.GetProviderKeysResponse2>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf, global::Helicone.GetProviderKeysResponse2>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse, global::Helicone.GetProviderKeysResponse2>>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateAPIKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateAPIKey.g.cs index c46b6fee..35d6edb7 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateAPIKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateAPIKey.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateAPIKeyResponseContent( public async global::System.Threading.Tasks.Task> UpdateAPIKeyAsync( double apiKeyId, + global::Helicone.UpdateAPIKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateAPIKeyAsResponseAsync( + apiKeyId: apiKeyId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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>> UpdateAPIKeyAsResponseAsync( + double apiKeyId, + global::Helicone.UpdateAPIKeyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateAPIKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/api-keys/{apiKeyId}", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateAPIKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateAPIKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateAPIKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateAPIKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateAPIKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateAPIKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateAPIKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateAPIKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateAPIKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateAPIKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateProviderKey.g.cs index 7b041e4f..f78e8e43 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.UpdateProviderKey.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateProviderKeyResponseContent( public async global::System.Threading.Tasks.Task UpdateProviderKeyAsync( string providerKeyId, + global::Helicone.UpdateProviderKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateProviderKeyAsResponseAsync( + providerKeyId: providerKeyId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateProviderKeyAsResponseAsync( + string providerKeyId, + global::Helicone.UpdateProviderKeyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateProviderKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/api-keys/provider-key/{providerKeyId}", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateProviderKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateProviderKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateProviderKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateProviderKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateProviderKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateProviderKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateProviderKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIdStringProviderNameStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIdStringProviderNameStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateProviderKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIdStringProviderNameStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIdStringProviderNameStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.g.cs b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.g.cs index 9690638f..0e93ee29 100644 --- a/src/libs/Helicone/Generated/Helicone.ApiKeyClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ApiKeyClient.g.cs @@ -103,10 +103,10 @@ public ApiKeyClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ApiKeyClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.AutoSDKHttpResponse.g.cs b/src/libs/Helicone/Generated/Helicone.AutoSDKHttpResponse.g.cs new file mode 100644 index 00000000..358fd2ff --- /dev/null +++ b/src/libs/Helicone/Generated/Helicone.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Helicone +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri) + { + StatusCode = statusCode; + Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + RequestUri = requestUri; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// Gets the response headers. + /// + public global::System.Collections.Generic.Dictionary> Headers { get; } + /// + /// Gets the final request URI associated with the response. + /// + public global::System.Uri? RequestUri { get; } + + internal static global::System.Collections.Generic.Dictionary> CreateHeaders( + global::System.Net.Http.HttpResponseMessage response) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null, + body: body) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri, + T body) + : base(statusCode, headers, requestUri) + { + Body = body; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ComparisonClient.GetModelComparison.g.cs b/src/libs/Helicone/Generated/Helicone.ComparisonClient.GetModelComparison.g.cs index a539bd60..cbd08b98 100644 --- a/src/libs/Helicone/Generated/Helicone.ComparisonClient.GetModelComparison.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ComparisonClient.GetModelComparison.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetModelComparisonResponseContent( /// public async global::System.Threading.Tasks.Task GetModelComparisonAsync( + global::System.Collections.Generic.IList request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetModelComparisonAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetModelComparisonAsResponseAsync( + global::System.Collections.Generic.IList request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetModelComparisonResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/public/compare/models", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetModelComparisonResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetModelComparisonResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetModelComparisonResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetModelComparisonResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetModelComparisonResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetModelComparisonResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetModelComparisonResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetModelComparisonResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetModelComparisonResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultModelArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultModelArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetModelComparisonResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultModelArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultModelArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ComparisonClient.g.cs b/src/libs/Helicone/Generated/Helicone.ComparisonClient.g.cs index 035ef4a6..d816e5cb 100644 --- a/src/libs/Helicone/Generated/Helicone.ComparisonClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ComparisonClient.g.cs @@ -103,10 +103,10 @@ public ComparisonClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ComparisonClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetCreditsBalance.g.cs b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetCreditsBalance.g.cs index 8ded7933..7696d226 100644 --- a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetCreditsBalance.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetCreditsBalance.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetCreditsBalanceResponseContent( public async global::System.Threading.Tasks.Task GetCreditsBalanceAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCreditsBalanceAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetCreditsBalanceAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetCreditsBalanceResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/credits/balance", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetCreditsBalanceResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetCreditsBalanceResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetCreditsBalanceResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetCreditsBalanceResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetCreditsBalanceResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetCreditsBalanceResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetCreditsBalanceResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetCreditsBalanceResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetCreditsBalanceResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultCreditBalanceResponseString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultCreditBalanceResponseString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetCreditsBalanceResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultCreditBalanceResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultCreditBalanceResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetDiscounts.g.cs b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetDiscounts.g.cs index 6e6513b9..330a8808 100644 --- a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetDiscounts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetDiscounts.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetDiscountsResponseContent( public async global::System.Threading.Tasks.Task GetDiscountsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDiscountsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetDiscountsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetDiscountsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/credits/discounts", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetDiscountsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetDiscountsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetDiscountsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetDiscountsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetDiscountsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetDiscountsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetDiscountsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetDiscountsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetDiscountsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultOrgDiscountArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultOrgDiscountArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetDiscountsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultOrgDiscountArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultOrgDiscountArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetSpendBreakdown.g.cs b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetSpendBreakdown.g.cs index c99ce9e9..93182c15 100644 --- a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetSpendBreakdown.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetSpendBreakdown.g.cs @@ -73,6 +73,32 @@ partial void ProcessGetSpendBreakdownResponseContent( string? endDate = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSpendBreakdownAsResponseAsync( + timeRange: timeRange, + startDate: startDate, + endDate: endDate, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// + /// 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> GetSpendBreakdownAsResponseAsync( + global::Helicone.GetSpendBreakdownTimeRange? timeRange = default, + string? startDate = default, + string? endDate = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -104,15 +130,16 @@ partial void ProcessGetSpendBreakdownResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/credits/spend/breakdown", baseUri: ResolveBaseUri( servers: s_GetSpendBreakdownServers, - defaultBaseUrl: "https://api.helicone.ai/")); + defaultBaseUrl: "https://api.helicone.ai/")); __pathBuilder .AddOptionalParameter("timeRange", timeRange?.ToValueString()) .AddOptionalParameter("startDate", startDate) - .AddOptionalParameter("endDate", endDate) + .AddOptionalParameter("endDate", endDate) ; var __path = __pathBuilder.ToString(); __path = global::Helicone.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -186,6 +213,8 @@ partial void ProcessGetSpendBreakdownResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -196,6 +225,11 @@ partial void ProcessGetSpendBreakdownResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -213,6 +247,8 @@ partial void ProcessGetSpendBreakdownResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -222,8 +258,7 @@ partial void ProcessGetSpendBreakdownResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -232,6 +267,11 @@ partial void ProcessGetSpendBreakdownResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -248,14 +288,15 @@ partial void ProcessGetSpendBreakdownResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -295,6 +336,8 @@ partial void ProcessGetSpendBreakdownResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -315,6 +358,8 @@ partial void ProcessGetSpendBreakdownResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -339,9 +384,13 @@ partial void ProcessGetSpendBreakdownResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultSpendBreakdownResponseString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultSpendBreakdownResponseString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -369,9 +418,13 @@ partial void ProcessGetSpendBreakdownResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultSpendBreakdownResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultSpendBreakdownResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetTotalSpend.g.cs b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetTotalSpend.g.cs index 71e7dd44..9458add1 100644 --- a/src/libs/Helicone/Generated/Helicone.CreditsClient.GetTotalSpend.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CreditsClient.GetTotalSpend.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetTotalSpendResponseContent( public async global::System.Threading.Tasks.Task GetTotalSpendAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTotalSpendAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetTotalSpendAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetTotalSpendResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/credits/totalSpend", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetTotalSpendResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetTotalSpendResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetTotalSpendResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetTotalSpendResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetTotalSpendResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetTotalSpendResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetTotalSpendResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetTotalSpendResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetTotalSpendResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultTotalSpendNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultTotalSpendNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetTotalSpendResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultTotalSpendNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultTotalSpendNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CreditsClient.ListInvoices.g.cs b/src/libs/Helicone/Generated/Helicone.CreditsClient.ListInvoices.g.cs index 4278bfb2..744c09ec 100644 --- a/src/libs/Helicone/Generated/Helicone.CreditsClient.ListInvoices.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CreditsClient.ListInvoices.g.cs @@ -61,6 +61,23 @@ partial void ProcessListInvoicesResponseContent( public async global::System.Threading.Tasks.Task ListInvoicesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListInvoicesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> ListInvoicesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessListInvoicesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/credits/invoices", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessListInvoicesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessListInvoicesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessListInvoicesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessListInvoicesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessListInvoicesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessListInvoicesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessListInvoicesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessListInvoicesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessListInvoicesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPTBInvoiceArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPTBInvoiceArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessListInvoicesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPTBInvoiceArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPTBInvoiceArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CreditsClient.ListTokenUsagePayments.g.cs b/src/libs/Helicone/Generated/Helicone.CreditsClient.ListTokenUsagePayments.g.cs index 782b521a..ac210761 100644 --- a/src/libs/Helicone/Generated/Helicone.CreditsClient.ListTokenUsagePayments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CreditsClient.ListTokenUsagePayments.g.cs @@ -69,6 +69,29 @@ partial void ProcessListTokenUsagePaymentsResponseContent( double? pageSize = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListTokenUsagePaymentsAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> ListTokenUsagePaymentsAsResponseAsync( + double? page = default, + double? pageSize = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,14 +122,15 @@ partial void ProcessListTokenUsagePaymentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/credits/payments", baseUri: ResolveBaseUri( servers: s_ListTokenUsagePaymentsServers, - defaultBaseUrl: "https://api.helicone.ai/")); + defaultBaseUrl: "https://api.helicone.ai/")); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("pageSize", pageSize?.ToString()) + .AddOptionalParameter("pageSize", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Helicone.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -179,6 +203,8 @@ partial void ProcessListTokenUsagePaymentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -189,6 +215,11 @@ partial void ProcessListTokenUsagePaymentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -206,6 +237,8 @@ partial void ProcessListTokenUsagePaymentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -215,8 +248,7 @@ partial void ProcessListTokenUsagePaymentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -225,6 +257,11 @@ partial void ProcessListTokenUsagePaymentsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -241,14 +278,15 @@ partial void ProcessListTokenUsagePaymentsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -288,6 +326,8 @@ partial void ProcessListTokenUsagePaymentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -308,6 +348,8 @@ partial void ProcessListTokenUsagePaymentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -332,9 +374,13 @@ partial void ProcessListTokenUsagePaymentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPaginatedPurchasedCreditsString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPaginatedPurchasedCreditsString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -362,9 +408,13 @@ partial void ProcessListTokenUsagePaymentsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPaginatedPurchasedCreditsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPaginatedPurchasedCreditsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CreditsClient.g.cs b/src/libs/Helicone/Generated/Helicone.CreditsClient.g.cs index d26e436a..9d1b3bb1 100644 --- a/src/libs/Helicone/Generated/Helicone.CreditsClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CreditsClient.g.cs @@ -103,10 +103,10 @@ public CreditsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public CreditsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomerUsage.g.cs b/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomerUsage.g.cs index 728eebbb..db98e659 100644 --- a/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomerUsage.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomerUsage.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetCustomerUsageResponseContent( public async global::System.Threading.Tasks.Task GetCustomerUsageAsync( string customerId, + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCustomerUsageAsResponseAsync( + customerId: customerId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetCustomerUsageAsResponseAsync( + string customerId, + object request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetCustomerUsageResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/customer/{customerId}/usage/query", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetCustomerUsageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetCustomerUsageResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetCustomerUsageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetCustomerUsageResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetCustomerUsageResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetCustomerUsageResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetCustomerUsageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetCustomerUsageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetCustomerUsageResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.CustomerUsage.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.CustomerUsage.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetCustomerUsageResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.CustomerUsage.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.CustomerUsage.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomers.g.cs b/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomers.g.cs index 47b5d1c3..60f951de 100644 --- a/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomers.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CustomerClient.GetCustomers.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetCustomersResponseContent( /// public async global::System.Threading.Tasks.Task> GetCustomersAsync( + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCustomersAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> GetCustomersAsResponseAsync( + object request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetCustomersResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/customer/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetCustomersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetCustomersResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetCustomersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetCustomersResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetCustomersResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetCustomersResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetCustomersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetCustomersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetCustomersResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + 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::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetCustomersResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).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::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.CustomerClient.g.cs b/src/libs/Helicone/Generated/Helicone.CustomerClient.g.cs index 17735d5d..0a9c9bca 100644 --- a/src/libs/Helicone/Generated/Helicone.CustomerClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.CustomerClient.g.cs @@ -103,10 +103,10 @@ public CustomerClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public CustomerClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.DashboardClient.GetScoresOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.DashboardClient.GetScoresOverTime.g.cs index a22a6aa5..075236aa 100644 --- a/src/libs/Helicone/Generated/Helicone.DashboardClient.GetScoresOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DashboardClient.GetScoresOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetScoresOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetScoresOverTimeAsync( + global::Helicone.DataOverTimeRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetScoresOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetScoresOverTimeAsResponseAsync( + global::Helicone.DataOverTimeRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetScoresOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/dashboard/scores/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetScoresOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetScoresOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetScoresOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetScoresOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetScoresOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetScoresOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetScoresOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetScoresOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetScoresOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultScoreKeyStringScoreSumNumberCreatedAtTruncStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultScoreKeyStringScoreSumNumberCreatedAtTruncStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetScoresOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultScoreKeyStringScoreSumNumberCreatedAtTruncStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultScoreKeyStringScoreSumNumberCreatedAtTruncStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DashboardClient.g.cs b/src/libs/Helicone/Generated/Helicone.DashboardClient.g.cs index b64b7918..f7df451f 100644 --- a/src/libs/Helicone/Generated/Helicone.DashboardClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DashboardClient.g.cs @@ -103,10 +103,10 @@ public DashboardClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DashboardClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.AddDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.AddDataset.g.cs index 48f4bbac..19dba8d8 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.AddDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.AddDataset.g.cs @@ -63,6 +63,28 @@ partial void ProcessAddDatasetResponseContent( /// public async global::System.Threading.Tasks.Task AddDatasetAsync( + global::Helicone.NewDatasetParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddDatasetAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> AddDatasetAsResponseAsync( + global::Helicone.NewDatasetParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessAddDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/dataset", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessAddDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessAddDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessAddDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessAddDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessAddDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessAddDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessAddDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessAddDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessAddDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultDatasetIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultDatasetIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessAddDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultDatasetIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultDatasetIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.AddHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.AddHeliconeDataset.g.cs index 11cc092e..2671a0af 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.AddHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.AddHeliconeDataset.g.cs @@ -63,6 +63,28 @@ partial void ProcessAddHeliconeDatasetResponseContent( /// public async global::System.Threading.Tasks.Task AddHeliconeDatasetAsync( + global::Helicone.NewHeliconeDatasetParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddHeliconeDatasetAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> AddHeliconeDatasetAsResponseAsync( + global::Helicone.NewHeliconeDatasetParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessAddHeliconeDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-dataset", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessAddHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessAddHeliconeDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessAddHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessAddHeliconeDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessAddHeliconeDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessAddHeliconeDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessAddHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessAddHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessAddHeliconeDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultDatasetIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultDatasetIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessAddHeliconeDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultDatasetIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultDatasetIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.AddRandomDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.AddRandomDataset.g.cs index 34f3ec6c..9c2fc72c 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.AddRandomDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.AddRandomDataset.g.cs @@ -63,6 +63,28 @@ partial void ProcessAddRandomDatasetResponseContent( /// public async global::System.Threading.Tasks.Task AddRandomDatasetAsync( + global::Helicone.RandomDatasetParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddRandomDatasetAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> AddRandomDatasetAsResponseAsync( + global::Helicone.RandomDatasetParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessAddRandomDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/dataset/random", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessAddRandomDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessAddRandomDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessAddRandomDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessAddRandomDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessAddRandomDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessAddRandomDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessAddRandomDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessAddRandomDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessAddRandomDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultDatasetIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultDatasetIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessAddRandomDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultDatasetIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultDatasetIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.CountHeliconeDatasetRows.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.CountHeliconeDatasetRows.g.cs index d0de8733..d97b24e0 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.CountHeliconeDatasetRows.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.CountHeliconeDatasetRows.g.cs @@ -65,6 +65,26 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CountHeliconeDatasetRowsAsResponseAsync( + datasetId: datasetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CountHeliconeDatasetRowsAsResponseAsync( + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-dataset/{datasetId}/count", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessCountHeliconeDatasetRowsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.CreateDatasetRow.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.CreateDatasetRow.g.cs index 8b9c88cb..6b785c4d 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.CreateDatasetRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.CreateDatasetRow.g.cs @@ -71,6 +71,34 @@ partial void ProcessCreateDatasetRowResponseContent( string datasetId, string promptVersionId, + global::Helicone.CreateDatasetRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateDatasetRowAsResponseAsync( + datasetId: datasetId, + promptVersionId: promptVersionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// + /// 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> CreateDatasetRowAsResponseAsync( + string datasetId, + string promptVersionId, + global::Helicone.CreateDatasetRowRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -107,6 +135,7 @@ partial void ProcessCreateDatasetRowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/dataset/{datasetId}/version/{promptVersionId}/row/new", baseUri: ResolveBaseUri( @@ -190,6 +219,8 @@ partial void ProcessCreateDatasetRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -200,6 +231,11 @@ partial void ProcessCreateDatasetRowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -217,6 +253,8 @@ partial void ProcessCreateDatasetRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -226,8 +264,7 @@ partial void ProcessCreateDatasetRowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +273,11 @@ partial void ProcessCreateDatasetRowResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -252,14 +294,15 @@ partial void ProcessCreateDatasetRowResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +342,8 @@ partial void ProcessCreateDatasetRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -319,6 +364,8 @@ partial void ProcessCreateDatasetRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -343,9 +390,13 @@ partial void ProcessCreateDatasetRowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -373,9 +424,13 @@ partial void ProcessCreateDatasetRowResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.DeleteHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.DeleteHeliconeDataset.g.cs index e297664c..3d97d6b4 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.DeleteHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.DeleteHeliconeDataset.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteHeliconeDatasetAsResponseAsync( + datasetId: datasetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeleteHeliconeDatasetAsResponseAsync( + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-dataset/{datasetId}/delete", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteHeliconeDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDataset.g.cs index ac02bf77..705d258b 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDataset.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetDatasetResponseContent( string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDatasetAsResponseAsync( + datasetId: datasetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetDatasetAsResponseAsync( + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/dataset/{datasetId}/inputs/query", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptInputRecordArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptInputRecordArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptInputRecordArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptInputRecordArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDatasets.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDatasets.g.cs index bf3afcf7..08ee6bbf 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDatasets.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.GetDatasets.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetDatasetsResponseContent( /// public async global::System.Threading.Tasks.Task GetDatasetsAsync( + global::Helicone.GetDatasetsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDatasetsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetDatasetsAsResponseAsync( + global::Helicone.GetDatasetsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetDatasetsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/dataset/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetDatasetsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetDatasetsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetDatasetsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetDatasetsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetDatasetsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetDatasetsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetDatasetsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetDatasetsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetDatasetsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultDatasetResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultDatasetResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetDatasetsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultDatasetResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultDatasetResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.InsertDatasetRow.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.InsertDatasetRow.g.cs index 1c0f9b26..be7a0bfc 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.InsertDatasetRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.InsertDatasetRow.g.cs @@ -67,6 +67,31 @@ partial void ProcessInsertDatasetRowResponseContent( public async global::System.Threading.Tasks.Task InsertDatasetRowAsync( string datasetId, + global::Helicone.InsertDatasetRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await InsertDatasetRowAsResponseAsync( + datasetId: datasetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> InsertDatasetRowAsResponseAsync( + string datasetId, + global::Helicone.InsertDatasetRowRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessInsertDatasetRowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/dataset/{datasetId}/row/insert", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessInsertDatasetRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessInsertDatasetRowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessInsertDatasetRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessInsertDatasetRowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessInsertDatasetRowResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessInsertDatasetRowResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessInsertDatasetRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessInsertDatasetRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessInsertDatasetRowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessInsertDatasetRowResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateDataset.g.cs index 457641ba..07d50153 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateDataset.g.cs @@ -67,6 +67,31 @@ partial void ProcessMutateDatasetResponseContent( public async global::System.Threading.Tasks.Task MutateDatasetAsync( string datasetId, + global::Helicone.MutateDatasetRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MutateDatasetAsResponseAsync( + datasetId: datasetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> MutateDatasetAsResponseAsync( + string datasetId, + global::Helicone.MutateDatasetRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessMutateDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/dataset/{datasetId}/mutate", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessMutateDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessMutateDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessMutateDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessMutateDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessMutateDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessMutateDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessMutateDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessMutateDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessMutateDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessMutateDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateHeliconeDataset.g.cs index 8efb91c5..6d3df268 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.MutateHeliconeDataset.g.cs @@ -67,6 +67,31 @@ partial void ProcessMutateHeliconeDatasetResponseContent( public async global::System.Threading.Tasks.Task MutateHeliconeDatasetAsync( string datasetId, + global::Helicone.MutateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MutateHeliconeDatasetAsResponseAsync( + datasetId: datasetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> MutateHeliconeDatasetAsResponseAsync( + string datasetId, + global::Helicone.MutateParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessMutateHeliconeDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-dataset/{datasetId}/mutate", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessMutateHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessMutateHeliconeDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessMutateHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessMutateHeliconeDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessMutateHeliconeDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessMutateHeliconeDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessMutateHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessMutateHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessMutateHeliconeDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessMutateHeliconeDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDataset.g.cs index a1786080..f43f0e9c 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDataset.g.cs @@ -63,6 +63,28 @@ partial void ProcessQueryHeliconeDatasetResponseContent( /// public async global::System.Threading.Tasks.Task QueryHeliconeDatasetAsync( + global::Helicone.QueryHeliconeDatasetRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await QueryHeliconeDatasetAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> QueryHeliconeDatasetAsResponseAsync( + global::Helicone.QueryHeliconeDatasetRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessQueryHeliconeDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-dataset/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessQueryHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessQueryHeliconeDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessQueryHeliconeDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessQueryHeliconeDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessQueryHeliconeDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessQueryHeliconeDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessQueryHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessQueryHeliconeDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessQueryHeliconeDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHeliconeDatasetArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHeliconeDatasetArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessQueryHeliconeDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHeliconeDatasetArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHeliconeDatasetArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDatasetRows.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDatasetRows.g.cs index c696b61c..6e6098f5 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDatasetRows.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.QueryHeliconeDatasetRows.g.cs @@ -67,6 +67,31 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( public async global::System.Threading.Tasks.Task QueryHeliconeDatasetRowsAsync( string datasetId, + global::Helicone.QueryHeliconeDatasetRowsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await QueryHeliconeDatasetRowsAsResponseAsync( + datasetId: datasetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> QueryHeliconeDatasetRowsAsResponseAsync( + string datasetId, + global::Helicone.QueryHeliconeDatasetRowsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-dataset/{datasetId}/query", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHeliconeDatasetRowArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHeliconeDatasetRowArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessQueryHeliconeDatasetRowsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHeliconeDatasetRowArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHeliconeDatasetRowArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.UpdateHeliconeDatasetRequest.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.UpdateHeliconeDatasetRequest.g.cs index e8c4341a..58c062ab 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.UpdateHeliconeDatasetRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.UpdateHeliconeDatasetRequest.g.cs @@ -71,6 +71,34 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( string datasetId, string requestId, + global::Helicone.UpdateHeliconeDatasetRequestRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateHeliconeDatasetRequestAsResponseAsync( + datasetId: datasetId, + requestId: requestId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// + /// 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>> UpdateHeliconeDatasetRequestAsResponseAsync( + string datasetId, + string requestId, + global::Helicone.UpdateHeliconeDatasetRequestRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -107,6 +135,7 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-dataset/{datasetId}/request/{requestId}", baseUri: ResolveBaseUri( @@ -190,6 +219,8 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -200,6 +231,11 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -217,6 +253,8 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -226,8 +264,7 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +273,11 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -252,14 +294,15 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -299,6 +342,8 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -319,6 +364,8 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -343,9 +390,13 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -373,9 +424,13 @@ partial void ProcessUpdateHeliconeDatasetRequestResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.DatasetClient.g.cs b/src/libs/Helicone/Generated/Helicone.DatasetClient.g.cs index 60189baf..23fc305d 100644 --- a/src/libs/Helicone/Generated/Helicone.DatasetClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.DatasetClient.g.cs @@ -103,10 +103,10 @@ public DatasetClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DatasetClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.EvalsClient.AddEval.g.cs b/src/libs/Helicone/Generated/Helicone.EvalsClient.AddEval.g.cs index 05a91f01..ac943563 100644 --- a/src/libs/Helicone/Generated/Helicone.EvalsClient.AddEval.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvalsClient.AddEval.g.cs @@ -67,6 +67,31 @@ partial void ProcessAddEvalResponseContent( public async global::System.Threading.Tasks.Task AddEvalAsync( string requestId, + global::Helicone.AddEvalRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddEvalAsResponseAsync( + requestId: requestId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> AddEvalAsResponseAsync( + string requestId, + global::Helicone.AddEvalRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessAddEvalResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evals/{requestId}", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessAddEvalResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessAddEvalResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessAddEvalResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessAddEvalResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessAddEvalResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessAddEvalResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessAddEvalResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessAddEvalResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessAddEvalResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessAddEvalResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvalsClient.GetEvalScores.g.cs b/src/libs/Helicone/Generated/Helicone.EvalsClient.GetEvalScores.g.cs index 7141a32a..91f8007e 100644 --- a/src/libs/Helicone/Generated/Helicone.EvalsClient.GetEvalScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvalsClient.GetEvalScores.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetEvalScoresResponseContent( public async global::System.Threading.Tasks.Task GetEvalScoresAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEvalScoresAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetEvalScoresAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetEvalScoresResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evals/scores", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetEvalScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetEvalScoresResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetEvalScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetEvalScoresResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetEvalScoresResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetEvalScoresResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetEvalScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetEvalScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetEvalScoresResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetEvalScoresResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryEvals.g.cs b/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryEvals.g.cs index 42d8e106..959bd406 100644 --- a/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryEvals.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryEvals.g.cs @@ -63,6 +63,28 @@ partial void ProcessQueryEvalsResponseContent( /// public async global::System.Threading.Tasks.Task QueryEvalsAsync( + global::Helicone.EvalQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await QueryEvalsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> QueryEvalsAsResponseAsync( + global::Helicone.EvalQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessQueryEvalsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evals/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessQueryEvalsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessQueryEvalsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessQueryEvalsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessQueryEvalsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessQueryEvalsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessQueryEvalsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessQueryEvalsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessQueryEvalsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessQueryEvalsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvalArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvalArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessQueryEvalsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvalArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvalArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryScoreDistributions.g.cs b/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryScoreDistributions.g.cs index 1bec1996..3b6bef2c 100644 --- a/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryScoreDistributions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvalsClient.QueryScoreDistributions.g.cs @@ -63,6 +63,28 @@ partial void ProcessQueryScoreDistributionsResponseContent( /// public async global::System.Threading.Tasks.Task QueryScoreDistributionsAsync( + global::Helicone.EvalQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await QueryScoreDistributionsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> QueryScoreDistributionsAsResponseAsync( + global::Helicone.EvalQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessQueryScoreDistributionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evals/score-distributions/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessQueryScoreDistributionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessQueryScoreDistributionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessQueryScoreDistributionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessQueryScoreDistributionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessQueryScoreDistributionsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessQueryScoreDistributionsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessQueryScoreDistributionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessQueryScoreDistributionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessQueryScoreDistributionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultScoreDistributionArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultScoreDistributionArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessQueryScoreDistributionsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultScoreDistributionArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultScoreDistributionArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvalsClient.g.cs b/src/libs/Helicone/Generated/Helicone.EvalsClient.g.cs index c459f144..4647d06a 100644 --- a/src/libs/Helicone/Generated/Helicone.EvalsClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvalsClient.g.cs @@ -103,10 +103,10 @@ public EvalsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public EvalsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateEvaluator.g.cs index 4e6b0f03..4e70d3b0 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateEvaluator.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateEvaluatorResponseContent( /// public async global::System.Threading.Tasks.Task CreateEvaluatorAsync( + global::Helicone.CreateEvaluatorParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateEvaluatorAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateEvaluatorAsResponseAsync( + global::Helicone.CreateEvaluatorParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evaluator", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateOnlineEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateOnlineEvaluator.g.cs index db3f30df..12b8bbba 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateOnlineEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.CreateOnlineEvaluator.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( public async global::System.Threading.Tasks.Task CreateOnlineEvaluatorAsync( string evaluatorId, + global::Helicone.CreateOnlineEvaluatorParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateOnlineEvaluatorAsResponseAsync( + evaluatorId: evaluatorId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateOnlineEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.CreateOnlineEvaluatorParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}/onlineEvaluators", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateOnlineEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteEvaluator.g.cs index f91a4275..0606d778 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteEvaluator.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteEvaluatorResponseContent( string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteEvaluatorAsResponseAsync( + evaluatorId: evaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeleteEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteOnlineEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteOnlineEvaluator.g.cs index da823819..f70e8faa 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteOnlineEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.DeleteOnlineEvaluator.g.cs @@ -69,6 +69,29 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( string onlineEvaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteOnlineEvaluatorAsResponseAsync( + evaluatorId: evaluatorId, + onlineEvaluatorId: onlineEvaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> DeleteOnlineEvaluatorAsResponseAsync( + string evaluatorId, + string onlineEvaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}/onlineEvaluators/{onlineEvaluatorId}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessDeleteOnlineEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluator.g.cs index dc77d050..530820b5 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluator.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetEvaluatorResponseContent( string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEvaluatorAsResponseAsync( + evaluatorId: evaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluatorStats.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluatorStats.g.cs index 2b068e9f..04100a68 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluatorStats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetEvaluatorStats.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetEvaluatorStatsResponseContent( string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEvaluatorStatsAsResponseAsync( + evaluatorId: evaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetEvaluatorStatsAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetEvaluatorStatsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}/stats", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetEvaluatorStatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetEvaluatorStatsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetEvaluatorStatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetEvaluatorStatsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetEvaluatorStatsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetEvaluatorStatsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetEvaluatorStatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetEvaluatorStatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetEvaluatorStatsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorStatsString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorStatsString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetEvaluatorStatsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorStatsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorStatsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetExperimentsForEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetExperimentsForEvaluator.g.cs index fcbc3a2e..0ecc4b70 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetExperimentsForEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetExperimentsForEvaluator.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentsForEvaluatorAsResponseAsync( + evaluatorId: evaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentsForEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}/experiments", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorExperimentArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorExperimentArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetExperimentsForEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorExperimentArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorExperimentArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetOnlineEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetOnlineEvaluators.g.cs index 9b645634..ccf73e64 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetOnlineEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.GetOnlineEvaluators.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetOnlineEvaluatorsAsResponseAsync( + evaluatorId: evaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetOnlineEvaluatorsAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}/onlineEvaluators", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultOnlineEvaluatorByEvaluatorIdArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultOnlineEvaluatorByEvaluatorIdArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetOnlineEvaluatorsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultOnlineEvaluatorByEvaluatorIdArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultOnlineEvaluatorByEvaluatorIdArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.QueryEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.QueryEvaluators.g.cs index 569d8e6f..5fb0416d 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.QueryEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.QueryEvaluators.g.cs @@ -63,6 +63,28 @@ partial void ProcessQueryEvaluatorsResponseContent( /// public async global::System.Threading.Tasks.Task QueryEvaluatorsAsync( + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await QueryEvaluatorsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> QueryEvaluatorsAsResponseAsync( + object request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessQueryEvaluatorsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evaluator/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessQueryEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessQueryEvaluatorsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessQueryEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessQueryEvaluatorsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessQueryEvaluatorsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessQueryEvaluatorsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessQueryEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessQueryEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessQueryEvaluatorsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessQueryEvaluatorsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLLMEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLLMEvaluator.g.cs index f3fc73c5..426d2ddb 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLLMEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLLMEvaluator.g.cs @@ -63,6 +63,28 @@ partial void ProcessTestLLMEvaluatorResponseContent( /// public async global::System.Threading.Tasks.Task TestLLMEvaluatorAsync( + global::Helicone.TestLLMEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TestLLMEvaluatorAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> TestLLMEvaluatorAsResponseAsync( + global::Helicone.TestLLMEvaluatorRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessTestLLMEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evaluator/llm/test", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessTestLLMEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessTestLLMEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessTestLLMEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessTestLLMEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessTestLLMEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessTestLLMEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessTestLLMEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessTestLLMEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessTestLLMEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorScoreString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorScoreString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessTestLLMEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorScoreString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorScoreString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLastMileEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLastMileEvaluator.g.cs index ba398210..930e0d8f 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLastMileEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestLastMileEvaluator.g.cs @@ -63,6 +63,28 @@ partial void ProcessTestLastMileEvaluatorResponseContent( /// public async global::System.Threading.Tasks.Task TestLastMileEvaluatorAsync( + global::Helicone.TestLastMileEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TestLastMileEvaluatorAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> TestLastMileEvaluatorAsResponseAsync( + global::Helicone.TestLastMileEvaluatorRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessTestLastMileEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evaluator/lastmile/test", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessTestLastMileEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessTestLastMileEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessTestLastMileEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessTestLastMileEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessTestLastMileEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessTestLastMileEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessTestLastMileEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessTestLastMileEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessTestLastMileEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultScoreNumberInputStringOutputStringGroundTruth63StringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultScoreNumberInputStringOutputStringGroundTruth63StringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessTestLastMileEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultScoreNumberInputStringOutputStringGroundTruth63StringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultScoreNumberInputStringOutputStringGroundTruth63StringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestPythonEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestPythonEvaluator.g.cs index d3ae57f8..73b8fdb2 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestPythonEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.TestPythonEvaluator.g.cs @@ -63,6 +63,28 @@ partial void ProcessTestPythonEvaluatorResponseContent( /// public async global::System.Threading.Tasks.Task TestPythonEvaluatorAsync( + global::Helicone.TestPythonEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TestPythonEvaluatorAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> TestPythonEvaluatorAsResponseAsync( + global::Helicone.TestPythonEvaluatorRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessTestPythonEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/evaluator/python/test", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessTestPythonEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessTestPythonEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessTestPythonEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessTestPythonEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessTestPythonEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessTestPythonEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessTestPythonEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessTestPythonEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessTestPythonEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultOutputStringTracesStringArrayStatusCode63NumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultOutputStringTracesStringArrayStatusCode63NumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessTestPythonEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultOutputStringTracesStringArrayStatusCode63NumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultOutputStringTracesStringArrayStatusCode63NumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.UpdateEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.UpdateEvaluator.g.cs index 352eaa6f..3c1564d1 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.UpdateEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.UpdateEvaluator.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateEvaluatorResponseContent( public async global::System.Threading.Tasks.Task UpdateEvaluatorAsync( string evaluatorId, + global::Helicone.UpdateEvaluatorParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateEvaluatorAsResponseAsync( + evaluatorId: evaluatorId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.UpdateEvaluatorParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/evaluator/{evaluatorId}", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.g.cs b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.g.cs index d7b13051..fea6cbb4 100644 --- a/src/libs/Helicone/Generated/Helicone.EvaluatorClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.EvaluatorClient.g.cs @@ -103,10 +103,10 @@ public EvaluatorClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public EvaluatorClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowToExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowToExperiment.g.cs index d10138a2..4ab94ed2 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowToExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowToExperiment.g.cs @@ -67,6 +67,31 @@ partial void ProcessAddManualRowToExperimentResponseContent( public async global::System.Threading.Tasks.Task AddManualRowToExperimentAsync( string experimentId, + global::Helicone.AddManualRowToExperimentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddManualRowToExperimentAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> AddManualRowToExperimentAsResponseAsync( + string experimentId, + global::Helicone.AddManualRowToExperimentRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessAddManualRowToExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/add-manual-row", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessAddManualRowToExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessAddManualRowToExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessAddManualRowToExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessAddManualRowToExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessAddManualRowToExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessAddManualRowToExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessAddManualRowToExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessAddManualRowToExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessAddManualRowToExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessAddManualRowToExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowsToExperimentBatch.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowsToExperimentBatch.g.cs index e46a8499..64f4a006 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowsToExperimentBatch.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.AddManualRowsToExperimentBatch.g.cs @@ -67,6 +67,31 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( public async global::System.Threading.Tasks.Task AddManualRowsToExperimentBatchAsync( string experimentId, + global::Helicone.AddManualRowsToExperimentBatchRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddManualRowsToExperimentBatchAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> AddManualRowsToExperimentBatchAsResponseAsync( + string experimentId, + global::Helicone.AddManualRowsToExperimentBatchRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/add-manual-rows-batch", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessAddManualRowsToExperimentBatchResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateEmptyExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateEmptyExperiment.g.cs index ecade34f..9ece6028 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateEmptyExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateEmptyExperiment.g.cs @@ -61,6 +61,23 @@ partial void ProcessCreateEmptyExperimentResponseContent( public async global::System.Threading.Tasks.Task CreateEmptyExperimentAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateEmptyExperimentAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> CreateEmptyExperimentAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessCreateEmptyExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v2/experiment/create/empty", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessCreateEmptyExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessCreateEmptyExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessCreateEmptyExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessCreateEmptyExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessCreateEmptyExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessCreateEmptyExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessCreateEmptyExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessCreateEmptyExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessCreateEmptyExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessCreateEmptyExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentCell.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentCell.g.cs index dbabc020..d221ea12 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentCell.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentCell.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateExperimentCellResponseContent( public async global::System.Threading.Tasks.Task CreateExperimentCellAsync( string experimentTableId, + global::Helicone.CreateExperimentCellRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentCellAsResponseAsync( + experimentTableId: experimentTableId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentCellAsResponseAsync( + string experimentTableId, + global::Helicone.CreateExperimentCellRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateExperimentCellResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/cell", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateExperimentCellResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateExperimentCellResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateExperimentCellResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateExperimentCellResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateExperimentCellResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateExperimentCellResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateExperimentCellResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateExperimentCellResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateExperimentCellResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateExperimentCellResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentColumn.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentColumn.g.cs index 90a3f821..5e717eed 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentColumn.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentColumn.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateExperimentColumnResponseContent( public async global::System.Threading.Tasks.Task CreateExperimentColumnAsync( string experimentTableId, + global::Helicone.CreateExperimentColumnRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentColumnAsResponseAsync( + experimentTableId: experimentTableId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentColumnAsResponseAsync( + string experimentTableId, + global::Helicone.CreateExperimentColumnRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateExperimentColumnResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/column", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateExperimentColumnResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateExperimentColumnResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateExperimentColumnResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateExperimentColumnResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateExperimentColumnResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateExperimentColumnResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateExperimentColumnResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateExperimentColumnResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateExperimentColumnResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateExperimentColumnResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluator.g.cs index 8bd0ccb5..b5e802a8 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluator.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( public async global::System.Threading.Tasks.Task CreateExperimentEvaluatorAsync( string experimentId, + global::Helicone.CreateExperimentEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentEvaluatorAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentEvaluatorAsResponseAsync( + string experimentId, + global::Helicone.CreateExperimentEvaluatorRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/evaluators", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateExperimentEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluatorOld.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluatorOld.g.cs index b972b849..216b8fff 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluatorOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentEvaluatorOld.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( public async global::System.Threading.Tasks.Task CreateExperimentEvaluatorOldAsync( string experimentId, + global::Helicone.CreateExperimentEvaluatorOldRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentEvaluatorOldAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentEvaluatorOldAsResponseAsync( + string experimentId, + global::Helicone.CreateExperimentEvaluatorOldRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/{experimentId}/evaluators", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateExperimentEvaluatorOldResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentFromRequest.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentFromRequest.g.cs index d7259ff2..ec40c50d 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentFromRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentFromRequest.g.cs @@ -65,6 +65,26 @@ partial void ProcessCreateExperimentFromRequestResponseContent( string requestId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentFromRequestAsResponseAsync( + requestId: requestId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateExperimentFromRequestAsResponseAsync( + string requestId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessCreateExperimentFromRequestResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/create/from-request/{requestId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessCreateExperimentFromRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessCreateExperimentFromRequestResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessCreateExperimentFromRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessCreateExperimentFromRequestResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessCreateExperimentFromRequestResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessCreateExperimentFromRequestResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessCreateExperimentFromRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessCreateExperimentFromRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessCreateExperimentFromRequestResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessCreateExperimentFromRequestResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRow.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRow.g.cs index d7765e8e..de76712a 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRow.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateExperimentTableRowResponseContent( public async global::System.Threading.Tasks.Task CreateExperimentTableRowAsync( string experimentTableId, + global::Helicone.CreateExperimentTableRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentTableRowAsResponseAsync( + experimentTableId: experimentTableId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentTableRowAsResponseAsync( + string experimentTableId, + global::Helicone.CreateExperimentTableRowRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateExperimentTableRowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/row/new", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateExperimentTableRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateExperimentTableRowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateExperimentTableRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateExperimentTableRowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateExperimentTableRowResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateExperimentTableRowResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateExperimentTableRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateExperimentTableRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateExperimentTableRowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateExperimentTableRowResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowBatch.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowBatch.g.cs index a4dba92d..b41f277d 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowBatch.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowBatch.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( public async global::System.Threading.Tasks.Task CreateExperimentTableRowBatchAsync( string experimentId, + global::Helicone.CreateExperimentTableRowBatchRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentTableRowBatchAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentTableRowBatchAsResponseAsync( + string experimentId, + global::Helicone.CreateExperimentTableRowBatchRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/row/insert/batch", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateExperimentTableRowBatchResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowFromDataset.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowFromDataset.g.cs index 14512a20..263f9e86 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowFromDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowFromDataset.g.cs @@ -69,6 +69,29 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentTableRowFromDatasetAsResponseAsync( + experimentId: experimentId, + datasetId: datasetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentTableRowFromDatasetAsResponseAsync( + string experimentId, + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/row/insert/dataset/{datasetId}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessCreateExperimentTableRowFromDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs index 264abb69..33580869 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( public async global::System.Threading.Tasks.Task CreateExperimentTableRowWithCellsBatchAsync( string experimentTableId, + global::Helicone.CreateExperimentTableRowWithCellsBatchRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateExperimentTableRowWithCellsBatchAsResponseAsync( + experimentTableId: experimentTableId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateExperimentTableRowWithCellsBatchAsResponseAsync( + string experimentTableId, + global::Helicone.CreateExperimentTableRowWithCellsBatchRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/row/insert/batch", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateExperimentTableRowWithCellsBatchResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewEmptyExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewEmptyExperiment.g.cs index 64cee62b..b4145a70 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewEmptyExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewEmptyExperiment.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( /// public async global::System.Threading.Tasks.Task CreateNewEmptyExperimentAsync( + global::Helicone.CreateNewEmptyExperimentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateNewEmptyExperimentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateNewEmptyExperimentAsResponseAsync( + global::Helicone.CreateNewEmptyExperimentRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/new-empty", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateNewEmptyExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperiment.g.cs index 0f71b444..c7ab77b2 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperiment.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateNewExperimentResponseContent( /// public async global::System.Threading.Tasks.Task CreateNewExperimentAsync( + global::Helicone.CreateNewExperimentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateNewExperimentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateNewExperimentAsResponseAsync( + global::Helicone.CreateNewExperimentRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateNewExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v2/experiment/new", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateNewExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateNewExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateNewExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateNewExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateNewExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateNewExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateNewExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateNewExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateNewExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateNewExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentHypothesis.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentHypothesis.g.cs index 49177921..329af91b 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentHypothesis.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentHypothesis.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( /// public async global::System.Threading.Tasks.Task CreateNewExperimentHypothesisAsync( + global::Helicone.CreateNewExperimentHypothesisRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateNewExperimentHypothesisAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateNewExperimentHypothesisAsResponseAsync( + global::Helicone.CreateNewExperimentHypothesisRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/hypothesis", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHypothesisIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHypothesisIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateNewExperimentHypothesisResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHypothesisIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHypothesisIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentOld.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentOld.g.cs index 7169fa53..57ca678d 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentOld.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateNewExperimentOldResponseContent( /// public async global::System.Threading.Tasks.Task CreateNewExperimentOldAsync( + global::Helicone.NewExperimentParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateNewExperimentOldAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateNewExperimentOldAsResponseAsync( + global::Helicone.NewExperimentParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateNewExperimentOldResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateNewExperimentOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateNewExperimentOldResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateNewExperimentOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateNewExperimentOldResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateNewExperimentOldResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateNewExperimentOldResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateNewExperimentOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateNewExperimentOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateNewExperimentOldResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateNewExperimentOldResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentTable.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentTable.g.cs index a2e94174..42e2346a 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentTable.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewExperimentTable.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateNewExperimentTableResponseContent( /// public async global::System.Threading.Tasks.Task CreateNewExperimentTableAsync( + global::Helicone.CreateExperimentTableParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateNewExperimentTableAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateNewExperimentTableAsResponseAsync( + global::Helicone.CreateExperimentTableParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateNewExperimentTableResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/table/new", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateNewExperimentTableResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateNewExperimentTableResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateNewExperimentTableResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateNewExperimentTableResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateNewExperimentTableResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateNewExperimentTableResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateNewExperimentTableResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateNewExperimentTableResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateNewExperimentTableResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultTableIdStringExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultTableIdStringExperimentIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateNewExperimentTableResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultTableIdStringExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultTableIdStringExperimentIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewPromptVersionForExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewPromptVersionForExperiment.g.cs index 5f4c3006..8b8bf415 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewPromptVersionForExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.CreateNewPromptVersionForExperiment.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( public async global::System.Threading.Tasks.Task CreateNewPromptVersionForExperimentAsync( string experimentId, + global::Helicone.CreateNewPromptVersionForExperimentParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateNewPromptVersionForExperimentAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateNewPromptVersionForExperimentAsResponseAsync( + string experimentId, + global::Helicone.CreateNewPromptVersionForExperimentParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/prompt-version", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateNewPromptVersionForExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperiment.g.cs index 0ac855af..20a30c67 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperiment.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteExperimentResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteExperimentAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeleteExperimentAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluator.g.cs index 358d0de1..53171490 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluator.g.cs @@ -69,6 +69,29 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteExperimentEvaluatorAsResponseAsync( + experimentId: experimentId, + evaluatorId: evaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> DeleteExperimentEvaluatorAsResponseAsync( + string experimentId, + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/evaluators/{evaluatorId}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessDeleteExperimentEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluatorOld.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluatorOld.g.cs index fed16062..0366e8c8 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluatorOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentEvaluatorOld.g.cs @@ -69,6 +69,29 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteExperimentEvaluatorOldAsResponseAsync( + experimentId: experimentId, + evaluatorId: evaluatorId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> DeleteExperimentEvaluatorOldAsResponseAsync( + string experimentId, + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/{experimentId}/evaluators/{evaluatorId}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessDeleteExperimentEvaluatorOldResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRow.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRow.g.cs index 0152eb0c..829f950b 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRow.g.cs @@ -69,6 +69,29 @@ partial void ProcessDeleteExperimentTableRowResponseContent( double rowIndex, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteExperimentTableRowAsResponseAsync( + experimentTableId: experimentTableId, + rowIndex: rowIndex, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> DeleteExperimentTableRowAsResponseAsync( + string experimentTableId, + double rowIndex, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessDeleteExperimentTableRowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/row/{rowIndex}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessDeleteExperimentTableRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessDeleteExperimentTableRowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessDeleteExperimentTableRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessDeleteExperimentTableRowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessDeleteExperimentTableRowResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessDeleteExperimentTableRowResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessDeleteExperimentTableRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessDeleteExperimentTableRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessDeleteExperimentTableRowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessDeleteExperimentTableRowResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRows.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRows.g.cs index c704c3d5..c41a99d9 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRows.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeleteExperimentTableRows.g.cs @@ -67,6 +67,31 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( public async global::System.Threading.Tasks.Task DeleteExperimentTableRowsAsync( string experimentId, + global::Helicone.DeleteExperimentTableRowsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteExperimentTableRowsAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> DeleteExperimentTableRowsAsResponseAsync( + string experimentId, + global::Helicone.DeleteExperimentTableRowsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/rows", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessDeleteExperimentTableRowsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeletePromptVersion.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeletePromptVersion.g.cs index 2773c3d3..97039415 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeletePromptVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.DeletePromptVersion.g.cs @@ -69,6 +69,29 @@ partial void ProcessDeletePromptVersionResponseContent( string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeletePromptVersionAsResponseAsync( + experimentId: experimentId, + promptVersionId: promptVersionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> DeletePromptVersionAsResponseAsync( + string experimentId, + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessDeletePromptVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/prompt-version/{promptVersionId}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessDeletePromptVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessDeletePromptVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessDeletePromptVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessDeletePromptVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessDeletePromptVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessDeletePromptVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentById.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentById.g.cs index efa52955..6d4f5b25 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentById.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetExperimentByIdResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentByIdAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentByIdAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetExperimentByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetExperimentByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetExperimentByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetExperimentByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetExperimentByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetExperimentByIdResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetExperimentByIdResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetExperimentByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetExperimentByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetExperimentByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExtendedExperimentDataString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExtendedExperimentDataString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetExperimentByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExtendedExperimentDataString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExtendedExperimentDataString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators.g.cs index f435072c..770827f8 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentEvaluatorsAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentEvaluatorsAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/evaluators", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetExperimentEvaluatorsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators2.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators2.g.cs index 8d5991c9..49403884 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators2.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentEvaluators2.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentEvaluators2AsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentEvaluators2AsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/{experimentId}/evaluators", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultEvaluatorResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultEvaluatorResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetExperimentEvaluators2ResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultEvaluatorResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultEvaluatorResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentHypothesisScores.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentHypothesisScores.g.cs index ca843598..4876ab99 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentHypothesisScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentHypothesisScores.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( string hypothesisId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentHypothesisScoresAsResponseAsync( + hypothesisId: hypothesisId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentHypothesisScoresAsResponseAsync( + string hypothesisId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/hypothesis/{hypothesisId}/scores/query", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultRunsCountNumberScoresRecordStringScoreString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultRunsCountNumberScoresRecordStringScoreString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetExperimentHypothesisScoresResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultRunsCountNumberScoresRecordStringScoreString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultRunsCountNumberScoresRecordStringScoreString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentPromptVersionScores.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentPromptVersionScores.g.cs index 0a47e64d..abd2b25c 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentPromptVersionScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentPromptVersionScores.g.cs @@ -69,6 +69,29 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentPromptVersionScoresAsResponseAsync( + experimentId: experimentId, + promptVersionId: promptVersionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetExperimentPromptVersionScoresAsResponseAsync( + string experimentId, + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/{promptVersionId}/scores", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultRecordStringScoreV2String.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultRecordStringScoreV2String.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessGetExperimentPromptVersionScoresResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultRecordStringScoreV2String.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultRecordStringScoreV2String.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentScore.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentScore.g.cs index b803a7a0..02d41f53 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentScore.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentScore.g.cs @@ -73,6 +73,32 @@ partial void ProcessGetExperimentScoreResponseContent( string scoreKey, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentScoreAsResponseAsync( + experimentId: experimentId, + requestId: requestId, + scoreKey: scoreKey, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// + /// 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> GetExperimentScoreAsResponseAsync( + string experimentId, + string requestId, + string scoreKey, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -104,6 +130,7 @@ partial void ProcessGetExperimentScoreResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/{requestId}/{scoreKey}", baseUri: ResolveBaseUri( @@ -181,6 +208,8 @@ partial void ProcessGetExperimentScoreResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -191,6 +220,11 @@ partial void ProcessGetExperimentScoreResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -208,6 +242,8 @@ partial void ProcessGetExperimentScoreResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -217,8 +253,7 @@ partial void ProcessGetExperimentScoreResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +262,11 @@ partial void ProcessGetExperimentScoreResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -243,14 +283,15 @@ partial void ProcessGetExperimentScoreResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -290,6 +331,8 @@ partial void ProcessGetExperimentScoreResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -310,6 +353,8 @@ partial void ProcessGetExperimentScoreResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -334,9 +379,13 @@ partial void ProcessGetExperimentScoreResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultScoreV2OrNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultScoreV2OrNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -364,9 +413,13 @@ partial void ProcessGetExperimentScoreResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultScoreV2OrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultScoreV2OrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableById.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableById.g.cs index f89f2c8d..ae48a6d5 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableById.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetExperimentTableByIdResponseContent( string experimentTableId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentTableByIdAsResponseAsync( + experimentTableId: experimentTableId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentTableByIdAsResponseAsync( + string experimentTableId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetExperimentTableByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/query", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetExperimentTableByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetExperimentTableByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetExperimentTableByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetExperimentTableByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetExperimentTableByIdResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetExperimentTableByIdResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetExperimentTableByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetExperimentTableByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetExperimentTableByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentTableString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentTableString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetExperimentTableByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentTableString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentTableString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableMetadata.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableMetadata.g.cs index c1296ae4..59c8daeb 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableMetadata.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTableMetadata.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetExperimentTableMetadataResponseContent( string experimentTableId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentTableMetadataAsResponseAsync( + experimentTableId: experimentTableId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentTableMetadataAsResponseAsync( + string experimentTableId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetExperimentTableMetadataResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/metadata/query", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetExperimentTableMetadataResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetExperimentTableMetadataResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetExperimentTableMetadataResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetExperimentTableMetadataResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetExperimentTableMetadataResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetExperimentTableMetadataResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetExperimentTableMetadataResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetExperimentTableMetadataResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetExperimentTableMetadataResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentTableSimplifiedString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentTableSimplifiedString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetExperimentTableMetadataResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentTableSimplifiedString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentTableSimplifiedString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTables.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTables.g.cs index be63177f..2645670b 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTables.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentTables.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetExperimentTablesResponseContent( public async global::System.Threading.Tasks.Task GetExperimentTablesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentTablesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetExperimentTablesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetExperimentTablesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/tables/query", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetExperimentTablesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetExperimentTablesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetExperimentTablesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetExperimentTablesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetExperimentTablesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetExperimentTablesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetExperimentTablesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetExperimentTablesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetExperimentTablesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentTableSimplifiedArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentTableSimplifiedArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetExperimentTablesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentTableSimplifiedArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentTableSimplifiedArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperiments.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperiments.g.cs index 042406b2..05062a24 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperiments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperiments.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetExperimentsResponseContent( public async global::System.Threading.Tasks.Task GetExperimentsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetExperimentsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetExperimentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v2/experiment", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetExperimentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetExperimentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetExperimentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetExperimentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetExperimentsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetExperimentsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetExperimentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetExperimentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetExperimentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentV2ArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentV2ArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetExperimentsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentV2ArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentV2ArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentsOld.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentsOld.g.cs index 54ea143e..7ecdfff1 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentsOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetExperimentsOld.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetExperimentsOldResponseContent( /// public async global::System.Threading.Tasks.Task GetExperimentsOldAsync( + global::Helicone.GetExperimentsOldRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetExperimentsOldAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetExperimentsOldAsResponseAsync( + global::Helicone.GetExperimentsOldRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetExperimentsOldResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetExperimentsOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetExperimentsOldResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetExperimentsOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetExperimentsOldResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetExperimentsOldResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetExperimentsOldResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetExperimentsOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetExperimentsOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetExperimentsOldResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetExperimentsOldResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetInputKeysForExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetInputKeysForExperiment.g.cs index a03055e7..c7cba269 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetInputKeysForExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetInputKeysForExperiment.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetInputKeysForExperimentResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetInputKeysForExperimentAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetInputKeysForExperimentAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetInputKeysForExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/input-keys", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetInputKeysForExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetInputKeysForExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetInputKeysForExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetInputKeysForExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetInputKeysForExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetInputKeysForExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetInputKeysForExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetInputKeysForExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetInputKeysForExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetInputKeysForExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetPromptVersionsForExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetPromptVersionsForExperiment.g.cs index 93769b6a..eb8af1b5 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetPromptVersionsForExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.GetPromptVersionsForExperiment.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptVersionsForExperimentAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPromptVersionsForExperimentAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/prompt-versions", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExperimentV2PromptVersionArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExperimentV2PromptVersionArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetPromptVersionsForExperimentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExperimentV2PromptVersionArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExperimentV2PromptVersionArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluators.g.cs index ec6d35c2..c1f3ef68 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluators.g.cs @@ -65,6 +65,26 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RunExperimentEvaluatorsAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> RunExperimentEvaluatorsAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/evaluators/run", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessRunExperimentEvaluatorsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluatorsOld.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluatorsOld.g.cs index 5081f3b0..960b3165 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluatorsOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunExperimentEvaluatorsOld.g.cs @@ -65,6 +65,26 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RunExperimentEvaluatorsOldAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> RunExperimentEvaluatorsOldAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/{experimentId}/evaluators/run", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessRunExperimentEvaluatorsOldResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunHypothesis.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunHypothesis.g.cs index 14deb74f..0408a115 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunHypothesis.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.RunHypothesis.g.cs @@ -67,6 +67,31 @@ partial void ProcessRunHypothesisResponseContent( public async global::System.Threading.Tasks.Task RunHypothesisAsync( string experimentId, + global::Helicone.RunHypothesisRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RunHypothesisAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> RunHypothesisAsResponseAsync( + string experimentId, + global::Helicone.RunHypothesisRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessRunHypothesisResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/run-hypothesis", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessRunHypothesisResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessRunHypothesisResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessRunHypothesisResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessRunHypothesisResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessRunHypothesisResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessRunHypothesisResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessRunHypothesisResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessRunHypothesisResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessRunHypothesisResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessRunHypothesisResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.ShouldRunEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.ShouldRunEvaluators.g.cs index 0fc7c182..205898f8 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.ShouldRunEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.ShouldRunEvaluators.g.cs @@ -65,6 +65,26 @@ partial void ProcessShouldRunEvaluatorsResponseContent( string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ShouldRunEvaluatorsAsResponseAsync( + experimentId: experimentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> ShouldRunEvaluatorsAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessShouldRunEvaluatorsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/should-run-evaluators", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessShouldRunEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessShouldRunEvaluatorsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessShouldRunEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessShouldRunEvaluatorsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessShouldRunEvaluatorsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessShouldRunEvaluatorsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessShouldRunEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessShouldRunEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessShouldRunEvaluatorsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultBooleanString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultBooleanString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessShouldRunEvaluatorsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentCell.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentCell.g.cs index f716a1c0..bc26d488 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentCell.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentCell.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateExperimentCellResponseContent( public async global::System.Threading.Tasks.Task UpdateExperimentCellAsync( string experimentTableId, + global::Helicone.UpdateExperimentCellRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateExperimentCellAsResponseAsync( + experimentTableId: experimentTableId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateExperimentCellAsResponseAsync( + string experimentTableId, + global::Helicone.UpdateExperimentCellRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateExperimentCellResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/experiment/table/{experimentTableId}/cell", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateExperimentCellResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateExperimentCellResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateExperimentCellResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateExperimentCellResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateExperimentCellResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateExperimentCellResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateExperimentCellResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateExperimentCellResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateExperimentCellResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateExperimentCellResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentMeta.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentMeta.g.cs index 0d093e09..d6c985d4 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentMeta.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentMeta.g.cs @@ -63,6 +63,28 @@ partial void ProcessUpdateExperimentMetaResponseContent( /// public async global::System.Threading.Tasks.Task> UpdateExperimentMetaAsync( + global::Helicone.UpdateExperimentMetaRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateExperimentMetaAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> UpdateExperimentMetaAsResponseAsync( + global::Helicone.UpdateExperimentMetaRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessUpdateExperimentMetaResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/experiment/update-meta", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessUpdateExperimentMetaResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessUpdateExperimentMetaResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessUpdateExperimentMetaResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessUpdateExperimentMetaResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessUpdateExperimentMetaResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessUpdateExperimentMetaResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessUpdateExperimentMetaResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessUpdateExperimentMetaResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessUpdateExperimentMetaResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessUpdateExperimentMetaResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentTableRow.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentTableRow.g.cs index f21897fd..f7c6e31b 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentTableRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.UpdateExperimentTableRow.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateExperimentTableRowResponseContent( public async global::System.Threading.Tasks.Task UpdateExperimentTableRowAsync( string experimentId, + global::Helicone.UpdateExperimentTableRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateExperimentTableRowAsResponseAsync( + experimentId: experimentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateExperimentTableRowAsResponseAsync( + string experimentId, + global::Helicone.UpdateExperimentTableRowRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateExperimentTableRowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v2/experiment/{experimentId}/row/update", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateExperimentTableRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateExperimentTableRowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateExperimentTableRowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateExperimentTableRowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateExperimentTableRowResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateExperimentTableRowResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateExperimentTableRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateExperimentTableRowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateExperimentTableRowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateExperimentTableRowResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ExperimentClient.g.cs b/src/libs/Helicone/Generated/Helicone.ExperimentClient.g.cs index 2aadc86c..0810eca8 100644 --- a/src/libs/Helicone/Generated/Helicone.ExperimentClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ExperimentClient.g.cs @@ -103,10 +103,10 @@ public ExperimentClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ExperimentClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeClient.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeClient.g.cs index 3b5846f2..9c10642a 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeClient.g.cs @@ -45,7 +45,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public AgentClient Agent => new AgentClient(HttpClient, authorizations: Authorizations, options: Options) + public AgentClient Agent => new AgentClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -55,7 +55,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public ApiKeyClient ApiKey => new ApiKeyClient(HttpClient, authorizations: Authorizations, options: Options) + public ApiKeyClient ApiKey => new ApiKeyClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -65,7 +65,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public ComparisonClient Comparison => new ComparisonClient(HttpClient, authorizations: Authorizations, options: Options) + public ComparisonClient Comparison => new ComparisonClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -75,7 +75,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public CreditsClient Credits => new CreditsClient(HttpClient, authorizations: Authorizations, options: Options) + public CreditsClient Credits => new CreditsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -85,7 +85,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public CustomerClient Customer => new CustomerClient(HttpClient, authorizations: Authorizations, options: Options) + public CustomerClient Customer => new CustomerClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -95,7 +95,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public DashboardClient Dashboard => new DashboardClient(HttpClient, authorizations: Authorizations, options: Options) + public DashboardClient Dashboard => new DashboardClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -105,7 +105,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public DatasetClient Dataset => new DatasetClient(HttpClient, authorizations: Authorizations, options: Options) + public DatasetClient Dataset => new DatasetClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -115,7 +115,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public EvalsClient Evals => new EvalsClient(HttpClient, authorizations: Authorizations, options: Options) + public EvalsClient Evals => new EvalsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -125,7 +125,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public EvaluatorClient Evaluator => new EvaluatorClient(HttpClient, authorizations: Authorizations, options: Options) + public EvaluatorClient Evaluator => new EvaluatorClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -135,7 +135,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public ExperimentClient Experiment => new ExperimentClient(HttpClient, authorizations: Authorizations, options: Options) + public ExperimentClient Experiment => new ExperimentClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -145,7 +145,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public HeliconeSqlClient HeliconeSql => new HeliconeSqlClient(HttpClient, authorizations: Authorizations, options: Options) + public HeliconeSqlClient HeliconeSql => new HeliconeSqlClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -155,7 +155,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public IntegrationClient Integration => new IntegrationClient(HttpClient, authorizations: Authorizations, options: Options) + public IntegrationClient Integration => new IntegrationClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -165,7 +165,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public MetricsClient Metrics => new MetricsClient(HttpClient, authorizations: Authorizations, options: Options) + public MetricsClient Metrics => new MetricsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -175,7 +175,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public ModelRegistryClient ModelRegistry => new ModelRegistryClient(HttpClient, authorizations: Authorizations, options: Options) + public ModelRegistryClient ModelRegistry => new ModelRegistryClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -185,7 +185,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public ModelsClient Models => new ModelsClient(HttpClient, authorizations: Authorizations, options: Options) + public ModelsClient Models => new ModelsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -195,7 +195,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public PiClient Pi => new PiClient(HttpClient, authorizations: Authorizations, options: Options) + public PiClient Pi => new PiClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -205,7 +205,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public PlaygroundClient Playground => new PlaygroundClient(HttpClient, authorizations: Authorizations, options: Options) + public PlaygroundClient Playground => new PlaygroundClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -215,7 +215,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public PromptClient Prompt => new PromptClient(HttpClient, authorizations: Authorizations, options: Options) + public PromptClient Prompt => new PromptClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -225,7 +225,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public Prompt2025Client Prompt2025 => new Prompt2025Client(HttpClient, authorizations: Authorizations, options: Options) + public Prompt2025Client Prompt2025 => new Prompt2025Client(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -235,7 +235,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public Prompt2025V2Client Prompt2025V2 => new Prompt2025V2Client(HttpClient, authorizations: Authorizations, options: Options) + public Prompt2025V2Client Prompt2025V2 => new Prompt2025V2Client(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -245,7 +245,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public PropertyClient Property => new PropertyClient(HttpClient, authorizations: Authorizations, options: Options) + public PropertyClient Property => new PropertyClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -255,7 +255,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public ProvidersClient Providers => new ProvidersClient(HttpClient, authorizations: Authorizations, options: Options) + public ProvidersClient Providers => new ProvidersClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -265,7 +265,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public RequestClient Request => new RequestClient(HttpClient, authorizations: Authorizations, options: Options) + public RequestClient Request => new RequestClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -275,7 +275,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public SecurityClient Security => new SecurityClient(HttpClient, authorizations: Authorizations, options: Options) + public SecurityClient Security => new SecurityClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -285,7 +285,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public SessionClient Session => new SessionClient(HttpClient, authorizations: Authorizations, options: Options) + public SessionClient Session => new SessionClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -295,7 +295,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public StatusClient Status => new StatusClient(HttpClient, authorizations: Authorizations, options: Options) + public StatusClient Status => new StatusClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -305,7 +305,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public StripeClient Stripe => new StripeClient(HttpClient, authorizations: Authorizations, options: Options) + public StripeClient Stripe => new StripeClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -315,7 +315,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public TestClient Test => new TestClient(HttpClient, authorizations: Authorizations, options: Options) + public TestClient Test => new TestClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -325,7 +325,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public TraceClient Trace => new TraceClient(HttpClient, authorizations: Authorizations, options: Options) + public TraceClient Trace => new TraceClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -335,7 +335,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public UserClient User => new UserClient(HttpClient, authorizations: Authorizations, options: Options) + public UserClient User => new UserClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -345,7 +345,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public VaultClient Vault => new VaultClient(HttpClient, authorizations: Authorizations, options: Options) + public VaultClient Vault => new VaultClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -355,7 +355,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public WebhooksClient Webhooks => new WebhooksClient(HttpClient, authorizations: Authorizations, options: Options) + public WebhooksClient Webhooks => new WebhooksClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -365,7 +365,7 @@ public sealed partial class HeliconeClient : global::Helicone.IHeliconeClient, g /// /// /// - public WrappedClient Wrapped => new WrappedClient(HttpClient, authorizations: Authorizations, options: Options) + public WrappedClient Wrapped => new WrappedClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -433,10 +433,10 @@ public HeliconeClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HeliconeClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.BulkDeleteSavedQueries.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.BulkDeleteSavedQueries.g.cs index 045036dc..75317ab7 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.BulkDeleteSavedQueries.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.BulkDeleteSavedQueries.g.cs @@ -64,6 +64,29 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( /// public async global::System.Threading.Tasks.Task BulkDeleteSavedQueriesAsync( + global::Helicone.BulkDeleteSavedQueriesRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await BulkDeleteSavedQueriesAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Bulk delete saved queries
+ /// Delete multiple saved queries at once + ///
+ /// + /// 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> BulkDeleteSavedQueriesAsResponseAsync( + global::Helicone.BulkDeleteSavedQueriesRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -98,6 +121,7 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-sql/saved-queries/bulk-delete", baseUri: ResolveBaseUri( @@ -179,6 +203,8 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -189,6 +215,11 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -206,6 +237,8 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -215,8 +248,7 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -225,6 +257,11 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -241,14 +278,15 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -288,6 +326,8 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -308,6 +348,8 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -332,9 +374,13 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultVoidString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultVoidString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -362,9 +408,13 @@ partial void ProcessBulkDeleteSavedQueriesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultVoidString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultVoidString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.CreateSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.CreateSavedQuery.g.cs index 485e10b5..2b712a23 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.CreateSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.CreateSavedQuery.g.cs @@ -64,6 +64,29 @@ partial void ProcessCreateSavedQueryResponseContent( /// public async global::System.Threading.Tasks.Task CreateSavedQueryAsync( + global::Helicone.CreateSavedQueryRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateSavedQueryAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create saved query
+ /// Create a new saved query + ///
+ /// + /// 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> CreateSavedQueryAsResponseAsync( + global::Helicone.CreateSavedQueryRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -98,6 +121,7 @@ partial void ProcessCreateSavedQueryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-sql/saved-query", baseUri: ResolveBaseUri( @@ -179,6 +203,8 @@ partial void ProcessCreateSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -189,6 +215,11 @@ partial void ProcessCreateSavedQueryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -206,6 +237,8 @@ partial void ProcessCreateSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -215,8 +248,7 @@ partial void ProcessCreateSavedQueryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -225,6 +257,11 @@ partial void ProcessCreateSavedQueryResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -241,14 +278,15 @@ partial void ProcessCreateSavedQueryResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -288,6 +326,8 @@ partial void ProcessCreateSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -308,6 +348,8 @@ partial void ProcessCreateSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -332,9 +374,13 @@ partial void ProcessCreateSavedQueryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHqlSavedQueryArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHqlSavedQueryArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -362,9 +408,13 @@ partial void ProcessCreateSavedQueryResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHqlSavedQueryArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHqlSavedQueryArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DeleteSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DeleteSavedQuery.g.cs index 1b2b1926..2a973b8d 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DeleteSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DeleteSavedQuery.g.cs @@ -66,6 +66,27 @@ partial void ProcessDeleteSavedQueryResponseContent( string queryId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteSavedQueryAsResponseAsync( + queryId: queryId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete saved query
+ /// Delete a saved query by ID + ///
+ /// + /// 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> DeleteSavedQueryAsResponseAsync( + string queryId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -95,6 +116,7 @@ partial void ProcessDeleteSavedQueryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-sql/saved-query/{queryId}", baseUri: ResolveBaseUri( @@ -170,6 +192,8 @@ partial void ProcessDeleteSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +204,11 @@ partial void ProcessDeleteSavedQueryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +226,8 @@ partial void ProcessDeleteSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +237,7 @@ partial void ProcessDeleteSavedQueryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +246,11 @@ partial void ProcessDeleteSavedQueryResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +267,15 @@ partial void ProcessDeleteSavedQueryResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +315,8 @@ partial void ProcessDeleteSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +337,8 @@ partial void ProcessDeleteSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,9 +363,13 @@ partial void ProcessDeleteSavedQueryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultVoidString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultVoidString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -353,9 +397,13 @@ partial void ProcessDeleteSavedQueryResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultVoidString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultVoidString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DownloadCsv.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DownloadCsv.g.cs index 5b9e335b..d687fd36 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DownloadCsv.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.DownloadCsv.g.cs @@ -64,6 +64,29 @@ partial void ProcessDownloadCsvResponseContent( /// public async global::System.Threading.Tasks.Task DownloadCsvAsync( + global::Helicone.ExecuteSqlRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DownloadCsvAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Download query results as CSV
+ /// Execute a SQL query and download results as CSV + ///
+ /// + /// 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> DownloadCsvAsResponseAsync( + global::Helicone.ExecuteSqlRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -98,6 +121,7 @@ partial void ProcessDownloadCsvResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-sql/download", baseUri: ResolveBaseUri( @@ -179,6 +203,8 @@ partial void ProcessDownloadCsvResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -189,6 +215,11 @@ partial void ProcessDownloadCsvResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -206,6 +237,8 @@ partial void ProcessDownloadCsvResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -215,8 +248,7 @@ partial void ProcessDownloadCsvResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -225,6 +257,11 @@ partial void ProcessDownloadCsvResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -241,14 +278,15 @@ partial void ProcessDownloadCsvResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -288,6 +326,8 @@ partial void ProcessDownloadCsvResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -308,6 +348,8 @@ partial void ProcessDownloadCsvResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -332,9 +374,13 @@ partial void ProcessDownloadCsvResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -362,9 +408,13 @@ partial void ProcessDownloadCsvResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.ExecuteSql.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.ExecuteSql.g.cs index 6581648b..b558a13d 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.ExecuteSql.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.ExecuteSql.g.cs @@ -64,6 +64,29 @@ partial void ProcessExecuteSqlResponseContent( /// public async global::System.Threading.Tasks.Task ExecuteSqlAsync( + global::Helicone.ExecuteSqlRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExecuteSqlAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Execute SQL query
+ /// Execute a SQL query against ClickHouse + ///
+ /// + /// 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> ExecuteSqlAsResponseAsync( + global::Helicone.ExecuteSqlRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -98,6 +121,7 @@ partial void ProcessExecuteSqlResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-sql/execute", baseUri: ResolveBaseUri( @@ -179,6 +203,8 @@ partial void ProcessExecuteSqlResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -189,6 +215,11 @@ partial void ProcessExecuteSqlResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -206,6 +237,8 @@ partial void ProcessExecuteSqlResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -215,8 +248,7 @@ partial void ProcessExecuteSqlResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -225,6 +257,11 @@ partial void ProcessExecuteSqlResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -241,14 +278,15 @@ partial void ProcessExecuteSqlResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -288,6 +326,8 @@ partial void ProcessExecuteSqlResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -308,6 +348,8 @@ partial void ProcessExecuteSqlResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -332,9 +374,13 @@ partial void ProcessExecuteSqlResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultExecuteSqlResponseString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultExecuteSqlResponseString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -362,9 +408,13 @@ partial void ProcessExecuteSqlResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultExecuteSqlResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultExecuteSqlResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetClickHouseSchema.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetClickHouseSchema.g.cs index 7673971b..3c1a831f 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetClickHouseSchema.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetClickHouseSchema.g.cs @@ -62,6 +62,24 @@ partial void ProcessGetClickHouseSchemaResponseContent( public async global::System.Threading.Tasks.Task GetClickHouseSchemaAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetClickHouseSchemaAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get database schema
+ /// Get ClickHouse schema (tables and columns) + ///
+ /// 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> GetClickHouseSchemaAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,6 +108,7 @@ partial void ProcessGetClickHouseSchemaResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-sql/schema", baseUri: ResolveBaseUri( @@ -164,6 +183,8 @@ partial void ProcessGetClickHouseSchemaResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +195,11 @@ partial void ProcessGetClickHouseSchemaResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +217,8 @@ partial void ProcessGetClickHouseSchemaResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +228,7 @@ partial void ProcessGetClickHouseSchemaResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +237,11 @@ partial void ProcessGetClickHouseSchemaResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +258,15 @@ partial void ProcessGetClickHouseSchemaResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +306,8 @@ partial void ProcessGetClickHouseSchemaResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +328,8 @@ partial void ProcessGetClickHouseSchemaResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -317,9 +354,13 @@ partial void ProcessGetClickHouseSchemaResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultClickHouseTableSchemaArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultClickHouseTableSchemaArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +388,13 @@ partial void ProcessGetClickHouseSchemaResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultClickHouseTableSchemaArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultClickHouseTableSchemaArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQueries.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQueries.g.cs index 1653b25f..e53180f4 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQueries.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQueries.g.cs @@ -62,6 +62,24 @@ partial void ProcessGetSavedQueriesResponseContent( public async global::System.Threading.Tasks.Task GetSavedQueriesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSavedQueriesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List saved queries
+ /// Get all saved queries for the organization + ///
+ /// 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> GetSavedQueriesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,6 +108,7 @@ partial void ProcessGetSavedQueriesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/helicone-sql/saved-queries", baseUri: ResolveBaseUri( @@ -164,6 +183,8 @@ partial void ProcessGetSavedQueriesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +195,11 @@ partial void ProcessGetSavedQueriesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +217,8 @@ partial void ProcessGetSavedQueriesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +228,7 @@ partial void ProcessGetSavedQueriesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +237,11 @@ partial void ProcessGetSavedQueriesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +258,15 @@ partial void ProcessGetSavedQueriesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +306,8 @@ partial void ProcessGetSavedQueriesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +328,8 @@ partial void ProcessGetSavedQueriesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -317,9 +354,13 @@ partial void ProcessGetSavedQueriesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultArrayHqlSavedQueryString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultArrayHqlSavedQueryString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +388,13 @@ partial void ProcessGetSavedQueriesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultArrayHqlSavedQueryString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultArrayHqlSavedQueryString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQuery.g.cs index 5a3fdaf2..42a7f564 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.GetSavedQuery.g.cs @@ -66,6 +66,27 @@ partial void ProcessGetSavedQueryResponseContent( string queryId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSavedQueryAsResponseAsync( + queryId: queryId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get saved query
+ /// Get a specific saved query by ID + ///
+ /// + /// 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> GetSavedQueryAsResponseAsync( + string queryId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -95,6 +116,7 @@ partial void ProcessGetSavedQueryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-sql/saved-query/{queryId}", baseUri: ResolveBaseUri( @@ -170,6 +192,8 @@ partial void ProcessGetSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +204,11 @@ partial void ProcessGetSavedQueryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +226,8 @@ partial void ProcessGetSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +237,7 @@ partial void ProcessGetSavedQueryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +246,11 @@ partial void ProcessGetSavedQueryResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +267,15 @@ partial void ProcessGetSavedQueryResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +315,8 @@ partial void ProcessGetSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +337,8 @@ partial void ProcessGetSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,9 +363,13 @@ partial void ProcessGetSavedQueryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHqlSavedQueryOrNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHqlSavedQueryOrNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -353,9 +397,13 @@ partial void ProcessGetSavedQueryResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHqlSavedQueryOrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHqlSavedQueryOrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.UpdateSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.UpdateSavedQuery.g.cs index 486b97df..83f1fc65 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.UpdateSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.UpdateSavedQuery.g.cs @@ -68,6 +68,32 @@ partial void ProcessUpdateSavedQueryResponseContent( public async global::System.Threading.Tasks.Task UpdateSavedQueryAsync( string queryId, + global::Helicone.CreateSavedQueryRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateSavedQueryAsResponseAsync( + queryId: queryId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update saved query
+ /// Update an existing saved query + ///
+ /// + /// + /// 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> UpdateSavedQueryAsResponseAsync( + string queryId, + global::Helicone.CreateSavedQueryRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -103,6 +129,7 @@ partial void ProcessUpdateSavedQueryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/helicone-sql/saved-query/{queryId}", baseUri: ResolveBaseUri( @@ -185,6 +212,8 @@ partial void ProcessUpdateSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +224,11 @@ partial void ProcessUpdateSavedQueryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +246,8 @@ partial void ProcessUpdateSavedQueryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +257,7 @@ partial void ProcessUpdateSavedQueryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +266,11 @@ partial void ProcessUpdateSavedQueryResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +287,15 @@ partial void ProcessUpdateSavedQueryResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +335,8 @@ partial void ProcessUpdateSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +357,8 @@ partial void ProcessUpdateSavedQueryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -338,9 +383,13 @@ partial void ProcessUpdateSavedQueryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHqlSavedQueryString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHqlSavedQueryString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -368,9 +417,13 @@ partial void ProcessUpdateSavedQueryResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHqlSavedQueryString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHqlSavedQueryString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.g.cs b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.g.cs index f99d3e02..2a574f67 100644 --- a/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.HeliconeSqlClient.g.cs @@ -103,10 +103,10 @@ public HeliconeSqlClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HeliconeSqlClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.CreateAndEscalateThread.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.CreateAndEscalateThread.g.cs index 246c8f10..a3640bdf 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.CreateAndEscalateThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.CreateAndEscalateThread.g.cs @@ -13,5 +13,14 @@ public partial interface IAgentClient global::System.Threading.Tasks.Task CreateAndEscalateThreadAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> CreateAndEscalateThreadAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.DeleteThread.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.DeleteThread.g.cs index 892daf37..8297ada7 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.DeleteThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.DeleteThread.g.cs @@ -15,5 +15,16 @@ public partial interface IAgentClient string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeleteThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.EscalateThread.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.EscalateThread.g.cs index 5656d0cb..19012cd2 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.EscalateThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.EscalateThread.g.cs @@ -15,5 +15,16 @@ public partial interface IAgentClient string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> EscalateThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.Generate.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.Generate.g.cs index d8621d72..25b3c34b 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.Generate.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.Generate.g.cs @@ -19,6 +19,18 @@ public partial interface IAgentClient /// /// /// + /// + /// 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> GenerateAsResponseAsync( + + global::Helicone.AllOf request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.GetAllThreads.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.GetAllThreads.g.cs index b8f723ed..7647e6a8 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.GetAllThreads.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.GetAllThreads.g.cs @@ -13,5 +13,14 @@ public partial interface IAgentClient global::System.Threading.Tasks.Task GetAllThreadsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetAllThreadsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.GetThread.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.GetThread.g.cs index b6ea506f..5e088975 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.GetThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.GetThread.g.cs @@ -15,5 +15,16 @@ public partial interface IAgentClient string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.ReopenThread.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.ReopenThread.g.cs index cf91a355..a69bb1ec 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.ReopenThread.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.ReopenThread.g.cs @@ -15,5 +15,16 @@ public partial interface IAgentClient string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> ReopenThreadAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.SearchDocs.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.SearchDocs.g.cs index a4ed940e..959f67b7 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.SearchDocs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.SearchDocs.g.cs @@ -19,6 +19,18 @@ public partial interface IAgentClient /// /// /// + /// + /// 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> SearchDocsAsResponseAsync( + + global::Helicone.SearchDocsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IAgentClient.UpsertThreadMessage.g.cs b/src/libs/Helicone/Generated/Helicone.IAgentClient.UpsertThreadMessage.g.cs index 8a9ec194..ae83ed9e 100644 --- a/src/libs/Helicone/Generated/Helicone.IAgentClient.UpsertThreadMessage.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IAgentClient.UpsertThreadMessage.g.cs @@ -22,6 +22,20 @@ public partial interface IAgentClient /// /// /// + /// + /// 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> UpsertThreadMessageAsResponseAsync( + string sessionId, + + global::Helicone.UpsertThreadMessageRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateAPIKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateAPIKey.g.cs index 969f28bf..559b0193 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateAPIKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateAPIKey.g.cs @@ -19,6 +19,18 @@ public partial interface IApiKeyClient /// /// /// + /// + /// 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>> CreateAPIKeyAsResponseAsync( + + global::Helicone.CreateAPIKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProviderKey.g.cs index 72c7d200..73a239cf 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProviderKey.g.cs @@ -19,6 +19,18 @@ public partial interface IApiKeyClient /// /// /// + /// + /// 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>> CreateProviderKeyAsResponseAsync( + + global::Helicone.CreateProviderKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProxyKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProxyKey.g.cs index 684a7d0e..92db6996 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProxyKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.CreateProxyKey.g.cs @@ -19,6 +19,18 @@ public partial interface IApiKeyClient /// /// /// + /// + /// 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>> CreateProxyKeyAsResponseAsync( + + global::Helicone.CreateProxyKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteAPIKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteAPIKey.g.cs index a9d1be15..ebbcfe1e 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteAPIKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteAPIKey.g.cs @@ -15,5 +15,16 @@ public partial interface IApiKeyClient double apiKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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>> DeleteAPIKeyAsResponseAsync( + double apiKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteProviderKey.g.cs index bea61e51..dcbdd8e9 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.DeleteProviderKey.g.cs @@ -15,5 +15,16 @@ public partial interface IApiKeyClient string providerKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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>> DeleteProviderKeyAsResponseAsync( + string providerKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetAPIKeys.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetAPIKeys.g.cs index 861c849e..cc80ad24 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetAPIKeys.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetAPIKeys.g.cs @@ -13,5 +13,14 @@ public partial interface IApiKeyClient global::System.Threading.Tasks.Task GetAPIKeysAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetAPIKeysAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKey.g.cs index 4a58b56d..4dd147d3 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKey.g.cs @@ -15,5 +15,16 @@ public partial interface IApiKeyClient string providerKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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>> GetProviderKeyAsResponseAsync( + string providerKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKeys.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKeys.g.cs index c6a07b87..d56ba628 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKeys.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.GetProviderKeys.g.cs @@ -13,5 +13,14 @@ public partial interface IApiKeyClient global::System.Threading.Tasks.Task, global::Helicone.GetProviderKeysResponse2>> GetProviderKeysAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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, global::Helicone.GetProviderKeysResponse2>>> GetProviderKeysAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateAPIKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateAPIKey.g.cs index eb4f7d31..0c24e645 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateAPIKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateAPIKey.g.cs @@ -22,6 +22,20 @@ public partial interface IApiKeyClient /// /// /// + /// + /// 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>> UpdateAPIKeyAsResponseAsync( + double apiKeyId, + + global::Helicone.UpdateAPIKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateProviderKey.g.cs b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateProviderKey.g.cs index 9f0e4602..113dbf47 100644 --- a/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateProviderKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IApiKeyClient.UpdateProviderKey.g.cs @@ -22,6 +22,20 @@ public partial interface IApiKeyClient /// /// /// + /// + /// 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> UpdateProviderKeyAsResponseAsync( + string providerKeyId, + + global::Helicone.UpdateProviderKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Construct a type with a set of properties K of type T diff --git a/src/libs/Helicone/Generated/Helicone.IComparisonClient.GetModelComparison.g.cs b/src/libs/Helicone/Generated/Helicone.IComparisonClient.GetModelComparison.g.cs index badcfd8d..71d010e8 100644 --- a/src/libs/Helicone/Generated/Helicone.IComparisonClient.GetModelComparison.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IComparisonClient.GetModelComparison.g.cs @@ -13,6 +13,18 @@ public partial interface IComparisonClient /// global::System.Threading.Tasks.Task GetModelComparisonAsync( + global::System.Collections.Generic.IList request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetModelComparisonAsResponseAsync( + global::System.Collections.Generic.IList request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetCreditsBalance.g.cs b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetCreditsBalance.g.cs index 0f02b8bc..cac06b21 100644 --- a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetCreditsBalance.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetCreditsBalance.g.cs @@ -13,5 +13,14 @@ public partial interface ICreditsClient global::System.Threading.Tasks.Task GetCreditsBalanceAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetCreditsBalanceAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetDiscounts.g.cs b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetDiscounts.g.cs index b772aeb9..7de6d1c2 100644 --- a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetDiscounts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetDiscounts.g.cs @@ -13,5 +13,14 @@ public partial interface ICreditsClient global::System.Threading.Tasks.Task GetDiscountsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetDiscountsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetSpendBreakdown.g.cs b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetSpendBreakdown.g.cs index c519ddcc..2b61d980 100644 --- a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetSpendBreakdown.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetSpendBreakdown.g.cs @@ -19,5 +19,20 @@ public partial interface ICreditsClient string? endDate = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// + /// 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> GetSpendBreakdownAsResponseAsync( + global::Helicone.GetSpendBreakdownTimeRange? timeRange = default, + string? startDate = default, + string? endDate = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetTotalSpend.g.cs b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetTotalSpend.g.cs index 5fd9306f..b067c57e 100644 --- a/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetTotalSpend.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICreditsClient.GetTotalSpend.g.cs @@ -13,5 +13,14 @@ public partial interface ICreditsClient global::System.Threading.Tasks.Task GetTotalSpendAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetTotalSpendAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListInvoices.g.cs b/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListInvoices.g.cs index 8ffe75c5..4bf091d6 100644 --- a/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListInvoices.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListInvoices.g.cs @@ -13,5 +13,14 @@ public partial interface ICreditsClient global::System.Threading.Tasks.Task ListInvoicesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> ListInvoicesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListTokenUsagePayments.g.cs b/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListTokenUsagePayments.g.cs index 0c214e5a..e3b8d43b 100644 --- a/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListTokenUsagePayments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICreditsClient.ListTokenUsagePayments.g.cs @@ -17,5 +17,18 @@ public partial interface ICreditsClient double? pageSize = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> ListTokenUsagePaymentsAsResponseAsync( + double? page = default, + double? pageSize = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomerUsage.g.cs b/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomerUsage.g.cs index 49b08483..fb5c523a 100644 --- a/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomerUsage.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomerUsage.g.cs @@ -22,6 +22,20 @@ public partial interface ICustomerClient /// /// /// + /// + /// 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> GetCustomerUsageAsResponseAsync( + string customerId, + + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomers.g.cs b/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomers.g.cs index 72d7dab3..d2c628a6 100644 --- a/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomers.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ICustomerClient.GetCustomers.g.cs @@ -19,6 +19,18 @@ public partial interface ICustomerClient /// /// /// + /// + /// 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>> GetCustomersAsResponseAsync( + + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.IDashboardClient.GetScoresOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IDashboardClient.GetScoresOverTime.g.cs index 6db2ba42..b6363da3 100644 --- a/src/libs/Helicone/Generated/Helicone.IDashboardClient.GetScoresOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDashboardClient.GetScoresOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IDashboardClient /// /// /// + /// + /// 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> GetScoresOverTimeAsResponseAsync( + + global::Helicone.DataOverTimeRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddDataset.g.cs index 5564d387..246262eb 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddDataset.g.cs @@ -19,6 +19,18 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> AddDatasetAsResponseAsync( + + global::Helicone.NewDatasetParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddHeliconeDataset.g.cs index be87166c..7a8cff31 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddHeliconeDataset.g.cs @@ -19,6 +19,18 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> AddHeliconeDatasetAsResponseAsync( + + global::Helicone.NewHeliconeDatasetParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddRandomDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddRandomDataset.g.cs index 5904bcbc..a4ae04d8 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddRandomDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.AddRandomDataset.g.cs @@ -19,6 +19,18 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> AddRandomDatasetAsResponseAsync( + + global::Helicone.RandomDatasetParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.CountHeliconeDatasetRows.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.CountHeliconeDatasetRows.g.cs index 3219742d..b10feef6 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.CountHeliconeDatasetRows.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.CountHeliconeDatasetRows.g.cs @@ -15,5 +15,16 @@ public partial interface IDatasetClient string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> CountHeliconeDatasetRowsAsResponseAsync( + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.CreateDatasetRow.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.CreateDatasetRow.g.cs index b54a2a20..86dd52d3 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.CreateDatasetRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.CreateDatasetRow.g.cs @@ -25,6 +25,22 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> CreateDatasetRowAsResponseAsync( + string datasetId, + string promptVersionId, + + global::Helicone.CreateDatasetRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// /// /// /// Construct a type with a set of properties K of type T diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.DeleteHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.DeleteHeliconeDataset.g.cs index f3c5fafe..9a9b0709 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.DeleteHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.DeleteHeliconeDataset.g.cs @@ -15,5 +15,16 @@ public partial interface IDatasetClient string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeleteHeliconeDatasetAsResponseAsync( + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDataset.g.cs index be365544..2fffe450 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDataset.g.cs @@ -15,5 +15,16 @@ public partial interface IDatasetClient string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetDatasetAsResponseAsync( + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDatasets.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDatasets.g.cs index b44ae101..42b67e77 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDatasets.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.GetDatasets.g.cs @@ -19,6 +19,18 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> GetDatasetsAsResponseAsync( + + global::Helicone.GetDatasetsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.InsertDatasetRow.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.InsertDatasetRow.g.cs index 9afe1831..874488d2 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.InsertDatasetRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.InsertDatasetRow.g.cs @@ -22,6 +22,20 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> InsertDatasetRowAsResponseAsync( + string datasetId, + + global::Helicone.InsertDatasetRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Construct a type with a set of properties K of type T diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateDataset.g.cs index cbe5e013..4feb1d12 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateDataset.g.cs @@ -22,6 +22,20 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> MutateDatasetAsResponseAsync( + string datasetId, + + global::Helicone.MutateDatasetRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateHeliconeDataset.g.cs index 44852285..36043a4a 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.MutateHeliconeDataset.g.cs @@ -22,6 +22,20 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> MutateHeliconeDatasetAsResponseAsync( + string datasetId, + + global::Helicone.MutateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDataset.g.cs index 5bd06209..31cc0048 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDataset.g.cs @@ -19,6 +19,18 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> QueryHeliconeDatasetAsResponseAsync( + + global::Helicone.QueryHeliconeDatasetRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDatasetRows.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDatasetRows.g.cs index 02ca8588..41928514 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDatasetRows.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.QueryHeliconeDatasetRows.g.cs @@ -22,6 +22,20 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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> QueryHeliconeDatasetRowsAsResponseAsync( + string datasetId, + + global::Helicone.QueryHeliconeDatasetRowsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IDatasetClient.UpdateHeliconeDatasetRequest.g.cs b/src/libs/Helicone/Generated/Helicone.IDatasetClient.UpdateHeliconeDatasetRequest.g.cs index e88e1c18..b38d8c14 100644 --- a/src/libs/Helicone/Generated/Helicone.IDatasetClient.UpdateHeliconeDatasetRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IDatasetClient.UpdateHeliconeDatasetRequest.g.cs @@ -25,6 +25,22 @@ public partial interface IDatasetClient /// /// /// + /// + /// 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>> UpdateHeliconeDatasetRequestAsResponseAsync( + string datasetId, + string requestId, + + global::Helicone.UpdateHeliconeDatasetRequestRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IEvalsClient.AddEval.g.cs b/src/libs/Helicone/Generated/Helicone.IEvalsClient.AddEval.g.cs index 88c46e01..be6112b9 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvalsClient.AddEval.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvalsClient.AddEval.g.cs @@ -22,6 +22,20 @@ public partial interface IEvalsClient /// /// /// + /// + /// 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> AddEvalAsResponseAsync( + string requestId, + + global::Helicone.AddEvalRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IEvalsClient.GetEvalScores.g.cs b/src/libs/Helicone/Generated/Helicone.IEvalsClient.GetEvalScores.g.cs index b2c09892..eed20e92 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvalsClient.GetEvalScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvalsClient.GetEvalScores.g.cs @@ -13,5 +13,14 @@ public partial interface IEvalsClient global::System.Threading.Tasks.Task GetEvalScoresAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetEvalScoresAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryEvals.g.cs b/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryEvals.g.cs index a952ac41..40bacd17 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryEvals.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryEvals.g.cs @@ -19,6 +19,18 @@ public partial interface IEvalsClient /// /// /// + /// + /// 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> QueryEvalsAsResponseAsync( + + global::Helicone.EvalQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryScoreDistributions.g.cs b/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryScoreDistributions.g.cs index 1048f245..ca265f5f 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryScoreDistributions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvalsClient.QueryScoreDistributions.g.cs @@ -19,6 +19,18 @@ public partial interface IEvalsClient /// /// /// + /// + /// 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> QueryScoreDistributionsAsResponseAsync( + + global::Helicone.EvalQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateEvaluator.g.cs index b78b425b..8963e97f 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateEvaluator.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluatorClient /// /// /// + /// + /// 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> CreateEvaluatorAsResponseAsync( + + global::Helicone.CreateEvaluatorParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateOnlineEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateOnlineEvaluator.g.cs index 7d34db68..10863335 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateOnlineEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.CreateOnlineEvaluator.g.cs @@ -22,6 +22,20 @@ public partial interface IEvaluatorClient /// /// /// + /// + /// 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> CreateOnlineEvaluatorAsResponseAsync( + string evaluatorId, + + global::Helicone.CreateOnlineEvaluatorParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteEvaluator.g.cs index 4da012a6..4c4629d4 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteEvaluator.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluatorClient string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeleteEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteOnlineEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteOnlineEvaluator.g.cs index f11cf5d6..503306d9 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteOnlineEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.DeleteOnlineEvaluator.g.cs @@ -17,5 +17,18 @@ public partial interface IEvaluatorClient string onlineEvaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> DeleteOnlineEvaluatorAsResponseAsync( + string evaluatorId, + string onlineEvaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluator.g.cs index 9a89f469..3b1c918f 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluator.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluatorClient string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluatorStats.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluatorStats.g.cs index 9ea3481b..69f49aa0 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluatorStats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetEvaluatorStats.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluatorClient string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetEvaluatorStatsAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetExperimentsForEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetExperimentsForEvaluator.g.cs index 5a9bd3a4..10d245ab 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetExperimentsForEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetExperimentsForEvaluator.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluatorClient string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetExperimentsForEvaluatorAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetOnlineEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetOnlineEvaluators.g.cs index 2282e323..2efef658 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetOnlineEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.GetOnlineEvaluators.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluatorClient string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetOnlineEvaluatorsAsResponseAsync( + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.QueryEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.QueryEvaluators.g.cs index 500c25b8..dfb52895 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.QueryEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.QueryEvaluators.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluatorClient /// /// /// + /// + /// 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> QueryEvaluatorsAsResponseAsync( + + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLLMEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLLMEvaluator.g.cs index 5abeb324..ce85b347 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLLMEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLLMEvaluator.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluatorClient /// /// /// + /// + /// 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> TestLLMEvaluatorAsResponseAsync( + + global::Helicone.TestLLMEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLastMileEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLastMileEvaluator.g.cs index 7824526e..d0504c0c 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLastMileEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestLastMileEvaluator.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluatorClient /// /// /// + /// + /// 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> TestLastMileEvaluatorAsResponseAsync( + + global::Helicone.TestLastMileEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestPythonEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestPythonEvaluator.g.cs index cd6a79d7..0a3b01f6 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestPythonEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.TestPythonEvaluator.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluatorClient /// /// /// + /// + /// 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> TestPythonEvaluatorAsResponseAsync( + + global::Helicone.TestPythonEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.UpdateEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.UpdateEvaluator.g.cs index 699c0a4a..8097ed04 100644 --- a/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.UpdateEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IEvaluatorClient.UpdateEvaluator.g.cs @@ -22,6 +22,20 @@ public partial interface IEvaluatorClient /// /// /// + /// + /// 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> UpdateEvaluatorAsResponseAsync( + string evaluatorId, + + global::Helicone.UpdateEvaluatorParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowToExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowToExperiment.g.cs index 4cfca6b6..c98543c7 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowToExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowToExperiment.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> AddManualRowToExperimentAsResponseAsync( + string experimentId, + + global::Helicone.AddManualRowToExperimentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowsToExperimentBatch.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowsToExperimentBatch.g.cs index fc189f77..2afde9f5 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowsToExperimentBatch.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.AddManualRowsToExperimentBatch.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> AddManualRowsToExperimentBatchAsResponseAsync( + string experimentId, + + global::Helicone.AddManualRowsToExperimentBatchRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateEmptyExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateEmptyExperiment.g.cs index 829725b9..8c16e922 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateEmptyExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateEmptyExperiment.g.cs @@ -13,5 +13,14 @@ public partial interface IExperimentClient global::System.Threading.Tasks.Task CreateEmptyExperimentAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> CreateEmptyExperimentAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentCell.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentCell.g.cs index 073c97b1..b55eca50 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentCell.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentCell.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateExperimentCellAsResponseAsync( + string experimentTableId, + + global::Helicone.CreateExperimentCellRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentColumn.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentColumn.g.cs index 1680b90c..b6504be7 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentColumn.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentColumn.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateExperimentColumnAsResponseAsync( + string experimentTableId, + + global::Helicone.CreateExperimentColumnRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluator.g.cs index 0978a482..a292f18e 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluator.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateExperimentEvaluatorAsResponseAsync( + string experimentId, + + global::Helicone.CreateExperimentEvaluatorRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluatorOld.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluatorOld.g.cs index d1fa41a8..7e6cdeae 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluatorOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentEvaluatorOld.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateExperimentEvaluatorOldAsResponseAsync( + string experimentId, + + global::Helicone.CreateExperimentEvaluatorOldRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentFromRequest.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentFromRequest.g.cs index 6d784a4e..e8c4ef70 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentFromRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentFromRequest.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string requestId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> CreateExperimentFromRequestAsResponseAsync( + string requestId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRow.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRow.g.cs index 041ad7df..079c0674 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRow.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateExperimentTableRowAsResponseAsync( + string experimentTableId, + + global::Helicone.CreateExperimentTableRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowBatch.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowBatch.g.cs index f0158a68..ac2cffd5 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowBatch.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowBatch.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateExperimentTableRowBatchAsResponseAsync( + string experimentId, + + global::Helicone.CreateExperimentTableRowBatchRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowFromDataset.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowFromDataset.g.cs index fe96fbbe..dcdf3f05 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowFromDataset.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowFromDataset.g.cs @@ -17,5 +17,18 @@ public partial interface IExperimentClient string datasetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> CreateExperimentTableRowFromDatasetAsResponseAsync( + string experimentId, + string datasetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs index 55865a8c..416b016b 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateExperimentTableRowWithCellsBatch.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateExperimentTableRowWithCellsBatchAsResponseAsync( + string experimentTableId, + + global::Helicone.CreateExperimentTableRowWithCellsBatchRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewEmptyExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewEmptyExperiment.g.cs index 4ebff242..9ed700d3 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewEmptyExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewEmptyExperiment.g.cs @@ -19,6 +19,18 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateNewEmptyExperimentAsResponseAsync( + + global::Helicone.CreateNewEmptyExperimentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Construct a type with a set of properties K of type T diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperiment.g.cs index 1d9310e5..688dc701 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperiment.g.cs @@ -19,6 +19,18 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateNewExperimentAsResponseAsync( + + global::Helicone.CreateNewExperimentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentHypothesis.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentHypothesis.g.cs index 4c764c98..7bc79c87 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentHypothesis.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentHypothesis.g.cs @@ -19,6 +19,18 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateNewExperimentHypothesisAsResponseAsync( + + global::Helicone.CreateNewExperimentHypothesisRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentOld.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentOld.g.cs index 107354af..57f8a4a6 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentOld.g.cs @@ -19,6 +19,18 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateNewExperimentOldAsResponseAsync( + + global::Helicone.NewExperimentParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentTable.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentTable.g.cs index a56460a3..3b22d2ac 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentTable.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewExperimentTable.g.cs @@ -19,6 +19,18 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateNewExperimentTableAsResponseAsync( + + global::Helicone.CreateExperimentTableParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Construct a type with a set of properties K of type T diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewPromptVersionForExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewPromptVersionForExperiment.g.cs index c1ecb230..7403b998 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewPromptVersionForExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.CreateNewPromptVersionForExperiment.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> CreateNewPromptVersionForExperimentAsResponseAsync( + string experimentId, + + global::Helicone.CreateNewPromptVersionForExperimentParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperiment.g.cs index 70d63201..9fffa76e 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperiment.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeleteExperimentAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluator.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluator.g.cs index 4945c387..5a0a4814 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluator.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluator.g.cs @@ -17,5 +17,18 @@ public partial interface IExperimentClient string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> DeleteExperimentEvaluatorAsResponseAsync( + string experimentId, + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluatorOld.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluatorOld.g.cs index 24dbde04..eebcc1aa 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluatorOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentEvaluatorOld.g.cs @@ -17,5 +17,18 @@ public partial interface IExperimentClient string evaluatorId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> DeleteExperimentEvaluatorOldAsResponseAsync( + string experimentId, + string evaluatorId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRow.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRow.g.cs index 67ee1c1f..fc432fd4 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRow.g.cs @@ -17,5 +17,18 @@ public partial interface IExperimentClient double rowIndex, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> DeleteExperimentTableRowAsResponseAsync( + string experimentTableId, + double rowIndex, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRows.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRows.g.cs index ee50bd21..8bc8eb02 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRows.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeleteExperimentTableRows.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> DeleteExperimentTableRowsAsResponseAsync( + string experimentId, + + global::Helicone.DeleteExperimentTableRowsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeletePromptVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeletePromptVersion.g.cs index 3838e95e..94a22372 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeletePromptVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.DeletePromptVersion.g.cs @@ -17,5 +17,18 @@ public partial interface IExperimentClient string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> DeletePromptVersionAsResponseAsync( + string experimentId, + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentById.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentById.g.cs index 4a2f4cf9..4c2bf8d5 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentById.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetExperimentByIdAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators.g.cs index 4462b5a9..36b976c1 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetExperimentEvaluatorsAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators2.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators2.g.cs index 1e0cabb1..f19ab00a 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators2.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentEvaluators2.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetExperimentEvaluators2AsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentHypothesisScores.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentHypothesisScores.g.cs index 7b881799..e6fc347a 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentHypothesisScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentHypothesisScores.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string hypothesisId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetExperimentHypothesisScoresAsResponseAsync( + string hypothesisId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentPromptVersionScores.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentPromptVersionScores.g.cs index 29b51e81..adbada0a 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentPromptVersionScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentPromptVersionScores.g.cs @@ -17,5 +17,18 @@ public partial interface IExperimentClient string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> GetExperimentPromptVersionScoresAsResponseAsync( + string experimentId, + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentScore.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentScore.g.cs index 6dd77c9b..8c2a57b7 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentScore.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentScore.g.cs @@ -19,5 +19,20 @@ public partial interface IExperimentClient string scoreKey, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// + /// 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> GetExperimentScoreAsResponseAsync( + string experimentId, + string requestId, + string scoreKey, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableById.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableById.g.cs index 6c7e6655..55c135a5 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableById.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentTableId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetExperimentTableByIdAsResponseAsync( + string experimentTableId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableMetadata.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableMetadata.g.cs index 5bf3ee32..8dbcaf6d 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableMetadata.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTableMetadata.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentTableId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetExperimentTableMetadataAsResponseAsync( + string experimentTableId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTables.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTables.g.cs index 9c6efe33..833f4048 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTables.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentTables.g.cs @@ -13,5 +13,14 @@ public partial interface IExperimentClient global::System.Threading.Tasks.Task GetExperimentTablesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetExperimentTablesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperiments.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperiments.g.cs index 9e4b5f43..a0454276 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperiments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperiments.g.cs @@ -13,5 +13,14 @@ public partial interface IExperimentClient global::System.Threading.Tasks.Task GetExperimentsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetExperimentsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentsOld.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentsOld.g.cs index 57dc7aee..69fd5db7 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentsOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetExperimentsOld.g.cs @@ -19,6 +19,18 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> GetExperimentsOldAsResponseAsync( + + global::Helicone.GetExperimentsOldRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetInputKeysForExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetInputKeysForExperiment.g.cs index 2443573d..1a624b46 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetInputKeysForExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetInputKeysForExperiment.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetInputKeysForExperimentAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetPromptVersionsForExperiment.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetPromptVersionsForExperiment.g.cs index 38274aea..ca1a9c61 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetPromptVersionsForExperiment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.GetPromptVersionsForExperiment.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetPromptVersionsForExperimentAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluators.g.cs index 9cfa7a0e..79d1eb30 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluators.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> RunExperimentEvaluatorsAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluatorsOld.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluatorsOld.g.cs index 626e098d..db764bf5 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluatorsOld.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunExperimentEvaluatorsOld.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> RunExperimentEvaluatorsOldAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunHypothesis.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunHypothesis.g.cs index 6af9fc16..f7d105f4 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunHypothesis.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.RunHypothesis.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> RunHypothesisAsResponseAsync( + string experimentId, + + global::Helicone.RunHypothesisRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.ShouldRunEvaluators.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.ShouldRunEvaluators.g.cs index b8a9cef5..c8c774ff 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.ShouldRunEvaluators.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.ShouldRunEvaluators.g.cs @@ -15,5 +15,16 @@ public partial interface IExperimentClient string experimentId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> ShouldRunEvaluatorsAsResponseAsync( + string experimentId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentCell.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentCell.g.cs index b668ba9d..6b2dec11 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentCell.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentCell.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> UpdateExperimentCellAsResponseAsync( + string experimentTableId, + + global::Helicone.UpdateExperimentCellRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentMeta.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentMeta.g.cs index 39c21f36..0272e70c 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentMeta.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentMeta.g.cs @@ -19,6 +19,18 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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>> UpdateExperimentMetaAsResponseAsync( + + global::Helicone.UpdateExperimentMetaRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentTableRow.g.cs b/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentTableRow.g.cs index cca54a86..8526b115 100644 --- a/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentTableRow.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IExperimentClient.UpdateExperimentTableRow.g.cs @@ -22,6 +22,20 @@ public partial interface IExperimentClient /// /// /// + /// + /// 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> UpdateExperimentTableRowAsResponseAsync( + string experimentId, + + global::Helicone.UpdateExperimentTableRowRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.BulkDeleteSavedQueries.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.BulkDeleteSavedQueries.g.cs index 864b1b18..2e63ef7c 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.BulkDeleteSavedQueries.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.BulkDeleteSavedQueries.g.cs @@ -21,6 +21,19 @@ public partial interface IHeliconeSqlClient /// Bulk delete saved queries
/// Delete multiple saved queries at once /// + /// + /// 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> BulkDeleteSavedQueriesAsResponseAsync( + + global::Helicone.BulkDeleteSavedQueriesRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Bulk delete saved queries
+ /// Delete multiple saved queries at once + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.CreateSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.CreateSavedQuery.g.cs index 0fa20c6c..20279d9b 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.CreateSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.CreateSavedQuery.g.cs @@ -21,6 +21,19 @@ public partial interface IHeliconeSqlClient /// Create saved query
/// Create a new saved query /// + /// + /// 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> CreateSavedQueryAsResponseAsync( + + global::Helicone.CreateSavedQueryRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create saved query
+ /// Create a new saved query + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DeleteSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DeleteSavedQuery.g.cs index a15a1d3b..0969957b 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DeleteSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DeleteSavedQuery.g.cs @@ -16,5 +16,17 @@ public partial interface IHeliconeSqlClient string queryId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete saved query
+ /// Delete a saved query by ID + ///
+ /// + /// 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> DeleteSavedQueryAsResponseAsync( + string queryId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DownloadCsv.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DownloadCsv.g.cs index 7aa19d02..91b7e7e7 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DownloadCsv.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.DownloadCsv.g.cs @@ -21,6 +21,19 @@ public partial interface IHeliconeSqlClient /// Download query results as CSV
/// Execute a SQL query and download results as CSV /// + /// + /// 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> DownloadCsvAsResponseAsync( + + global::Helicone.ExecuteSqlRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Download query results as CSV
+ /// Execute a SQL query and download results as CSV + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.ExecuteSql.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.ExecuteSql.g.cs index c31074b3..0c81ebf7 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.ExecuteSql.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.ExecuteSql.g.cs @@ -21,6 +21,19 @@ public partial interface IHeliconeSqlClient /// Execute SQL query
/// Execute a SQL query against ClickHouse /// + /// + /// 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> ExecuteSqlAsResponseAsync( + + global::Helicone.ExecuteSqlRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Execute SQL query
+ /// Execute a SQL query against ClickHouse + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetClickHouseSchema.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetClickHouseSchema.g.cs index 9a6f5d99..2fdfe27f 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetClickHouseSchema.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetClickHouseSchema.g.cs @@ -14,5 +14,15 @@ public partial interface IHeliconeSqlClient global::System.Threading.Tasks.Task GetClickHouseSchemaAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get database schema
+ /// Get ClickHouse schema (tables and columns) + ///
+ /// 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> GetClickHouseSchemaAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQueries.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQueries.g.cs index 4fa04609..1e44559d 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQueries.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQueries.g.cs @@ -14,5 +14,15 @@ public partial interface IHeliconeSqlClient global::System.Threading.Tasks.Task GetSavedQueriesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List saved queries
+ /// Get all saved queries for the organization + ///
+ /// 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> GetSavedQueriesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQuery.g.cs index 5dc2d58c..9bdfd998 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.GetSavedQuery.g.cs @@ -16,5 +16,17 @@ public partial interface IHeliconeSqlClient string queryId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get saved query
+ /// Get a specific saved query by ID + ///
+ /// + /// 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> GetSavedQueryAsResponseAsync( + string queryId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.UpdateSavedQuery.g.cs b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.UpdateSavedQuery.g.cs index 54ef7930..83362841 100644 --- a/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.UpdateSavedQuery.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IHeliconeSqlClient.UpdateSavedQuery.g.cs @@ -24,6 +24,21 @@ public partial interface IHeliconeSqlClient /// Update an existing saved query /// /// + /// + /// 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> UpdateSavedQueryAsResponseAsync( + string queryId, + + global::Helicone.CreateSavedQueryRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update saved query
+ /// Update an existing saved query + ///
+ /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.CreateIntegration.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.CreateIntegration.g.cs index 4abcf9f1..eaa3bfb0 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.CreateIntegration.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.CreateIntegration.g.cs @@ -19,6 +19,18 @@ public partial interface IIntegrationClient /// /// /// + /// + /// 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> CreateIntegrationAsResponseAsync( + + global::Helicone.IntegrationCreateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegration.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegration.g.cs index 73fd210e..379c54eb 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegration.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegration.g.cs @@ -15,5 +15,16 @@ public partial interface IIntegrationClient string integrationId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetIntegrationAsResponseAsync( + string integrationId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrationByType.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrationByType.g.cs index f31b589d..fdb2722a 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrationByType.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrationByType.g.cs @@ -15,5 +15,16 @@ public partial interface IIntegrationClient string type, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetIntegrationByTypeAsResponseAsync( + string type, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrations.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrations.g.cs index 5c6014dc..6c26a33b 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrations.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetIntegrations.g.cs @@ -13,5 +13,14 @@ public partial interface IIntegrationClient global::System.Threading.Tasks.Task GetIntegrationsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetIntegrationsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackChannels.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackChannels.g.cs index 28fa11a5..bab399fc 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackChannels.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackChannels.g.cs @@ -13,5 +13,14 @@ public partial interface IIntegrationClient global::System.Threading.Tasks.Task GetSlackChannelsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetSlackChannelsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackSettings.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackSettings.g.cs index 402b9550..ae98b6a5 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackSettings.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.GetSlackSettings.g.cs @@ -13,5 +13,14 @@ public partial interface IIntegrationClient global::System.Threading.Tasks.Task GetSlackSettingsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetSlackSettingsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.TestStripeMeterEvent.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.TestStripeMeterEvent.g.cs index 957e8fbc..6e7df6f5 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.TestStripeMeterEvent.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.TestStripeMeterEvent.g.cs @@ -22,6 +22,20 @@ public partial interface IIntegrationClient /// /// /// + /// + /// 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> TestStripeMeterEventAsResponseAsync( + string integrationId, + + global::Helicone.TestStripeMeterEventRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.UpdateIntegration.g.cs b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.UpdateIntegration.g.cs index 66cac5a9..ceb2eaca 100644 --- a/src/libs/Helicone/Generated/Helicone.IIntegrationClient.UpdateIntegration.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IIntegrationClient.UpdateIntegration.g.cs @@ -22,6 +22,20 @@ public partial interface IIntegrationClient /// /// /// + /// + /// 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> UpdateIntegrationAsResponseAsync( + string integrationId, + + global::Helicone.IntegrationUpdateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetActiveUsers.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetActiveUsers.g.cs index 56d6268e..abc4d13b 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetActiveUsers.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetActiveUsers.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetActiveUsersAsResponseAsync( + + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageLatency.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageLatency.g.cs index b178c6f5..4e7c22b8 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageLatency.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageLatency.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetAverageLatencyAsResponseAsync( + + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTimeToFirstToken.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTimeToFirstToken.g.cs index c74e258c..0dd50360 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTimeToFirstToken.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTimeToFirstToken.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetAverageTimeToFirstTokenAsResponseAsync( + + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTokensPerRequest.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTokensPerRequest.g.cs index 003a913f..dcb1fc5b 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTokensPerRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetAverageTokensPerRequest.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetAverageTokensPerRequestAsResponseAsync( + + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCostOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCostOverTime.g.cs index ec2158d7..11d2c17f 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCostOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCostOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetCostOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCountryMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCountryMetrics.g.cs index a5d41e46..8601d09f 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCountryMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetCountryMetrics.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetCountryMetricsAsResponseAsync( + + global::Helicone.CountryMetricsBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetErrorsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetErrorsOverTime.g.cs index 85f5dc12..33c3ead6 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetErrorsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetErrorsOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetErrorsOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetLatencyOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetLatencyOverTime.g.cs index eb3dd5da..69b616a9 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetLatencyOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetLatencyOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetLatencyOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetModelMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetModelMetrics.g.cs index 69de2484..71dc9fb3 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetModelMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetModelMetrics.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetModelMetricsAsResponseAsync( + + global::Helicone.ModelMetricsBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetQuantiles.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetQuantiles.g.cs index f235d34a..2bf7601b 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetQuantiles.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetQuantiles.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetQuantilesAsResponseAsync( + + global::Helicone.QuantilesBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestCount.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestCount.g.cs index 0900cc3f..8832c437 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestCount.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestCount.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetRequestCountAsResponseAsync( + + global::Helicone.RequestCountBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestStatusOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestStatusOverTime.g.cs index 6e190a3c..880bb57d 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestStatusOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestStatusOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetRequestStatusOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestsOverTime.g.cs index 34ac4962..22eba3df 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetRequestsOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetRequestsOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetThreatsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetThreatsOverTime.g.cs index 10957730..284af402 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetThreatsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetThreatsOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetThreatsOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTimeToFirstTokenOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTimeToFirstTokenOverTime.g.cs index 24c3d19b..5a7fb918 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTimeToFirstTokenOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTimeToFirstTokenOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetTimeToFirstTokenOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTokensOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTokensOverTime.g.cs index 64482a08..868b0209 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTokensOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTokensOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetTokensOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalCost.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalCost.g.cs index f3146f2c..53f8a562 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalCost.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalCost.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetTotalCostAsResponseAsync( + + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalRequests.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalRequests.g.cs index 4d4c6884..cb98a3d4 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalRequests.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetTotalRequestsAsResponseAsync( + + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalThreats.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalThreats.g.cs index 74f8d064..faaf0343 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalThreats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetTotalThreats.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetTotalThreatsAsResponseAsync( + + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetUsersOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetUsersOverTime.g.cs index 245cd237..27bc2b63 100644 --- a/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetUsersOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IMetricsClient.GetUsersOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IMetricsClient /// /// /// + /// + /// 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> GetUsersOverTimeAsResponseAsync( + + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IModelRegistryClient.GetModelRegistry.g.cs b/src/libs/Helicone/Generated/Helicone.IModelRegistryClient.GetModelRegistry.g.cs index e1d5b82d..41af1d58 100644 --- a/src/libs/Helicone/Generated/Helicone.IModelRegistryClient.GetModelRegistry.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IModelRegistryClient.GetModelRegistry.g.cs @@ -14,5 +14,15 @@ public partial interface IModelRegistryClient global::System.Threading.Tasks.Task GetModelRegistryAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities
+ /// Get all available models from the registry + ///
+ /// 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> GetModelRegistryAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IModelsClient.GetModels.g.cs b/src/libs/Helicone/Generated/Helicone.IModelsClient.GetModels.g.cs index 86cec3dc..21902430 100644 --- a/src/libs/Helicone/Generated/Helicone.IModelsClient.GetModels.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IModelsClient.GetModels.g.cs @@ -13,5 +13,14 @@ public partial interface IModelsClient global::System.Threading.Tasks.Task GetModelsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetModelsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IModelsClient.GetMultimodalModels.g.cs b/src/libs/Helicone/Generated/Helicone.IModelsClient.GetMultimodalModels.g.cs index aa995c8a..8226fb8e 100644 --- a/src/libs/Helicone/Generated/Helicone.IModelsClient.GetMultimodalModels.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IModelsClient.GetMultimodalModels.g.cs @@ -13,5 +13,14 @@ public partial interface IModelsClient global::System.Threading.Tasks.Task GetMultimodalModelsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetMultimodalModelsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPiClient.AddSession.g.cs b/src/libs/Helicone/Generated/Helicone.IPiClient.AddSession.g.cs index a8979031..f86baf50 100644 --- a/src/libs/Helicone/Generated/Helicone.IPiClient.AddSession.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPiClient.AddSession.g.cs @@ -19,6 +19,18 @@ public partial interface IPiClient /// /// /// + /// + /// 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> AddSessionAsResponseAsync( + + global::Helicone.AddSessionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPiClient.GetApiKey.g.cs b/src/libs/Helicone/Generated/Helicone.IPiClient.GetApiKey.g.cs index 2fc86819..10a1ab84 100644 --- a/src/libs/Helicone/Generated/Helicone.IPiClient.GetApiKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPiClient.GetApiKey.g.cs @@ -19,6 +19,18 @@ public partial interface IPiClient /// /// /// + /// + /// 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> GetApiKeyAsResponseAsync( + + global::Helicone.GetApiKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPiClient.GetCostsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IPiClient.GetCostsOverTime.g.cs index 7405c725..20d73e1e 100644 --- a/src/libs/Helicone/Generated/Helicone.IPiClient.GetCostsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPiClient.GetCostsOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IPiClient /// /// /// + /// + /// 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> GetCostsOverTimeAsResponseAsync( + + global::Helicone.DataOverTimeRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPiClient.GetOrgName.g.cs b/src/libs/Helicone/Generated/Helicone.IPiClient.GetOrgName.g.cs index b85b983c..6c5e1ab3 100644 --- a/src/libs/Helicone/Generated/Helicone.IPiClient.GetOrgName.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPiClient.GetOrgName.g.cs @@ -13,5 +13,14 @@ public partial interface IPiClient global::System.Threading.Tasks.Task GetOrgNameAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetOrgNameAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPiClient.GetTotalCosts.g.cs b/src/libs/Helicone/Generated/Helicone.IPiClient.GetTotalCosts.g.cs index 1f07094f..8c0e957e 100644 --- a/src/libs/Helicone/Generated/Helicone.IPiClient.GetTotalCosts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPiClient.GetTotalCosts.g.cs @@ -13,5 +13,14 @@ public partial interface IPiClient global::System.Threading.Tasks.Task GetTotalCostsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetTotalCostsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPiClient.PiGetTotalRequests.g.cs b/src/libs/Helicone/Generated/Helicone.IPiClient.PiGetTotalRequests.g.cs index d6bcb875..cfa75e4f 100644 --- a/src/libs/Helicone/Generated/Helicone.IPiClient.PiGetTotalRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPiClient.PiGetTotalRequests.g.cs @@ -13,5 +13,14 @@ public partial interface IPiClient global::System.Threading.Tasks.Task PiGetTotalRequestsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> PiGetTotalRequestsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.Generate.g.cs b/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.Generate.g.cs index 62077958..d1f4ba2b 100644 --- a/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.Generate.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.Generate.g.cs @@ -19,6 +19,18 @@ public partial interface IPlaygroundClient /// /// /// + /// + /// 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> GenerateAsResponseAsync( + + global::Helicone.AllOf request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.GetRequestsThroughHelicone.g.cs b/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.GetRequestsThroughHelicone.g.cs index 8d41043e..f6ce59ac 100644 --- a/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.GetRequestsThroughHelicone.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.GetRequestsThroughHelicone.g.cs @@ -13,5 +13,14 @@ public partial interface IPlaygroundClient global::System.Threading.Tasks.Task GetRequestsThroughHeliconeAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetRequestsThroughHeliconeAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.RequestsThroughHelicone.g.cs b/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.RequestsThroughHelicone.g.cs index 6f436131..cb56f497 100644 --- a/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.RequestsThroughHelicone.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPlaygroundClient.RequestsThroughHelicone.g.cs @@ -19,6 +19,18 @@ public partial interface IPlaygroundClient /// /// /// + /// + /// 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> RequestsThroughHeliconeAsResponseAsync( + + global::Helicone.RequestsThroughHeliconeRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.CreatePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.CreatePrompt2025.g.cs index 2ab15004..b2ba207d 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.CreatePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.CreatePrompt2025.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> CreatePrompt2025AsResponseAsync( + + global::Helicone.CreatePrompt2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Simplified interface for the OpenAI Chat request format /// diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025.g.cs index 485dadfc..4d2d2a6f 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025.g.cs @@ -15,5 +15,16 @@ public partial interface IPrompt2025Client string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeletePrompt2025AsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025Version.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025Version.g.cs index 11a9a00e..c16135c8 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025Version.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.DeletePrompt2025Version.g.cs @@ -17,5 +17,18 @@ public partial interface IPrompt2025Client string versionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> DeletePrompt2025VersionAsResponseAsync( + string promptId, + string versionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025.g.cs index c067396e..68737e15 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025.g.cs @@ -15,5 +15,16 @@ public partial interface IPrompt2025Client string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetPrompt2025AsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Count.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Count.g.cs index 04dcfbff..c7093531 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Count.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Count.g.cs @@ -13,5 +13,14 @@ public partial interface IPrompt2025Client global::System.Threading.Tasks.Task GetPrompt2025CountAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetPrompt2025CountAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025EnvironmentVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025EnvironmentVersion.g.cs index 3848dca0..f1d254fd 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025EnvironmentVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025EnvironmentVersion.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> GetPrompt2025EnvironmentVersionAsResponseAsync( + + global::Helicone.GetPrompt2025EnvironmentVersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Environments.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Environments.g.cs index d7b52019..da363832 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Environments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Environments.g.cs @@ -13,5 +13,14 @@ public partial interface IPrompt2025Client global::System.Threading.Tasks.Task GetPrompt2025EnvironmentsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetPrompt2025EnvironmentsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Inputs.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Inputs.g.cs index ec9d4615..1d3b1a75 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Inputs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Inputs.g.cs @@ -19,5 +19,20 @@ public partial interface IPrompt2025Client string requestId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// + /// 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> GetPrompt2025InputsAsResponseAsync( + string promptId, + string versionId, + string requestId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025ProductionVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025ProductionVersion.g.cs index 0e2d6628..f849632a 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025ProductionVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025ProductionVersion.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> GetPrompt2025ProductionVersionAsResponseAsync( + + global::Helicone.GetPrompt2025ProductionVersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Tags.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Tags.g.cs index c8b61eb7..27ec4bde 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Tags.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Tags.g.cs @@ -13,5 +13,14 @@ public partial interface IPrompt2025Client global::System.Threading.Tasks.Task GetPrompt2025TagsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetPrompt2025TagsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025TotalVersions.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025TotalVersions.g.cs index 6c48e589..3ed3a69a 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025TotalVersions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025TotalVersions.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> GetPrompt2025TotalVersionsAsResponseAsync( + + global::Helicone.GetPrompt2025TotalVersionsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Version.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Version.g.cs index 81dafd25..9d527e2e 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Version.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Version.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> GetPrompt2025VersionAsResponseAsync( + + global::Helicone.GetPrompt2025VersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025VersionBody.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025VersionBody.g.cs index 4ffe072c..d52136d7 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025VersionBody.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025VersionBody.g.cs @@ -15,5 +15,16 @@ public partial interface IPrompt2025Client string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get the full prompt body (messages, tools, etc.) for a specific prompt version. + /// + /// + /// 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> GetPrompt2025VersionBodyAsResponseAsync( + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Versions.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Versions.g.cs index eaabb5ab..9a03fe70 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Versions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompt2025Versions.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> GetPrompt2025VersionsAsResponseAsync( + + global::Helicone.GetPrompt2025VersionsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompts2025.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompts2025.g.cs index dc47c173..104c2945 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompts2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.GetPrompts2025.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> GetPrompts2025AsResponseAsync( + + global::Helicone.GetPrompts2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RemoveEnvironmentFromVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RemoveEnvironmentFromVersion.g.cs index 92e861b1..20a10dec 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RemoveEnvironmentFromVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RemoveEnvironmentFromVersion.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> RemoveEnvironmentFromVersionAsResponseAsync( + + global::Helicone.RemoveEnvironmentFromVersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RenamePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RenamePrompt2025.g.cs index f99d4665..38aaef9d 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RenamePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.RenamePrompt2025.g.cs @@ -22,6 +22,20 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> RenamePrompt2025AsResponseAsync( + string promptId, + + global::Helicone.RenamePrompt2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.SetPromptVersionEnvironment.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.SetPromptVersionEnvironment.g.cs index 83784c71..515d5082 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.SetPromptVersionEnvironment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.SetPromptVersionEnvironment.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> SetPromptVersionEnvironmentAsResponseAsync( + + global::Helicone.SetPromptVersionEnvironmentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025.g.cs index e86ca329..041a00ad 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> UpdatePrompt2025AsResponseAsync( + + global::Helicone.UpdatePrompt2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Simplified interface for the OpenAI Chat request format /// diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025Tags.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025Tags.g.cs index 912b7d98..d2842962 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025Tags.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025Client.UpdatePrompt2025Tags.g.cs @@ -22,6 +22,20 @@ public partial interface IPrompt2025Client /// /// /// + /// + /// 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> UpdatePrompt2025TagsAsResponseAsync( + string promptId, + + global::Helicone.UpdatePrompt2025TagsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs index 38d02c88..7725b542 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025V2Client /// /// /// + /// + /// 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> GetPrompt2025EnvironmentVersionAsResponseAsync( + + global::Helicone.GetPrompt2025EnvironmentVersionRequest2 request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025ProductionVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025ProductionVersion.g.cs index 24e3aedf..9565840e 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025ProductionVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025ProductionVersion.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025V2Client /// /// /// + /// + /// 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> GetPrompt2025ProductionVersionAsResponseAsync( + + global::Helicone.GetPrompt2025ProductionVersionRequest2 request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025Version.g.cs b/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025Version.g.cs index 2fcc4bc6..32658852 100644 --- a/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025Version.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPrompt2025V2Client.GetPrompt2025Version.g.cs @@ -19,6 +19,18 @@ public partial interface IPrompt2025V2Client /// /// /// + /// + /// 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> GetPrompt2025VersionAsResponseAsync( + + global::Helicone.GetPrompt2025VersionRequest2 request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.CreatePrompt.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.CreatePrompt.g.cs index 60c0a6c1..eae01051 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.CreatePrompt.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.CreatePrompt.g.cs @@ -19,6 +19,18 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> CreatePromptAsResponseAsync( + + global::Helicone.CreatePromptRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversion.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversion.g.cs index 163a0274..205d6b50 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversion.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> CreateSubversionAsResponseAsync( + string promptVersionId, + + global::Helicone.PromptCreateSubversionParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversionFromUi.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversionFromUi.g.cs index b632d551..8f40d910 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversionFromUi.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.CreateSubversionFromUi.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> CreateSubversionFromUiAsResponseAsync( + string promptVersionId, + + global::Helicone.PromptCreateSubversionParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePrompt.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePrompt.g.cs index 47c90a2e..d9541879 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePrompt.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePrompt.g.cs @@ -15,5 +15,16 @@ public partial interface IPromptClient string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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 DeletePromptAsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePromptVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePromptVersion.g.cs index 91960792..e67ff919 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePromptVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.DeletePromptVersion.g.cs @@ -15,5 +15,16 @@ public partial interface IPromptClient string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeletePromptVersionAsResponseAsync( + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionLabel.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionLabel.g.cs index 303964a8..ea605dcd 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionLabel.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionLabel.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> EditPromptVersionLabelAsResponseAsync( + string promptVersionId, + + global::Helicone.PromptEditSubversionLabelParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionTemplate.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionTemplate.g.cs index edfd74f6..a8587944 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionTemplate.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.EditPromptVersionTemplate.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> EditPromptVersionTemplateAsResponseAsync( + string promptVersionId, + + global::Helicone.PromptEditSubversionTemplateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetInputs.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetInputs.g.cs index 1e16dc4c..b90be680 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetInputs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetInputs.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> GetInputsAsResponseAsync( + string promptVersionId, + + global::Helicone.GetInputsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompt.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompt.g.cs index d94c6fdf..6a1c398d 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompt.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompt.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> GetPromptAsResponseAsync( + string promptId, + + global::Helicone.PromptQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptExperiments.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptExperiments.g.cs index a5bf8d0f..34ebcad5 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptExperiments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptExperiments.g.cs @@ -15,5 +15,16 @@ public partial interface IPromptClient string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetPromptExperimentsAsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersion.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersion.g.cs index 2212148c..2e88ee1e 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersion.g.cs @@ -15,5 +15,16 @@ public partial interface IPromptClient string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetPromptVersionAsResponseAsync( + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionTemplates.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionTemplates.g.cs index 50812b2f..783effe9 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionTemplates.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionTemplates.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> GetPromptVersionTemplatesAsResponseAsync( + string userDefinedId, + + global::Helicone.PromptVersiosQueryParamsCompiled request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersions.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersions.g.cs index 759cc463..33545d61 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersions.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> GetPromptVersionsAsResponseAsync( + string promptId, + + global::Helicone.PromptVersionsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionsCompiled.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionsCompiled.g.cs index c23bd9fe..c7416fb4 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionsCompiled.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPromptVersionsCompiled.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> GetPromptVersionsCompiledAsResponseAsync( + string userDefinedId, + + global::Helicone.PromptVersiosQueryParamsCompiled request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompts.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompts.g.cs index cdb0ddc4..4e8b670b 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.GetPrompts.g.cs @@ -19,6 +19,18 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> GetPromptsAsResponseAsync( + + global::Helicone.PromptsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.HasPrompts.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.HasPrompts.g.cs index ecb2eba8..a6795d16 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.HasPrompts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.HasPrompts.g.cs @@ -13,5 +13,14 @@ public partial interface IPromptClient global::System.Threading.Tasks.Task HasPromptsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> HasPromptsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.PromotePromptVersionToProduction.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.PromotePromptVersionToProduction.g.cs index d6eb2436..5ebd152d 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.PromotePromptVersionToProduction.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.PromotePromptVersionToProduction.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> PromotePromptVersionToProductionAsResponseAsync( + string promptVersionId, + + global::Helicone.PromotePromptVersionToProductionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPromptClient.UpdatePromptUserDefinedId.g.cs b/src/libs/Helicone/Generated/Helicone.IPromptClient.UpdatePromptUserDefinedId.g.cs index 9937ef3a..970c81ae 100644 --- a/src/libs/Helicone/Generated/Helicone.IPromptClient.UpdatePromptUserDefinedId.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPromptClient.UpdatePromptUserDefinedId.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptClient /// /// /// + /// + /// 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> UpdatePromptUserDefinedIdAsResponseAsync( + string promptId, + + global::Helicone.UpdatePromptUserDefinedIdRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetHiddenProperties.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetHiddenProperties.g.cs index f21b17ee..7e29940f 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetHiddenProperties.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetHiddenProperties.g.cs @@ -13,5 +13,14 @@ public partial interface IPropertyClient global::System.Threading.Tasks.Task GetHiddenPropertiesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetHiddenPropertiesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetProperties.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetProperties.g.cs index 0ff6a385..1fc9da8d 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetProperties.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetProperties.g.cs @@ -19,6 +19,18 @@ public partial interface IPropertyClient /// /// /// + /// + /// 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> GetPropertiesAsResponseAsync( + + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetPropertiesOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetPropertiesOverTime.g.cs index 4cbd758a..e26edac1 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetPropertiesOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetPropertiesOverTime.g.cs @@ -19,6 +19,18 @@ public partial interface IPropertyClient /// /// /// + /// + /// 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> GetPropertiesOverTimeAsResponseAsync( + + global::Helicone.AllOf request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopCosts.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopCosts.g.cs index 12b1a2bc..638d04b7 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopCosts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopCosts.g.cs @@ -22,6 +22,20 @@ public partial interface IPropertyClient /// /// /// + /// + /// 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> GetTopCostsAsResponseAsync( + string propertyKey, + + global::Helicone.TimeFilterRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopRequests.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopRequests.g.cs index e379560c..21319816 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.GetTopRequests.g.cs @@ -22,6 +22,20 @@ public partial interface IPropertyClient /// /// /// + /// + /// 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> GetTopRequestsAsResponseAsync( + string propertyKey, + + global::Helicone.TimeFilterRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.HideProperty.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.HideProperty.g.cs index 80d65fe7..375609d9 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.HideProperty.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.HideProperty.g.cs @@ -19,6 +19,18 @@ public partial interface IPropertyClient /// /// /// + /// + /// 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>> HidePropertyAsResponseAsync( + + global::Helicone.HidePropertyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.RestoreProperty.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.RestoreProperty.g.cs index 8462cdaf..fb79d24a 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.RestoreProperty.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.RestoreProperty.g.cs @@ -19,6 +19,18 @@ public partial interface IPropertyClient /// /// /// + /// + /// 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>> RestorePropertyAsResponseAsync( + + global::Helicone.RestorePropertyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IPropertyClient.SearchProperties.g.cs b/src/libs/Helicone/Generated/Helicone.IPropertyClient.SearchProperties.g.cs index ef6f9a70..6f818596 100644 --- a/src/libs/Helicone/Generated/Helicone.IPropertyClient.SearchProperties.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IPropertyClient.SearchProperties.g.cs @@ -22,6 +22,20 @@ public partial interface IPropertyClient /// /// /// + /// + /// 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> SearchPropertiesAsResponseAsync( + string propertyKey, + + global::Helicone.SearchPropertiesRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IProvidersClient.GetProviders.g.cs b/src/libs/Helicone/Generated/Helicone.IProvidersClient.GetProviders.g.cs index 7ec74481..78abe6b4 100644 --- a/src/libs/Helicone/Generated/Helicone.IProvidersClient.GetProviders.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IProvidersClient.GetProviders.g.cs @@ -19,6 +19,18 @@ public partial interface IProvidersClient /// /// /// + /// + /// 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> GetProvidersAsResponseAsync( + + global::Helicone.ProviderQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.AddScores.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.AddScores.g.cs index 68d458b6..b7e381f1 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.AddScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.AddScores.g.cs @@ -22,6 +22,20 @@ public partial interface IRequestClient /// /// /// + /// + /// 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> AddScoresAsResponseAsync( + string requestId, + + global::Helicone.ScoreRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Construct a type with a set of properties K of type T /// diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.FeedbackRequest.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.FeedbackRequest.g.cs index ef104288..c0eba51a 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.FeedbackRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.FeedbackRequest.g.cs @@ -22,6 +22,20 @@ public partial interface IRequestClient /// /// /// + /// + /// 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> FeedbackRequestAsResponseAsync( + string requestId, + + global::Helicone.FeedbackRequestRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestAssetById.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestAssetById.g.cs index 7e0868c7..c2768afe 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestAssetById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestAssetById.g.cs @@ -17,5 +17,18 @@ public partial interface IRequestClient string assetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> GetRequestAssetByIdAsResponseAsync( + string requestId, + string assetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestById.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestById.g.cs index cb48cabb..d61f58b6 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestById.g.cs @@ -19,5 +19,20 @@ public partial interface IRequestClient bool? includeBody = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// Default Value: false + /// + /// 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> GetRequestByIdAsResponseAsync( + string requestId, + bool? includeBody = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestCount.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestCount.g.cs index 33fcece8..14d6ea52 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestCount.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestCount.g.cs @@ -19,6 +19,18 @@ public partial interface IRequestClient /// /// /// + /// + /// 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> GetRequestCountAsResponseAsync( + + global::Helicone.RequestQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestInputs.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestInputs.g.cs index 1caddd54..bc17a1d0 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestInputs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestInputs.g.cs @@ -15,5 +15,16 @@ public partial interface IRequestClient string requestId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetRequestInputsAsResponseAsync( + string requestId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequests.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequests.g.cs index bc4bbcdb..0b147972 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequests.g.cs @@ -19,6 +19,18 @@ public partial interface IRequestClient /// /// /// + /// + /// 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> GetRequestsAsResponseAsync( + + global::Helicone.RequestQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsByIds.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsByIds.g.cs index c8d3d8e9..fc04ce31 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsByIds.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsByIds.g.cs @@ -19,6 +19,18 @@ public partial interface IRequestClient /// /// /// + /// + /// 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> GetRequestsByIdsAsResponseAsync( + + global::Helicone.GetRequestsByIdsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsClickhouse.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsClickhouse.g.cs index 4a270438..e25a4379 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsClickhouse.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.GetRequestsClickhouse.g.cs @@ -19,6 +19,18 @@ public partial interface IRequestClient /// /// /// + /// + /// 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> GetRequestsClickhouseAsResponseAsync( + + global::Helicone.RequestQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IRequestClient.PutProperty.g.cs b/src/libs/Helicone/Generated/Helicone.IRequestClient.PutProperty.g.cs index cea4ff58..93b985f6 100644 --- a/src/libs/Helicone/Generated/Helicone.IRequestClient.PutProperty.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IRequestClient.PutProperty.g.cs @@ -22,6 +22,20 @@ public partial interface IRequestClient /// /// /// + /// + /// 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> PutPropertyAsResponseAsync( + string requestId, + + global::Helicone.PutPropertyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.ISecurityClient.GetSecurity.g.cs b/src/libs/Helicone/Generated/Helicone.ISecurityClient.GetSecurity.g.cs index d0885854..87e96133 100644 --- a/src/libs/Helicone/Generated/Helicone.ISecurityClient.GetSecurity.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISecurityClient.GetSecurity.g.cs @@ -19,6 +19,18 @@ public partial interface ISecurityClient /// /// /// + /// + /// 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> GetSecurityAsResponseAsync( + + global::Helicone.GetSecurityRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetMetrics.g.cs index b7c234b5..c4a2afe1 100644 --- a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetMetrics.g.cs @@ -19,6 +19,18 @@ public partial interface ISessionClient /// /// /// + /// + /// 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> GetMetricsAsResponseAsync( + + global::Helicone.SessionMetricsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetNames.g.cs b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetNames.g.cs index b115b053..7c7f67ce 100644 --- a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetNames.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetNames.g.cs @@ -19,6 +19,18 @@ public partial interface ISessionClient /// /// /// + /// + /// 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> GetNamesAsResponseAsync( + + global::Helicone.SessionNameQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionTag.g.cs b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionTag.g.cs index c255c1e8..745bf700 100644 --- a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionTag.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionTag.g.cs @@ -15,5 +15,16 @@ public partial interface ISessionClient string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetSessionTagAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessions.g.cs b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessions.g.cs index df9f0f0c..6365d93d 100644 --- a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessions.g.cs @@ -19,6 +19,18 @@ public partial interface ISessionClient /// /// /// + /// + /// 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> GetSessionsAsResponseAsync( + + global::Helicone.SessionQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionsCount.g.cs b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionsCount.g.cs index c941ff40..2981fef8 100644 --- a/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionsCount.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISessionClient.GetSessionsCount.g.cs @@ -19,6 +19,18 @@ public partial interface ISessionClient /// /// /// + /// + /// 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> GetSessionsCountAsResponseAsync( + + global::Helicone.SessionQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionFeedback.g.cs b/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionFeedback.g.cs index edc4053c..6af6dc61 100644 --- a/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionFeedback.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionFeedback.g.cs @@ -22,6 +22,20 @@ public partial interface ISessionClient /// /// /// + /// + /// 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> UpdateSessionFeedbackAsResponseAsync( + string sessionId, + + global::Helicone.UpdateSessionFeedbackRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionTag.g.cs b/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionTag.g.cs index 22f07827..e51c4838 100644 --- a/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionTag.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ISessionClient.UpdateSessionTag.g.cs @@ -22,6 +22,20 @@ public partial interface ISessionClient /// /// /// + /// + /// 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> UpdateSessionTagAsResponseAsync( + string sessionId, + + global::Helicone.UpdateSessionTagRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IStatusClient.GetAllProviderStatus.g.cs b/src/libs/Helicone/Generated/Helicone.IStatusClient.GetAllProviderStatus.g.cs index 3ecbcddc..f6cbd0c9 100644 --- a/src/libs/Helicone/Generated/Helicone.IStatusClient.GetAllProviderStatus.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStatusClient.GetAllProviderStatus.g.cs @@ -13,5 +13,14 @@ public partial interface IStatusClient global::System.Threading.Tasks.Task GetAllProviderStatusAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetAllProviderStatusAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStatusClient.GetProviderStatus.g.cs b/src/libs/Helicone/Generated/Helicone.IStatusClient.GetProviderStatus.g.cs index ebd3b83b..e1b5b3b9 100644 --- a/src/libs/Helicone/Generated/Helicone.IStatusClient.GetProviderStatus.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStatusClient.GetProviderStatus.g.cs @@ -17,5 +17,18 @@ public partial interface IStatusClient global::Helicone.TimeFrame timeFrame, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// 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> GetProviderStatusAsResponseAsync( + string provider, + global::Helicone.TimeFrame timeFrame, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.AddOns.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.AddOns.g.cs index 5f99d49b..fd839dd9 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.AddOns.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.AddOns.g.cs @@ -15,5 +15,16 @@ public partial interface IStripeClient global::Helicone.AddOnsProductType productType, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> AddOnsAsResponseAsync( + global::Helicone.AddOnsProductType productType, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.CancelSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.CancelSubscription.g.cs index 29aad707..8e2e2d3c 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.CancelSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.CancelSubscription.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task CancelSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> CancelSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateCloudGatewayCheckoutSession.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateCloudGatewayCheckoutSession.g.cs index ab4f1e14..65f30a49 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateCloudGatewayCheckoutSession.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateCloudGatewayCheckoutSession.g.cs @@ -19,6 +19,18 @@ public partial interface IStripeClient /// /// /// + /// + /// 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> CreateCloudGatewayCheckoutSessionAsResponseAsync( + + global::Helicone.CreateCloudGatewayCheckoutSessionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateSetupSession.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateSetupSession.g.cs index a48be995..d0babffe 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateSetupSession.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.CreateSetupSession.g.cs @@ -19,6 +19,18 @@ public partial interface IStripeClient /// /// /// + /// + /// 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> CreateSetupSessionAsResponseAsync( + + global::Helicone.CreateSetupSessionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.DeleteAddOns.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.DeleteAddOns.g.cs index 1be2290b..ce8bd6d6 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.DeleteAddOns.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.DeleteAddOns.g.cs @@ -15,5 +15,16 @@ public partial interface IStripeClient global::Helicone.DeleteAddOnsProductType productType, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeleteAddOnsAsResponseAsync( + global::Helicone.DeleteAddOnsProductType productType, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.DisableAutoTopoff.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.DisableAutoTopoff.g.cs index 98dd946e..84283a6c 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.DisableAutoTopoff.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.DisableAutoTopoff.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task DisableAutoTopoffAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> DisableAutoTopoffAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetAutoTopoffSettings.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetAutoTopoffSettings.g.cs index f37bd681..86aefe7c 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetAutoTopoffSettings.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetAutoTopoffSettings.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task GetAutoTopoffSettingsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetAutoTopoffSettingsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForEvals.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForEvals.g.cs index 76145299..c91a4ad5 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForEvals.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForEvals.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task GetCostForEvalsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetCostForEvalsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForExperiments.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForExperiments.g.cs index 7c135908..48ea7fe5 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForExperiments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForExperiments.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task GetCostForExperimentsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetCostForExperimentsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForPrompts.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForPrompts.g.cs index fa5c2def..5e06d821 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForPrompts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetCostForPrompts.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task GetCostForPromptsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetCostForPromptsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetFreeUsage.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetFreeUsage.g.cs index c08013cc..42503329 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetFreeUsage.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetFreeUsage.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task GetFreeUsageAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetFreeUsageAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetPaymentMethods.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetPaymentMethods.g.cs index e7fb235e..fe94de68 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetPaymentMethods.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetPaymentMethods.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task> GetPaymentMethodsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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>> GetPaymentMethodsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetSubscription.g.cs index 5417e524..ac80c85a 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetSubscription.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task GetSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetUsageStats.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetUsageStats.g.cs index 9cf49b3e..d3f5d8a6 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.GetUsageStats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.GetUsageStats.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task GetUsageStatsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetUsageStatsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.ManageSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.ManageSubscription.g.cs index 023683ce..69692aff 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.ManageSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.ManageSubscription.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task ManageSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> ManageSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.MigrateToPro.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.MigrateToPro.g.cs index aa9ec61a..7d2b52b7 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.MigrateToPro.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.MigrateToPro.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task MigrateToProAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> MigrateToProAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.PreviewInvoice.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.PreviewInvoice.g.cs index 398ed540..b9dda9d5 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.PreviewInvoice.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.PreviewInvoice.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task PreviewInvoiceAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> PreviewInvoiceAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.RemovePaymentMethod.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.RemovePaymentMethod.g.cs index 955ae7bf..c02032f6 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.RemovePaymentMethod.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.RemovePaymentMethod.g.cs @@ -15,5 +15,16 @@ public partial interface IStripeClient string paymentMethodId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> RemovePaymentMethodAsResponseAsync( + string paymentMethodId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.SearchPaymentIntents.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.SearchPaymentIntents.g.cs index 951dc7e3..dc397d6f 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.SearchPaymentIntents.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.SearchPaymentIntents.g.cs @@ -19,5 +19,20 @@ public partial interface IStripeClient string? page = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// + /// + /// 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> SearchPaymentIntentsAsResponseAsync( + string searchKind, + double? limit = default, + string? page = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.UndoCancelSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.UndoCancelSubscription.g.cs index ed98a639..58d2f801 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.UndoCancelSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.UndoCancelSubscription.g.cs @@ -13,5 +13,14 @@ public partial interface IStripeClient global::System.Threading.Tasks.Task UndoCancelSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> UndoCancelSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpdateAutoTopoffSettings.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpdateAutoTopoffSettings.g.cs index c3ea1704..95a2f7fd 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpdateAutoTopoffSettings.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpdateAutoTopoffSettings.g.cs @@ -19,6 +19,18 @@ public partial interface IStripeClient /// /// /// + /// + /// 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> UpdateAutoTopoffSettingsAsResponseAsync( + + global::Helicone.UpdateAutoTopoffSettingsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomer.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomer.g.cs index 80a00374..9a45ada1 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomer.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomer.g.cs @@ -19,6 +19,18 @@ public partial interface IStripeClient /// /// /// + /// + /// 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> UpgradeExistingCustomerAsResponseAsync( + + global::Helicone.UpgradeToProRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomerToTeamBundle.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomerToTeamBundle.g.cs index 280c63b2..32b5c1ba 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomerToTeamBundle.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeExistingCustomerToTeamBundle.g.cs @@ -19,6 +19,18 @@ public partial interface IStripeClient /// /// /// + /// + /// 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> UpgradeExistingCustomerToTeamBundleAsResponseAsync( + + global::Helicone.UpgradeToTeamBundleRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToPro.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToPro.g.cs index 60f88b60..ca224d9a 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToPro.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToPro.g.cs @@ -19,6 +19,18 @@ public partial interface IStripeClient /// /// /// + /// + /// 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> UpgradeToProAsResponseAsync( + + global::Helicone.UpgradeToProRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToTeamBundle.g.cs b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToTeamBundle.g.cs index f27e5623..9895ca3a 100644 --- a/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToTeamBundle.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IStripeClient.UpgradeToTeamBundle.g.cs @@ -19,6 +19,18 @@ public partial interface IStripeClient /// /// /// + /// + /// 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> UpgradeToTeamBundleAsResponseAsync( + + global::Helicone.UpgradeToTeamBundleRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.ITestClient.SendTestRequest.g.cs b/src/libs/Helicone/Generated/Helicone.ITestClient.SendTestRequest.g.cs index 6bb9e69f..5919c033 100644 --- a/src/libs/Helicone/Generated/Helicone.ITestClient.SendTestRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ITestClient.SendTestRequest.g.cs @@ -19,6 +19,18 @@ public partial interface ITestClient /// /// /// + /// + /// 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> SendTestRequestAsResponseAsync( + + global::Helicone.SendTestRequestRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTrace.g.cs b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTrace.g.cs index d0d79d15..193582e5 100644 --- a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTrace.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTrace.g.cs @@ -19,6 +19,18 @@ public partial interface ITraceClient /// /// /// + /// + /// 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 LogCustomTraceAsResponseAsync( + + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceLegacy.g.cs b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceLegacy.g.cs index c0910b13..4b8967f4 100644 --- a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceLegacy.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceLegacy.g.cs @@ -19,6 +19,18 @@ public partial interface ITraceClient /// /// /// + /// + /// 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 LogCustomTraceLegacyAsResponseAsync( + + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceTyped.g.cs b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceTyped.g.cs index f7ff69ab..fff64bfc 100644 --- a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceTyped.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogCustomTraceTyped.g.cs @@ -19,6 +19,18 @@ public partial interface ITraceClient /// /// /// + /// + /// 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>> LogCustomTraceTypedAsResponseAsync( + + global::Helicone.TypedAsyncLogModel request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogPythonTrace.g.cs b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogPythonTrace.g.cs index be156345..a5ac8f68 100644 --- a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogPythonTrace.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogPythonTrace.g.cs @@ -19,6 +19,18 @@ public partial interface ITraceClient /// /// /// + /// + /// 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 LogPythonTraceAsResponseAsync( + + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// diff --git a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogTrace.g.cs b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogTrace.g.cs index b2555d25..876fe3b9 100644 --- a/src/libs/Helicone/Generated/Helicone.ITraceClient.LogTrace.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ITraceClient.LogTrace.g.cs @@ -19,6 +19,18 @@ public partial interface ITraceClient /// /// /// + /// + /// 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 LogTraceAsResponseAsync( + + global::Helicone.OTELTrace request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetrics.g.cs index e79bcb70..037564cf 100644 --- a/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetrics.g.cs @@ -19,6 +19,18 @@ public partial interface IUserClient /// /// /// + /// + /// 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> GetUserMetricsAsResponseAsync( + + global::Helicone.UserMetricsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetricsOverview.g.cs b/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetricsOverview.g.cs index 054a04f8..74dc5ecb 100644 --- a/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetricsOverview.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IUserClient.GetUserMetricsOverview.g.cs @@ -19,6 +19,18 @@ public partial interface IUserClient /// /// /// + /// + /// 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> GetUserMetricsOverviewAsResponseAsync( + + global::Helicone.GetUserMetricsOverviewRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IUserClient.GetUsers.g.cs b/src/libs/Helicone/Generated/Helicone.IUserClient.GetUsers.g.cs index 92b10959..89fd065e 100644 --- a/src/libs/Helicone/Generated/Helicone.IUserClient.GetUsers.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IUserClient.GetUsers.g.cs @@ -19,6 +19,18 @@ public partial interface IUserClient /// /// /// + /// + /// 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> GetUsersAsResponseAsync( + + global::Helicone.UserQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Helicone/Generated/Helicone.IVaultClient.AddKey.g.cs b/src/libs/Helicone/Generated/Helicone.IVaultClient.AddKey.g.cs index d77a571b..69bab0c7 100644 --- a/src/libs/Helicone/Generated/Helicone.IVaultClient.AddKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IVaultClient.AddKey.g.cs @@ -19,6 +19,18 @@ public partial interface IVaultClient /// /// /// + /// + /// 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> AddKeyAsResponseAsync( + + global::Helicone.AddVaultKeyParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeyById.g.cs b/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeyById.g.cs index 2947323e..461e5470 100644 --- a/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeyById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeyById.g.cs @@ -15,5 +15,16 @@ public partial interface IVaultClient string providerKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> GetKeyByIdAsResponseAsync( + string providerKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeys.g.cs b/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeys.g.cs index 8f86de69..6e87b071 100644 --- a/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeys.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IVaultClient.GetKeys.g.cs @@ -13,5 +13,14 @@ public partial interface IVaultClient global::System.Threading.Tasks.Task GetKeysAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetKeysAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IVaultClient.UpdateKey.g.cs b/src/libs/Helicone/Generated/Helicone.IVaultClient.UpdateKey.g.cs index 3b6d2ae3..bd98527f 100644 --- a/src/libs/Helicone/Generated/Helicone.IVaultClient.UpdateKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IVaultClient.UpdateKey.g.cs @@ -22,6 +22,20 @@ public partial interface IVaultClient /// /// /// + /// + /// 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> UpdateKeyAsResponseAsync( + string id, + + global::Helicone.UpdateKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// /// /// /// diff --git a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.DeleteWebhook.g.cs b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.DeleteWebhook.g.cs index 347e6ca3..d018ac33 100644 --- a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.DeleteWebhook.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.DeleteWebhook.g.cs @@ -15,5 +15,16 @@ public partial interface IWebhooksClient string webhookId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> DeleteWebhookAsResponseAsync( + string webhookId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.GetWebhooks.g.cs b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.GetWebhooks.g.cs index 00247ad7..2d917f5c 100644 --- a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.GetWebhooks.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.GetWebhooks.g.cs @@ -13,5 +13,14 @@ public partial interface IWebhooksClient global::System.Threading.Tasks.Task GetWebhooksAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetWebhooksAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.NewWebhook.g.cs b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.NewWebhook.g.cs index 63a0db3e..49fd551a 100644 --- a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.NewWebhook.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.NewWebhook.g.cs @@ -19,6 +19,18 @@ public partial interface IWebhooksClient /// /// /// + /// + /// 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>> NewWebhookAsResponseAsync( + + global::Helicone.WebhookData request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// /// /// /// Construct a type with a set of properties K of type T diff --git a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.TestWebhook.g.cs b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.TestWebhook.g.cs index cf62e2c2..32e68398 100644 --- a/src/libs/Helicone/Generated/Helicone.IWebhooksClient.TestWebhook.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IWebhooksClient.TestWebhook.g.cs @@ -15,5 +15,16 @@ public partial interface IWebhooksClient string webhookId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// + /// 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> TestWebhookAsResponseAsync( + string webhookId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IWrappedClient.CheckHasWrapped2025Data.g.cs b/src/libs/Helicone/Generated/Helicone.IWrappedClient.CheckHasWrapped2025Data.g.cs index 9a6ce7ac..0a8dee92 100644 --- a/src/libs/Helicone/Generated/Helicone.IWrappedClient.CheckHasWrapped2025Data.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IWrappedClient.CheckHasWrapped2025Data.g.cs @@ -13,5 +13,14 @@ public partial interface IWrappedClient global::System.Threading.Tasks.Task CheckHasWrapped2025DataAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> CheckHasWrapped2025DataAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IWrappedClient.GetWrapped2025Stats.g.cs b/src/libs/Helicone/Generated/Helicone.IWrappedClient.GetWrapped2025Stats.g.cs index 5d344b82..1fd38fc1 100644 --- a/src/libs/Helicone/Generated/Helicone.IWrappedClient.GetWrapped2025Stats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IWrappedClient.GetWrapped2025Stats.g.cs @@ -13,5 +13,14 @@ public partial interface IWrappedClient global::System.Threading.Tasks.Task GetWrapped2025StatsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// + /// + /// 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> GetWrapped2025StatsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.CreateIntegration.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.CreateIntegration.g.cs index c5322627..2203b5fc 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.CreateIntegration.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.CreateIntegration.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateIntegrationResponseContent( /// public async global::System.Threading.Tasks.Task CreateIntegrationAsync( + global::Helicone.IntegrationCreateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateIntegrationAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateIntegrationAsResponseAsync( + global::Helicone.IntegrationCreateParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateIntegrationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/integration", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateIntegrationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateIntegrationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateIntegrationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateIntegrationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateIntegrationResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateIntegrationResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateIntegrationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateIntegrationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateIntegrationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateIntegrationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegration.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegration.g.cs index dc7060d8..ad2e0d9e 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegration.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegration.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetIntegrationResponseContent( string integrationId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetIntegrationAsResponseAsync( + integrationId: integrationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetIntegrationAsResponseAsync( + string integrationId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetIntegrationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/integration/{integrationId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetIntegrationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetIntegrationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetIntegrationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetIntegrationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetIntegrationResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetIntegrationResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetIntegrationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetIntegrationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetIntegrationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIntegrationString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIntegrationString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetIntegrationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrationByType.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrationByType.g.cs index be6711a4..a88c7c7c 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrationByType.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrationByType.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetIntegrationByTypeResponseContent( string type, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetIntegrationByTypeAsResponseAsync( + type: type, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetIntegrationByTypeAsResponseAsync( + string type, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetIntegrationByTypeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/integration/type/{type}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetIntegrationByTypeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetIntegrationByTypeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetIntegrationByTypeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetIntegrationByTypeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetIntegrationByTypeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetIntegrationByTypeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetIntegrationByTypeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetIntegrationByTypeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetIntegrationByTypeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIntegrationString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIntegrationString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetIntegrationByTypeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrations.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrations.g.cs index 60388044..32120925 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrations.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetIntegrations.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetIntegrationsResponseContent( public async global::System.Threading.Tasks.Task GetIntegrationsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetIntegrationsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetIntegrationsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetIntegrationsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/integration", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetIntegrationsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetIntegrationsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetIntegrationsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetIntegrationsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetIntegrationsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetIntegrationsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetIntegrationsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetIntegrationsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetIntegrationsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultArrayIntegrationString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultArrayIntegrationString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetIntegrationsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultArrayIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultArrayIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackChannels.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackChannels.g.cs index 1c0fa5d0..c8b2927f 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackChannels.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackChannels.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetSlackChannelsResponseContent( public async global::System.Threading.Tasks.Task GetSlackChannelsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSlackChannelsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetSlackChannelsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetSlackChannelsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/integration/slack/channels", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetSlackChannelsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetSlackChannelsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetSlackChannelsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetSlackChannelsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetSlackChannelsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetSlackChannelsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetSlackChannelsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetSlackChannelsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetSlackChannelsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultArrayIdStringNameStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultArrayIdStringNameStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetSlackChannelsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultArrayIdStringNameStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultArrayIdStringNameStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackSettings.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackSettings.g.cs index a75dd9be..e2c1f7ce 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackSettings.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.GetSlackSettings.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetSlackSettingsResponseContent( public async global::System.Threading.Tasks.Task GetSlackSettingsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSlackSettingsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetSlackSettingsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetSlackSettingsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/integration/slack/settings", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetSlackSettingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetSlackSettingsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetSlackSettingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetSlackSettingsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetSlackSettingsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetSlackSettingsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetSlackSettingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetSlackSettingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetSlackSettingsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIntegrationString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIntegrationString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetSlackSettingsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIntegrationString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.TestStripeMeterEvent.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.TestStripeMeterEvent.g.cs index c1f2d632..a1b66e90 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.TestStripeMeterEvent.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.TestStripeMeterEvent.g.cs @@ -67,6 +67,31 @@ partial void ProcessTestStripeMeterEventResponseContent( public async global::System.Threading.Tasks.Task TestStripeMeterEventAsync( string integrationId, + global::Helicone.TestStripeMeterEventRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TestStripeMeterEventAsResponseAsync( + integrationId: integrationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> TestStripeMeterEventAsResponseAsync( + string integrationId, + global::Helicone.TestStripeMeterEventRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessTestStripeMeterEventResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/integration/{integrationId}/stripe/test-meter-event", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessTestStripeMeterEventResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessTestStripeMeterEventResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessTestStripeMeterEventResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessTestStripeMeterEventResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessTestStripeMeterEventResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessTestStripeMeterEventResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessTestStripeMeterEventResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessTestStripeMeterEventResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessTestStripeMeterEventResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessTestStripeMeterEventResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.UpdateIntegration.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.UpdateIntegration.g.cs index b332a3f4..0a1f1b05 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.UpdateIntegration.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.UpdateIntegration.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateIntegrationResponseContent( public async global::System.Threading.Tasks.Task UpdateIntegrationAsync( string integrationId, + global::Helicone.IntegrationUpdateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateIntegrationAsResponseAsync( + integrationId: integrationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateIntegrationAsResponseAsync( + string integrationId, + global::Helicone.IntegrationUpdateParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateIntegrationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/integration/{integrationId}", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateIntegrationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateIntegrationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateIntegrationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateIntegrationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateIntegrationResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateIntegrationResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateIntegrationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateIntegrationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateIntegrationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateIntegrationResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.IntegrationClient.g.cs b/src/libs/Helicone/Generated/Helicone.IntegrationClient.g.cs index 7cdd9a2c..ba6df058 100644 --- a/src/libs/Helicone/Generated/Helicone.IntegrationClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.IntegrationClient.g.cs @@ -103,10 +103,10 @@ public IntegrationClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public IntegrationClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetActiveUsers.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetActiveUsers.g.cs index c48f717d..512c8ac8 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetActiveUsers.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetActiveUsers.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetActiveUsersResponseContent( /// public async global::System.Threading.Tasks.Task GetActiveUsersAsync( + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetActiveUsersAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetActiveUsersAsResponseAsync( + global::Helicone.MetricsFilterBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetActiveUsersResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/activeUsers", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetActiveUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetActiveUsersResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetActiveUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetActiveUsersResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetActiveUsersResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetActiveUsersResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetActiveUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetActiveUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetActiveUsersResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetActiveUsersResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageLatency.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageLatency.g.cs index 84478b76..d6ca283b 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageLatency.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageLatency.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetAverageLatencyResponseContent( /// public async global::System.Threading.Tasks.Task GetAverageLatencyAsync( + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAverageLatencyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetAverageLatencyAsResponseAsync( + global::Helicone.MetricsFilterBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetAverageLatencyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/averageLatency", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetAverageLatencyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetAverageLatencyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetAverageLatencyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetAverageLatencyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetAverageLatencyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetAverageLatencyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetAverageLatencyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetAverageLatencyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetAverageLatencyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetAverageLatencyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTimeToFirstToken.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTimeToFirstToken.g.cs index f0d8aac1..aba524ef 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTimeToFirstToken.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTimeToFirstToken.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( /// public async global::System.Threading.Tasks.Task GetAverageTimeToFirstTokenAsync( + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAverageTimeToFirstTokenAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetAverageTimeToFirstTokenAsResponseAsync( + global::Helicone.MetricsFilterBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/averageTimeToFirstToken", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetAverageTimeToFirstTokenResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTokensPerRequest.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTokensPerRequest.g.cs index 89423abe..d3b100c6 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTokensPerRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetAverageTokensPerRequest.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( /// public async global::System.Threading.Tasks.Task GetAverageTokensPerRequestAsync( + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAverageTokensPerRequestAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetAverageTokensPerRequestAsResponseAsync( + global::Helicone.MetricsFilterBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/averageTokensPerRequest", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultTokensPerRequestString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultTokensPerRequestString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetAverageTokensPerRequestResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultTokensPerRequestString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultTokensPerRequestString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCostOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCostOverTime.g.cs index 24253fbb..84fb1469 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCostOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCostOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetCostOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetCostOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCostOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetCostOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetCostOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/costOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetCostOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetCostOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetCostOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetCostOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetCostOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetCostOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetCostOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetCostOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetCostOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultCostOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultCostOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetCostOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultCostOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultCostOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCountryMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCountryMetrics.g.cs index a7549df2..de93f8bc 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCountryMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetCountryMetrics.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetCountryMetricsResponseContent( /// public async global::System.Threading.Tasks.Task GetCountryMetricsAsync( + global::Helicone.CountryMetricsBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCountryMetricsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetCountryMetricsAsResponseAsync( + global::Helicone.CountryMetricsBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetCountryMetricsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/country", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetCountryMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetCountryMetricsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetCountryMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetCountryMetricsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetCountryMetricsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetCountryMetricsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetCountryMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetCountryMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetCountryMetricsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultCountryDataArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultCountryDataArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetCountryMetricsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultCountryDataArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultCountryDataArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetErrorsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetErrorsOverTime.g.cs index 1cb81d86..c334b9b0 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetErrorsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetErrorsOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetErrorsOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetErrorsOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetErrorsOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetErrorsOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetErrorsOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/errorOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetErrorsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetErrorsOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetErrorsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetErrorsOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetErrorsOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetErrorsOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetErrorsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetErrorsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetErrorsOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultErrorOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultErrorOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetErrorsOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultErrorOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultErrorOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetLatencyOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetLatencyOverTime.g.cs index cc8f5651..bbb579f9 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetLatencyOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetLatencyOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetLatencyOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetLatencyOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetLatencyOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetLatencyOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetLatencyOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/latencyOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetLatencyOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetLatencyOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetLatencyOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetLatencyOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetLatencyOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetLatencyOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetLatencyOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetLatencyOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetLatencyOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultLatencyOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultLatencyOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetLatencyOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultLatencyOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultLatencyOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetModelMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetModelMetrics.g.cs index 96a18f6b..ea1ca2e5 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetModelMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetModelMetrics.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetModelMetricsResponseContent( /// public async global::System.Threading.Tasks.Task GetModelMetricsAsync( + global::Helicone.ModelMetricsBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetModelMetricsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetModelMetricsAsResponseAsync( + global::Helicone.ModelMetricsBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetModelMetricsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/models", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetModelMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetModelMetricsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetModelMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetModelMetricsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetModelMetricsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetModelMetricsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetModelMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetModelMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetModelMetricsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultModelMetricArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultModelMetricArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetModelMetricsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultModelMetricArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultModelMetricArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetQuantiles.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetQuantiles.g.cs index 07726dae..ff1ec363 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetQuantiles.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetQuantiles.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetQuantilesResponseContent( /// public async global::System.Threading.Tasks.Task GetQuantilesAsync( + global::Helicone.QuantilesBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetQuantilesAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetQuantilesAsResponseAsync( + global::Helicone.QuantilesBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetQuantilesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/quantiles", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetQuantilesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetQuantilesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetQuantilesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetQuantilesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetQuantilesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetQuantilesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetQuantilesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetQuantilesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetQuantilesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultQuantilesArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultQuantilesArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetQuantilesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultQuantilesArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultQuantilesArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestCount.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestCount.g.cs index ed0b3b9c..18cadc8f 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestCount.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestCount.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetRequestCountResponseContent( /// public async global::System.Threading.Tasks.Task GetRequestCountAsync( + global::Helicone.RequestCountBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestCountAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestCountAsResponseAsync( + global::Helicone.RequestCountBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetRequestCountResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/requestCount", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetRequestCountResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetRequestCountResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetRequestCountResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetRequestCountResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetRequestCountResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetRequestCountResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestStatusOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestStatusOverTime.g.cs index 2cfd232a..297f598f 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestStatusOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestStatusOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetRequestStatusOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestStatusOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestStatusOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/requestStatusOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultRequestsOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultRequestsOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetRequestStatusOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultRequestsOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultRequestsOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestsOverTime.g.cs index b4e538f4..fbe4377e 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetRequestsOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetRequestsOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetRequestsOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestsOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestsOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetRequestsOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/requestOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetRequestsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetRequestsOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetRequestsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetRequestsOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetRequestsOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetRequestsOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetRequestsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetRequestsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetRequestsOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultRequestsOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultRequestsOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetRequestsOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultRequestsOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultRequestsOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetThreatsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetThreatsOverTime.g.cs index f1b258f0..21e95711 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetThreatsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetThreatsOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetThreatsOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetThreatsOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetThreatsOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetThreatsOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetThreatsOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/threatsOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetThreatsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetThreatsOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetThreatsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetThreatsOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetThreatsOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetThreatsOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetThreatsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetThreatsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetThreatsOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultThreatsOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultThreatsOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetThreatsOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultThreatsOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultThreatsOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTimeToFirstTokenOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTimeToFirstTokenOverTime.g.cs index 598951f2..d4275af0 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTimeToFirstTokenOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTimeToFirstTokenOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetTimeToFirstTokenOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTimeToFirstTokenOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetTimeToFirstTokenOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/timeToFirstToken", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultTimeToFirstTokenOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultTimeToFirstTokenOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetTimeToFirstTokenOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultTimeToFirstTokenOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultTimeToFirstTokenOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTokensOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTokensOverTime.g.cs index 1d07ffd2..1a36ad4a 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTokensOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTokensOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetTokensOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetTokensOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTokensOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetTokensOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetTokensOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/tokensOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetTokensOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetTokensOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetTokensOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetTokensOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetTokensOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetTokensOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetTokensOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetTokensOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetTokensOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultTokensOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultTokensOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetTokensOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultTokensOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultTokensOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalCost.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalCost.g.cs index 4a9af228..b1aa3b4b 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalCost.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalCost.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetTotalCostResponseContent( /// public async global::System.Threading.Tasks.Task GetTotalCostAsync( + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTotalCostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetTotalCostAsResponseAsync( + global::Helicone.MetricsFilterBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetTotalCostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/totalCost", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetTotalCostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetTotalCostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetTotalCostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetTotalCostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetTotalCostResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetTotalCostResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetTotalCostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetTotalCostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetTotalCostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetTotalCostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalRequests.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalRequests.g.cs index fa1eaef1..a3dae1c9 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalRequests.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetTotalRequestsResponseContent( /// public async global::System.Threading.Tasks.Task GetTotalRequestsAsync( + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTotalRequestsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetTotalRequestsAsResponseAsync( + global::Helicone.MetricsFilterBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetTotalRequestsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/totalRequests", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetTotalRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetTotalRequestsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetTotalRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetTotalRequestsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetTotalRequestsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetTotalRequestsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetTotalRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetTotalRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetTotalRequestsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetTotalRequestsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalThreats.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalThreats.g.cs index 107a29f1..268442ee 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalThreats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetTotalThreats.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetTotalThreatsResponseContent( /// public async global::System.Threading.Tasks.Task GetTotalThreatsAsync( + global::Helicone.MetricsFilterBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTotalThreatsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetTotalThreatsAsResponseAsync( + global::Helicone.MetricsFilterBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetTotalThreatsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/totalThreats", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetTotalThreatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetTotalThreatsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetTotalThreatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetTotalThreatsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetTotalThreatsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetTotalThreatsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetTotalThreatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetTotalThreatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetTotalThreatsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetTotalThreatsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetUsersOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetUsersOverTime.g.cs index c9953e09..a38c0ea9 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.GetUsersOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.GetUsersOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetUsersOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetUsersOverTimeAsync( + global::Helicone.MetricsOverTimeBody request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUsersOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetUsersOverTimeAsResponseAsync( + global::Helicone.MetricsOverTimeBody request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetUsersOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/metrics/usersOverTime", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetUsersOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetUsersOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetUsersOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetUsersOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetUsersOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetUsersOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetUsersOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetUsersOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetUsersOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultUsersOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultUsersOverTimeArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetUsersOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultUsersOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultUsersOverTimeArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.MetricsClient.g.cs b/src/libs/Helicone/Generated/Helicone.MetricsClient.g.cs index 614cb0f6..2b5ff569 100644 --- a/src/libs/Helicone/Generated/Helicone.MetricsClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.MetricsClient.g.cs @@ -103,10 +103,10 @@ public MetricsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public MetricsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.GetModelRegistry.g.cs b/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.GetModelRegistry.g.cs index b290f7a8..2ec735a9 100644 --- a/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.GetModelRegistry.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.GetModelRegistry.g.cs @@ -62,6 +62,24 @@ partial void ProcessGetModelRegistryResponseContent( public async global::System.Threading.Tasks.Task GetModelRegistryAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetModelRegistryAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities
+ /// Get all available models from the registry + ///
+ /// 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> GetModelRegistryAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,6 +108,7 @@ partial void ProcessGetModelRegistryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/public/model-registry/models", baseUri: ResolveBaseUri( @@ -164,6 +183,8 @@ partial void ProcessGetModelRegistryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +195,11 @@ partial void ProcessGetModelRegistryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +217,8 @@ partial void ProcessGetModelRegistryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +228,7 @@ partial void ProcessGetModelRegistryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +237,11 @@ partial void ProcessGetModelRegistryResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +258,15 @@ partial void ProcessGetModelRegistryResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +306,8 @@ partial void ProcessGetModelRegistryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +328,8 @@ partial void ProcessGetModelRegistryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -317,9 +354,13 @@ partial void ProcessGetModelRegistryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultModelRegistryResponseString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultModelRegistryResponseString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +388,13 @@ partial void ProcessGetModelRegistryResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultModelRegistryResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultModelRegistryResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.g.cs b/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.g.cs index 681522a7..88580cad 100644 --- a/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ModelRegistryClient.g.cs @@ -103,10 +103,10 @@ public ModelRegistryClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ModelRegistryClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.ModelsClient.GetModels.g.cs b/src/libs/Helicone/Generated/Helicone.ModelsClient.GetModels.g.cs index 9566238d..1e1f881b 100644 --- a/src/libs/Helicone/Generated/Helicone.ModelsClient.GetModels.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ModelsClient.GetModels.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetModelsResponseContent( public async global::System.Threading.Tasks.Task GetModelsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetModelsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetModelsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetModelsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/models", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetModelsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetModelsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetModelsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetModelsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetModelsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetModelsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetModelsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetModelsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetModelsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.OAIModelsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.OAIModelsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetModelsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.OAIModelsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.OAIModelsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ModelsClient.GetMultimodalModels.g.cs b/src/libs/Helicone/Generated/Helicone.ModelsClient.GetMultimodalModels.g.cs index fd562c0a..260ee781 100644 --- a/src/libs/Helicone/Generated/Helicone.ModelsClient.GetMultimodalModels.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ModelsClient.GetMultimodalModels.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetMultimodalModelsResponseContent( public async global::System.Threading.Tasks.Task GetMultimodalModelsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetMultimodalModelsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetMultimodalModelsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetMultimodalModelsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/models/multimodal", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetMultimodalModelsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetMultimodalModelsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetMultimodalModelsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetMultimodalModelsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetMultimodalModelsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetMultimodalModelsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetMultimodalModelsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetMultimodalModelsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetMultimodalModelsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.OAIModelsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.OAIModelsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetMultimodalModelsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.OAIModelsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.OAIModelsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ModelsClient.g.cs b/src/libs/Helicone/Generated/Helicone.ModelsClient.g.cs index ef43eb12..3bcc07b4 100644 --- a/src/libs/Helicone/Generated/Helicone.ModelsClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ModelsClient.g.cs @@ -103,10 +103,10 @@ public ModelsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ModelsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.OptionsSupport.g.cs b/src/libs/Helicone/Generated/Helicone.OptionsSupport.g.cs index 333297fa..6db7190e 100644 --- a/src/libs/Helicone/Generated/Helicone.OptionsSupport.g.cs +++ b/src/libs/Helicone/Generated/Helicone.OptionsSupport.g.cs @@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions public int MaxAttempts { get; set; } = 1; /// - /// Optional fixed delay between retry attempts. + /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff. /// public global::System.TimeSpan? Delay { get; set; } + + /// + /// Initial exponential backoff delay used when is not set. + /// + public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1); + + /// + /// Maximum retry delay after applying retry headers, backoff, and jitter. + /// + public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30); + + /// + /// Multiplier applied to exponential backoff after each failed attempt. + /// Values below 1 are normalized to 1. + /// + public double BackoffMultiplier { get; set; } = 2D; + + /// + /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1. + /// + public double JitterRatio { get; set; } = 0.2D; + + /// + /// Whether Retry-After response headers should control retry delay when present. + /// + public bool UseRetryAfterHeader { get; set; } = true; + + /// + /// Whether a rate-limit reset response header should control retry delay when present. + /// + public bool UseRateLimitResetHeader { get; set; } + + /// + /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date. + /// + public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset"; } @@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext /// public bool WillRetry { get; set; } + /// + /// The computed retry delay when is true. + /// + public global::System.TimeSpan? RetryDelay { get; set; } + + /// + /// A short retry reason such as exception or status:429. + /// + public string RetryReason { get; set; } = string.Empty; + /// /// The effective cancellation token for the current request attempt. /// @@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport int attempt, int maxAttempts, bool willRetry, + global::System.TimeSpan? retryDelay, + string retryReason, global::System.Threading.CancellationToken cancellationToken) { return new global::Helicone.AutoSDKHookContext @@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport Attempt = attempt, MaxAttempts = maxAttempts, WillRetry = willRetry, + RetryDelay = retryDelay, + RetryReason = retryReason ?? string.Empty, CancellationToken = cancellationToken, }; } @@ -338,19 +388,188 @@ internal static int GetMaxAttempts( return maxAttempts < 1 ? 1 : maxAttempts; } - internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + internal static global::System.TimeSpan GetRetryDelay( global::Helicone.AutoSDKClientOptions clientOptions, global::Helicone.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Helicone.AutoSDKRetryOptions(); + + if (retryOptions.UseRetryAfterHeader && + TryGetRetryAfterDelay(response, out var retryAfterDelay)) + { + return ClampRetryDelay(retryAfterDelay, retryOptions); + } + + if (retryOptions.UseRateLimitResetHeader && + TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay)) + { + return ClampRetryDelay(rateLimitResetDelay, retryOptions); + } + + if (retryOptions.Delay.HasValue) + { + return ClampRetryDelay(retryOptions.Delay.Value, retryOptions); + } + + var initialDelay = retryOptions.InitialDelay; + if (initialDelay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier; + var exponent = attempt <= 1 ? 0 : attempt - 1; + var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent); + if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D) + { + delayMilliseconds = 0D; + } + + var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds); + delay = ApplyJitter(delay, retryOptions.JitterRatio); + return ClampRetryDelay(delay, retryOptions); + } + + internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + global::System.TimeSpan retryDelay, global::System.Threading.CancellationToken cancellationToken) { - var delay = requestOptions?.Retry?.Delay ?? - clientOptions.Retry?.Delay; - if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero) + if (retryDelay <= global::System.TimeSpan.Zero) { return; } - await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false); + await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false); + } + + private static bool TryGetRetryAfterDelay( + global::System.Net.Http.HttpResponseMessage? response, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + var retryAfter = response?.Headers.RetryAfter; + if (retryAfter == null) + { + return false; + } + + if (retryAfter.Delta.HasValue) + { + delay = retryAfter.Delta.Value; + return delay > global::System.TimeSpan.Zero; + } + + if (retryAfter.Date.HasValue) + { + delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static bool TryGetRateLimitResetDelay( + global::System.Net.Http.HttpResponseMessage? response, + string? headerName, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + if (response == null || string.IsNullOrWhiteSpace(headerName)) + { + return false; + } + + if (!response.Headers.TryGetValues(headerName, out var values) && + (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values))) + { + return false; + } + + var value = global::System.Linq.Enumerable.FirstOrDefault(values); + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + value = value.Trim(); + if (long.TryParse( + value, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var unixSeconds)) + { + delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + if (global::System.DateTimeOffset.TryParse( + value, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var resetAt)) + { + delay = resetAt - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static global::System.TimeSpan ApplyJitter( + global::System.TimeSpan delay, + double jitterRatio) + { + if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D) + { + return delay; + } + + if (jitterRatio > 1D) + { + jitterRatio = 1D; + } + + var sample = NextJitterSample(); + var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D); + var milliseconds = delay.TotalMilliseconds * multiplier; + if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D) + { + milliseconds = 0D; + } + + return global::System.TimeSpan.FromMilliseconds(milliseconds); + } + + private static double NextJitterSample() + { + var bytes = new byte[8]; + using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create()) + { + randomNumberGenerator.GetBytes(bytes); + } + + var value = global::System.BitConverter.ToUInt64(bytes, 0); + return value / (double)ulong.MaxValue; + } + + private static global::System.TimeSpan ClampRetryDelay( + global::System.TimeSpan delay, + global::Helicone.AutoSDKRetryOptions retryOptions) + { + if (delay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var maxDelay = retryOptions.MaxDelay; + if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay) + { + return maxDelay; + } + + return delay; } internal static bool ShouldRetryStatusCode( diff --git a/src/libs/Helicone/Generated/Helicone.PiClient.AddSession.g.cs b/src/libs/Helicone/Generated/Helicone.PiClient.AddSession.g.cs index 4747327b..69967a6f 100644 --- a/src/libs/Helicone/Generated/Helicone.PiClient.AddSession.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PiClient.AddSession.g.cs @@ -63,6 +63,28 @@ partial void ProcessAddSessionResponseContent( /// public async global::System.Threading.Tasks.Task AddSessionAsync( + global::Helicone.AddSessionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddSessionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> AddSessionAsResponseAsync( + global::Helicone.AddSessionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessAddSessionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/pi/session", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessAddSessionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessAddSessionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessAddSessionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessAddSessionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessAddSessionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessAddSessionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessAddSessionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessAddSessionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessAddSessionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessAddSessionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PiClient.GetApiKey.g.cs b/src/libs/Helicone/Generated/Helicone.PiClient.GetApiKey.g.cs index f8cc255c..d4d56880 100644 --- a/src/libs/Helicone/Generated/Helicone.PiClient.GetApiKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PiClient.GetApiKey.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetApiKeyResponseContent( /// public async global::System.Threading.Tasks.Task GetApiKeyAsync( + global::Helicone.GetApiKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetApiKeyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetApiKeyAsResponseAsync( + global::Helicone.GetApiKeyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetApiKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/public/pi/get-api-key", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetApiKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetApiKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetApiKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetApiKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetApiKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetApiKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetApiKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetApiKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetApiKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultApiKeyStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultApiKeyStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetApiKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultApiKeyStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultApiKeyStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PiClient.GetCostsOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.PiClient.GetCostsOverTime.g.cs index 63ba005e..5c7fbdec 100644 --- a/src/libs/Helicone/Generated/Helicone.PiClient.GetCostsOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PiClient.GetCostsOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetCostsOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetCostsOverTimeAsync( + global::Helicone.DataOverTimeRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCostsOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetCostsOverTimeAsResponseAsync( + global::Helicone.DataOverTimeRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetCostsOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/pi/costs-over-time/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetCostsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetCostsOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetCostsOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetCostsOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetCostsOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetCostsOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetCostsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetCostsOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetCostsOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultCostNumberCreatedAtTruncStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultCostNumberCreatedAtTruncStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetCostsOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultCostNumberCreatedAtTruncStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultCostNumberCreatedAtTruncStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PiClient.GetOrgName.g.cs b/src/libs/Helicone/Generated/Helicone.PiClient.GetOrgName.g.cs index 2fac62d2..c5f1221d 100644 --- a/src/libs/Helicone/Generated/Helicone.PiClient.GetOrgName.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PiClient.GetOrgName.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetOrgNameResponseContent( public async global::System.Threading.Tasks.Task GetOrgNameAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetOrgNameAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetOrgNameAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetOrgNameResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/pi/org-name/query", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetOrgNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetOrgNameResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetOrgNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetOrgNameResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetOrgNameResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetOrgNameResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetOrgNameResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetOrgNameResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetOrgNameResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetOrgNameResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PiClient.GetTotalCosts.g.cs b/src/libs/Helicone/Generated/Helicone.PiClient.GetTotalCosts.g.cs index d6e34df2..9f2677b5 100644 --- a/src/libs/Helicone/Generated/Helicone.PiClient.GetTotalCosts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PiClient.GetTotalCosts.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetTotalCostsResponseContent( public async global::System.Threading.Tasks.Task GetTotalCostsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTotalCostsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetTotalCostsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetTotalCostsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/pi/total-costs", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetTotalCostsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetTotalCostsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetTotalCostsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetTotalCostsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetTotalCostsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetTotalCostsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetTotalCostsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetTotalCostsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetTotalCostsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetTotalCostsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PiClient.PiGetTotalRequests.g.cs b/src/libs/Helicone/Generated/Helicone.PiClient.PiGetTotalRequests.g.cs index e23045e9..1daf0d58 100644 --- a/src/libs/Helicone/Generated/Helicone.PiClient.PiGetTotalRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PiClient.PiGetTotalRequests.g.cs @@ -61,6 +61,23 @@ partial void ProcessPiGetTotalRequestsResponseContent( public async global::System.Threading.Tasks.Task PiGetTotalRequestsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PiGetTotalRequestsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> PiGetTotalRequestsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessPiGetTotalRequestsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/pi/total_requests", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessPiGetTotalRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessPiGetTotalRequestsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessPiGetTotalRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessPiGetTotalRequestsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessPiGetTotalRequestsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessPiGetTotalRequestsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessPiGetTotalRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessPiGetTotalRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessPiGetTotalRequestsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessPiGetTotalRequestsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PiClient.g.cs b/src/libs/Helicone/Generated/Helicone.PiClient.g.cs index 4f69735c..277d0508 100644 --- a/src/libs/Helicone/Generated/Helicone.PiClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PiClient.g.cs @@ -103,10 +103,10 @@ public PiClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PiClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.Generate.g.cs b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.Generate.g.cs index 06191204..02ea00be 100644 --- a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.Generate.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.Generate.g.cs @@ -63,6 +63,28 @@ partial void ProcessGenerateResponseContent( /// public async global::System.Threading.Tasks.Task GenerateAsync( + global::Helicone.AllOf request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GenerateAsResponseAsync( + global::Helicone.AllOf request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +117,7 @@ partial void ProcessGenerateResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/playground/generate", baseUri: ResolveBaseUri( @@ -176,6 +199,8 @@ partial void ProcessGenerateResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +211,11 @@ partial void ProcessGenerateResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +233,8 @@ partial void ProcessGenerateResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +244,7 @@ partial void ProcessGenerateResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +253,11 @@ partial void ProcessGenerateResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +274,15 @@ partial void ProcessGenerateResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +322,8 @@ partial void ProcessGenerateResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +344,8 @@ partial void ProcessGenerateResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -329,9 +370,13 @@ partial void ProcessGenerateResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -359,9 +404,13 @@ partial void ProcessGenerateResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.GetRequestsThroughHelicone.g.cs b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.GetRequestsThroughHelicone.g.cs index 862924df..dc133d6a 100644 --- a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.GetRequestsThroughHelicone.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.GetRequestsThroughHelicone.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( public async global::System.Threading.Tasks.Task GetRequestsThroughHeliconeAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestsThroughHeliconeAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetRequestsThroughHeliconeAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/playground/requests-through-helicone", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultBooleanString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultBooleanString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetRequestsThroughHeliconeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.RequestsThroughHelicone.g.cs b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.RequestsThroughHelicone.g.cs index fadcaf12..f1b471c8 100644 --- a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.RequestsThroughHelicone.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.RequestsThroughHelicone.g.cs @@ -63,6 +63,28 @@ partial void ProcessRequestsThroughHeliconeResponseContent( /// public async global::System.Threading.Tasks.Task RequestsThroughHeliconeAsync( + global::Helicone.RequestsThroughHeliconeRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RequestsThroughHeliconeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> RequestsThroughHeliconeAsResponseAsync( + global::Helicone.RequestsThroughHeliconeRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessRequestsThroughHeliconeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/playground/requests-through-helicone", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessRequestsThroughHeliconeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessRequestsThroughHeliconeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessRequestsThroughHeliconeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessRequestsThroughHeliconeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessRequestsThroughHeliconeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessRequestsThroughHeliconeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessRequestsThroughHeliconeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessRequestsThroughHeliconeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessRequestsThroughHeliconeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessRequestsThroughHeliconeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.g.cs b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.g.cs index 82e32a2c..66960153 100644 --- a/src/libs/Helicone/Generated/Helicone.PlaygroundClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PlaygroundClient.g.cs @@ -103,10 +103,10 @@ public PlaygroundClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PlaygroundClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.CreatePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.CreatePrompt2025.g.cs index 8ba0458a..0c2f7d23 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.CreatePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.CreatePrompt2025.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreatePrompt2025ResponseContent( /// public async global::System.Threading.Tasks.Task CreatePrompt2025Async( + global::Helicone.CreatePrompt2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePrompt2025AsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreatePrompt2025AsResponseAsync( + global::Helicone.CreatePrompt2025Request request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreatePrompt2025ResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreatePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreatePrompt2025ResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreatePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreatePrompt2025ResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreatePrompt2025ResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreatePrompt2025ResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreatePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreatePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreatePrompt2025ResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptCreateResponseString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptCreateResponseString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreatePrompt2025ResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptCreateResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptCreateResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025.g.cs index 79b44854..864006c8 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeletePrompt2025ResponseContent( string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeletePrompt2025AsResponseAsync( + promptId: promptId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeletePrompt2025AsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeletePrompt2025ResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt-2025/{promptId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeletePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeletePrompt2025ResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeletePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeletePrompt2025ResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeletePrompt2025ResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeletePrompt2025ResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeletePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeletePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeletePrompt2025ResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeletePrompt2025ResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025Version.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025Version.g.cs index 39da4604..5c5db1d6 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025Version.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.DeletePrompt2025Version.g.cs @@ -69,6 +69,29 @@ partial void ProcessDeletePrompt2025VersionResponseContent( string versionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeletePrompt2025VersionAsResponseAsync( + promptId: promptId, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> DeletePrompt2025VersionAsResponseAsync( + string promptId, + string versionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessDeletePrompt2025VersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt-2025/{promptId}/{versionId}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessDeletePrompt2025VersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessDeletePrompt2025VersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessDeletePrompt2025VersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessDeletePrompt2025VersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessDeletePrompt2025VersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessDeletePrompt2025VersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessDeletePrompt2025VersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessDeletePrompt2025VersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessDeletePrompt2025VersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessDeletePrompt2025VersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025.g.cs index 94ef3d37..44d1dd20 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetPrompt2025ResponseContent( string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025AsResponseAsync( + promptId: promptId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025AsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetPrompt2025ResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt-2025/id/{promptId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetPrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetPrompt2025ResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetPrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetPrompt2025ResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetPrompt2025ResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetPrompt2025ResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetPrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetPrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetPrompt2025ResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025String.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025String.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetPrompt2025ResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025String.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025String.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Count.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Count.g.cs index 8ad5a7f3..114dfa5b 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Count.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Count.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetPrompt2025CountResponseContent( public async global::System.Threading.Tasks.Task GetPrompt2025CountAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025CountAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetPrompt2025CountAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetPrompt2025CountResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/count", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetPrompt2025CountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetPrompt2025CountResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetPrompt2025CountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetPrompt2025CountResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetPrompt2025CountResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetPrompt2025CountResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetPrompt2025CountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetPrompt2025CountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetPrompt2025CountResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetPrompt2025CountResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025EnvironmentVersion.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025EnvironmentVersion.g.cs index bc715cc6..08e3dc31 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025EnvironmentVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025EnvironmentVersion.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025EnvironmentVersionAsync( + global::Helicone.GetPrompt2025EnvironmentVersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025EnvironmentVersionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025EnvironmentVersionAsResponseAsync( + global::Helicone.GetPrompt2025EnvironmentVersionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/query/environment-version", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Environments.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Environments.g.cs index 284a62a4..4962989d 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Environments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Environments.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( public async global::System.Threading.Tasks.Task GetPrompt2025EnvironmentsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025EnvironmentsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetPrompt2025EnvironmentsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/environments", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetPrompt2025EnvironmentsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Inputs.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Inputs.g.cs index fa58206c..496e3ce1 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Inputs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Inputs.g.cs @@ -73,6 +73,32 @@ partial void ProcessGetPrompt2025InputsResponseContent( string requestId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025InputsAsResponseAsync( + promptId: promptId, + versionId: versionId, + requestId: requestId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// + /// 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> GetPrompt2025InputsAsResponseAsync( + string promptId, + string versionId, + string requestId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -104,13 +130,14 @@ partial void ProcessGetPrompt2025InputsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt-2025/id/{promptId}/{versionId}/inputs", baseUri: ResolveBaseUri( servers: s_GetPrompt2025InputsServers, - defaultBaseUrl: "https://api.helicone.ai/")); + defaultBaseUrl: "https://api.helicone.ai/")); __pathBuilder - .AddRequiredParameter("requestId", requestId) + .AddRequiredParameter("requestId", requestId) ; var __path = __pathBuilder.ToString(); __path = global::Helicone.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -184,6 +211,8 @@ partial void ProcessGetPrompt2025InputsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +223,11 @@ partial void ProcessGetPrompt2025InputsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +245,8 @@ partial void ProcessGetPrompt2025InputsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +256,7 @@ partial void ProcessGetPrompt2025InputsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +265,11 @@ partial void ProcessGetPrompt2025InputsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +286,15 @@ partial void ProcessGetPrompt2025InputsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +334,8 @@ partial void ProcessGetPrompt2025InputsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +356,8 @@ partial void ProcessGetPrompt2025InputsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +382,13 @@ partial void ProcessGetPrompt2025InputsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025InputString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025InputString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +416,13 @@ partial void ProcessGetPrompt2025InputsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025InputString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025InputString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025ProductionVersion.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025ProductionVersion.g.cs index f1b06e31..33968ab5 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025ProductionVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025ProductionVersion.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025ProductionVersionAsync( + global::Helicone.GetPrompt2025ProductionVersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025ProductionVersionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025ProductionVersionAsResponseAsync( + global::Helicone.GetPrompt2025ProductionVersionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/query/production-version", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Tags.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Tags.g.cs index 4e1a6fa2..b68edb40 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Tags.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Tags.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetPrompt2025TagsResponseContent( public async global::System.Threading.Tasks.Task GetPrompt2025TagsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025TagsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetPrompt2025TagsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetPrompt2025TagsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/tags", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetPrompt2025TagsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetPrompt2025TagsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetPrompt2025TagsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetPrompt2025TagsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetPrompt2025TagsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetPrompt2025TagsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetPrompt2025TagsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetPrompt2025TagsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetPrompt2025TagsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetPrompt2025TagsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025TotalVersions.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025TotalVersions.g.cs index 2c83c14f..5b796323 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025TotalVersions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025TotalVersions.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025TotalVersionsAsync( + global::Helicone.GetPrompt2025TotalVersionsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025TotalVersionsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025TotalVersionsAsResponseAsync( + global::Helicone.GetPrompt2025TotalVersionsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/query/total-versions", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionCountsString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionCountsString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025TotalVersionsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionCountsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionCountsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Version.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Version.g.cs index ff270bb4..075dfc43 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Version.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Version.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025VersionResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025VersionAsync( + global::Helicone.GetPrompt2025VersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025VersionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025VersionAsResponseAsync( + global::Helicone.GetPrompt2025VersionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025VersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/query/version", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025VersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025VersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025VersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025VersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025VersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025VersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025VersionBody.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025VersionBody.g.cs index c1b79260..b16952ff 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025VersionBody.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025VersionBody.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025VersionBodyAsResponseAsync( + promptVersionId: promptVersionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get the full prompt body (messages, tools, etc.) for a specific prompt version. + /// + /// + /// 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> GetPrompt2025VersionBodyAsResponseAsync( + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt-2025/{promptVersionId}/prompt-body", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025Version91PromptBody93String.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025Version91PromptBody93String.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetPrompt2025VersionBodyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025Version91PromptBody93String.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025Version91PromptBody93String.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Versions.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Versions.g.cs index cf51196a..22dac0d5 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Versions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompt2025Versions.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025VersionsResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025VersionsAsync( + global::Helicone.GetPrompt2025VersionsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025VersionsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025VersionsAsResponseAsync( + global::Helicone.GetPrompt2025VersionsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025VersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/query/versions", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025VersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025VersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025VersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025VersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025VersionsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025VersionsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025VersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025VersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025VersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025VersionArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025VersionArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025VersionsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025VersionArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025VersionArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompts2025.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompts2025.g.cs index 0e7bf8a2..151248e2 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompts2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.GetPrompts2025.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompts2025ResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompts2025Async( + global::Helicone.GetPrompts2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompts2025AsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompts2025AsResponseAsync( + global::Helicone.GetPrompts2025Request request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompts2025ResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompts2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompts2025ResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompts2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompts2025ResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompts2025ResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompts2025ResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompts2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompts2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompts2025ResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025ArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025ArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompts2025ResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025ArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025ArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RemoveEnvironmentFromVersion.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RemoveEnvironmentFromVersion.g.cs index 26df8c28..1f1ddbac 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RemoveEnvironmentFromVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RemoveEnvironmentFromVersion.g.cs @@ -63,6 +63,28 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( /// public async global::System.Threading.Tasks.Task RemoveEnvironmentFromVersionAsync( + global::Helicone.RemoveEnvironmentFromVersionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RemoveEnvironmentFromVersionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> RemoveEnvironmentFromVersionAsResponseAsync( + global::Helicone.RemoveEnvironmentFromVersionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/remove/environment", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessRemoveEnvironmentFromVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RenamePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RenamePrompt2025.g.cs index fe512e9c..bd22b984 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RenamePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.RenamePrompt2025.g.cs @@ -67,6 +67,31 @@ partial void ProcessRenamePrompt2025ResponseContent( public async global::System.Threading.Tasks.Task RenamePrompt2025Async( string promptId, + global::Helicone.RenamePrompt2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RenamePrompt2025AsResponseAsync( + promptId: promptId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> RenamePrompt2025AsResponseAsync( + string promptId, + global::Helicone.RenamePrompt2025Request request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessRenamePrompt2025ResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt-2025/id/{promptId}/rename", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessRenamePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessRenamePrompt2025ResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessRenamePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessRenamePrompt2025ResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessRenamePrompt2025ResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessRenamePrompt2025ResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessRenamePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessRenamePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessRenamePrompt2025ResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessRenamePrompt2025ResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.SetPromptVersionEnvironment.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.SetPromptVersionEnvironment.g.cs index 8a4ddb47..03fc3926 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.SetPromptVersionEnvironment.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.SetPromptVersionEnvironment.g.cs @@ -63,6 +63,28 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( /// public async global::System.Threading.Tasks.Task SetPromptVersionEnvironmentAsync( + global::Helicone.SetPromptVersionEnvironmentRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetPromptVersionEnvironmentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> SetPromptVersionEnvironmentAsResponseAsync( + global::Helicone.SetPromptVersionEnvironmentRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/update/environment", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessSetPromptVersionEnvironmentResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025.g.cs index 91fd3d12..dc8cc26a 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025.g.cs @@ -63,6 +63,28 @@ partial void ProcessUpdatePrompt2025ResponseContent( /// public async global::System.Threading.Tasks.Task UpdatePrompt2025Async( + global::Helicone.UpdatePrompt2025Request request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePrompt2025AsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> UpdatePrompt2025AsResponseAsync( + global::Helicone.UpdatePrompt2025Request request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessUpdatePrompt2025ResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt-2025/update", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessUpdatePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessUpdatePrompt2025ResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessUpdatePrompt2025ResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessUpdatePrompt2025ResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessUpdatePrompt2025ResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessUpdatePrompt2025ResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessUpdatePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessUpdatePrompt2025ResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessUpdatePrompt2025ResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessUpdatePrompt2025ResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025Tags.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025Tags.g.cs index 17adc22a..57c6f8cd 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025Tags.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.UpdatePrompt2025Tags.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( public async global::System.Threading.Tasks.Task UpdatePrompt2025TagsAsync( string promptId, + global::Helicone.UpdatePrompt2025TagsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePrompt2025TagsAsResponseAsync( + promptId: promptId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdatePrompt2025TagsAsResponseAsync( + string promptId, + global::Helicone.UpdatePrompt2025TagsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt-2025/id/{promptId}/tags", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdatePrompt2025TagsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.g.cs index f51332a7..0b8a19c9 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025Client.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025Client.g.cs @@ -103,10 +103,10 @@ public Prompt2025Client( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public Prompt2025Client( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs index a2a2db38..d210b387 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025EnvironmentVersion.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025EnvironmentVersionAsync( + global::Helicone.GetPrompt2025EnvironmentVersionRequest2 request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025EnvironmentVersionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025EnvironmentVersionAsResponseAsync( + global::Helicone.GetPrompt2025EnvironmentVersionRequest2 request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v2/prompt-2025/query/environment-version", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025EnvironmentVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025ProductionVersion.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025ProductionVersion.g.cs index b2b055e6..bd4bf73d 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025ProductionVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025ProductionVersion.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025ProductionVersionAsync( + global::Helicone.GetPrompt2025ProductionVersionRequest2 request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025ProductionVersionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025ProductionVersionAsResponseAsync( + global::Helicone.GetPrompt2025ProductionVersionRequest2 request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v2/prompt-2025/query/production-version", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025ProductionVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025Version.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025Version.g.cs index f5a0867b..6644c7f0 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025Version.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.GetPrompt2025Version.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPrompt2025VersionResponseContent( /// public async global::System.Threading.Tasks.Task GetPrompt2025VersionAsync( + global::Helicone.GetPrompt2025VersionRequest2 request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPrompt2025VersionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPrompt2025VersionAsResponseAsync( + global::Helicone.GetPrompt2025VersionRequest2 request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPrompt2025VersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v2/prompt-2025/query/version", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPrompt2025VersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPrompt2025VersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPrompt2025VersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPrompt2025VersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPrompt2025VersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPrompt2025VersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPrompt2025VersionString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPrompt2025VersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPrompt2025VersionString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.g.cs b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.g.cs index 41741fe7..d5d082d2 100644 --- a/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.g.cs +++ b/src/libs/Helicone/Generated/Helicone.Prompt2025V2Client.g.cs @@ -103,10 +103,10 @@ public Prompt2025V2Client( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public Prompt2025V2Client( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.CreatePrompt.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.CreatePrompt.g.cs index dd20f16e..1d796d1e 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.CreatePrompt.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.CreatePrompt.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreatePromptResponseContent( /// public async global::System.Threading.Tasks.Task CreatePromptAsync( + global::Helicone.CreatePromptRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePromptAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreatePromptAsResponseAsync( + global::Helicone.CreatePromptRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreatePromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt/create", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreatePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreatePromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreatePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreatePromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreatePromptResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreatePromptResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreatePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreatePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreatePromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultCreatePromptResponseString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultCreatePromptResponseString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreatePromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultCreatePromptResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultCreatePromptResponseString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversion.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversion.g.cs index a606d9fb..71ae5982 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversion.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateSubversionResponseContent( public async global::System.Threading.Tasks.Task CreateSubversionAsync( string promptVersionId, + global::Helicone.PromptCreateSubversionParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateSubversionAsResponseAsync( + promptVersionId: promptVersionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateSubversionAsResponseAsync( + string promptVersionId, + global::Helicone.PromptCreateSubversionParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateSubversionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}/subversion", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateSubversionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateSubversionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateSubversionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateSubversionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateSubversionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateSubversionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateSubversionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateSubversionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateSubversionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateSubversionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversionFromUi.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversionFromUi.g.cs index e6e5cb8e..297ae465 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversionFromUi.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.CreateSubversionFromUi.g.cs @@ -67,6 +67,31 @@ partial void ProcessCreateSubversionFromUiResponseContent( public async global::System.Threading.Tasks.Task CreateSubversionFromUiAsync( string promptVersionId, + global::Helicone.PromptCreateSubversionParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateSubversionFromUiAsResponseAsync( + promptVersionId: promptVersionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> CreateSubversionFromUiAsResponseAsync( + string promptVersionId, + global::Helicone.PromptCreateSubversionParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessCreateSubversionFromUiResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}/subversion-from-ui", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessCreateSubversionFromUiResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessCreateSubversionFromUiResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessCreateSubversionFromUiResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessCreateSubversionFromUiResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessCreateSubversionFromUiResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessCreateSubversionFromUiResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessCreateSubversionFromUiResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessCreateSubversionFromUiResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessCreateSubversionFromUiResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessCreateSubversionFromUiResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePrompt.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePrompt.g.cs index f2d37cc8..518a2b05 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePrompt.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePrompt.g.cs @@ -60,6 +60,24 @@ partial void ProcessDeletePromptResponse( string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeletePromptAsResponseAsync( + promptId: promptId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// + /// + /// + /// 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 DeletePromptAsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +107,7 @@ partial void ProcessDeletePromptResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/{promptId}", baseUri: ResolveBaseUri( @@ -164,6 +183,8 @@ partial void ProcessDeletePromptResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +195,11 @@ partial void ProcessDeletePromptResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +217,8 @@ partial void ProcessDeletePromptResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +228,7 @@ partial void ProcessDeletePromptResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +237,11 @@ partial void ProcessDeletePromptResponse( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +258,15 @@ partial void ProcessDeletePromptResponse( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +306,8 @@ partial void ProcessDeletePromptResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +328,8 @@ partial void ProcessDeletePromptResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -313,6 +350,10 @@ partial void ProcessDeletePromptResponse( { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -334,6 +375,10 @@ partial void ProcessDeletePromptResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePromptVersion.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePromptVersion.g.cs index b64d3453..071866d9 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePromptVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.DeletePromptVersion.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeletePromptVersionResponseContent( string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeletePromptVersionAsResponseAsync( + promptVersionId: promptVersionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeletePromptVersionAsResponseAsync( + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeletePromptVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeletePromptVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeletePromptVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeletePromptVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeletePromptVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeletePromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeletePromptVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeletePromptVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionLabel.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionLabel.g.cs index f5aab64a..ee778d41 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionLabel.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionLabel.g.cs @@ -67,6 +67,31 @@ partial void ProcessEditPromptVersionLabelResponseContent( public async global::System.Threading.Tasks.Task EditPromptVersionLabelAsync( string promptVersionId, + global::Helicone.PromptEditSubversionLabelParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditPromptVersionLabelAsResponseAsync( + promptVersionId: promptVersionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> EditPromptVersionLabelAsResponseAsync( + string promptVersionId, + global::Helicone.PromptEditSubversionLabelParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessEditPromptVersionLabelResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}/edit-label", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessEditPromptVersionLabelResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessEditPromptVersionLabelResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessEditPromptVersionLabelResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessEditPromptVersionLabelResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessEditPromptVersionLabelResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessEditPromptVersionLabelResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessEditPromptVersionLabelResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessEditPromptVersionLabelResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessEditPromptVersionLabelResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultMetadataRecordStringAnyString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultMetadataRecordStringAnyString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessEditPromptVersionLabelResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultMetadataRecordStringAnyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultMetadataRecordStringAnyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionTemplate.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionTemplate.g.cs index 10d827cd..0b6bcd64 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionTemplate.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.EditPromptVersionTemplate.g.cs @@ -67,6 +67,31 @@ partial void ProcessEditPromptVersionTemplateResponseContent( public async global::System.Threading.Tasks.Task EditPromptVersionTemplateAsync( string promptVersionId, + global::Helicone.PromptEditSubversionTemplateParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditPromptVersionTemplateAsResponseAsync( + promptVersionId: promptVersionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> EditPromptVersionTemplateAsResponseAsync( + string promptVersionId, + global::Helicone.PromptEditSubversionTemplateParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessEditPromptVersionTemplateResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}/edit-template", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessEditPromptVersionTemplateResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessEditPromptVersionTemplateResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessEditPromptVersionTemplateResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessEditPromptVersionTemplateResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessEditPromptVersionTemplateResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessEditPromptVersionTemplateResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessEditPromptVersionTemplateResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessEditPromptVersionTemplateResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessEditPromptVersionTemplateResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessEditPromptVersionTemplateResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetInputs.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetInputs.g.cs index 614fb5c3..88d592c7 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetInputs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetInputs.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetInputsResponseContent( public async global::System.Threading.Tasks.Task GetInputsAsync( string promptVersionId, + global::Helicone.GetInputsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetInputsAsResponseAsync( + promptVersionId: promptVersionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetInputsAsResponseAsync( + string promptVersionId, + global::Helicone.GetInputsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetInputsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}/inputs/query", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetInputsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetInputsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetInputsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetInputsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetInputsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetInputsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetInputsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetInputsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetInputsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptInputRecordArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptInputRecordArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetInputsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptInputRecordArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptInputRecordArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompt.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompt.g.cs index f2b45fa4..dee4a95c 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompt.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompt.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetPromptResponseContent( public async global::System.Threading.Tasks.Task GetPromptAsync( string promptId, + global::Helicone.PromptQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptAsResponseAsync( + promptId: promptId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetPromptAsResponseAsync( + string promptId, + global::Helicone.PromptQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetPromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/{promptId}/query", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetPromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetPromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetPromptResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetPromptResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetPromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetPromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptExperiments.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptExperiments.g.cs index 4eb9af65..b33e7323 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptExperiments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptExperiments.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetPromptExperimentsResponseContent( string promptId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptExperimentsAsResponseAsync( + promptId: promptId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPromptExperimentsAsResponseAsync( + string promptId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetPromptExperimentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/{promptId}/experiments", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetPromptExperimentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetPromptExperimentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetPromptExperimentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetPromptExperimentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetPromptExperimentsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetPromptExperimentsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetPromptExperimentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetPromptExperimentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetPromptExperimentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIdStringCreatedAtStringNumHypothesesNumberDatasetStringMetaRecordStringAnyArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIdStringCreatedAtStringNumHypothesesNumberDatasetStringMetaRecordStringAnyArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetPromptExperimentsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIdStringCreatedAtStringNumHypothesesNumberDatasetStringMetaRecordStringAnyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIdStringCreatedAtStringNumHypothesesNumberDatasetStringMetaRecordStringAnyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersion.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersion.g.cs index a4dd01a2..e36d9819 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersion.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersion.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetPromptVersionResponseContent( string promptVersionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptVersionAsResponseAsync( + promptVersionId: promptVersionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPromptVersionAsResponseAsync( + string promptVersionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetPromptVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetPromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetPromptVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetPromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetPromptVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetPromptVersionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetPromptVersionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetPromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetPromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetPromptVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetPromptVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionTemplates.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionTemplates.g.cs index 238a8d7a..2d57fc9b 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionTemplates.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionTemplates.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( public async global::System.Threading.Tasks.Task GetPromptVersionTemplatesAsync( string userDefinedId, + global::Helicone.PromptVersiosQueryParamsCompiled request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptVersionTemplatesAsResponseAsync( + userDefinedId: userDefinedId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetPromptVersionTemplatesAsResponseAsync( + string userDefinedId, + global::Helicone.PromptVersiosQueryParamsCompiled request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/{userDefinedId}/template", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultFilledString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultFilledString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetPromptVersionTemplatesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultFilledString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultFilledString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersions.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersions.g.cs index fe3c1dae..36004adc 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersions.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetPromptVersionsResponseContent( public async global::System.Threading.Tasks.Task GetPromptVersionsAsync( string promptId, + global::Helicone.PromptVersionsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptVersionsAsResponseAsync( + promptId: promptId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetPromptVersionsAsResponseAsync( + string promptId, + global::Helicone.PromptVersionsQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetPromptVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/{promptId}/versions/query", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetPromptVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetPromptVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetPromptVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetPromptVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetPromptVersionsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetPromptVersionsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetPromptVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetPromptVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetPromptVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetPromptVersionsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionsCompiled.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionsCompiled.g.cs index 551d3423..0b5c461c 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionsCompiled.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPromptVersionsCompiled.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( public async global::System.Threading.Tasks.Task GetPromptVersionsCompiledAsync( string userDefinedId, + global::Helicone.PromptVersiosQueryParamsCompiled request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptVersionsCompiledAsResponseAsync( + userDefinedId: userDefinedId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetPromptVersionsCompiledAsResponseAsync( + string userDefinedId, + global::Helicone.PromptVersiosQueryParamsCompiled request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/{userDefinedId}/compile", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultCompiledString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultCompiledString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetPromptVersionsCompiledResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultCompiledString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultCompiledString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompts.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompts.g.cs index c3a68272..f0733300 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.GetPrompts.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPromptsResponseContent( /// public async global::System.Threading.Tasks.Task GetPromptsAsync( + global::Helicone.PromptsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPromptsAsResponseAsync( + global::Helicone.PromptsQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPromptsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPromptsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPromptsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPromptsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPromptsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPromptsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptsResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptsResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPromptsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptsResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptsResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.HasPrompts.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.HasPrompts.g.cs index 94a24d85..a1921581 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.HasPrompts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.HasPrompts.g.cs @@ -61,6 +61,23 @@ partial void ProcessHasPromptsResponseContent( public async global::System.Threading.Tasks.Task HasPromptsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await HasPromptsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> HasPromptsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessHasPromptsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/prompt/has-prompts", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessHasPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessHasPromptsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessHasPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessHasPromptsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessHasPromptsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessHasPromptsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessHasPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessHasPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessHasPromptsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHasPromptsBooleanString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHasPromptsBooleanString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessHasPromptsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHasPromptsBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHasPromptsBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.PromotePromptVersionToProduction.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.PromotePromptVersionToProduction.g.cs index 170ab0bb..541a8d94 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.PromotePromptVersionToProduction.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.PromotePromptVersionToProduction.g.cs @@ -67,6 +67,31 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( public async global::System.Threading.Tasks.Task PromotePromptVersionToProductionAsync( string promptVersionId, + global::Helicone.PromotePromptVersionToProductionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PromotePromptVersionToProductionAsResponseAsync( + promptVersionId: promptVersionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> PromotePromptVersionToProductionAsResponseAsync( + string promptVersionId, + global::Helicone.PromotePromptVersionToProductionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/version/{promptVersionId}/promote", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPromptVersionResultString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessPromotePromptVersionToProductionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPromptVersionResultString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.UpdatePromptUserDefinedId.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.UpdatePromptUserDefinedId.g.cs index 7ca1397e..de03eff7 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.UpdatePromptUserDefinedId.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.UpdatePromptUserDefinedId.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( public async global::System.Threading.Tasks.Task UpdatePromptUserDefinedIdAsync( string promptId, + global::Helicone.UpdatePromptUserDefinedIdRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePromptUserDefinedIdAsResponseAsync( + promptId: promptId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdatePromptUserDefinedIdAsResponseAsync( + string promptId, + global::Helicone.UpdatePromptUserDefinedIdRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/prompt/{promptId}/user-defined-id", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdatePromptUserDefinedIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PromptClient.g.cs b/src/libs/Helicone/Generated/Helicone.PromptClient.g.cs index 568bc3c3..c9221c9c 100644 --- a/src/libs/Helicone/Generated/Helicone.PromptClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PromptClient.g.cs @@ -103,10 +103,10 @@ public PromptClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PromptClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetHiddenProperties.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetHiddenProperties.g.cs index b52e1eef..47818e55 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetHiddenProperties.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetHiddenProperties.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetHiddenPropertiesResponseContent( public async global::System.Threading.Tasks.Task GetHiddenPropertiesAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetHiddenPropertiesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetHiddenPropertiesAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetHiddenPropertiesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/property/hidden/query", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetHiddenPropertiesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetHiddenPropertiesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetHiddenPropertiesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetHiddenPropertiesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetHiddenPropertiesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetHiddenPropertiesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetHiddenPropertiesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetHiddenPropertiesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetHiddenPropertiesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPropertyArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPropertyArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetHiddenPropertiesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPropertyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPropertyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetProperties.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetProperties.g.cs index 4508660a..55bf7159 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetProperties.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetProperties.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPropertiesResponseContent( /// public async global::System.Threading.Tasks.Task GetPropertiesAsync( + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPropertiesAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPropertiesAsResponseAsync( + object request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetPropertiesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/property/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetPropertiesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetPropertiesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetPropertiesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetPropertiesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetPropertiesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetPropertiesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetPropertiesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetPropertiesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetPropertiesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPropertyArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPropertyArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetPropertiesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPropertyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPropertyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetPropertiesOverTime.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetPropertiesOverTime.g.cs index f1b26608..3f9a5af0 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetPropertiesOverTime.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetPropertiesOverTime.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetPropertiesOverTimeResponseContent( /// public async global::System.Threading.Tasks.Task GetPropertiesOverTimeAsync( + global::Helicone.AllOf request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPropertiesOverTimeAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetPropertiesOverTimeAsResponseAsync( + global::Helicone.AllOf request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +117,7 @@ partial void ProcessGetPropertiesOverTimeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/property/properties/over-time", baseUri: ResolveBaseUri( @@ -176,6 +199,8 @@ partial void ProcessGetPropertiesOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +211,11 @@ partial void ProcessGetPropertiesOverTimeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +233,8 @@ partial void ProcessGetPropertiesOverTimeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +244,7 @@ partial void ProcessGetPropertiesOverTimeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +253,11 @@ partial void ProcessGetPropertiesOverTimeResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +274,15 @@ partial void ProcessGetPropertiesOverTimeResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +322,8 @@ partial void ProcessGetPropertiesOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +344,8 @@ partial void ProcessGetPropertiesOverTimeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -329,9 +370,13 @@ partial void ProcessGetPropertiesOverTimeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultPropertyStringTotalCostNumberRequestCountNumberCreatedAtTruncStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultPropertyStringTotalCostNumberRequestCountNumberCreatedAtTruncStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -359,9 +404,13 @@ partial void ProcessGetPropertiesOverTimeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultPropertyStringTotalCostNumberRequestCountNumberCreatedAtTruncStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultPropertyStringTotalCostNumberRequestCountNumberCreatedAtTruncStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopCosts.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopCosts.g.cs index 031809b2..4c1089fa 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopCosts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopCosts.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetTopCostsResponseContent( public async global::System.Threading.Tasks.Task GetTopCostsAsync( string propertyKey, + global::Helicone.TimeFilterRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTopCostsAsResponseAsync( + propertyKey: propertyKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetTopCostsAsResponseAsync( + string propertyKey, + global::Helicone.TimeFilterRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetTopCostsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/property/{propertyKey}/top-costs/query", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetTopCostsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetTopCostsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetTopCostsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetTopCostsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetTopCostsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetTopCostsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetTopCostsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetTopCostsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetTopCostsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultValueStringCostNumberArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultValueStringCostNumberArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetTopCostsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultValueStringCostNumberArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultValueStringCostNumberArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopRequests.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopRequests.g.cs index b0d4e121..bbeda4f9 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.GetTopRequests.g.cs @@ -67,6 +67,31 @@ partial void ProcessGetTopRequestsResponseContent( public async global::System.Threading.Tasks.Task GetTopRequestsAsync( string propertyKey, + global::Helicone.TimeFilterRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTopRequestsAsResponseAsync( + propertyKey: propertyKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetTopRequestsAsResponseAsync( + string propertyKey, + global::Helicone.TimeFilterRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessGetTopRequestsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/property/{propertyKey}/top-requests/query", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessGetTopRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessGetTopRequestsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessGetTopRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessGetTopRequestsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessGetTopRequestsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessGetTopRequestsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessGetTopRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessGetTopRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessGetTopRequestsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultValueStringCountNumberArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultValueStringCountNumberArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessGetTopRequestsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultValueStringCountNumberArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultValueStringCountNumberArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.HideProperty.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.HideProperty.g.cs index 69dcebb5..fa42af90 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.HideProperty.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.HideProperty.g.cs @@ -63,6 +63,28 @@ partial void ProcessHidePropertyResponseContent( /// public async global::System.Threading.Tasks.Task> HidePropertyAsync( + global::Helicone.HidePropertyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await HidePropertyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> HidePropertyAsResponseAsync( + global::Helicone.HidePropertyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessHidePropertyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/property/hide", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessHidePropertyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessHidePropertyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessHidePropertyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessHidePropertyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessHidePropertyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessHidePropertyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessHidePropertyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessHidePropertyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessHidePropertyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessHidePropertyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.RestoreProperty.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.RestoreProperty.g.cs index 828a042b..259b81df 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.RestoreProperty.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.RestoreProperty.g.cs @@ -63,6 +63,28 @@ partial void ProcessRestorePropertyResponseContent( /// public async global::System.Threading.Tasks.Task> RestorePropertyAsync( + global::Helicone.RestorePropertyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RestorePropertyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> RestorePropertyAsResponseAsync( + global::Helicone.RestorePropertyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessRestorePropertyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/property/restore", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessRestorePropertyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessRestorePropertyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessRestorePropertyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessRestorePropertyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessRestorePropertyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessRestorePropertyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessRestorePropertyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessRestorePropertyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessRestorePropertyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessRestorePropertyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.SearchProperties.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.SearchProperties.g.cs index 3c8c1f88..b683e011 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.SearchProperties.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.SearchProperties.g.cs @@ -67,6 +67,31 @@ partial void ProcessSearchPropertiesResponseContent( public async global::System.Threading.Tasks.Task SearchPropertiesAsync( string propertyKey, + global::Helicone.SearchPropertiesRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SearchPropertiesAsResponseAsync( + propertyKey: propertyKey, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> SearchPropertiesAsResponseAsync( + string propertyKey, + global::Helicone.SearchPropertiesRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessSearchPropertiesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/property/{propertyKey}/search", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessSearchPropertiesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessSearchPropertiesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessSearchPropertiesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessSearchPropertiesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessSearchPropertiesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessSearchPropertiesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessSearchPropertiesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessSearchPropertiesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessSearchPropertiesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessSearchPropertiesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.PropertyClient.g.cs b/src/libs/Helicone/Generated/Helicone.PropertyClient.g.cs index 92b5dc6e..693d3bfd 100644 --- a/src/libs/Helicone/Generated/Helicone.PropertyClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.PropertyClient.g.cs @@ -103,10 +103,10 @@ public PropertyClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PropertyClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.ProvidersClient.GetProviders.g.cs b/src/libs/Helicone/Generated/Helicone.ProvidersClient.GetProviders.g.cs index 22d704d6..8acc3136 100644 --- a/src/libs/Helicone/Generated/Helicone.ProvidersClient.GetProviders.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ProvidersClient.GetProviders.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetProvidersResponseContent( /// public async global::System.Threading.Tasks.Task GetProvidersAsync( + global::Helicone.ProviderQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProvidersAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetProvidersAsResponseAsync( + global::Helicone.ProviderQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetProvidersResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/providers", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetProvidersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetProvidersResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetProvidersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetProvidersResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetProvidersResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetProvidersResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetProvidersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetProvidersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetProvidersResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultProviderMetricArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultProviderMetricArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetProvidersResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultProviderMetricArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultProviderMetricArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.ProvidersClient.g.cs b/src/libs/Helicone/Generated/Helicone.ProvidersClient.g.cs index 138e23cd..a744a108 100644 --- a/src/libs/Helicone/Generated/Helicone.ProvidersClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.ProvidersClient.g.cs @@ -103,10 +103,10 @@ public ProvidersClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ProvidersClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.AddScores.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.AddScores.g.cs index 329ca78f..51159600 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.AddScores.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.AddScores.g.cs @@ -67,6 +67,31 @@ partial void ProcessAddScoresResponseContent( public async global::System.Threading.Tasks.Task AddScoresAsync( string requestId, + global::Helicone.ScoreRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddScoresAsResponseAsync( + requestId: requestId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> AddScoresAsResponseAsync( + string requestId, + global::Helicone.ScoreRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessAddScoresResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/request/{requestId}/score", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessAddScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessAddScoresResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessAddScoresResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessAddScoresResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessAddScoresResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessAddScoresResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessAddScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessAddScoresResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessAddScoresResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessAddScoresResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.FeedbackRequest.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.FeedbackRequest.g.cs index 276b9bdb..c6d717db 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.FeedbackRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.FeedbackRequest.g.cs @@ -67,6 +67,31 @@ partial void ProcessFeedbackRequestResponseContent( public async global::System.Threading.Tasks.Task FeedbackRequestAsync( string requestId, + global::Helicone.FeedbackRequestRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackRequestAsResponseAsync( + requestId: requestId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> FeedbackRequestAsResponseAsync( + string requestId, + global::Helicone.FeedbackRequestRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessFeedbackRequestResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/request/{requestId}/feedback", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessFeedbackRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessFeedbackRequestResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessFeedbackRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessFeedbackRequestResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessFeedbackRequestResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessFeedbackRequestResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessFeedbackRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessFeedbackRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessFeedbackRequestResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessFeedbackRequestResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestAssetById.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestAssetById.g.cs index f9498cb0..9db093e0 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestAssetById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestAssetById.g.cs @@ -69,6 +69,29 @@ partial void ProcessGetRequestAssetByIdResponseContent( string assetId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestAssetByIdAsResponseAsync( + requestId: requestId, + assetId: assetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetRequestAssetByIdAsResponseAsync( + string requestId, + string assetId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,6 +122,7 @@ partial void ProcessGetRequestAssetByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/request/{requestId}/assets/{assetId}", baseUri: ResolveBaseUri( @@ -175,6 +199,8 @@ partial void ProcessGetRequestAssetByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +211,11 @@ partial void ProcessGetRequestAssetByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +233,8 @@ partial void ProcessGetRequestAssetByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +244,7 @@ partial void ProcessGetRequestAssetByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +253,11 @@ partial void ProcessGetRequestAssetByIdResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +274,15 @@ partial void ProcessGetRequestAssetByIdResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +322,8 @@ partial void ProcessGetRequestAssetByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +344,8 @@ partial void ProcessGetRequestAssetByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +370,13 @@ partial void ProcessGetRequestAssetByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHeliconeRequestAssetString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHeliconeRequestAssetString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +404,13 @@ partial void ProcessGetRequestAssetByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHeliconeRequestAssetString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHeliconeRequestAssetString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestById.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestById.g.cs index 6aa2e210..3ec88e77 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestById.g.cs @@ -71,6 +71,31 @@ partial void ProcessGetRequestByIdResponseContent( bool? includeBody = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestByIdAsResponseAsync( + requestId: requestId, + includeBody: includeBody, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// Default Value: false + /// + /// 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> GetRequestByIdAsResponseAsync( + string requestId, + bool? includeBody = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,13 +126,14 @@ partial void ProcessGetRequestByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/request/{requestId}", baseUri: ResolveBaseUri( servers: s_GetRequestByIdServers, - defaultBaseUrl: "https://api.helicone.ai/")); + defaultBaseUrl: "https://api.helicone.ai/")); __pathBuilder - .AddOptionalParameter("includeBody", includeBody?.ToString().ToLowerInvariant()) + .AddOptionalParameter("includeBody", includeBody?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Helicone.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -180,6 +206,8 @@ partial void ProcessGetRequestByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -190,6 +218,11 @@ partial void ProcessGetRequestByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -207,6 +240,8 @@ partial void ProcessGetRequestByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -216,8 +251,7 @@ partial void ProcessGetRequestByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -226,6 +260,11 @@ partial void ProcessGetRequestByIdResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -242,14 +281,15 @@ partial void ProcessGetRequestByIdResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -289,6 +329,8 @@ partial void ProcessGetRequestByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -309,6 +351,8 @@ partial void ProcessGetRequestByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -333,9 +377,13 @@ partial void ProcessGetRequestByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHeliconeRequestString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHeliconeRequestString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -363,9 +411,13 @@ partial void ProcessGetRequestByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHeliconeRequestString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHeliconeRequestString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestCount.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestCount.g.cs index bba04484..20341330 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestCount.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestCount.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetRequestCountResponseContent( /// public async global::System.Threading.Tasks.Task GetRequestCountAsync( + global::Helicone.RequestQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestCountAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestCountAsResponseAsync( + global::Helicone.RequestQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetRequestCountResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/request/count/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetRequestCountResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetRequestCountResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetRequestCountResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetRequestCountResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetRequestCountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetRequestCountResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNumberString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetRequestCountResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNumberString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestInputs.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestInputs.g.cs index a02ff37a..e0c3f836 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestInputs.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestInputs.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetRequestInputsResponseContent( string requestId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestInputsAsResponseAsync( + requestId: requestId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestInputsAsResponseAsync( + string requestId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetRequestInputsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/request/{requestId}/inputs", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetRequestInputsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetRequestInputsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetRequestInputsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetRequestInputsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetRequestInputsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetRequestInputsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetRequestInputsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetRequestInputsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetRequestInputsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultInputsRecordStringAnyPromptIdStringVersionIdStringEnvironmentStringOrNullOrNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultInputsRecordStringAnyPromptIdStringVersionIdStringEnvironmentStringOrNullOrNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetRequestInputsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultInputsRecordStringAnyPromptIdStringVersionIdStringEnvironmentStringOrNullOrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultInputsRecordStringAnyPromptIdStringVersionIdStringEnvironmentStringOrNullOrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequests.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequests.g.cs index e542b7d8..1cde1232 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequests.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequests.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetRequestsResponseContent( /// public async global::System.Threading.Tasks.Task GetRequestsAsync( + global::Helicone.RequestQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestsAsResponseAsync( + global::Helicone.RequestQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetRequestsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/request/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetRequestsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetRequestsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetRequestsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetRequestsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetRequestsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetRequestsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetRequestsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHeliconeRequestArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHeliconeRequestArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetRequestsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHeliconeRequestArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHeliconeRequestArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsByIds.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsByIds.g.cs index dda30191..a89e774e 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsByIds.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsByIds.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetRequestsByIdsResponseContent( /// public async global::System.Threading.Tasks.Task GetRequestsByIdsAsync( + global::Helicone.GetRequestsByIdsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestsByIdsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestsByIdsAsResponseAsync( + global::Helicone.GetRequestsByIdsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetRequestsByIdsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/request/query-ids", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetRequestsByIdsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetRequestsByIdsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetRequestsByIdsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetRequestsByIdsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetRequestsByIdsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetRequestsByIdsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetRequestsByIdsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetRequestsByIdsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetRequestsByIdsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHeliconeRequestArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHeliconeRequestArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetRequestsByIdsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHeliconeRequestArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHeliconeRequestArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsClickhouse.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsClickhouse.g.cs index b47d6ed9..51eaf45d 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsClickhouse.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.GetRequestsClickhouse.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetRequestsClickhouseResponseContent( /// public async global::System.Threading.Tasks.Task GetRequestsClickhouseAsync( + global::Helicone.RequestQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRequestsClickhouseAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetRequestsClickhouseAsResponseAsync( + global::Helicone.RequestQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetRequestsClickhouseResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/request/query-clickhouse", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetRequestsClickhouseResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetRequestsClickhouseResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetRequestsClickhouseResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetRequestsClickhouseResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetRequestsClickhouseResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetRequestsClickhouseResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetRequestsClickhouseResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetRequestsClickhouseResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetRequestsClickhouseResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHeliconeRequestArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHeliconeRequestArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetRequestsClickhouseResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHeliconeRequestArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHeliconeRequestArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.PutProperty.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.PutProperty.g.cs index c2b26721..b3770b46 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.PutProperty.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.PutProperty.g.cs @@ -67,6 +67,31 @@ partial void ProcessPutPropertyResponseContent( public async global::System.Threading.Tasks.Task PutPropertyAsync( string requestId, + global::Helicone.PutPropertyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PutPropertyAsResponseAsync( + requestId: requestId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> PutPropertyAsResponseAsync( + string requestId, + global::Helicone.PutPropertyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessPutPropertyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/request/{requestId}/property", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessPutPropertyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessPutPropertyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessPutPropertyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessPutPropertyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessPutPropertyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessPutPropertyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessPutPropertyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessPutPropertyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessPutPropertyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessPutPropertyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.RequestClient.g.cs b/src/libs/Helicone/Generated/Helicone.RequestClient.g.cs index 287d0818..53cb8332 100644 --- a/src/libs/Helicone/Generated/Helicone.RequestClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.RequestClient.g.cs @@ -103,10 +103,10 @@ public RequestClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public RequestClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.SecurityClient.GetSecurity.g.cs b/src/libs/Helicone/Generated/Helicone.SecurityClient.GetSecurity.g.cs index b3984548..0abedc1c 100644 --- a/src/libs/Helicone/Generated/Helicone.SecurityClient.GetSecurity.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SecurityClient.GetSecurity.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetSecurityResponseContent( /// public async global::System.Threading.Tasks.Task GetSecurityAsync( + global::Helicone.GetSecurityRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSecurityAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetSecurityAsResponseAsync( + global::Helicone.GetSecurityRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetSecurityResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/public/security", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetSecurityResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetSecurityResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetSecurityResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetSecurityResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetSecurityResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetSecurityResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetSecurityResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetSecurityResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetSecurityResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultUnsafeBooleanString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultUnsafeBooleanString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetSecurityResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultUnsafeBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultUnsafeBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SecurityClient.g.cs b/src/libs/Helicone/Generated/Helicone.SecurityClient.g.cs index 0d7c3a5d..42beb826 100644 --- a/src/libs/Helicone/Generated/Helicone.SecurityClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SecurityClient.g.cs @@ -103,10 +103,10 @@ public SecurityClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SecurityClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.GetMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.GetMetrics.g.cs index 0840e945..dc3b2821 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.GetMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.GetMetrics.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetMetricsResponseContent( /// public async global::System.Threading.Tasks.Task GetMetricsAsync( + global::Helicone.SessionMetricsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetMetricsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetMetricsAsResponseAsync( + global::Helicone.SessionMetricsQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetMetricsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/session/metrics/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetMetricsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetMetricsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetMetricsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetMetricsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetMetricsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultSessionMetricsString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultSessionMetricsString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetMetricsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultSessionMetricsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultSessionMetricsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.GetNames.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.GetNames.g.cs index 5b806e2c..8cc60128 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.GetNames.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.GetNames.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetNamesResponseContent( /// public async global::System.Threading.Tasks.Task GetNamesAsync( + global::Helicone.SessionNameQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetNamesAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetNamesAsResponseAsync( + global::Helicone.SessionNameQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetNamesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/session/name/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetNamesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetNamesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetNamesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetNamesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetNamesResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetNamesResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetNamesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetNamesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetNamesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultSessionNameResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultSessionNameResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetNamesResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultSessionNameResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultSessionNameResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionTag.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionTag.g.cs index 90026d2c..61a688d9 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionTag.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionTag.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetSessionTagResponseContent( string sessionId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSessionTagAsResponseAsync( + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetSessionTagAsResponseAsync( + string sessionId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetSessionTagResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/session/{sessionId}/tag", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetSessionTagResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetSessionTagResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetSessionTagResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetSessionTagResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetSessionTagResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetSessionTagResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetSessionTagResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetSessionTagResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetSessionTagResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultStringOrNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultStringOrNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetSessionTagResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultStringOrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultStringOrNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessions.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessions.g.cs index 46aa9b94..099a41d0 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessions.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessions.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetSessionsResponseContent( /// public async global::System.Threading.Tasks.Task GetSessionsAsync( + global::Helicone.SessionQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSessionsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetSessionsAsResponseAsync( + global::Helicone.SessionQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetSessionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/session/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetSessionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetSessionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetSessionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetSessionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetSessionsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetSessionsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetSessionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetSessionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetSessionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultSessionResultArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultSessionResultArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetSessionsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultSessionResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultSessionResultArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionsCount.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionsCount.g.cs index a793c82f..26313b82 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionsCount.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.GetSessionsCount.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetSessionsCountResponseContent( /// public async global::System.Threading.Tasks.Task GetSessionsCountAsync( + global::Helicone.SessionQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSessionsCountAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetSessionsCountAsResponseAsync( + global::Helicone.SessionQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetSessionsCountResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/session/count", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetSessionsCountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetSessionsCountResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetSessionsCountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetSessionsCountResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetSessionsCountResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetSessionsCountResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetSessionsCountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetSessionsCountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetSessionsCountResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultSessionsAggregateMetricsString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultSessionsAggregateMetricsString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetSessionsCountResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultSessionsAggregateMetricsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultSessionsAggregateMetricsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionFeedback.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionFeedback.g.cs index 5a175860..33edb902 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionFeedback.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionFeedback.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateSessionFeedbackResponseContent( public async global::System.Threading.Tasks.Task UpdateSessionFeedbackAsync( string sessionId, + global::Helicone.UpdateSessionFeedbackRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateSessionFeedbackAsResponseAsync( + sessionId: sessionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateSessionFeedbackAsResponseAsync( + string sessionId, + global::Helicone.UpdateSessionFeedbackRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateSessionFeedbackResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/session/{sessionId}/feedback", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateSessionFeedbackResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateSessionFeedbackResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateSessionFeedbackResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateSessionFeedbackResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateSessionFeedbackResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateSessionFeedbackResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateSessionFeedbackResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateSessionFeedbackResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateSessionFeedbackResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateSessionFeedbackResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionTag.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionTag.g.cs index e33189ee..9784c401 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionTag.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.UpdateSessionTag.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateSessionTagResponseContent( public async global::System.Threading.Tasks.Task UpdateSessionTagAsync( string sessionId, + global::Helicone.UpdateSessionTagRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateSessionTagAsResponseAsync( + sessionId: sessionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateSessionTagAsResponseAsync( + string sessionId, + global::Helicone.UpdateSessionTagRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateSessionTagResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/session/{sessionId}/tag", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateSessionTagResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateSessionTagResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateSessionTagResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateSessionTagResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateSessionTagResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateSessionTagResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateSessionTagResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateSessionTagResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateSessionTagResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateSessionTagResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.SessionClient.g.cs b/src/libs/Helicone/Generated/Helicone.SessionClient.g.cs index c56f73b6..ad4e71fd 100644 --- a/src/libs/Helicone/Generated/Helicone.SessionClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.SessionClient.g.cs @@ -103,10 +103,10 @@ public SessionClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SessionClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.StatusClient.GetAllProviderStatus.g.cs b/src/libs/Helicone/Generated/Helicone.StatusClient.GetAllProviderStatus.g.cs index ce9cba8a..0d85c5a3 100644 --- a/src/libs/Helicone/Generated/Helicone.StatusClient.GetAllProviderStatus.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StatusClient.GetAllProviderStatus.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetAllProviderStatusResponseContent( public async global::System.Threading.Tasks.Task GetAllProviderStatusAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllProviderStatusAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetAllProviderStatusAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetAllProviderStatusResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/public/status/provider", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetAllProviderStatusResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetAllProviderStatusResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetAllProviderStatusResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetAllProviderStatusResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetAllProviderStatusResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetAllProviderStatusResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetAllProviderStatusResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetAllProviderStatusResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetAllProviderStatusResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultProviderMetricsArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultProviderMetricsArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetAllProviderStatusResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultProviderMetricsArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultProviderMetricsArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StatusClient.GetProviderStatus.g.cs b/src/libs/Helicone/Generated/Helicone.StatusClient.GetProviderStatus.g.cs index 8ae80403..2f36cd26 100644 --- a/src/libs/Helicone/Generated/Helicone.StatusClient.GetProviderStatus.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StatusClient.GetProviderStatus.g.cs @@ -69,6 +69,29 @@ partial void ProcessGetProviderStatusResponseContent( global::Helicone.TimeFrame timeFrame, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProviderStatusAsResponseAsync( + provider: provider, + timeFrame: timeFrame, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> GetProviderStatusAsResponseAsync( + string provider, + global::Helicone.TimeFrame timeFrame, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,13 +122,14 @@ partial void ProcessGetProviderStatusResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/public/status/provider/{provider}", baseUri: ResolveBaseUri( servers: s_GetProviderStatusServers, - defaultBaseUrl: "https://api.helicone.ai/")); + defaultBaseUrl: "https://api.helicone.ai/")); __pathBuilder - .AddRequiredParameter("timeFrame", timeFrame.ToValueString()) + .AddRequiredParameter("timeFrame", timeFrame.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Helicone.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +202,8 @@ partial void ProcessGetProviderStatusResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +214,11 @@ partial void ProcessGetProviderStatusResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +236,8 @@ partial void ProcessGetProviderStatusResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +247,7 @@ partial void ProcessGetProviderStatusResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +256,11 @@ partial void ProcessGetProviderStatusResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +277,15 @@ partial void ProcessGetProviderStatusResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +325,8 @@ partial void ProcessGetProviderStatusResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +347,8 @@ partial void ProcessGetProviderStatusResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +373,13 @@ partial void ProcessGetProviderStatusResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultProviderMetricsString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultProviderMetricsString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +407,13 @@ partial void ProcessGetProviderStatusResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultProviderMetricsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultProviderMetricsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StatusClient.g.cs b/src/libs/Helicone/Generated/Helicone.StatusClient.g.cs index 7b8bdb3f..eca203ad 100644 --- a/src/libs/Helicone/Generated/Helicone.StatusClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StatusClient.g.cs @@ -103,10 +103,10 @@ public StatusClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public StatusClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.AddOns.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.AddOns.g.cs index 8cc85cef..3993ec4f 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.AddOns.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.AddOns.g.cs @@ -65,6 +65,26 @@ partial void ProcessAddOnsResponseContent( global::Helicone.AddOnsProductType productType, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddOnsAsResponseAsync( + productType: productType, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> AddOnsAsResponseAsync( + global::Helicone.AddOnsProductType productType, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessAddOnsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/stripe/subscription/add-ons/{productType}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessAddOnsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessAddOnsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessAddOnsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessAddOnsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessAddOnsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessAddOnsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessAddOnsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessAddOnsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessAddOnsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessAddOnsResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.CancelSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.CancelSubscription.g.cs index be11ba4d..fb79ba0f 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.CancelSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.CancelSubscription.g.cs @@ -61,6 +61,23 @@ partial void ProcessCancelSubscriptionResponseContent( public async global::System.Threading.Tasks.Task CancelSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CancelSubscriptionAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> CancelSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessCancelSubscriptionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/cancel-subscription", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessCancelSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessCancelSubscriptionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessCancelSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessCancelSubscriptionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessCancelSubscriptionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessCancelSubscriptionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessCancelSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessCancelSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessCancelSubscriptionResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessCancelSubscriptionResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.CreateCloudGatewayCheckoutSession.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.CreateCloudGatewayCheckoutSession.g.cs index 4d47031c..710784ef 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.CreateCloudGatewayCheckoutSession.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.CreateCloudGatewayCheckoutSession.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( /// public async global::System.Threading.Tasks.Task CreateCloudGatewayCheckoutSessionAsync( + global::Helicone.CreateCloudGatewayCheckoutSessionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateCloudGatewayCheckoutSessionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateCloudGatewayCheckoutSessionAsResponseAsync( + global::Helicone.CreateCloudGatewayCheckoutSessionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/cloud/checkout-session", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.CreateCloudGatewayCheckoutSessionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.CreateCloudGatewayCheckoutSessionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateCloudGatewayCheckoutSessionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.CreateCloudGatewayCheckoutSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.CreateCloudGatewayCheckoutSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.CreateSetupSession.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.CreateSetupSession.g.cs index c3a6d41b..b4435ae8 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.CreateSetupSession.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.CreateSetupSession.g.cs @@ -63,6 +63,28 @@ partial void ProcessCreateSetupSessionResponseContent( /// public async global::System.Threading.Tasks.Task CreateSetupSessionAsync( + global::Helicone.CreateSetupSessionRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateSetupSessionAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> CreateSetupSessionAsResponseAsync( + global::Helicone.CreateSetupSessionRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessCreateSetupSessionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/payment-methods/setup-session", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessCreateSetupSessionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessCreateSetupSessionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessCreateSetupSessionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessCreateSetupSessionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessCreateSetupSessionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessCreateSetupSessionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessCreateSetupSessionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessCreateSetupSessionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessCreateSetupSessionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.CreateSetupSessionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.CreateSetupSessionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessCreateSetupSessionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.CreateSetupSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.CreateSetupSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.DeleteAddOns.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.DeleteAddOns.g.cs index bb5ca06c..b0c72809 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.DeleteAddOns.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.DeleteAddOns.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteAddOnsResponseContent( global::Helicone.DeleteAddOnsProductType productType, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteAddOnsAsResponseAsync( + productType: productType, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeleteAddOnsAsResponseAsync( + global::Helicone.DeleteAddOnsProductType productType, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteAddOnsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/stripe/subscription/add-ons/{productType}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteAddOnsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteAddOnsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteAddOnsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteAddOnsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteAddOnsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteAddOnsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteAddOnsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteAddOnsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteAddOnsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteAddOnsResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.DisableAutoTopoff.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.DisableAutoTopoff.g.cs index e9912520..3eb0c6ec 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.DisableAutoTopoff.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.DisableAutoTopoff.g.cs @@ -61,6 +61,23 @@ partial void ProcessDisableAutoTopoffResponseContent( public async global::System.Threading.Tasks.Task DisableAutoTopoffAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DisableAutoTopoffAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> DisableAutoTopoffAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessDisableAutoTopoffResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/auto-topoff/settings", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessDisableAutoTopoffResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessDisableAutoTopoffResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessDisableAutoTopoffResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessDisableAutoTopoffResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessDisableAutoTopoffResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessDisableAutoTopoffResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessDisableAutoTopoffResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessDisableAutoTopoffResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessDisableAutoTopoffResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.DisableAutoTopoffResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.DisableAutoTopoffResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessDisableAutoTopoffResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.DisableAutoTopoffResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.DisableAutoTopoffResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetAutoTopoffSettings.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetAutoTopoffSettings.g.cs index b8ffc827..988803f7 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetAutoTopoffSettings.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetAutoTopoffSettings.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( public async global::System.Threading.Tasks.Task GetAutoTopoffSettingsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAutoTopoffSettingsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetAutoTopoffSettingsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/auto-topoff/settings", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AutoTopoffSettings.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AutoTopoffSettings.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetAutoTopoffSettingsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AutoTopoffSettings.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AutoTopoffSettings.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForEvals.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForEvals.g.cs index 2e96f269..2b4e52eb 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForEvals.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForEvals.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetCostForEvalsResponseContent( public async global::System.Threading.Tasks.Task GetCostForEvalsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCostForEvalsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetCostForEvalsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetCostForEvalsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/cost-for-evals", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetCostForEvalsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetCostForEvalsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetCostForEvalsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetCostForEvalsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetCostForEvalsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetCostForEvalsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetCostForEvalsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetCostForEvalsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetCostForEvalsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetCostForEvalsResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForExperiments.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForExperiments.g.cs index 25958d2d..75cd052c 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForExperiments.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForExperiments.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetCostForExperimentsResponseContent( public async global::System.Threading.Tasks.Task GetCostForExperimentsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCostForExperimentsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetCostForExperimentsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetCostForExperimentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/cost-for-experiments", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetCostForExperimentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetCostForExperimentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetCostForExperimentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetCostForExperimentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetCostForExperimentsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetCostForExperimentsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetCostForExperimentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetCostForExperimentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetCostForExperimentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetCostForExperimentsResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForPrompts.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForPrompts.g.cs index 983d2405..09017ae7 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForPrompts.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetCostForPrompts.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetCostForPromptsResponseContent( public async global::System.Threading.Tasks.Task GetCostForPromptsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCostForPromptsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetCostForPromptsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetCostForPromptsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/cost-for-prompts", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetCostForPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetCostForPromptsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetCostForPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetCostForPromptsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetCostForPromptsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetCostForPromptsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetCostForPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetCostForPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetCostForPromptsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetCostForPromptsResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetFreeUsage.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetFreeUsage.g.cs index 4d5ef112..87ba16fa 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetFreeUsage.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetFreeUsage.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetFreeUsageResponseContent( public async global::System.Threading.Tasks.Task GetFreeUsageAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetFreeUsageAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetFreeUsageAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetFreeUsageResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/free/usage", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetFreeUsageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetFreeUsageResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetFreeUsageResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetFreeUsageResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetFreeUsageResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetFreeUsageResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetFreeUsageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetFreeUsageResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetFreeUsageResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetFreeUsageResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetPaymentMethods.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetPaymentMethods.g.cs index 35c87d33..bb7e4fca 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetPaymentMethods.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetPaymentMethods.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetPaymentMethodsResponseContent( public async global::System.Threading.Tasks.Task> GetPaymentMethodsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPaymentMethodsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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>> GetPaymentMethodsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetPaymentMethodsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/payment-methods", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetPaymentMethodsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetPaymentMethodsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetPaymentMethodsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetPaymentMethodsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetPaymentMethodsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetPaymentMethodsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetPaymentMethodsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetPaymentMethodsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetPaymentMethodsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + 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::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetPaymentMethodsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).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::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetSubscription.g.cs index e38abaf9..80c3ea63 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetSubscription.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetSubscriptionResponseContent( public async global::System.Threading.Tasks.Task GetSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSubscriptionAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetSubscriptionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetSubscriptionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetSubscriptionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetSubscriptionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetSubscriptionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetSubscriptionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.GetSubscriptionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.GetSubscriptionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetSubscriptionResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.GetSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.GetSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.GetUsageStats.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.GetUsageStats.g.cs index cf52bb59..9c6eefd7 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.GetUsageStats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.GetUsageStats.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetUsageStatsResponseContent( public async global::System.Threading.Tasks.Task GetUsageStatsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUsageStatsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetUsageStatsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetUsageStatsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/usage-stats", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetUsageStatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetUsageStatsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetUsageStatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetUsageStatsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetUsageStatsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetUsageStatsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetUsageStatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetUsageStatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetUsageStatsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.UsageStatsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.UsageStatsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetUsageStatsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.UsageStatsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.UsageStatsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.ManageSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.ManageSubscription.g.cs index 3d534c6a..01317120 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.ManageSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.ManageSubscription.g.cs @@ -61,6 +61,23 @@ partial void ProcessManageSubscriptionResponseContent( public async global::System.Threading.Tasks.Task ManageSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ManageSubscriptionAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> ManageSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessManageSubscriptionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/manage-subscription", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessManageSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessManageSubscriptionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessManageSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessManageSubscriptionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessManageSubscriptionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessManageSubscriptionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessManageSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessManageSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,7 +352,11 @@ partial void ProcessManageSubscriptionResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -344,7 +384,11 @@ partial void ProcessManageSubscriptionResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.MigrateToPro.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.MigrateToPro.g.cs index 24e67290..5abb9692 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.MigrateToPro.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.MigrateToPro.g.cs @@ -61,6 +61,23 @@ partial void ProcessMigrateToProResponseContent( public async global::System.Threading.Tasks.Task MigrateToProAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MigrateToProAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> MigrateToProAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessMigrateToProResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/migrate-to-pro", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessMigrateToProResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessMigrateToProResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessMigrateToProResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessMigrateToProResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessMigrateToProResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessMigrateToProResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessMigrateToProResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessMigrateToProResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,7 +352,11 @@ partial void ProcessMigrateToProResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -344,7 +384,11 @@ partial void ProcessMigrateToProResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.PreviewInvoice.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.PreviewInvoice.g.cs index 6a563a93..6fad29dc 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.PreviewInvoice.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.PreviewInvoice.g.cs @@ -61,6 +61,23 @@ partial void ProcessPreviewInvoiceResponseContent( public async global::System.Threading.Tasks.Task PreviewInvoiceAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PreviewInvoiceAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> PreviewInvoiceAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessPreviewInvoiceResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/preview-invoice", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessPreviewInvoiceResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessPreviewInvoiceResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessPreviewInvoiceResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessPreviewInvoiceResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessPreviewInvoiceResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessPreviewInvoiceResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessPreviewInvoiceResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessPreviewInvoiceResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessPreviewInvoiceResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.PreviewInvoiceResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.PreviewInvoiceResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessPreviewInvoiceResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.PreviewInvoiceResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.PreviewInvoiceResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.RemovePaymentMethod.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.RemovePaymentMethod.g.cs index 1f54f154..92c77d57 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.RemovePaymentMethod.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.RemovePaymentMethod.g.cs @@ -65,6 +65,26 @@ partial void ProcessRemovePaymentMethodResponseContent( string paymentMethodId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RemovePaymentMethodAsResponseAsync( + paymentMethodId: paymentMethodId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> RemovePaymentMethodAsResponseAsync( + string paymentMethodId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessRemovePaymentMethodResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/stripe/payment-methods/{paymentMethodId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessRemovePaymentMethodResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessRemovePaymentMethodResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessRemovePaymentMethodResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessRemovePaymentMethodResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessRemovePaymentMethodResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessRemovePaymentMethodResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessRemovePaymentMethodResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessRemovePaymentMethodResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessRemovePaymentMethodResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.RemovePaymentMethodResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.RemovePaymentMethodResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessRemovePaymentMethodResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.RemovePaymentMethodResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.RemovePaymentMethodResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.SearchPaymentIntents.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.SearchPaymentIntents.g.cs index c8b0790c..8d6b0318 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.SearchPaymentIntents.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.SearchPaymentIntents.g.cs @@ -73,6 +73,32 @@ partial void ProcessSearchPaymentIntentsResponseContent( string? page = default, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SearchPaymentIntentsAsResponseAsync( + searchKind: searchKind, + limit: limit, + page: page, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// + /// 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> SearchPaymentIntentsAsResponseAsync( + string searchKind, + double? limit = default, + string? page = default, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -104,15 +130,16 @@ partial void ProcessSearchPaymentIntentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/payment-intents/search", baseUri: ResolveBaseUri( servers: s_SearchPaymentIntentsServers, - defaultBaseUrl: "https://api.helicone.ai/")); + defaultBaseUrl: "https://api.helicone.ai/")); __pathBuilder .AddRequiredParameter("search_kind", searchKind) .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("page", page) + .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); __path = global::Helicone.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -186,6 +213,8 @@ partial void ProcessSearchPaymentIntentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -196,6 +225,11 @@ partial void ProcessSearchPaymentIntentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -213,6 +247,8 @@ partial void ProcessSearchPaymentIntentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -222,8 +258,7 @@ partial void ProcessSearchPaymentIntentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -232,6 +267,11 @@ partial void ProcessSearchPaymentIntentsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -248,14 +288,15 @@ partial void ProcessSearchPaymentIntentsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -295,6 +336,8 @@ partial void ProcessSearchPaymentIntentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -315,6 +358,8 @@ partial void ProcessSearchPaymentIntentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -339,9 +384,13 @@ partial void ProcessSearchPaymentIntentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.StripePaymentIntentsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.StripePaymentIntentsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -369,9 +418,13 @@ partial void ProcessSearchPaymentIntentsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.StripePaymentIntentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.StripePaymentIntentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.UndoCancelSubscription.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.UndoCancelSubscription.g.cs index e50e679e..bd1760e7 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.UndoCancelSubscription.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.UndoCancelSubscription.g.cs @@ -61,6 +61,23 @@ partial void ProcessUndoCancelSubscriptionResponseContent( public async global::System.Threading.Tasks.Task UndoCancelSubscriptionAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UndoCancelSubscriptionAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> UndoCancelSubscriptionAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessUndoCancelSubscriptionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/undo-cancel-subscription", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessUndoCancelSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessUndoCancelSubscriptionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessUndoCancelSubscriptionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessUndoCancelSubscriptionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessUndoCancelSubscriptionResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessUndoCancelSubscriptionResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessUndoCancelSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessUndoCancelSubscriptionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessUndoCancelSubscriptionResponseContent( { __response.EnsureSuccessStatusCode(); - return - (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? + var __value = (double?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(double?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessUndoCancelSubscriptionResponseContent( #endif ).ConfigureAwait(false); - return - (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (double?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(double?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.UpdateAutoTopoffSettings.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.UpdateAutoTopoffSettings.g.cs index e15db2ba..cab4238f 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.UpdateAutoTopoffSettings.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.UpdateAutoTopoffSettings.g.cs @@ -63,6 +63,28 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( /// public async global::System.Threading.Tasks.Task UpdateAutoTopoffSettingsAsync( + global::Helicone.UpdateAutoTopoffSettingsRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateAutoTopoffSettingsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> UpdateAutoTopoffSettingsAsResponseAsync( + global::Helicone.UpdateAutoTopoffSettingsRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/auto-topoff/settings", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AutoTopoffSettings.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AutoTopoffSettings.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessUpdateAutoTopoffSettingsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AutoTopoffSettings.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AutoTopoffSettings.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomer.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomer.g.cs index 4ec2b57d..82043f41 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomer.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomer.g.cs @@ -63,6 +63,28 @@ partial void ProcessUpgradeExistingCustomerResponseContent( /// public async global::System.Threading.Tasks.Task UpgradeExistingCustomerAsync( + global::Helicone.UpgradeToProRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpgradeExistingCustomerAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> UpgradeExistingCustomerAsResponseAsync( + global::Helicone.UpgradeToProRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessUpgradeExistingCustomerResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/existing-customer/upgrade-to-pro", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessUpgradeExistingCustomerResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessUpgradeExistingCustomerResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessUpgradeExistingCustomerResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessUpgradeExistingCustomerResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessUpgradeExistingCustomerResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessUpgradeExistingCustomerResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessUpgradeExistingCustomerResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessUpgradeExistingCustomerResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,7 +372,11 @@ partial void ProcessUpgradeExistingCustomerResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -359,7 +404,11 @@ partial void ProcessUpgradeExistingCustomerResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomerToTeamBundle.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomerToTeamBundle.g.cs index c167ec5c..cc5bb0f0 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomerToTeamBundle.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeExistingCustomerToTeamBundle.g.cs @@ -63,6 +63,28 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( /// public async global::System.Threading.Tasks.Task UpgradeExistingCustomerToTeamBundleAsync( + global::Helicone.UpgradeToTeamBundleRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpgradeExistingCustomerToTeamBundleAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> UpgradeExistingCustomerToTeamBundleAsResponseAsync( + global::Helicone.UpgradeToTeamBundleRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/existing-customer/upgrade-to-team-bundle", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,7 +372,11 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -359,7 +404,11 @@ partial void ProcessUpgradeExistingCustomerToTeamBundleResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToPro.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToPro.g.cs index 36809954..fa7aaeaa 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToPro.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToPro.g.cs @@ -63,6 +63,28 @@ partial void ProcessUpgradeToProResponseContent( /// public async global::System.Threading.Tasks.Task UpgradeToProAsync( + global::Helicone.UpgradeToProRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpgradeToProAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> UpgradeToProAsResponseAsync( + global::Helicone.UpgradeToProRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessUpgradeToProResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/new-customer/upgrade-to-pro", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessUpgradeToProResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessUpgradeToProResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessUpgradeToProResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessUpgradeToProResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessUpgradeToProResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessUpgradeToProResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessUpgradeToProResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessUpgradeToProResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,7 +372,11 @@ partial void ProcessUpgradeToProResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -359,7 +404,11 @@ partial void ProcessUpgradeToProResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToTeamBundle.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToTeamBundle.g.cs index 9dfe16a6..e91666b7 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToTeamBundle.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.UpgradeToTeamBundle.g.cs @@ -63,6 +63,28 @@ partial void ProcessUpgradeToTeamBundleResponseContent( /// public async global::System.Threading.Tasks.Task UpgradeToTeamBundleAsync( + global::Helicone.UpgradeToTeamBundleRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpgradeToTeamBundleAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> UpgradeToTeamBundleAsResponseAsync( + global::Helicone.UpgradeToTeamBundleRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessUpgradeToTeamBundleResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/stripe/subscription/new-customer/upgrade-to-team-bundle", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessUpgradeToTeamBundleResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessUpgradeToTeamBundleResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessUpgradeToTeamBundleResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessUpgradeToTeamBundleResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessUpgradeToTeamBundleResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessUpgradeToTeamBundleResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessUpgradeToTeamBundleResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessUpgradeToTeamBundleResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,7 +372,11 @@ partial void ProcessUpgradeToTeamBundleResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -359,7 +404,11 @@ partial void ProcessUpgradeToTeamBundleResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.StripeClient.g.cs b/src/libs/Helicone/Generated/Helicone.StripeClient.g.cs index f312eb49..d11854f7 100644 --- a/src/libs/Helicone/Generated/Helicone.StripeClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.StripeClient.g.cs @@ -103,10 +103,10 @@ public StripeClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public StripeClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.TestClient.SendTestRequest.g.cs b/src/libs/Helicone/Generated/Helicone.TestClient.SendTestRequest.g.cs index 3e057eed..090d34b7 100644 --- a/src/libs/Helicone/Generated/Helicone.TestClient.SendTestRequest.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TestClient.SendTestRequest.g.cs @@ -63,6 +63,28 @@ partial void ProcessSendTestRequestResponseContent( /// public async global::System.Threading.Tasks.Task SendTestRequestAsync( + global::Helicone.SendTestRequestRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SendTestRequestAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> SendTestRequestAsResponseAsync( + global::Helicone.SendTestRequestRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessSendTestRequestResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/test/gateway-request", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessSendTestRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessSendTestRequestResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessSendTestRequestResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessSendTestRequestResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessSendTestRequestResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessSendTestRequestResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessSendTestRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessSendTestRequestResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessSendTestRequestResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.SendTestRequestResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.SendTestRequestResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessSendTestRequestResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.SendTestRequestResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.SendTestRequestResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.TestClient.g.cs b/src/libs/Helicone/Generated/Helicone.TestClient.g.cs index 55c600f5..08ca2d14 100644 --- a/src/libs/Helicone/Generated/Helicone.TestClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TestClient.g.cs @@ -103,10 +103,10 @@ public TestClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TestClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTrace.g.cs b/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTrace.g.cs index 2fd5dc6b..802739ec 100644 --- a/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTrace.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTrace.g.cs @@ -58,6 +58,26 @@ partial void ProcessLogCustomTraceResponse( /// public async global::System.Threading.Tasks.Task LogCustomTraceAsync( + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await LogCustomTraceAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// + /// + /// + /// 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 LogCustomTraceAsResponseAsync( + object request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -92,6 +112,7 @@ partial void ProcessLogCustomTraceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/trace/custom/log", baseUri: ResolveBaseUri( @@ -173,6 +194,8 @@ partial void ProcessLogCustomTraceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +206,11 @@ partial void ProcessLogCustomTraceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +228,8 @@ partial void ProcessLogCustomTraceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +239,7 @@ partial void ProcessLogCustomTraceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +248,11 @@ partial void ProcessLogCustomTraceResponse( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +269,15 @@ partial void ProcessLogCustomTraceResponse( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +317,8 @@ partial void ProcessLogCustomTraceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +339,8 @@ partial void ProcessLogCustomTraceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,6 +361,10 @@ partial void ProcessLogCustomTraceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -343,6 +386,10 @@ partial void ProcessLogCustomTraceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceLegacy.g.cs b/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceLegacy.g.cs index 5ccef53e..601e7de0 100644 --- a/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceLegacy.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceLegacy.g.cs @@ -58,6 +58,26 @@ partial void ProcessLogCustomTraceLegacyResponse( /// public async global::System.Threading.Tasks.Task LogCustomTraceLegacyAsync( + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await LogCustomTraceLegacyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// + /// + /// + /// 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 LogCustomTraceLegacyAsResponseAsync( + object request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -92,6 +112,7 @@ partial void ProcessLogCustomTraceLegacyResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/trace/custom/v1/log", baseUri: ResolveBaseUri( @@ -173,6 +194,8 @@ partial void ProcessLogCustomTraceLegacyResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +206,11 @@ partial void ProcessLogCustomTraceLegacyResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +228,8 @@ partial void ProcessLogCustomTraceLegacyResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +239,7 @@ partial void ProcessLogCustomTraceLegacyResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +248,11 @@ partial void ProcessLogCustomTraceLegacyResponse( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +269,15 @@ partial void ProcessLogCustomTraceLegacyResponse( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +317,8 @@ partial void ProcessLogCustomTraceLegacyResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +339,8 @@ partial void ProcessLogCustomTraceLegacyResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,6 +361,10 @@ partial void ProcessLogCustomTraceLegacyResponse( { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -343,6 +386,10 @@ partial void ProcessLogCustomTraceLegacyResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceTyped.g.cs b/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceTyped.g.cs index 549844f3..6e4ce377 100644 --- a/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceTyped.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TraceClient.LogCustomTraceTyped.g.cs @@ -63,6 +63,28 @@ partial void ProcessLogCustomTraceTypedResponseContent( /// public async global::System.Threading.Tasks.Task> LogCustomTraceTypedAsync( + global::Helicone.TypedAsyncLogModel request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LogCustomTraceTypedAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> LogCustomTraceTypedAsResponseAsync( + global::Helicone.TypedAsyncLogModel request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessLogCustomTraceTypedResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/trace/custom/log/typed", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessLogCustomTraceTypedResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessLogCustomTraceTypedResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessLogCustomTraceTypedResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessLogCustomTraceTypedResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessLogCustomTraceTypedResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessLogCustomTraceTypedResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessLogCustomTraceTypedResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessLogCustomTraceTypedResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessLogCustomTraceTypedResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessLogCustomTraceTypedResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.TraceClient.LogPythonTrace.g.cs b/src/libs/Helicone/Generated/Helicone.TraceClient.LogPythonTrace.g.cs index 424a8631..2fcb9dfe 100644 --- a/src/libs/Helicone/Generated/Helicone.TraceClient.LogPythonTrace.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TraceClient.LogPythonTrace.g.cs @@ -58,6 +58,26 @@ partial void ProcessLogPythonTraceResponse( /// public async global::System.Threading.Tasks.Task LogPythonTraceAsync( + object request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await LogPythonTraceAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// + /// + /// + /// 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 LogPythonTraceAsResponseAsync( + object request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -92,6 +112,7 @@ partial void ProcessLogPythonTraceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/trace/log-python", baseUri: ResolveBaseUri( @@ -173,6 +194,8 @@ partial void ProcessLogPythonTraceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +206,11 @@ partial void ProcessLogPythonTraceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +228,8 @@ partial void ProcessLogPythonTraceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +239,7 @@ partial void ProcessLogPythonTraceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +248,11 @@ partial void ProcessLogPythonTraceResponse( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +269,15 @@ partial void ProcessLogPythonTraceResponse( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +317,8 @@ partial void ProcessLogPythonTraceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +339,8 @@ partial void ProcessLogPythonTraceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,6 +361,10 @@ partial void ProcessLogPythonTraceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -343,6 +386,10 @@ partial void ProcessLogPythonTraceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.TraceClient.LogTrace.g.cs b/src/libs/Helicone/Generated/Helicone.TraceClient.LogTrace.g.cs index e45bb69d..c7904421 100644 --- a/src/libs/Helicone/Generated/Helicone.TraceClient.LogTrace.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TraceClient.LogTrace.g.cs @@ -58,6 +58,26 @@ partial void ProcessLogTraceResponse( /// public async global::System.Threading.Tasks.Task LogTraceAsync( + global::Helicone.OTELTrace request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await LogTraceAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// + /// + /// + /// 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 LogTraceAsResponseAsync( + global::Helicone.OTELTrace request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -92,6 +112,7 @@ partial void ProcessLogTraceResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/trace/log", baseUri: ResolveBaseUri( @@ -173,6 +194,8 @@ partial void ProcessLogTraceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +206,11 @@ partial void ProcessLogTraceResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +228,8 @@ partial void ProcessLogTraceResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +239,7 @@ partial void ProcessLogTraceResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +248,11 @@ partial void ProcessLogTraceResponse( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +269,15 @@ partial void ProcessLogTraceResponse( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +317,8 @@ partial void ProcessLogTraceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +339,8 @@ partial void ProcessLogTraceResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,6 +361,10 @@ partial void ProcessLogTraceResponse( { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -343,6 +386,10 @@ partial void ProcessLogTraceResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.TraceClient.g.cs b/src/libs/Helicone/Generated/Helicone.TraceClient.g.cs index eef79182..eb8b20e8 100644 --- a/src/libs/Helicone/Generated/Helicone.TraceClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.TraceClient.g.cs @@ -103,10 +103,10 @@ public TraceClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TraceClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetrics.g.cs b/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetrics.g.cs index 01a83f6e..ad81111b 100644 --- a/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetrics.g.cs +++ b/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetrics.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetUserMetricsResponseContent( /// public async global::System.Threading.Tasks.Task GetUserMetricsAsync( + global::Helicone.UserMetricsQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUserMetricsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetUserMetricsAsResponseAsync( + global::Helicone.UserMetricsQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetUserMetricsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/user/metrics/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetUserMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetUserMetricsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetUserMetricsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetUserMetricsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetUserMetricsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetUserMetricsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetUserMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetUserMetricsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetUserMetricsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultUsersUserMetricsResultArrayCountNumberHasUsersBooleanString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultUsersUserMetricsResultArrayCountNumberHasUsersBooleanString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetUserMetricsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultUsersUserMetricsResultArrayCountNumberHasUsersBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultUsersUserMetricsResultArrayCountNumberHasUsersBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetricsOverview.g.cs b/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetricsOverview.g.cs index 597b5884..3a4463a0 100644 --- a/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetricsOverview.g.cs +++ b/src/libs/Helicone/Generated/Helicone.UserClient.GetUserMetricsOverview.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetUserMetricsOverviewResponseContent( /// public async global::System.Threading.Tasks.Task GetUserMetricsOverviewAsync( + global::Helicone.GetUserMetricsOverviewRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUserMetricsOverviewAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetUserMetricsOverviewAsResponseAsync( + global::Helicone.GetUserMetricsOverviewRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetUserMetricsOverviewResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/user/metrics-overview/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetUserMetricsOverviewResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetUserMetricsOverviewResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetUserMetricsOverviewResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetUserMetricsOverviewResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetUserMetricsOverviewResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetUserMetricsOverviewResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetUserMetricsOverviewResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetUserMetricsOverviewResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetUserMetricsOverviewResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultRequestCountHistogramRowArrayUserCostHistogramRowArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultRequestCountHistogramRowArrayUserCostHistogramRowArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetUserMetricsOverviewResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultRequestCountHistogramRowArrayUserCostHistogramRowArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultRequestCountHistogramRowArrayUserCostHistogramRowArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.UserClient.GetUsers.g.cs b/src/libs/Helicone/Generated/Helicone.UserClient.GetUsers.g.cs index 47f2dd74..ea0a2381 100644 --- a/src/libs/Helicone/Generated/Helicone.UserClient.GetUsers.g.cs +++ b/src/libs/Helicone/Generated/Helicone.UserClient.GetUsers.g.cs @@ -63,6 +63,28 @@ partial void ProcessGetUsersResponseContent( /// public async global::System.Threading.Tasks.Task GetUsersAsync( + global::Helicone.UserQueryParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUsersAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetUsersAsResponseAsync( + global::Helicone.UserQueryParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessGetUsersResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/user/query", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessGetUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessGetUsersResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessGetUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessGetUsersResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessGetUsersResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessGetUsersResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessGetUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessGetUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessGetUsersResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultCountNumberPromptTokensNumberCompletionTokensNumberUserIdStringCostNumberArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultCountNumberPromptTokensNumberCompletionTokensNumberUserIdStringCostNumberArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessGetUsersResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultCountNumberPromptTokensNumberCompletionTokensNumberUserIdStringCostNumberArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultCountNumberPromptTokensNumberCompletionTokensNumberUserIdStringCostNumberArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.UserClient.g.cs b/src/libs/Helicone/Generated/Helicone.UserClient.g.cs index 64d64aa9..edf556be 100644 --- a/src/libs/Helicone/Generated/Helicone.UserClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.UserClient.g.cs @@ -103,10 +103,10 @@ public UserClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public UserClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.VaultClient.AddKey.g.cs b/src/libs/Helicone/Generated/Helicone.VaultClient.AddKey.g.cs index 06f8bd25..38b87969 100644 --- a/src/libs/Helicone/Generated/Helicone.VaultClient.AddKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.VaultClient.AddKey.g.cs @@ -63,6 +63,28 @@ partial void ProcessAddKeyResponseContent( /// public async global::System.Threading.Tasks.Task AddKeyAsync( + global::Helicone.AddVaultKeyParams request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddKeyAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> AddKeyAsResponseAsync( + global::Helicone.AddVaultKeyParams request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessAddKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/vault/add", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessAddKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessAddKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessAddKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessAddKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessAddKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessAddKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessAddKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessAddKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessAddKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIdStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIdStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessAddKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIdStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeyById.g.cs b/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeyById.g.cs index b759b37f..6f5e7898 100644 --- a/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeyById.g.cs +++ b/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeyById.g.cs @@ -65,6 +65,26 @@ partial void ProcessGetKeyByIdResponseContent( string providerKeyId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetKeyByIdAsResponseAsync( + providerKeyId: providerKeyId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> GetKeyByIdAsResponseAsync( + string providerKeyId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessGetKeyByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/vault/key/{providerKeyId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessGetKeyByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessGetKeyByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessGetKeyByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessGetKeyByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessGetKeyByIdResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessGetKeyByIdResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessGetKeyByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessGetKeyByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessGetKeyByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultDecryptedProviderKeyString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultDecryptedProviderKeyString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessGetKeyByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultDecryptedProviderKeyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultDecryptedProviderKeyString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeys.g.cs b/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeys.g.cs index 579fde38..5973dea3 100644 --- a/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeys.g.cs +++ b/src/libs/Helicone/Generated/Helicone.VaultClient.GetKeys.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetKeysResponseContent( public async global::System.Threading.Tasks.Task GetKeysAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetKeysAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetKeysAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetKeysResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/vault/keys", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetKeysResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetKeysResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetKeysResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetKeysResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetKeysResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetKeysResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetKeysResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetKeysResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetKeysResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultDecryptedProviderKeyArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultDecryptedProviderKeyArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetKeysResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultDecryptedProviderKeyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultDecryptedProviderKeyArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.VaultClient.UpdateKey.g.cs b/src/libs/Helicone/Generated/Helicone.VaultClient.UpdateKey.g.cs index b356ebbb..12eea08b 100644 --- a/src/libs/Helicone/Generated/Helicone.VaultClient.UpdateKey.g.cs +++ b/src/libs/Helicone/Generated/Helicone.VaultClient.UpdateKey.g.cs @@ -67,6 +67,31 @@ partial void ProcessUpdateKeyResponseContent( public async global::System.Threading.Tasks.Task UpdateKeyAsync( string id, + global::Helicone.UpdateKeyRequest request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateKeyAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// + /// 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> UpdateKeyAsResponseAsync( + string id, + global::Helicone.UpdateKeyRequest request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +127,7 @@ partial void ProcessUpdateKeyResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/vault/update/{id}", baseUri: ResolveBaseUri( @@ -184,6 +210,8 @@ partial void ProcessUpdateKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +222,11 @@ partial void ProcessUpdateKeyResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +244,8 @@ partial void ProcessUpdateKeyResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +255,7 @@ partial void ProcessUpdateKeyResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +264,11 @@ partial void ProcessUpdateKeyResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +285,15 @@ partial void ProcessUpdateKeyResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +333,8 @@ partial void ProcessUpdateKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +355,8 @@ partial void ProcessUpdateKeyResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -337,9 +381,13 @@ partial void ProcessUpdateKeyResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -367,9 +415,13 @@ partial void ProcessUpdateKeyResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.VaultClient.g.cs b/src/libs/Helicone/Generated/Helicone.VaultClient.g.cs index 7db19a08..e86e03c7 100644 --- a/src/libs/Helicone/Generated/Helicone.VaultClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.VaultClient.g.cs @@ -103,10 +103,10 @@ public VaultClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public VaultClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.WebhooksClient.DeleteWebhook.g.cs b/src/libs/Helicone/Generated/Helicone.WebhooksClient.DeleteWebhook.g.cs index d3c3fb45..fd63bf83 100644 --- a/src/libs/Helicone/Generated/Helicone.WebhooksClient.DeleteWebhook.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WebhooksClient.DeleteWebhook.g.cs @@ -65,6 +65,26 @@ partial void ProcessDeleteWebhookResponseContent( string webhookId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteWebhookAsResponseAsync( + webhookId: webhookId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> DeleteWebhookAsResponseAsync( + string webhookId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessDeleteWebhookResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/webhooks/{webhookId}", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessDeleteWebhookResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessDeleteWebhookResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessDeleteWebhookResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessDeleteWebhookResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessDeleteWebhookResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessDeleteWebhookResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessDeleteWebhookResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessDeleteWebhookResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessDeleteWebhookResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultNullString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessDeleteWebhookResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultNullString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.WebhooksClient.GetWebhooks.g.cs b/src/libs/Helicone/Generated/Helicone.WebhooksClient.GetWebhooks.g.cs index 20e09e23..183d793f 100644 --- a/src/libs/Helicone/Generated/Helicone.WebhooksClient.GetWebhooks.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WebhooksClient.GetWebhooks.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetWebhooksResponseContent( public async global::System.Threading.Tasks.Task GetWebhooksAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetWebhooksAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetWebhooksAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetWebhooksResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/webhooks", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetWebhooksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetWebhooksResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetWebhooksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetWebhooksResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetWebhooksResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetWebhooksResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetWebhooksResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetWebhooksResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetWebhooksResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultIdStringCreatedAtStringDestinationStringVersionStringConfigStringHmacKeyStringArrayString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultIdStringCreatedAtStringDestinationStringVersionStringConfigStringHmacKeyStringArrayString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetWebhooksResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultIdStringCreatedAtStringDestinationStringVersionStringConfigStringHmacKeyStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultIdStringCreatedAtStringDestinationStringVersionStringConfigStringHmacKeyStringArrayString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.WebhooksClient.NewWebhook.g.cs b/src/libs/Helicone/Generated/Helicone.WebhooksClient.NewWebhook.g.cs index e2882855..f09628b6 100644 --- a/src/libs/Helicone/Generated/Helicone.WebhooksClient.NewWebhook.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WebhooksClient.NewWebhook.g.cs @@ -63,6 +63,28 @@ partial void ProcessNewWebhookResponseContent( /// public async global::System.Threading.Tasks.Task> NewWebhookAsync( + global::Helicone.WebhookData request, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await NewWebhookAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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>> NewWebhookAsResponseAsync( + global::Helicone.WebhookData request, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +119,7 @@ partial void ProcessNewWebhookResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/webhooks", baseUri: ResolveBaseUri( @@ -178,6 +201,8 @@ partial void ProcessNewWebhookResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +213,11 @@ partial void ProcessNewWebhookResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +235,8 @@ partial void ProcessNewWebhookResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +246,7 @@ partial void ProcessNewWebhookResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +255,11 @@ partial void ProcessNewWebhookResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +276,15 @@ partial void ProcessNewWebhookResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +324,8 @@ partial void ProcessNewWebhookResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +346,8 @@ partial void ProcessNewWebhookResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -331,9 +372,13 @@ partial void ProcessNewWebhookResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +406,13 @@ partial void ProcessNewWebhookResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.WebhooksClient.TestWebhook.g.cs b/src/libs/Helicone/Generated/Helicone.WebhooksClient.TestWebhook.g.cs index 9aed3cba..0f42417a 100644 --- a/src/libs/Helicone/Generated/Helicone.WebhooksClient.TestWebhook.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WebhooksClient.TestWebhook.g.cs @@ -65,6 +65,26 @@ partial void ProcessTestWebhookResponseContent( string webhookId, global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TestWebhookAsResponseAsync( + webhookId: webhookId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// + /// 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> TestWebhookAsResponseAsync( + string webhookId, + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,6 +114,7 @@ partial void ProcessTestWebhookResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: $"/v1/webhooks/{webhookId}/test", baseUri: ResolveBaseUri( @@ -169,6 +190,8 @@ partial void ProcessTestWebhookResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +202,11 @@ partial void ProcessTestWebhookResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +224,8 @@ partial void ProcessTestWebhookResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +235,7 @@ partial void ProcessTestWebhookResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +244,11 @@ partial void ProcessTestWebhookResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +265,15 @@ partial void ProcessTestWebhookResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +313,8 @@ partial void ProcessTestWebhookResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +335,8 @@ partial void ProcessTestWebhookResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +361,13 @@ partial void ProcessTestWebhookResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultSuccessBooleanMessageStringString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultSuccessBooleanMessageStringString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +395,13 @@ partial void ProcessTestWebhookResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultSuccessBooleanMessageStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultSuccessBooleanMessageStringString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.WebhooksClient.g.cs b/src/libs/Helicone/Generated/Helicone.WebhooksClient.g.cs index f481920c..dd47067a 100644 --- a/src/libs/Helicone/Generated/Helicone.WebhooksClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WebhooksClient.g.cs @@ -103,10 +103,10 @@ public WebhooksClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public WebhooksClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Helicone/Generated/Helicone.WrappedClient.CheckHasWrapped2025Data.g.cs b/src/libs/Helicone/Generated/Helicone.WrappedClient.CheckHasWrapped2025Data.g.cs index abb87a96..797ffdfd 100644 --- a/src/libs/Helicone/Generated/Helicone.WrappedClient.CheckHasWrapped2025Data.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WrappedClient.CheckHasWrapped2025Data.g.cs @@ -61,6 +61,23 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( public async global::System.Threading.Tasks.Task CheckHasWrapped2025DataAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CheckHasWrapped2025DataAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> CheckHasWrapped2025DataAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/wrapped/2025/check", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultHasDataBooleanString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultHasDataBooleanString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessCheckHasWrapped2025DataResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultHasDataBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultHasDataBooleanString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.WrappedClient.GetWrapped2025Stats.g.cs b/src/libs/Helicone/Generated/Helicone.WrappedClient.GetWrapped2025Stats.g.cs index b534e661..738dbc78 100644 --- a/src/libs/Helicone/Generated/Helicone.WrappedClient.GetWrapped2025Stats.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WrappedClient.GetWrapped2025Stats.g.cs @@ -61,6 +61,23 @@ partial void ProcessGetWrapped2025StatsResponseContent( public async global::System.Threading.Tasks.Task GetWrapped2025StatsAsync( global::Helicone.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetWrapped2025StatsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// + /// + /// 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> GetWrapped2025StatsAsResponseAsync( + global::Helicone.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +106,7 @@ partial void ProcessGetWrapped2025StatsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Helicone.PathBuilder( path: "/v1/wrapped/2025", baseUri: ResolveBaseUri( @@ -163,6 +181,8 @@ partial void ProcessGetWrapped2025StatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +193,11 @@ partial void ProcessGetWrapped2025StatsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +215,8 @@ partial void ProcessGetWrapped2025StatsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +226,7 @@ partial void ProcessGetWrapped2025StatsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +235,11 @@ partial void ProcessGetWrapped2025StatsResponseContent( __attempt < __maxAttempts && global::Helicone.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Helicone.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Helicone.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Helicone.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +256,15 @@ partial void ProcessGetWrapped2025StatsResponseContent( 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::Helicone.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +304,8 @@ partial void ProcessGetWrapped2025StatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +326,8 @@ partial void ProcessGetWrapped2025StatsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +352,13 @@ partial void ProcessGetWrapped2025StatsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Helicone.ResultWrappedStatsString.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Helicone.ResultWrappedStatsString.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +386,13 @@ partial void ProcessGetWrapped2025StatsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Helicone.ResultWrappedStatsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Helicone.ResultWrappedStatsString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Helicone.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Helicone.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Helicone/Generated/Helicone.WrappedClient.g.cs b/src/libs/Helicone/Generated/Helicone.WrappedClient.g.cs index 5bbbc220..652ffeeb 100644 --- a/src/libs/Helicone/Generated/Helicone.WrappedClient.g.cs +++ b/src/libs/Helicone/Generated/Helicone.WrappedClient.g.cs @@ -103,10 +103,10 @@ public WrappedClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public WrappedClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Helicone.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Helicone.AutoSDKClientOptions? options, bool disposeHttpClient = true) {