Skip to content

Commit

Permalink
Bump Bindings (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
drasticactions authored Dec 21, 2024
1 parent 4292dd4 commit af23047
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/FishyFlip/Lexicon/Com/Atproto/Server/ATProtoServer.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@ internal ATProtoServer(ATProtocol atp)
/// <param name="identifier"></param>
/// <param name="password"></param>
/// <param name="authFactorToken"></param>
/// <param name="allowTakendown"></param>
/// <param name="cancellationToken"></param>
public Task<Result<FishyFlip.Lexicon.Com.Atproto.Server.CreateSessionOutput?>> CreateSessionAsync (string identifier, string password, string? authFactorToken = default, CancellationToken cancellationToken = default)
public Task<Result<FishyFlip.Lexicon.Com.Atproto.Server.CreateSessionOutput?>> CreateSessionAsync (string identifier, string password, string? authFactorToken = default, bool? allowTakendown = default, CancellationToken cancellationToken = default)
{
return atp.CreateSessionAsync(identifier, password, authFactorToken, cancellationToken);
return atp.CreateSessionAsync(identifier, password, authFactorToken, allowTakendown, cancellationToken);
}


Expand Down
12 changes: 11 additions & 1 deletion src/FishyFlip/Lexicon/Com/Atproto/Server/CreateSessionInput.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ public partial class CreateSessionInput : ATObject
/// <param name="identifier">Handle or other identifier supported by the server for the authenticating user.</param>
/// <param name="password"></param>
/// <param name="authFactorToken"></param>
public CreateSessionInput(string? identifier = default, string? password = default, string? authFactorToken = default)
/// <param name="allowTakendown">When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned</param>
public CreateSessionInput(string? identifier = default, string? password = default, string? authFactorToken = default, bool? allowTakendown = default)
{
this.Identifier = identifier;
this.Password = password;
this.AuthFactorToken = authFactorToken;
this.AllowTakendown = allowTakendown;
}


Expand All @@ -39,6 +41,7 @@ public CreateSessionInput(CBORObject obj)
if (obj["identifier"] is not null) this.Identifier = obj["identifier"].AsString();
if (obj["password"] is not null) this.Password = obj["password"].AsString();
if (obj["authFactorToken"] is not null) this.AuthFactorToken = obj["authFactorToken"].AsString();
if (obj["allowTakendown"] is not null) this.AllowTakendown = obj["allowTakendown"].AsBoolean();
}

/// <summary>
Expand All @@ -62,6 +65,13 @@ public CreateSessionInput(CBORObject obj)
[JsonPropertyName("authFactorToken")]
public string? AuthFactorToken { get; set; }

/// <summary>
/// Gets or sets the allowTakendown.
/// <br/> When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned
/// </summary>
[JsonPropertyName("allowTakendown")]
public bool? AllowTakendown { get; set; }

/// <summary>
/// Gets the ATRecord Type.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,17 @@ public static class ServerEndpoints
/// <param name="identifier"></param>
/// <param name="password"></param>
/// <param name="authFactorToken"></param>
/// <param name="allowTakendown"></param>
/// <param name="cancellationToken"></param>
/// <returns>Result of <see cref="FishyFlip.Lexicon.Com.Atproto.Server.CreateSessionOutput?"/></returns>
public static Task<Result<FishyFlip.Lexicon.Com.Atproto.Server.CreateSessionOutput?>> CreateSessionAsync (this FishyFlip.ATProtocol atp, string identifier, string password, string? authFactorToken = default, CancellationToken cancellationToken = default)
public static Task<Result<FishyFlip.Lexicon.Com.Atproto.Server.CreateSessionOutput?>> CreateSessionAsync (this FishyFlip.ATProtocol atp, string identifier, string password, string? authFactorToken = default, bool? allowTakendown = default, CancellationToken cancellationToken = default)
{
var endpointUrl = CreateSession.ToString();
var inputItem = new CreateSessionInput();
inputItem.Identifier = identifier;
inputItem.Password = password;
inputItem.AuthFactorToken = authFactorToken;
inputItem.AllowTakendown = allowTakendown;
return atp.Post<CreateSessionInput, FishyFlip.Lexicon.Com.Atproto.Server.CreateSessionOutput?>(endpointUrl, atp.Options.SourceGenerationContext.ComAtprotoServerCreateSessionInput!, atp.Options.SourceGenerationContext.ComAtprotoServerCreateSessionOutput!, inputItem, cancellationToken);
}

Expand Down

0 comments on commit af23047

Please sign in to comment.