Skip to content

Commit

Permalink
Update bindings (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
drasticactions authored Jan 10, 2025
1 parent f1fd358 commit 14539fd
Show file tree
Hide file tree
Showing 8 changed files with 441 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ REPOS=(
"https://github.com/echo8/pastesphere.git"
"https://github.com/marukun712/AniBlue.git"
"https://github.com/lexicon-community/lexicon.git"
"https://github.com/icidasset/radical-edward.git"
)

PWD=$(pwd)
Expand Down Expand Up @@ -61,6 +62,8 @@ do
REPO_DIRS+=("$(PWD)/../fflexicons/$target_dir/web/lexicons")
elif [ "$target_dir" == "lexicon-community-lexicon" ]; then
REPO_DIRS+=("$(PWD)/../fflexicons/$target_dir/community/lexicon")
elif [ "$target_dir" == "icidasset-radical-edward" ]; then
REPO_DIRS+=("$(PWD)/../fflexicons/$target_dir/apps/byov/lexicons/ma/tokono/byov")
else
REPO_DIRS+=("$(PWD)/../fflexicons/$target_dir/lexicons")
fi
Expand Down
2 changes: 2 additions & 0 deletions src/FishyFlip/Lexicon/ATObject.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ namespace FishyFlip.Lexicon
[JsonDerivedType(typeof(Com.Atproto.Repo.StrongRef), typeDiscriminator: "com.atproto.repo.strongRef")]
[JsonDerivedType(typeof(Tools.Ozone.Moderation.SubjectStatusView), typeDiscriminator: "tools.ozone.moderation.defs#subjectStatusView")]
[JsonDerivedType(typeof(Com.Atproto.Identity.SubmitPlcOperationInput), typeDiscriminator: "com.atproto.identity.submitPlcOperation#SubmitPlcOperationInput")]
[JsonDerivedType(typeof(Ma.Tokono.Byov.Subscription), typeDiscriminator: "ma.tokono.byov.subscription")]
[JsonDerivedType(typeof(App.Bsky.Unspecced.Suggestion), typeDiscriminator: "app.bsky.unspecced.getTaggedSuggestions#suggestion")]
[JsonDerivedType(typeof(App.Bsky.Richtext.Tag), typeDiscriminator: "app.bsky.richtext.facet#tag")]
[JsonDerivedType(typeof(Tools.Ozone.Communication.TemplateView), typeDiscriminator: "tools.ozone.communication.defs#templateView")]
Expand Down Expand Up @@ -428,6 +429,7 @@ namespace FishyFlip.Lexicon
[JsonDerivedType(typeof(Tools.Ozone.Setting.UpsertOptionInput), typeDiscriminator: "tools.ozone.setting.upsertOption#UpsertOptionInput")]
[JsonDerivedType(typeof(Tools.Ozone.Setting.UpsertOptionOutput), typeDiscriminator: "tools.ozone.setting.upsertOption#UpsertOptionOutput")]
[JsonDerivedType(typeof(My.Skylights.UrlItem), typeDiscriminator: "my.skylights.rel#urlItem")]
[JsonDerivedType(typeof(Ma.Tokono.Byov.Video), typeDiscriminator: "ma.tokono.byov.video")]
[JsonDerivedType(typeof(Tools.Ozone.Moderation.VideoDetails), typeDiscriminator: "tools.ozone.moderation.defs#videoDetails")]
[JsonDerivedType(typeof(App.Bsky.Embed.ViewBlocked), typeDiscriminator: "app.bsky.embed.record#viewBlocked")]
[JsonDerivedType(typeof(App.Bsky.Embed.ViewDetached), typeDiscriminator: "app.bsky.embed.record#viewDetached")]
Expand Down
4 changes: 4 additions & 0 deletions src/FishyFlip/Lexicon/CborExtensions.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,8 @@ public static ATObject ToATObject(this CBORObject obj)
return new Tools.Ozone.Moderation.SubjectStatusView(obj);
case "com.atproto.identity.submitPlcOperation#SubmitPlcOperationInput":
return new Com.Atproto.Identity.SubmitPlcOperationInput(obj);
case "ma.tokono.byov.subscription":
return new Ma.Tokono.Byov.Subscription(obj);
case "app.bsky.unspecced.getTaggedSuggestions#suggestion":
return new App.Bsky.Unspecced.Suggestion(obj);
case "app.bsky.richtext.facet#tag":
Expand Down Expand Up @@ -871,6 +873,8 @@ public static ATObject ToATObject(this CBORObject obj)
return new Tools.Ozone.Setting.UpsertOptionOutput(obj);
case "my.skylights.rel#urlItem":
return new My.Skylights.UrlItem(obj);
case "ma.tokono.byov.video":
return new Ma.Tokono.Byov.Video(obj);
case "tools.ozone.moderation.defs#videoDetails":
return new Tools.Ozone.Moderation.VideoDetails(obj);
case "app.bsky.embed.record#viewBlocked":
Expand Down
249 changes: 249 additions & 0 deletions src/FishyFlip/Lexicon/Ma/Tokono/Byov/ATProtoByovExtensions.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
// <auto-generated />
// This file was generated by FFSourceGen.
// Do not modify this file.

#nullable enable

using FishyFlip.Lexicon.Com.Atproto.Repo;

namespace FishyFlip.Lexicon.Ma.Tokono.Byov
{

/// <summary>
/// Extension methods for ma.tokono.byov.
/// </summary>
public static class ATProtoByovExtensions
{

/// <summary>
/// Create a Subscription record.
/// </summary>
/// <param name="atp"></param>
/// <param name="record"></param>
/// <param name="rkey"></param>
/// <param name="validate"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<CreateRecordOutput?>> CreateSubscriptionAsync(this FishyFlip.ATProtocol atp, Ma.Tokono.Byov.Subscription record, string? rkey = default, bool? validate = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
return atp.CreateRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.subscription", record, rkey, validate, swapCommit, cancellationToken);
}

/// <summary>
/// Create a Subscription record.
/// </summary>
/// <param name="repo"></param>
/// <param name="collection"></param>
/// <param name="record"></param>
/// <param name="rkey"></param>
/// <param name="validate"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<CreateRecordOutput?>> CreateSubscriptionAsync(this FishyFlip.ATProtocol atp, string? subject, DateTime? createdAt = default, string? rkey = default, bool? validate = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
var record = new FishyFlip.Lexicon.Ma.Tokono.Byov.Subscription();
record.CreatedAt = createdAt ?? DateTime.UtcNow;
record.Subject = subject;
return atp.CreateRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.subscription", record, rkey, validate, swapCommit, cancellationToken);
}

/// <summary>
/// Delete a Subscription record.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="rkey"></param>
/// <param name="swapRecord"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<DeleteRecordOutput?>> DeleteSubscriptionAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, string? swapRecord = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
return atp.DeleteRecordAsync(repo, "ma.tokono.byov.subscription", rkey, swapRecord, swapCommit, cancellationToken);
}

