feat(api): AgentTask, AgentHistory
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace PARR.API.Contracts.V1
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PARR.API.Contracts.V1
|
||||
{
|
||||
// https://tproger.ru/translations/luchshie-praktiki-razrabotki-rest-api-20-sovetov/
|
||||
|
||||
@@ -112,6 +114,15 @@
|
||||
public const string taskId = "{taskId}";
|
||||
}
|
||||
|
||||
public static class AgentHistory
|
||||
{
|
||||
public const string GetAll = Base + "/agent-histories/";
|
||||
public const string Get = Base + "/agent-histories/" + getParam;
|
||||
public const string Create = Base + "/agent-histories/";
|
||||
|
||||
public const string getParam = "{id}";
|
||||
}
|
||||
|
||||
|
||||
//public static class Layer
|
||||
//{
|
||||
|
||||
22
PARR.API/Contracts/V1/Requests/AgentHistoryRequest.cs
Normal file
22
PARR.API/Contracts/V1/Requests/AgentHistoryRequest.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PARR.DAL.Contracts;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests
|
||||
{
|
||||
public class AgentHistoryRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// ИД шаблона
|
||||
/// </summary>
|
||||
public Guid TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Сообщение
|
||||
/// </summary>
|
||||
public string? Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Уровень истории (1 - Start, 5 - End)
|
||||
/// </summary>
|
||||
public AgentHistoryLevelEnum Level { get; set; }
|
||||
}
|
||||
}
|
||||
10
PARR.API/Contracts/V1/Requests/Queries/AgentHistoryQuery.cs
Normal file
10
PARR.API/Contracts/V1/Requests/Queries/AgentHistoryQuery.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
public class AgentHistoryQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Ид шаблона
|
||||
/// </summary>
|
||||
public Guid? TemplateId { get; set; }
|
||||
}
|
||||
}
|
||||
11
PARR.API/Contracts/V1/Responses/AgentHistoryLevelResponse.cs
Normal file
11
PARR.API/Contracts/V1/Responses/AgentHistoryLevelResponse.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class AgentHistoryLevelResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public required string Description { get; set; }
|
||||
}
|
||||
}
|
||||
15
PARR.API/Contracts/V1/Responses/AgentHistoryResponse.cs
Normal file
15
PARR.API/Contracts/V1/Responses/AgentHistoryResponse.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class AgentHistoryResponse
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset Date { get; set; }
|
||||
|
||||
public string? Message { get; set; }
|
||||
|
||||
public Guid TemplateId { get; set; }
|
||||
|
||||
public AgentHistoryLevelResponse? Level { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,5 +16,7 @@
|
||||
public required string Script { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public Guid TemplateId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user