Skip to content
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
34 changes: 33 additions & 1 deletion src/FishyFlip/Lexicon/App/Bsky/Actor/StatusView.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public partial class StatusView : ATObject, ICBOREncodable<StatusView>, IJsonEnc
/// <summary>
/// Initializes a new instance of the <see cref="StatusView"/> class.
/// </summary>
/// <param name="uri"></param>
/// <param name="cid"></param>
/// <param name="status">The status for the account.
/// <br/> Known Values: <br/>
/// live - Advertises an account as currently offering live content. <br/>
Expand All @@ -24,13 +26,17 @@ public partial class StatusView : ATObject, ICBOREncodable<StatusView>, IJsonEnc
/// </param>
/// <param name="expiresAt">The date when this status will expire. The application might choose to no longer return the status after expiration.</param>
/// <param name="isActive">True if the status is not expired, false if it is expired. Only present if expiration was set.</param>
public StatusView(string status = default, ATObject record = default, FishyFlip.Lexicon.App.Bsky.Embed.ViewExternal? embed = default, DateTime? expiresAt = default, bool? isActive = default)
/// <param name="isDisabled">True if the user's go-live access has been disabled by a moderator, false otherwise.</param>
public StatusView(FishyFlip.Models.ATUri? uri = default, string? cid = default, string status = default, ATObject record = default, FishyFlip.Lexicon.App.Bsky.Embed.ViewExternal? embed = default, DateTime? expiresAt = default, bool? isActive = default, bool? isDisabled = default)
{
this.Uri = uri;
this.Cid = cid;
this.Status = status;
this.Record = record;
this.Embed = embed;
this.ExpiresAt = expiresAt;
this.IsActive = isActive;
this.IsDisabled = isDisabled;
this.Type = "app.bsky.actor.defs#statusView";
}

Expand All @@ -49,14 +55,32 @@ public StatusView()
/// </summary>
public StatusView(CBORObject obj)
{
if (obj["uri"] is not null) this.Uri = obj["uri"].ToATUri();
if (obj["cid"] is not null) this.Cid = obj["cid"].AsString();
if (obj["status"] is not null) this.Status = obj["status"].AsString();
if (obj["record"] is not null) this.Record = obj["record"].ToATObject();
if (obj["embed"] is not null) this.Embed = new FishyFlip.Lexicon.App.Bsky.Embed.ViewExternal(obj["embed"]);
if (obj["expiresAt"] is not null) this.ExpiresAt = obj["expiresAt"].ToDateTime();
if (obj["isActive"] is not null) this.IsActive = obj["isActive"].AsBoolean();
if (obj["isDisabled"] is not null) this.IsDisabled = obj["isDisabled"].AsBoolean();
if (obj["$type"] is not null) this.Type = obj["$type"].AsString();
}