/// <summary>
/// Put a Subscription record.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="rkey"></param>
/// <param name="record"></param>
/// <param name="validate"></param>
/// <param name="swapRecord"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<PutRecordOutput?>> PutSubscriptionAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, Ma.Tokono.Byov.Subscription record, bool? validate = default, string? swapRecord = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
return atp.PutRecordAsync(repo, "ma.tokono.byov.subscription", rkey, record, validate, swapRecord, swapCommit, cancellationToken);
}

/// <summary>
/// List Subscription records.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="limit"></param>
/// <param name="cursor"></param>
/// <param name="reverse"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<ListRecordsOutput?>> ListSubscriptionAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, int? limit = 50, string? cursor = default, bool? reverse = default, CancellationToken cancellationToken = default)
{
return atp.ListRecordsAsync(repo, "ma.tokono.byov.subscription", limit, cursor, reverse, cancellationToken);
}

/// <summary>
/// List Subscription records.
/// </summary>
/// <param name="atp"></param>
/// <param name="limit"></param>
/// <param name="cursor"></param>
/// <param name="reverse"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<ListRecordsOutput?>> ListSubscriptionAsync(this FishyFlip.ATProtocol atp, int? limit = 50, string? cursor = default, bool? reverse = default, CancellationToken cancellationToken = default)
{
return atp.ListRecordsAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.subscription", limit, cursor, reverse, cancellationToken);
}

