Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#nullable enable

namespace PromptLayer
{
public partial interface ITrackingClient
{
/// <summary>
/// Request Analytics Custom Analytics
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::PromptLayer.ApiException"></exception>
global::System.Threading.Tasks.Task<global::PromptLayer.RequestAnalyticsCustomAnalyticsResponse> GetRequestAnalyticsCustomAnalyticsAsync(

global::PromptLayer.RequestAnalyticsCustomAnalyticsQuery request,
global::PromptLayer.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Request Analytics Custom Analytics
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::PromptLayer.ApiException"></exception>
global::System.Threading.Tasks.Task<global::PromptLayer.AutoSDKHttpResponse<global::PromptLayer.RequestAnalyticsCustomAnalyticsResponse>> GetRequestAnalyticsCustomAnalyticsAsResponseAsync(

global::PromptLayer.RequestAnalyticsCustomAnalyticsQuery request,
global::PromptLayer.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Request Analytics Custom Analytics
/// </summary>
/// <param name="filterGroup">
/// Nested filter group with AND/OR logic.
/// </param>
/// <param name="q">
/// Free-text search query.
/// </param>
/// <param name="sortBy">
/// Accepted for compatibility; does not affect aggregated output.
/// </param>
/// <param name="sortOrder"></param>
/// <param name="customCharts">
/// One or more chart definitions to compute. Chart ids must be unique.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::PromptLayer.RequestAnalyticsCustomAnalyticsResponse> GetRequestAnalyticsCustomAnalyticsAsync(
global::System.Collections.Generic.IList<global::PromptLayer.CustomAnalyticsSpec> customCharts,
global::PromptLayer.StructuredFilterGroup? filterGroup = default,
string? q = default,
global::PromptLayer.RequestAnalyticsCustomAnalyticsQuerySortBy? sortBy = default,
global::PromptLayer.RequestAnalyticsCustomAnalyticsQuerySortOrder? sortOrder = default,
global::PromptLayer.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace PromptLayer.JsonConverters
{
/// <inheritdoc />
public sealed class CustomAnalyticsResultChartTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::PromptLayer.CustomAnalyticsResultChartType>
{
/// <inheritdoc />
public override global::PromptLayer.CustomAnalyticsResultChartType Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::PromptLayer.CustomAnalyticsResultChartTypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::PromptLayer.CustomAnalyticsResultChartType)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::PromptLayer.CustomAnalyticsResultChartType);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::PromptLayer.CustomAnalyticsResultChartType value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::PromptLayer.CustomAnalyticsResultChartTypeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace PromptLayer.JsonConverters
{
/// <inheritdoc />
public sealed class CustomAnalyticsResultChartTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::PromptLayer.CustomAnalyticsResultChartType?>
{
/// <inheritdoc />
public override global::PromptLayer.CustomAnalyticsResultChartType? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::PromptLayer.CustomAnalyticsResultChartTypeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::PromptLayer.CustomAnalyticsResultChartType)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::PromptLayer.CustomAnalyticsResultChartType?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::PromptLayer.CustomAnalyticsResultChartType? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::PromptLayer.CustomAnalyticsResultChartTypeExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace PromptLayer.JsonConverters
{
/// <inheritdoc />
public sealed class CustomAnalyticsSeriesMetaUnitJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::PromptLayer.CustomAnalyticsSeriesMetaUnit>
{
/// <inheritdoc />
public override global::PromptLayer.CustomAnalyticsSeriesMetaUnit Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::PromptLayer.CustomAnalyticsSeriesMetaUnitExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::PromptLayer.CustomAnalyticsSeriesMetaUnit)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::PromptLayer.CustomAnalyticsSeriesMetaUnit);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::PromptLayer.CustomAnalyticsSeriesMetaUnit value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::PromptLayer.CustomAnalyticsSeriesMetaUnitExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace PromptLayer.JsonConverters
{
/// <inheritdoc />
public sealed class CustomAnalyticsSeriesMetaUnitNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::PromptLayer.CustomAnalyticsSeriesMetaUnit?>
{
/// <inheritdoc />
public override global::PromptLayer.CustomAnalyticsSeriesMetaUnit? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::PromptLayer.CustomAnalyticsSeriesMetaUnitExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::PromptLayer.CustomAnalyticsSeriesMetaUnit)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::PromptLayer.CustomAnalyticsSeriesMetaUnit?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::PromptLayer.CustomAnalyticsSeriesMetaUnit? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::PromptLayer.CustomAnalyticsSeriesMetaUnitExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace PromptLayer.JsonConverters
{
/// <inheritdoc />
public sealed class CustomAnalyticsSeriesSpecMetricJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::PromptLayer.CustomAnalyticsSeriesSpecMetric>
{
/// <inheritdoc />
public override global::PromptLayer.CustomAnalyticsSeriesSpecMetric Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::PromptLayer.CustomAnalyticsSeriesSpecMetricExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::PromptLayer.CustomAnalyticsSeriesSpecMetric)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::PromptLayer.CustomAnalyticsSeriesSpecMetric);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::PromptLayer.CustomAnalyticsSeriesSpecMetric value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::PromptLayer.CustomAnalyticsSeriesSpecMetricExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace PromptLayer.JsonConverters
{
/// <inheritdoc />
public sealed class CustomAnalyticsSeriesSpecMetricFieldJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::PromptLayer.CustomAnalyticsSeriesSpecMetricField>
{
/// <inheritdoc />
public override global::PromptLayer.CustomAnalyticsSeriesSpecMetricField Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::PromptLayer.CustomAnalyticsSeriesSpecMetricFieldExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::PromptLayer.CustomAnalyticsSeriesSpecMetricField)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::PromptLayer.CustomAnalyticsSeriesSpecMetricField);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::PromptLayer.CustomAnalyticsSeriesSpecMetricField value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::PromptLayer.CustomAnalyticsSeriesSpecMetricFieldExtensions.ToValueString(value));
}
}
}
Loading