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
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public partial interface IOrganizationsClient
/// Included only in requests
/// </param>
/// <param name="token"></param>
/// <param name="tokenExpiresAt">
/// When the current invite link stops working; null works only while expiration is disabled
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -116,6 +119,7 @@ public partial interface IOrganizationsClient
object? reactCodeSettings = default,
string? title = default,
string? token = default,
global::System.DateTime? tokenExpiresAt = default,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ namespace LabelStudio
/// </summary>
public sealed partial class OrganizationInvite
{
/// <summary>
/// True once the invite link has expired; reset the token to issue a new link
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("expired")]
public bool? Expired { get; set; }

/// <summary>
/// When the invite link expires; null if no expiry was recorded
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("expires_at")]
public global::System.DateTime? ExpiresAt { get; set; }

/// <summary>
///
/// </summary>
Expand All @@ -29,15 +41,25 @@ public sealed partial class OrganizationInvite
/// <summary>
/// Initializes a new instance of the <see cref="OrganizationInvite" /> class.
/// </summary>
/// <param name="expired">
/// True once the invite link has expired; reset the token to issue a new link
/// </param>
/// <param name="expiresAt">
/// When the invite link expires; null if no expiry was recorded
/// </param>
/// <param name="inviteUrl"></param>
/// <param name="token"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public OrganizationInvite(
bool? expired,
global::System.DateTime? expiresAt,
string? inviteUrl,
string? token)
{
this.Expired = expired;
this.ExpiresAt = expiresAt;
this.InviteUrl = inviteUrl;
this.Token = token;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public sealed partial class PatchedLseOrganizationSerializerUpdateRequest
[global::System.Text.Json.Serialization.JsonPropertyName("token")]
public string? Token { get; set; }

/// <summary>
/// When the current invite link stops working; null works only while expiration is disabled
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("token_expires_at")]
public global::System.DateTime? TokenExpiresAt { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -142,6 +148,9 @@ public sealed partial class PatchedLseOrganizationSerializerUpdateRequest
/// Included only in requests
/// </param>
/// <param name="token"></param>
/// <param name="tokenExpiresAt">
/// When the current invite link stops working; null works only while expiration is disabled
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -157,7 +166,8 @@ public PatchedLseOrganizationSerializerUpdateRequest(
object? interfaceSettings,
object? reactCodeSettings,
string? title,
string? token)
string? token,
global::System.DateTime? tokenExpiresAt)
{
this.AllowUnsafeInstructionTags = allowUnsafeInstructionTags;
this.ContactInfo = contactInfo;
Expand All @@ -171,6 +181,7 @@ public PatchedLseOrganizationSerializerUpdateRequest(
this.ReactCodeSettings = reactCodeSettings;
this.Title = title;
this.Token = token;
this.TokenExpiresAt = tokenExpiresAt;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ partial void ProcessUpdateResponseContent(
/// Included only in requests
/// </param>
/// <param name="token"></param>
/// <param name="tokenExpiresAt">
/// When the current invite link stops working; null works only while expiration is disabled
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -620,6 +623,7 @@ partial void ProcessUpdateResponseContent(
object? reactCodeSettings = default,
string? title = default,
string? token = default,
global::System.DateTime? tokenExpiresAt = default,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -637,6 +641,7 @@ partial void ProcessUpdateResponseContent(
ReactCodeSettings = reactCodeSettings,
Title = title,
Token = token,
TokenExpiresAt = tokenExpiresAt,
};

return await UpdateAsync(
Expand Down
13 changes: 13 additions & 0 deletions src/libs/LabelStudio/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38934,6 +38934,14 @@ components:
type: object
OrganizationInvite:
properties:
expired:
description: True once the invite link has expired; reset the token to issue a new link
type: boolean
expires_at:
description: When the invite link expires; null if no expiry was recorded
format: date-time
nullable: true
type: string
invite_url:
type: string
token:
Expand Down Expand Up @@ -41815,6 +41823,11 @@ components:
maxLength: 256
nullable: true
type: string
token_expires_at:
description: When the current invite link stops working; null works only while expiration is disabled
format: date-time
nullable: true
type: string
type: object
PatchedLseProjectUpdateRequest:
description: |-
Expand Down
Loading