/// <summary>
/// Get Subscription records.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="rkey"></param>
/// <param name="cid"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<GetRecordOutput?>> GetSubscriptionAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, string? cid = default, CancellationToken cancellationToken = default)
{
return atp.GetRecordAsync(repo, "ma.tokono.byov.subscription", rkey, cid, cancellationToken);
}

/// <summary>
/// Get Subscription records.
/// </summary>
/// <param name="atp"></param>
/// <param name="rkey"></param>
/// <param name="cid"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<GetRecordOutput?>> GetSubscriptionAsync(this FishyFlip.ATProtocol atp, string rkey, string? cid = default, CancellationToken cancellationToken = default)
{
return atp.GetRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.subscription", rkey, cid, cancellationToken);
}
/// <summary>
/// Create a Video record.
/// </summary>
/// <param name="atp"></param>
/// <param name="record"></param>
/// <param name="rkey"></param>
/// <param name="validate"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<CreateRecordOutput?>> CreateVideoAsync(this FishyFlip.ATProtocol atp, Ma.Tokono.Byov.Video record, string? rkey = default, bool? validate = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
return atp.CreateRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.video", record, rkey, validate, swapCommit, cancellationToken);
}

/// <summary>
/// Create a Video record.
/// </summary>
/// <param name="repo"></param>
/// <param name="collection"></param>
/// <param name="record"></param>
/// <param name="rkey"></param>
/// <param name="validate"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<CreateRecordOutput?>> CreateVideoAsync(this FishyFlip.ATProtocol atp, string? cid, string? id, string? serviceProvider, string? title, DateTime? createdAt = default, string? rkey = default, bool? validate = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
var record = new FishyFlip.Lexicon.Ma.Tokono.Byov.Video();
record.Cid = cid;
record.CreatedAt = createdAt ?? DateTime.UtcNow;
record.Id = id;
record.ServiceProvider = serviceProvider;
record.Title = title;
return atp.CreateRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.video", record, rkey, validate, swapCommit, cancellationToken);
}

/// <summary>
/// Delete a Video record.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="rkey"></param>
/// <param name="swapRecord"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<DeleteRecordOutput?>> DeleteVideoAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, string? swapRecord = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
return atp.DeleteRecordAsync(repo, "ma.tokono.byov.video", rkey, swapRecord, swapCommit, cancellationToken);
}

/// <summary>
/// Put a Video record.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="rkey"></param>
/// <param name="record"></param>
/// <param name="validate"></param>
/// <param name="swapRecord"></param>
/// <param name="swapCommit"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<PutRecordOutput?>> PutVideoAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, Ma.Tokono.Byov.Video record, bool? validate = default, string? swapRecord = default, string? swapCommit = default, CancellationToken cancellationToken = default)
{
return atp.PutRecordAsync(repo, "ma.tokono.byov.video", rkey, record, validate, swapRecord, swapCommit, cancellationToken);
}

/// <summary>
/// List Video records.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="limit"></param>
/// <param name="cursor"></param>
/// <param name="reverse"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<ListRecordsOutput?>> ListVideoAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, int? limit = 50, string? cursor = default, bool? reverse = default, CancellationToken cancellationToken = default)
{
return atp.ListRecordsAsync(repo, "ma.tokono.byov.video", limit, cursor, reverse, cancellationToken);
}

