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
@@ -0,0 +1,88 @@
#nullable enable

namespace LabelStudio
{
public partial interface ILearningResourcesClient
{
/// <summary>
/// ✨ Save one page of a module<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Replace only the supplied keys of a single page. Rejects a stale `page_version` with 409 `page_version_conflict`, and a page that moved to another module with 410 `page_moved`.
/// </summary>
/// <param name="id"></param>
/// <param name="moduleId"></param>
/// <param name="pageId"></param>
/// <param name="request"></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::LabelStudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LabelStudio.CoursePageSaveResponse> ApiLearningResourcesModulesPagesPartialUpdateAsync(
int id,
string moduleId,
string pageId,

global::LabelStudio.PatchedCoursePageUpdateRequest request,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// ✨ Save one page of a module<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Replace only the supplied keys of a single page. Rejects a stale `page_version` with 409 `page_version_conflict`, and a page that moved to another module with 410 `page_moved`.
/// </summary>
/// <param name="id"></param>
/// <param name="moduleId"></param>
/// <param name="pageId"></param>
/// <param name="request"></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::LabelStudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LabelStudio.AutoSDKHttpResponse<global::LabelStudio.CoursePageSaveResponse>> ApiLearningResourcesModulesPagesPartialUpdateAsResponseAsync(
int id,
string moduleId,
string pageId,

global::LabelStudio.PatchedCoursePageUpdateRequest request,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// ✨ Save one page of a module<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Replace only the supplied keys of a single page. Rejects a stale `page_version` with 409 `page_version_conflict`, and a page that moved to another module with 410 `page_moved`.
/// </summary>
/// <param name="id"></param>
/// <param name="moduleId"></param>
/// <param name="pageId"></param>
/// <param name="blocks"></param>
/// <param name="pageVersion"></param>
/// <param name="summary"></param>
/// <param name="title"></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>
global::System.Threading.Tasks.Task<global::LabelStudio.CoursePageSaveResponse> ApiLearningResourcesModulesPagesPartialUpdateAsync(
int id,
string moduleId,
string pageId,
global::System.Collections.Generic.IList<object>? blocks = default,
int? pageVersion = default,
string? summary = default,
string? title = default,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#nullable enable

namespace LabelStudio
{
public partial interface ILearningResourcesClient
{
/// <summary>
/// ✨ Get the structure outline of a course<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Module and page identity, titles and page versions without any block content.
/// </summary>
/// <param name="id"></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::LabelStudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LabelStudio.CourseOutline> ApiLearningResourcesOutlineRetrieveAsync(
int id,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// ✨ Get the structure outline of a course<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Module and page identity, titles and page versions without any block content.
/// </summary>
/// <param name="id"></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::LabelStudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LabelStudio.AutoSDKHttpResponse<global::LabelStudio.CourseOutline>> ApiLearningResourcesOutlineRetrieveAsResponseAsync(
int id,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#nullable enable

namespace LabelStudio
{
public partial interface ILearningResourcesClient
{
/// <summary>
/// ✨ Apply a structural change to a course<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Apply a semantic structural operation (add/delete/duplicate/reorder/move page or module, rename module) to current server state under a compare-and-swap on `structure_version`. A stale version returns 409 `structure_version_conflict` with the fresh outline so the client can resync and retry.
/// </summary>
/// <param name="id"></param>
/// <param name="request"></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::LabelStudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LabelStudio.CourseStructureOpResponse> ApiLearningResourcesStructureCreateAsync(
int id,

global::LabelStudio.CourseStructureOpRequest request,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// ✨ Apply a structural change to a course<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Apply a semantic structural operation (add/delete/duplicate/reorder/move page or module, rename module) to current server state under a compare-and-swap on `structure_version`. A stale version returns 409 `structure_version_conflict` with the fresh outline so the client can resync and retry.
/// </summary>
/// <param name="id"></param>
/// <param name="request"></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::LabelStudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LabelStudio.AutoSDKHttpResponse<global::LabelStudio.CourseStructureOpResponse>> ApiLearningResourcesStructureCreateAsResponseAsync(
int id,

global::LabelStudio.CourseStructureOpRequest request,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// ✨ Apply a structural change to a course<br/>
/// &lt;Card href="https://humansignal.com/goenterprise"&gt;<br/>
/// &lt;img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/&gt;<br/>
/// &lt;p style="margin-top: 10px; font-size: 14px;"&gt;<br/>
/// This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)<br/>
/// &lt;/p&gt;<br/>
/// &lt;/Card&gt;<br/>
/// Apply a semantic structural operation (add/delete/duplicate/reorder/move page or module, rename module) to current server state under a compare-and-swap on `structure_version`. A stale version returns 409 `structure_version_conflict` with the fresh outline so the client can resync and retry.
/// </summary>
/// <param name="id"></param>
/// <param name="destIndex"></param>
/// <param name="destModuleId"></param>
/// <param name="moduleId"></param>
/// <param name="moduleIds"></param>
/// <param name="op">
/// * `add_page` - add_page<br/>
/// * `delete_page` - delete_page<br/>
/// * `duplicate_page` - duplicate_page<br/>
/// * `reorder_pages` - reorder_pages<br/>
/// * `move_page` - move_page<br/>
/// * `add_module` - add_module<br/>
/// * `delete_module` - delete_module<br/>
/// * `duplicate_module` - duplicate_module<br/>
/// * `reorder_modules` - reorder_modules<br/>
/// * `rename_module` - rename_module
/// </param>
/// <param name="pageId"></param>
/// <param name="sourceModuleId"></param>
/// <param name="structureVersion"></param>
/// <param name="title"></param>
/// <param name="toIndex"></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>
global::System.Threading.Tasks.Task<global::LabelStudio.CourseStructureOpResponse> ApiLearningResourcesStructureCreateAsync(
int id,
global::LabelStudio.OpEnum op,
int structureVersion,
int? destIndex = default,
int? destModuleId = default,
int? moduleId = default,
global::System.Collections.Generic.IList<int>? moduleIds = default,
string? pageId = default,
int? sourceModuleId = default,
string? title = default,
int? toIndex = default,
global::LabelStudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace LabelStudio.JsonConverters
{
/// <inheritdoc />
public sealed class OpEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::LabelStudio.OpEnum>
{
/// <inheritdoc />
public override global::LabelStudio.OpEnum Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::LabelStudio.OpEnumExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::LabelStudio.OpEnum)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::LabelStudio.OpEnum);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::LabelStudio.OpEnum value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::LabelStudio.OpEnumExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace LabelStudio.JsonConverters
{
/// <inheritdoc />
public sealed class OpEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::LabelStudio.OpEnum?>
{
/// <inheritdoc />
public override global::LabelStudio.OpEnum? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::LabelStudio.OpEnumExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::LabelStudio.OpEnum)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::LabelStudio.OpEnum?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::LabelStudio.OpEnum? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::LabelStudio.OpEnumExtensions.ToValueString(value.Value));
}
}
}
}
Loading