Skip to content

Commit d80c2c5

Browse files
committed
Add Polls-related OpenAPI generated DTOs from the latest spec
1 parent 4406a17 commit d80c2c5

8 files changed

Lines changed: 177 additions & 6 deletions

Assets/Plugins/StreamChat/Core/InternalDTO/Events/PollClosedEventInternalDTO.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,48 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16+
/// <summary>
17+
/// Emitted when a poll is closed.
18+
/// </summary>
1619
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1720
internal partial class PollClosedEventInternalDTO
1821
{
22+
[Newtonsoft.Json.JsonProperty("activity_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public string ActivityId { get; set; }
24+
25+
/// <summary>
26+
/// The CID of the channel containing the poll
27+
/// </summary>
1928
[Newtonsoft.Json.JsonProperty("cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2029
public string Cid { get; set; }
2130

31+
/// <summary>
32+
/// Date/time of creation
33+
/// </summary>
2234
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2335
public System.DateTimeOffset CreatedAt { get; set; }
2436

37+
[Newtonsoft.Json.JsonProperty("custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
38+
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; } = new System.Collections.Generic.Dictionary<string, object>();
39+
40+
/// <summary>
41+
/// The ID of the message containing the poll
42+
/// </summary>
43+
[Newtonsoft.Json.JsonProperty("message_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
44+
public string MessageId { get; set; }
45+
46+
/// <summary>
47+
/// The poll object which was closed
48+
/// </summary>
2549
[Newtonsoft.Json.JsonProperty("poll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2650
public PollResponseDataInternalDTO Poll { get; set; } = new PollResponseDataInternalDTO();
2751

2852
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2953
public System.DateTimeOffset? ReceivedAt { get; set; }
3054

55+
/// <summary>
56+
/// The type of event: "poll.closed" in this case
57+
/// </summary>
3158
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3259
public string Type { get; set; } = "poll.closed";
3360

Assets/Plugins/StreamChat/Core/InternalDTO/Events/PollDeletedEventInternalDTO.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,48 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16+
/// <summary>
17+
/// Emitted when a poll is deleted.
18+
/// </summary>
1619
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1720
internal partial class PollDeletedEventInternalDTO
1821
{
22+
[Newtonsoft.Json.JsonProperty("activity_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public string ActivityId { get; set; }
24+
25+
/// <summary>
26+
/// The CID of the channel containing the poll
27+
/// </summary>
1928
[Newtonsoft.Json.JsonProperty("cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2029
public string Cid { get; set; }
2130

31+
/// <summary>
32+
/// Date/time of creation
33+
/// </summary>
2234
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2335
public System.DateTimeOffset CreatedAt { get; set; }
2436

37+
[Newtonsoft.Json.JsonProperty("custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
38+
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; } = new System.Collections.Generic.Dictionary<string, object>();
39+
40+
/// <summary>
41+
/// The ID of the message containing the poll
42+
/// </summary>
43+
[Newtonsoft.Json.JsonProperty("message_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
44+
public string MessageId { get; set; }
45+
46+
/// <summary>
47+
/// The poll object which was deleted
48+
/// </summary>
2549
[Newtonsoft.Json.JsonProperty("poll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2650
public PollResponseDataInternalDTO Poll { get; set; } = new PollResponseDataInternalDTO();
2751

2852
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2953
public System.DateTimeOffset? ReceivedAt { get; set; }
3054

55+
/// <summary>
56+
/// The type of event: "poll.deleted" in this case
57+
/// </summary>
3158
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3259
public string Type { get; set; } = "poll.deleted";
3360

Assets/Plugins/StreamChat/Core/InternalDTO/Events/PollUpdatedEventInternalDTO.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,48 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16+
/// <summary>
17+
/// Emitted when a poll is updated.
18+
/// </summary>
1619
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1720
internal partial class PollUpdatedEventInternalDTO
1821
{
22+
[Newtonsoft.Json.JsonProperty("activity_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public string ActivityId { get; set; }
24+
25+
/// <summary>
26+
/// The CID of the channel containing the poll
27+
/// </summary>
1928
[Newtonsoft.Json.JsonProperty("cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2029
public string Cid { get; set; }
2130

31+
/// <summary>
32+
/// Date/time of creation
33+
/// </summary>
2234
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2335
public System.DateTimeOffset CreatedAt { get; set; }
2436

37+
[Newtonsoft.Json.JsonProperty("custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
38+
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; } = new System.Collections.Generic.Dictionary<string, object>();
39+
40+
/// <summary>
41+
/// The ID of the message containing the poll
42+
/// </summary>
43+
[Newtonsoft.Json.JsonProperty("message_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
44+
public string MessageId { get; set; }
45+
46+
/// <summary>
47+
/// The poll object which was updated
48+
/// </summary>
2549
[Newtonsoft.Json.JsonProperty("poll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2650
public PollResponseDataInternalDTO Poll { get; set; } = new PollResponseDataInternalDTO();
2751

2852
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2953
public System.DateTimeOffset? ReceivedAt { get; set; }
3054

55+
/// <summary>
56+
/// The type of event: "poll.updated" in this case
57+
/// </summary>
3158
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3259
public string Type { get; set; } = "poll.updated";
3360

Assets/Plugins/StreamChat/Core/InternalDTO/Events/PollVoteCastedEventInternalDTO.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,54 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16+
/// <summary>
17+
/// Emitted when a vote is cast on a poll.
18+
/// </summary>
1619
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1720
internal partial class PollVoteCastedEventInternalDTO
1821
{
22+
[Newtonsoft.Json.JsonProperty("activity_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public string ActivityId { get; set; }
24+
25+
/// <summary>
26+
/// The CID of the channel containing the poll
27+
/// </summary>
1928
[Newtonsoft.Json.JsonProperty("cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2029
public string Cid { get; set; }
2130

31+
/// <summary>
32+
/// Date/time of creation
33+
/// </summary>
2234
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2335
public System.DateTimeOffset CreatedAt { get; set; }
2436

37+
[Newtonsoft.Json.JsonProperty("custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
38+
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; } = new System.Collections.Generic.Dictionary<string, object>();
39+
40+
/// <summary>
41+
/// The ID of the message containing the poll
42+
/// </summary>
43+
[Newtonsoft.Json.JsonProperty("message_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
44+
public string MessageId { get; set; }
45+
46+
/// <summary>
47+
/// The poll object
48+
/// </summary>
2549
[Newtonsoft.Json.JsonProperty("poll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2650
public PollResponseDataInternalDTO Poll { get; set; } = new PollResponseDataInternalDTO();
2751

52+
/// <summary>
53+
/// The vote that was cast
54+
/// </summary>
2855
[Newtonsoft.Json.JsonProperty("poll_vote", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2956
public PollVoteResponseDataInternalDTO PollVote { get; set; }
3057

3158
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3259
public System.DateTimeOffset? ReceivedAt { get; set; }
3360

61+
/// <summary>
62+
/// The type of event: "poll.vote_casted" in this case
63+
/// </summary>
3464
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3565
public string Type { get; set; } = "poll.vote_casted";
3666

Assets/Plugins/StreamChat/Core/InternalDTO/Events/PollVoteChangedEventInternalDTO.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,54 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16+
/// <summary>
17+
/// Emitted when a vote on a poll is changed.
18+
/// </summary>
1619
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1720
internal partial class PollVoteChangedEventInternalDTO
1821
{
22+
[Newtonsoft.Json.JsonProperty("activity_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public string ActivityId { get; set; }
24+
25+
/// <summary>
26+
/// The CID of the channel containing the poll
27+
/// </summary>
1928
[Newtonsoft.Json.JsonProperty("cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2029
public string Cid { get; set; }
2130

31+
/// <summary>
32+
/// Date/time of creation
33+
/// </summary>
2234
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2335
public System.DateTimeOffset CreatedAt { get; set; }
2436

37+
[Newtonsoft.Json.JsonProperty("custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
38+
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; } = new System.Collections.Generic.Dictionary<string, object>();
39+
40+
/// <summary>
41+
/// The ID of the message containing the poll
42+
/// </summary>
43+
[Newtonsoft.Json.JsonProperty("message_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
44+
public string MessageId { get; set; }
45+
46+
/// <summary>
47+
/// The poll object
48+
/// </summary>
2549
[Newtonsoft.Json.JsonProperty("poll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2650
public PollResponseDataInternalDTO Poll { get; set; } = new PollResponseDataInternalDTO();
2751

52+
/// <summary>
53+
/// The updated vote
54+
/// </summary>
2855
[Newtonsoft.Json.JsonProperty("poll_vote", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2956
public PollVoteResponseDataInternalDTO PollVote { get; set; }
3057

3158
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3259
public System.DateTimeOffset? ReceivedAt { get; set; }
3360

61+
/// <summary>
62+
/// The type of event: "poll.vote_changed" in this case
63+
/// </summary>
3464
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3565
public string Type { get; set; } = "poll.vote_changed";
3666

Assets/Plugins/StreamChat/Core/InternalDTO/Events/PollVoteRemovedEventInternalDTO.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,54 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16+
/// <summary>
17+
/// Emitted when a vote is removed from a poll.
18+
/// </summary>
1619
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1720
internal partial class PollVoteRemovedEventInternalDTO
1821
{
22+
[Newtonsoft.Json.JsonProperty("activity_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public string ActivityId { get; set; }
24+
25+
/// <summary>
26+
/// The CID of the channel containing the poll
27+
/// </summary>
1928
[Newtonsoft.Json.JsonProperty("cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2029
public string Cid { get; set; }
2130

31+
/// <summary>
32+
/// Date/time of creation
33+
/// </summary>
2234
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2335
public System.DateTimeOffset CreatedAt { get; set; }
2436

37+
[Newtonsoft.Json.JsonProperty("custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
38+
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; } = new System.Collections.Generic.Dictionary<string, object>();
39+
40+
/// <summary>
41+
/// The ID of the message containing the poll
42+
/// </summary>
43+
[Newtonsoft.Json.JsonProperty("message_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
44+
public string MessageId { get; set; }
45+
46+
/// <summary>
47+
/// The poll object
48+
/// </summary>
2549
[Newtonsoft.Json.JsonProperty("poll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2650
public PollResponseDataInternalDTO Poll { get; set; } = new PollResponseDataInternalDTO();
2751

52+
/// <summary>
53+
/// The vote that was removed
54+
/// </summary>
2855
[Newtonsoft.Json.JsonProperty("poll_vote", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2956
public PollVoteResponseDataInternalDTO PollVote { get; set; }
3057

3158
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3259
public System.DateTimeOffset? ReceivedAt { get; set; }
3360

61+
/// <summary>
62+
/// The type of event: "poll.vote_removed" in this case
63+
/// </summary>
3464
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3565
public string Type { get; set; } = "poll.vote_removed";
3666

Assets/Plugins/StreamChat/Core/InternalDTO/Requests/CreatePollOptionRequestInternalDTO.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ internal partial class CreatePollOptionRequestInternalDTO
1919
[Newtonsoft.Json.JsonProperty("Custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2020
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; }
2121

22-
[Newtonsoft.Json.JsonProperty("position", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23-
public int? Position { get; set; }
24-
2522
/// <summary>
2623
/// Option text
2724
/// </summary>

0 commit comments

Comments
 (0)