/// <summary>
/// List Video records.
/// </summary>
/// <param name="atp"></param>
/// <param name="limit"></param>
/// <param name="cursor"></param>
/// <param name="reverse"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<ListRecordsOutput?>> ListVideoAsync(this FishyFlip.ATProtocol atp, int? limit = 50, string? cursor = default, bool? reverse = default, CancellationToken cancellationToken = default)
{
return atp.ListRecordsAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.video", limit, cursor, reverse, cancellationToken);
}

/// <summary>
/// Get Video records.
/// </summary>
/// <param name="atp"></param>
/// <param name="repo"></param>
/// <param name="rkey"></param>
/// <param name="cid"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<GetRecordOutput?>> GetVideoAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, string? cid = default, CancellationToken cancellationToken = default)
{
return atp.GetRecordAsync(repo, "ma.tokono.byov.video", rkey, cid, cancellationToken);
}

/// <summary>
/// Get Video records.
/// </summary>
/// <param name="atp"></param>
/// <param name="rkey"></param>
/// <param name="cid"></param>
/// <param name="cancellationToken"></param>
public static Task<Result<GetRecordOutput?>> GetVideoAsync(this FishyFlip.ATProtocol atp, string rkey, string? cid = default, CancellationToken cancellationToken = default)
{
return atp.GetRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "ma.tokono.byov.video", rkey, cid, cancellationToken);
}
}
}

75 changes: 75 additions & 0 deletions src/FishyFlip/Lexicon/Ma/Tokono/Byov/Subscription.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// <auto-generated />
// This file was generated by FFSourceGen.
// Do not modify this file.

#nullable enable

namespace FishyFlip.Lexicon.Ma.Tokono.Byov
{
/// <summary>
/// A channel subscription.
/// </summary>
public partial class Subscription : ATObject
{

/// <summary>
/// Initializes a new instance of the <see cref="Subscription"/> class.
/// </summary>
/// <param name="subject"></param>
/// <param name="createdAt"></param>
public Subscription(string? subject, DateTime? createdAt = default)
{
this.CreatedAt = createdAt ?? DateTime.UtcNow;
this.Subject = subject;
}


/// <summary>
/// Initializes a new instance of the <see cref="Subscription"/> class.
/// </summary>
public Subscription()
{
}


/// <summary>
/// Initializes a new instance of the <see cref="Subscription"/> class.
/// </summary>
public Subscription(CBORObject obj)
{
if (obj["createdAt"] is not null) this.CreatedAt = obj["createdAt"].ToDateTime();
if (obj["subject"] is not null) this.Subject = obj["subject"].AsString();
}

/// <summary>
/// Gets or sets the createdAt.
/// </summary>
[JsonPropertyName("createdAt")]
public DateTime? CreatedAt { get; set; } = default;

/// <summary>
/// Gets or sets the subject.
/// </summary>
[JsonPropertyName("subject")]
public string? Subject { get; set; }

/// <summary>
/// Gets the ATRecord Type.
/// </summary>
[JsonPropertyName("$type")]
public override string Type => "ma.tokono.byov.subscription";

public const string RecordType = "ma.tokono.byov.subscription";

public override string ToJson()
{
return JsonSerializer.Serialize<Ma.Tokono.Byov.Subscription>(this, (JsonTypeInfo<Ma.Tokono.Byov.Subscription>)SourceGenerationContext.Default.MaTokonoByovSubscription)!;
}

public static Subscription FromJson(string json)
{
return JsonSerializer.Deserialize<Ma.Tokono.Byov.Subscription>(json, (JsonTypeInfo<Ma.Tokono.Byov.Subscription>)SourceGenerationContext.Default.MaTokonoByovSubscription)!;
}
}
}

Loading

0 comments on commit 14539fd

Please sign in to comment.