Skip to content

Commit

Permalink
Merge pull request #98 from GetStream/feature/update-dtos-2
Browse files Browse the repository at this point in the history
Update internal DTOs based on the latest OpenAPI spec
  • Loading branch information
sierpinskid authored Apr 16, 2024
2 parents b2a371c + 3714e7e commit e3259eb
Show file tree
Hide file tree
Showing 164 changed files with 3,271 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,25 @@ namespace StreamVideo.Core.InternalDTO.Events
using System = global::System;

/// <summary>
/// This event is sent when call transcription has started
/// This event is sent when call broadcasting has started
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class CallTranscriptionStartedEventInternalDTO
internal partial class CallBroadcastingStartedEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("call_cid", Required = Newtonsoft.Json.Required.Always)]
public string CallCid { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Always)]
public System.DateTimeOffset CreatedAt { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("hls_playlist_url", Required = Newtonsoft.Json.Required.Always)]
public string HlsPlaylistUrl { get; set; } = default!;

/// <summary>
/// The type of event: "call.transcription_started" in this case
/// The type of event: "call.broadcasting_started" in this case
/// </summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = "call.transcription_started";
public string Type { get; set; } = "call.broadcasting_started";

}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ namespace StreamVideo.Core.InternalDTO.Events
using System = global::System;

/// <summary>
/// This event is sent when call transcription has failed
/// This event is sent when call broadcasting has stopped
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class CallTranscriptionFailedEventInternalDTO
internal partial class CallBroadcastingStoppedEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("call_cid", Required = Newtonsoft.Json.Required.Always)]
public string CallCid { get; set; } = default!;
Expand All @@ -28,10 +28,10 @@ internal partial class CallTranscriptionFailedEventInternalDTO
public System.DateTimeOffset CreatedAt { get; set; } = default!;

/// <summary>
/// The type of event: "call.transcription_failed" in this case
/// The type of event: "call.broadcasting_stopped" in this case
/// </summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = "call.transcription_failed";
public string Type { get; set; } = "call.broadcasting_stopped";

}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------

#nullable enable


using StreamVideo.Core.InternalDTO.Requests;
using StreamVideo.Core.InternalDTO.Responses;
using StreamVideo.Core.InternalDTO.Models;

namespace StreamVideo.Core.InternalDTO.Events
{
using System = global::System;

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class CallEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)]
public string Description { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("end_timestamp", Required = Newtonsoft.Json.Required.Always)]
public long EndTimestamp { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Always)]
public int Severity { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.Always)]
public int Timestamp { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = default!;

}

}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ internal partial class ConnectionErrorEventInternalDTO
/// <summary>
/// The error that caused the connection to fail
/// </summary>
[Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.Always)]
public APIErrorInternalDTO Error { get; set; } = new APIErrorInternalDTO();
[Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.AllowNull)]
public APIErrorInternalDTO? Error { get; set; } = default!;

/// <summary>
/// The type of event: "connection.ok" in this case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,31 @@ namespace StreamVideo.Core.InternalDTO.Events
using System = global::System;

/// <summary>
/// This event is sent when closed captions are being sent in a call, clients should use this to show the closed captions in the call screen
/// A custom event, this event is used to send custom events to other participants in the call.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class ClosedCaptionEventInternalDTO
internal partial class CustomVideoEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("call_cid", Required = Newtonsoft.Json.Required.Always)]
public string CallCid { get; set; } = default!;

/// <summary>
/// The closed caption object
/// </summary>
[Newtonsoft.Json.JsonProperty("closed_caption", Required = Newtonsoft.Json.Required.Always)]
public CallClosedCaptionInternalDTO ClosedCaption { get; set; } = new CallClosedCaptionInternalDTO();

[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Always)]
public System.DateTimeOffset CreatedAt { get; set; } = default!;

/// <summary>
/// The type of event: "call.closed_caption" in this case
/// Custom data for this object
/// </summary>
[Newtonsoft.Json.JsonProperty("custom", Required = Newtonsoft.Json.Required.Always)]
public System.Collections.Generic.Dictionary<string, object> Custom { get; set; } = new System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// The type of event, "custom" in this case
/// </summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = "call.closed_caption";
public string Type { get; set; } = "custom";

[Newtonsoft.Json.JsonProperty("user", Required = Newtonsoft.Json.Required.Always)]
public UserResponseInternalDTO User { get; set; } = new UserResponseInternalDTO();

}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ internal partial class HealthCheckEventInternalDTO

}

}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,14 @@ namespace StreamVideo.Core.InternalDTO.Events
using System = global::System;

/// <summary>
/// This event is sent when call transcription has stopped
/// This is just a placeholder for all client events
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class CallTranscriptionStoppedEventInternalDTO
internal partial class WSCallEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("call_cid", Required = Newtonsoft.Json.Required.Always)]
[Newtonsoft.Json.JsonProperty("call_cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string CallCid { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Always)]
public System.DateTimeOffset CreatedAt { get; set; } = default!;

/// <summary>
/// The type of event: "call.transcription_stopped" in this case
/// </summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = "call.transcription_stopped";

}

}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------

#nullable enable


using StreamVideo.Core.InternalDTO.Requests;
using StreamVideo.Core.InternalDTO.Responses;
using StreamVideo.Core.InternalDTO.Models;

namespace StreamVideo.Core.InternalDTO.Events
{
using System = global::System;

/// <summary>
/// This is just a placeholder for all client events
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class WSClientEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("connection_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ConnectionId { get; set; } = default!;

}

}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------

#nullable enable


using StreamVideo.Core.InternalDTO.Requests;
using StreamVideo.Core.InternalDTO.Responses;
using StreamVideo.Core.InternalDTO.Events;

namespace StreamVideo.Core.InternalDTO.Models
{
using System = global::System;

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class APNSInternalDTO
{
[Newtonsoft.Json.JsonProperty("body", Required = Newtonsoft.Json.Required.Always)]
public string Body { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Always)]
public string Title { get; set; } = default!;

}

}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ internal partial class AudioSettingsInternalDTO
[Newtonsoft.Json.JsonProperty("mic_default_on", Required = Newtonsoft.Json.Required.Always)]
public bool MicDefaultOn { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("noise_cancellation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public NoiseCancellationSettingsInternalDTO NoiseCancellation { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("opus_dtx_enabled", Required = Newtonsoft.Json.Required.Always)]
public bool OpusDtxEnabled { get; set; } = default!;

Expand Down
Loading

0 comments on commit e3259eb

Please sign in to comment.