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
Expand Up @@ -7,7 +7,7 @@ public partial class AnalyticsClient
{


private static readonly global::LabelStudio.EndPointSecurityRequirement s_ApiAnalyticsKpisRetrieveSecurityRequirement0 =
private static readonly global::LabelStudio.EndPointSecurityRequirement s_GetSecurityRequirement0 =
new global::LabelStudio.EndPointSecurityRequirement
{
Authorizations = new global::LabelStudio.EndPointAuthorizationRequirement[]
Expand All @@ -21,44 +21,50 @@ public partial class AnalyticsClient
},
},
};
private static readonly global::LabelStudio.EndPointSecurityRequirement[] s_ApiAnalyticsKpisRetrieveSecurityRequirements =
private static readonly global::LabelStudio.EndPointSecurityRequirement[] s_GetSecurityRequirements =
new global::LabelStudio.EndPointSecurityRequirement[]
{ s_ApiAnalyticsKpisRetrieveSecurityRequirement0,
{ s_GetSecurityRequirement0,
};
partial void PrepareApiAnalyticsKpisRetrieveArguments(
partial void PrepareGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref global::System.DateTime? end,
ref string kpiKey,
ref string? members,
ref string? projects,
ref bool? segmentByProject,
ref string? segmentByTime,
ref global::LabelStudio.ApiAnalyticsKpisRetrieveSegmentByTime? segmentByTime,
ref bool? segmentByUser,
ref global::System.DateTime? start,
ref string tz);
partial void PrepareApiAnalyticsKpisRetrieveRequest(
partial void PrepareGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::System.DateTime? end,
string kpiKey,
string? members,
string? projects,
bool? segmentByProject,
string? segmentByTime,
global::LabelStudio.ApiAnalyticsKpisRetrieveSegmentByTime? segmentByTime,
bool? segmentByUser,
global::System.DateTime? start,
string tz);
partial void ProcessApiAnalyticsKpisRetrieveResponse(
partial void ProcessGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
partial void ProcessGetResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);

/// <summary>
/// Get KPI data with optional segmentation<br/>
/// ✨ Get KPI data with optional segmentation<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Retrieve data for a specific KPI with support for filtering and segmentation. Can segment by time (hourly, daily, weekly, monthly, yearly), by user, or both (2D matrix). If no segmentation is specified, returns a single total value. Supports filtering by projects, members, and date range. Date filters are interpreted in the specified timezone (required parameter). Maximum 50 projects allowed per request for performance reasons.
/// </summary>
/// <param name="end"></param>
Expand All @@ -73,20 +79,20 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
/// <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::LabelStudio.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::LabelStudio.KPIDetailResponse> ApiAnalyticsKpisRetrieveAsync(
public async global::System.Threading.Tasks.Task<global::LabelStudio.KPIDetailResponse> GetAsync(
string kpiKey,
string tz,
global::System.DateTime? end = default,
string? members = default,
string? projects = default,
bool? segmentByProject = default,
string? segmentByTime = default,
global::LabelStudio.ApiAnalyticsKpisRetrieveSegmentByTime? segmentByTime = default,
bool? segmentByUser = default,
global::System.DateTime? start = default,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await ApiAnalyticsKpisRetrieveAsResponseAsync(
var __response = await GetAsResponseAsync(
kpiKey: kpiKey,
tz: tz,
end: end,
Expand All @@ -103,7 +109,13 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
return __response.Body;
}
/// <summary>
/// Get KPI data with optional segmentation<br/>
/// ✨ Get KPI data with optional segmentation<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Retrieve data for a specific KPI with support for filtering and segmentation. Can segment by time (hourly, daily, weekly, monthly, yearly), by user, or both (2D matrix). If no segmentation is specified, returns a single total value. Supports filtering by projects, members, and date range. Date filters are interpreted in the specified timezone (required parameter). Maximum 50 projects allowed per request for performance reasons.
/// </summary>
/// <param name="end"></param>
Expand All @@ -118,22 +130,22 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
/// <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::LabelStudio.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::LabelStudio.AutoSDKHttpResponse<global::LabelStudio.KPIDetailResponse>> ApiAnalyticsKpisRetrieveAsResponseAsync(
public async global::System.Threading.Tasks.Task<global::LabelStudio.AutoSDKHttpResponse<global::LabelStudio.KPIDetailResponse>> GetAsResponseAsync(
string kpiKey,
string tz,
global::System.DateTime? end = default,
string? members = default,
string? projects = default,
bool? segmentByProject = default,
string? segmentByTime = default,
global::LabelStudio.ApiAnalyticsKpisRetrieveSegmentByTime? segmentByTime = default,
bool? segmentByUser = default,
global::System.DateTime? start = default,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
PrepareApiAnalyticsKpisRetrieveArguments(
PrepareGetArguments(
httpClient: HttpClient,
end: ref end,
kpiKey: ref kpiKey,
Expand All @@ -148,8 +160,8 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(

var __authorizations = global::LabelStudio.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
securityRequirements: s_ApiAnalyticsKpisRetrieveSecurityRequirements,
operationName: "ApiAnalyticsKpisRetrieveAsync");
securityRequirements: s_GetSecurityRequirements,
operationName: "GetAsync");

using var __timeoutCancellationTokenSource = global::LabelStudio.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
Expand All @@ -176,7 +188,7 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
.AddOptionalParameter("members", members)
.AddOptionalParameter("projects", projects)
.AddOptionalParameter("segment_by_project", segmentByProject?.ToString().ToLowerInvariant())
.AddOptionalParameter("segment_by_time", segmentByTime)
.AddOptionalParameter("segment_by_time", segmentByTime?.ToValueString())
.AddOptionalParameter("segment_by_user", segmentByUser?.ToString().ToLowerInvariant())
.AddOptionalParameter("start", start?.ToString("yyyy-MM-ddTHH:mm:ssZ"))
.AddRequiredParameter("tz", tz)
Expand Down Expand Up @@ -218,7 +230,7 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
PrepareApiAnalyticsKpisRetrieveRequest(
PrepareGetRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
end: end,
Expand Down Expand Up @@ -246,8 +258,8 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
await global::LabelStudio.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::LabelStudio.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ApiAnalyticsKpisRetrieve",
methodName: "ApiAnalyticsKpisRetrieveAsync",
operationId: "Get",
methodName: "GetAsync",
pathTemplate: "$\"/api/analytics/kpis/{kpiKey}\"",
httpMethod: "GET",
baseUri: BaseUri,
Expand Down Expand Up @@ -280,8 +292,8 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
await global::LabelStudio.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::LabelStudio.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ApiAnalyticsKpisRetrieve",
methodName: "ApiAnalyticsKpisRetrieveAsync",
operationId: "Get",
methodName: "GetAsync",
pathTemplate: "$\"/api/analytics/kpis/{kpiKey}\"",
httpMethod: "GET",
baseUri: BaseUri,
Expand Down Expand Up @@ -321,8 +333,8 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
await global::LabelStudio.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::LabelStudio.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ApiAnalyticsKpisRetrieve",
methodName: "ApiAnalyticsKpisRetrieveAsync",
operationId: "Get",
methodName: "GetAsync",
pathTemplate: "$\"/api/analytics/kpis/{kpiKey}\"",
httpMethod: "GET",
baseUri: BaseUri,
Expand Down Expand Up @@ -361,16 +373,16 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
ProcessApiAnalyticsKpisRetrieveResponse(
ProcessGetResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
{
await global::LabelStudio.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::LabelStudio.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ApiAnalyticsKpisRetrieve",
methodName: "ApiAnalyticsKpisRetrieveAsync",
operationId: "Get",
methodName: "GetAsync",
pathTemplate: "$\"/api/analytics/kpis/{kpiKey}\"",
httpMethod: "GET",
baseUri: BaseUri,
Expand All @@ -391,8 +403,8 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
await global::LabelStudio.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::LabelStudio.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ApiAnalyticsKpisRetrieve",
methodName: "ApiAnalyticsKpisRetrieveAsync",
operationId: "Get",
methodName: "GetAsync",
pathTemplate: "$\"/api/analytics/kpis/{kpiKey}\"",
httpMethod: "GET",
baseUri: BaseUri,
Expand Down Expand Up @@ -485,7 +497,7 @@ partial void ProcessApiAnalyticsKpisRetrieveResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
ProcessApiAnalyticsKpisRetrieveResponseContent(
ProcessGetResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
Expand Down
Loading