/* Options:
Date: 2026-09-16 17:01:03
Version: 10.05
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://testapi.bokamera.se
//GlobalNamespace:
//MakePartial: True
//MakeVirtual: True
//MakeInternal: False
//MakeDataContractsExtensible: False
//AddNullableAnnotations: True
//AddReturnMarker: True
//AddDescriptionAsComments: True
//AddDataContractAttributes: False
//AddIndexesToDataMembers: False
//AddGeneratedCodeAttributes: False
//AddResponseStatus: False
//AddImplicitVersion:
//InitializeCollections: False
//ExportValueTypes: False
IncludeTypes: SuperAdminAssistantUsageQuery.*
//ExcludeTypes:
//AddNamespaces:
//AddDefaultXmlNamespace: http://schemas.servicestack.net/types
*/
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using System.Globalization;
using ServiceStack.Data;
using System.Net;
using System.Net.Http.Headers;
using BokaMera.API.ServiceModel.Dtos;
namespace BokaMera.API.ServiceModel.Dtos
{
public partial class AssistantUsageMeter
{
///
///Tokens consumed within the current rolling window.
///
[ApiMember(Description="Tokens consumed within the current rolling window.")]
public virtual long TokensUsed { get; set; }
///
///The company's token limit for the window. Zero or less means no cap is applied.
///
[ApiMember(Description="The company's token limit for the window. Zero or less means no cap is applied.")]
public virtual int TokenLimit { get; set; }
///
///Tokens remaining before the limit is reached (never negative).
///
[ApiMember(Description="Tokens remaining before the limit is reached (never negative).")]
public virtual long TokensRemaining { get; set; }
///
///Share of the limit consumed, as a percentage. Zero when no cap is applied.
///
[ApiMember(Description="Share of the limit consumed, as a percentage. Zero when no cap is applied.")]
public virtual double PercentUsed { get; set; }
///
///True while the company is still below its token limit.
///
[ApiMember(Description="True while the company is still below its token limit.")]
public virtual bool IsWithinBudget { get; set; }
}
public partial class SuperAdminAssistantUsage
{
///
///The company the usage applies to.
///
[ApiMember(Description="The company the usage applies to.")]
public virtual Guid CompanyId { get; set; }
///
///The company's name.
///
[ApiMember(Description="The company's name.")]
public virtual string CompanyName { get; set; }
///
///Token budget for the admin portal AI assistant. Null when it could not be read.
///
[ApiMember(Description="Token budget for the admin portal AI assistant. Null when it could not be read.")]
public virtual AssistantUsageMeter? AiChat { get; set; }
///
///Token budget for the public MCP server. Null when it could not be read.
///
[ApiMember(Description="Token budget for the public MCP server. Null when it could not be read.")]
public virtual AssistantUsageMeter? Mcp { get; set; }
}
[Route("/superadmin/assistant/usage", "GET")]
[ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
[ApiResponse(Description="You have too low privileges to call this service", StatusCode=403)]
[ValidateRequest("IsAuthenticated")]
public partial class SuperAdminAssistantUsageQuery
: IReturn
{
///
///Filter on company name. Case-insensitive substring match.
///
[ApiMember(DataType="string", Description="Filter on company name. Case-insensitive substring match.", ParameterType="query")]
public virtual string? Search { get; set; }
///
///Return only this company. Takes precedence over Search when both are set.
///
[ApiMember(DataType="string", Description="Return only this company. Takes precedence over Search when both are set.", ParameterType="query")]
public virtual Guid? CompanyId { get; set; }
///
///Number of companies to skip.
///
[ApiMember(DataType="integer", Description="Number of companies to skip.", ParameterType="query")]
public virtual int? Skip { get; set; }
///
///Number of companies to return. Capped server-side.
///
[ApiMember(DataType="integer", Description="Number of companies to return. Capped server-side.", ParameterType="query")]
public virtual int? Take { get; set; }
}
public partial class SuperAdminAssistantUsageQueryResponse
{
///
///Number of companies skipped.
///
[ApiMember(Description="Number of companies skipped.")]
public virtual int Offset { get; set; }
///
///Total number of companies matching the filter.
///
[ApiMember(Description="Total number of companies matching the filter.")]
public virtual int Total { get; set; }
///
///Length of the rolling usage window, in days.
///
[ApiMember(Description="Length of the rolling usage window, in days.")]
public virtual int WindowDays { get; set; }
///
///Usage for the requested page of companies.
///
[ApiMember(Description="Usage for the requested page of companies.")]
public virtual List Results { get; set; } = [];
public virtual ResponseStatus ResponseStatus { get; set; }
}
}