Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade internal DTOs to the latest video OpenAPI spec #89

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,28 @@ namespace StreamVideo.Core.InternalDTO.Events
using System = global::System;

/// <summary>
/// A custom event, this event is used to send custom events to other participants in the call.
/// This event is sent when a call is deleted. Clients receiving this event should leave the call screen
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class CustomVideoEventInternalDTO
internal partial class CallDeletedEventInternalDTO
{
/// <summary>
/// Call object
/// </summary>
[Newtonsoft.Json.JsonProperty("call", Required = Newtonsoft.Json.Required.Always)]
public CallResponseInternalDTO Call { get; set; } = new CallResponseInternalDTO();

[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!;

/// <summary>
/// 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
/// The type of event: "call.deleted" in this case
/// </summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = "custom";

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

}

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 broadcasting has stopped
/// This event is sent when call transcription has failed
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class CallBroadcastingStoppedEventInternalDTO
internal partial class CallTranscriptionFailedEventInternalDTO
{
[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 CallBroadcastingStoppedEventInternalDTO
public System.DateTimeOffset CreatedAt { get; set; } = default!;

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

}

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,45 @@
//----------------------
// <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 event is sent when call transcription is ready
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v10.0.0.0))")]
internal partial class CallTranscriptionReadyEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("call_cid", Required = Newtonsoft.Json.Required.Always)]
public string CallCid { get; set; } = default!;

/// <summary>
/// The call transcription object
/// </summary>
[Newtonsoft.Json.JsonProperty("call_transcription", Required = Newtonsoft.Json.Required.Always)]
public CallTranscriptionInternalDTO CallTranscription { get; set; } = new CallTranscriptionInternalDTO();

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

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

}

}

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,25 +16,22 @@ namespace StreamVideo.Core.InternalDTO.Events
using System = global::System;

/// <summary>
/// This event is sent when call broadcasting has started
/// This event is sent when call transcription 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 CallBroadcastingStartedEventInternalDTO
internal partial class CallTranscriptionStartedEventInternalDTO
{
[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.broadcasting_started" in this case
/// The type of event: "call.transcription_started" in this case
/// </summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = "call.broadcasting_started";
public string Type { get; set; } = "call.transcription_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,14 +16,23 @@ namespace StreamVideo.Core.InternalDTO.Events
using System = global::System;

/// <summary>
/// This is just a placeholder for all client events
/// This event is sent when call transcription 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 WSCallEventInternalDTO
internal partial class CallTranscriptionStoppedEventInternalDTO
{
[Newtonsoft.Json.JsonProperty("call_cid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[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!;

/// <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,45 @@
//----------------------
// <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 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
/// </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
{
[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
/// </summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = "call.closed_caption";

}

}

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 @@ -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.AllowNull)]
public APIErrorInternalDTO? Error { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.Always)]
public APIErrorInternalDTO Error { get; set; } = new APIErrorInternalDTO();

/// <summary>
/// The type of event: "connection.ok" in this case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ internal partial class HealthCheckEventInternalDTO

}

}

}

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.

This file was deleted.

This file was deleted.

Loading
Loading