Skip to content

Instantly share code, notes, and snippets.

@INTERNALINTERFERENCE
Last active July 4, 2023 18:11
Show Gist options
  • Save INTERNALINTERFERENCE/1693d2733ca0e88171f6ede4ce8aa253 to your computer and use it in GitHub Desktop.
Save INTERNALINTERFERENCE/1693d2733ca0e88171f6ede4ce8aa253 to your computer and use it in GitHub Desktop.
cs
[ApiEndpoint( Name, SignatureBase )]
[Title]
[Description]
abstract public class ReportsAPI
{
public const string Name = "reports";
public const string SignatureBase = "/system/report";
static public readonly EndpointSignature Signature =
SignatureBase;
public class TitleAttribute
: TitleLocalizedAttribute
{
public TitleAttribute()
: base(typeof(Resources.ReportsAPITitle))
{
}
}
public class DescriptionAttribute
: DescriptionLocalizedAttribute
{
public DescriptionAttribute()
: base(typeof(Resources.ReportsAPIDescription))
{
}
}
[ApiCommands]
abstract public class Commands
{
[ApiArgument(typeof(ReportTemplatesListArguments), isOptional: true)]
[ApiReturn(typeof(ReportTemplatesListResponse))]
[Title]
[Description]
public const string ReportTemplatesList = "report_templates_list";
[ApiArgument(typeof(ReportTemplatesGetArguments))]
[ApiReturn(typeof(ReportTemplatesGetResponse))]
[Title]
[Description]
public const string ReportTemplatesGet = "report_templates_get";
[ApiArgument(typeof(ReportsGenerateArguments))]
[ApiReturn(typeof(ReportsGenerateResponse))]
[Title]
[Description]
public const string ReportsGenerate = "reports_generate";
}
[ApiEvents]
abstract public class Events
{
[ApiReturn(typeof(ReportGenerateStartedEvent))]
[Title]
[Description]
[EventCategory(EventCategoryType.Audit)]
[EventIsVerbalized]
public const string ReportGenerateStarted = "report_generate_started";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment