Skip to content

Commit 37c2da9

Browse files
authored
Merge pull request SciSharp#1360 from danielyuan476-ctrl/features/AII-836
AII-836
2 parents df87b43 + e40ba64 commit 37c2da9

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

src/Plugins/BotSharp.Plugin.Membase/Interfaces/IMembaseApi.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,8 @@ public interface IMembaseApi
5858

5959
[Post("/graph/{graphId}/pgt-definitions/{definitionId}/validate")]
6060
Task<PgtValidationResponse> ValidatePgtDefinitionAsync(string graphId, string definitionId, [Body] PgtValidationRequest request);
61+
62+
[Post("/graph/{graphId}/pgt-external/{correlationId}/complete")]
63+
Task<PgtExternalCompleteResponse> CompletePgtExternalAsync(string graphId, string correlationId);
6164
#endregion
6265
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using System.Text.Json.Serialization;
2+
3+
namespace BotSharp.Plugin.Membase.Models;
4+
5+
public class PgtExternalCompleteResponse
6+
{
7+
public PgtExternalTask Task { get; set; } = new();
8+
9+
[JsonPropertyName("already_completed")]
10+
public bool AlreadyCompleted { get; set; }
11+
}
12+
13+
public class PgtExternalTask
14+
{
15+
public string TaskId { get; set; } = string.Empty;
16+
public string RunId { get; set; } = string.Empty;
17+
public string GraphId { get; set; } = string.Empty;
18+
public string NodeId { get; set; } = string.Empty;
19+
public string TaskType { get; set; } = string.Empty;
20+
public string CorrelationId { get; set; } = string.Empty;
21+
public string Status { get; set; } = string.Empty;
22+
23+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
24+
public Dictionary<string, object>? Request { get; set; }
25+
26+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
27+
public Dictionary<string, object>? Response { get; set; }
28+
29+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
30+
public object? Error { get; set; }
31+
32+
public DateTime CreatedAt { get; set; }
33+
public DateTime UpdatedAt { get; set; }
34+
35+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
36+
public DateTime? CompletedAt { get; set; }
37+
38+
public long NotBefore { get; set; }
39+
40+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
41+
public DateTime? ClaimedAt { get; set; }
42+
}

0 commit comments

Comments
 (0)