/// <summary>
/// Gets or sets the uri.
/// </summary>
[JsonPropertyName("uri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(FishyFlip.Tools.Json.ATUriJsonConverter))]
public FishyFlip.Models.ATUri? Uri { get; set; }

/// <summary>
/// Gets or sets the cid.
/// </summary>
[JsonPropertyName("cid")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Cid { get; set; }

/// <summary>
/// Gets or sets the status.
/// <br/> The status for the account.
Expand Down Expand Up @@ -100,6 +124,14 @@ public StatusView(CBORObject obj)
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? IsActive { get; set; }

/// <summary>
/// Gets or sets the isDisabled.
/// <br/> True if the user's go-live access has been disabled by a moderator, false otherwise.
/// </summary>
[JsonPropertyName("isDisabled")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? IsDisabled { get; set; }

public const string RecordType = "app.bsky.actor.defs#statusView";

public override string ToJson()
Expand Down
13 changes: 12 additions & 1 deletion src/FishyFlip/Lexicon/App/Bsky/Ageassurance/ConfigRegion.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public partial class ConfigRegion : ATObject, ICBOREncodable<ConfigRegion>, IJso
/// </summary>
/// <param name="countryCode">The ISO 3166-1 alpha-2 country code this configuration applies to.</param>
/// <param name="regionCode">The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country.</param>
/// <param name="minAccessAge">The minimum age (as a whole integer) required to use Bluesky in this region.</param>
/// <param name="rules">The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item.
/// <br/> Union Types: <br/>
/// <see cref="FishyFlip.Lexicon.App.Bsky.Ageassurance.ConfigRegionRuleDefault"/> (app.bsky.ageassurance.defs#configRegionRuleDefault) <br/>
Expand All @@ -28,10 +29,11 @@ public partial class ConfigRegion : ATObject, ICBOREncodable<ConfigRegion>, IJso
/// <see cref="FishyFlip.Lexicon.App.Bsky.Ageassurance.ConfigRegionRuleIfAccountNewerThan"/> (app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan) <br/>
/// <see cref="FishyFlip.Lexicon.App.Bsky.Ageassurance.ConfigRegionRuleIfAccountOlderThan"/> (app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan) <br/>
/// </param>
public ConfigRegion(string countryCode = default, string? regionCode = default, List<ATObject> rules = default)
public ConfigRegion(string countryCode = default, string? regionCode = default, long minAccessAge = default, List<ATObject> rules = default)
{
this.CountryCode = countryCode;
this.RegionCode = regionCode;
this.MinAccessAge = minAccessAge;
this.Rules = rules;
this.Type = "app.bsky.ageassurance.defs#configRegion";
}
Expand All @@ -53,6 +55,7 @@ public ConfigRegion(CBORObject obj)
{
if (obj["countryCode"] is not null) this.CountryCode = obj["countryCode"].AsString();
if (obj["regionCode"] is not null) this.RegionCode = obj["regionCode"].AsString();
if (obj["minAccessAge"] is not null) this.MinAccessAge = obj["minAccessAge"].AsInt64Value();
if (obj["rules"] is not null) this.Rules = obj["rules"].Values.Select(n =>n.ToATObject()).ToList();
if (obj["$type"] is not null) this.Type = obj["$type"].AsString();
}
Expand All @@ -73,6 +76,14 @@ public ConfigRegion(CBORObject obj)
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? RegionCode { get; set; }

/// <summary>
/// Gets or sets the minAccessAge.
/// <br/> The minimum age (as a whole integer) required to use Bluesky in this region.
/// </summary>
[JsonPropertyName("minAccessAge")]
[JsonRequired]
public long MinAccessAge { get; set; }

/// <summary>
/// Gets or sets the rules.
/// <br/> The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ public partial class GetSuggestedUsersOutput : ATObject, ICBOREncodable<GetSugge
/// Initializes a new instance of the <see cref="GetSuggestedUsersOutput"/> class.
/// </summary>
/// <param name="actors"></param>
public GetSuggestedUsersOutput(List<FishyFlip.Lexicon.App.Bsky.Actor.ProfileView> actors = default)
/// <param name="recId">Snowflake for this recommendation, use when submitting recommendation events.</param>
public GetSuggestedUsersOutput(List<FishyFlip.Lexicon.App.Bsky.Actor.ProfileView> actors = default, long? recId = default)
{
this.Actors = actors;
this.RecId = recId;
this.Type = "app.bsky.unspecced.getSuggestedUsers#GetSuggestedUsersOutput";
}

Expand All @@ -36,6 +38,7 @@ public GetSuggestedUsersOutput()
public GetSuggestedUsersOutput(CBORObject obj)
{
if (obj["actors"] is not null) this.Actors = obj["actors"].Values.Select(n =>new FishyFlip.Lexicon.App.Bsky.Actor.ProfileView(n)).ToList();
if (obj["recId"] is not null) this.RecId = obj["recId"].AsInt64Value();
if (obj["$type"] is not null) this.Type = obj["$type"].AsString();
}

Expand All @@ -46,6 +49,14 @@ public GetSuggestedUsersOutput(CBORObject obj)
[JsonRequired]
public List<FishyFlip.Lexicon.App.Bsky.Actor.ProfileView> Actors { get; set; }

/// <summary>
/// Gets or sets the recId.
/// <br/> Snowflake for this recommendation, use when submitting recommendation events.
/// </summary>
[JsonPropertyName("recId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public long? RecId { get; set; }

public const string RecordType = "app.bsky.unspecced.getSuggestedUsers#GetSuggestedUsersOutput";

public override string ToJson()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ public partial class GetSuggestedUsersSkeletonOutput : ATObject, ICBOREncodable<
/// Initializes a new instance of the <see cref="GetSuggestedUsersSkeletonOutput"/> class.
/// </summary>
/// <param name="dids"></param>
public GetSuggestedUsersSkeletonOutput(List<FishyFlip.Models.ATDid> dids = default)
/// <param name="recId">Snowflake for this recommendation, use when submitting recommendation events.</param>
public GetSuggestedUsersSkeletonOutput(List<FishyFlip.Models.ATDid> dids = default, long? recId = default)
{
this.Dids = dids;
this.RecId = recId;
this.Type = "app.bsky.unspecced.getSuggestedUsersSkeleton#GetSuggestedUsersSkeletonOutput";
}

Expand All @@ -36,6 +38,7 @@ public GetSuggestedUsersSkeletonOutput()
public GetSuggestedUsersSkeletonOutput(CBORObject obj)
{
if (obj["dids"] is not null) this.Dids = obj["dids"].Values.Select(n =>n.ToATDid()!).ToList();
if (obj["recId"] is not null) this.RecId = obj["recId"].AsInt64Value();
if (obj["$type"] is not null) this.Type = obj["$type"].AsString();
}

Expand All @@ -46,6 +49,14 @@ public GetSuggestedUsersSkeletonOutput(CBORObject obj)
[JsonRequired]
public List<FishyFlip.Models.ATDid> Dids { get; set; }

/// <summary>
/// Gets or sets the recId.
/// <br/> Snowflake for this recommendation, use when submitting recommendation events.
/// </summary>
[JsonPropertyName("recId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public long? RecId { get; set; }

public const string RecordType = "app.bsky.unspecced.getSuggestedUsersSkeleton#GetSuggestedUsersSkeletonOutput";

public override string ToJson()
Expand Down