Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "a87c352", "specHash": "ded99bf", "version": "10.13.0" }
{ "engineHash": "a87c352", "specHash": "0ac3d31", "version": "10.13.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ public interface IUserCollaborationsManager {
/// If a collaboration is being created with a group, access to
/// this endpoint is dependent on the group's ability to be invited.
///
/// If collaboration is in `pending` status, the following fields
/// are redacted:
/// - `login` and `name` are hidden if a collaboration was created
/// using `user_id`,
/// - `name` is hidden if a collaboration was created using `login`.
/// If collaboration is in `pending` status, field `name` is redacted when:
/// - a collaboration was created using `user_id`,
/// - a collaboration was created using `login`.
/// </summary>
/// <param name="requestBody">
/// Request body of createCollaboration method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ public async System.Threading.Tasks.Task DeleteCollaborationByIdAsync(string col
/// If a collaboration is being created with a group, access to
/// this endpoint is dependent on the group's ability to be invited.
///
/// If collaboration is in `pending` status, the following fields
/// are redacted:
/// - `login` and `name` are hidden if a collaboration was created
/// using `user_id`,
/// - `name` is hidden if a collaboration was created using `login`.
/// If collaboration is in `pending` status, field `name` is redacted when:
/// - a collaboration was created using `user_id`,
/// - a collaboration was created using `login`.
/// </summary>
/// <param name="requestBody">
/// Request body of createCollaboration method
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System.Text.Json.Serialization;
using System.Collections.Generic;
using Box.Sdk.Gen.Internal;

namespace Box.Sdk.Gen.Schemas {
public class AiExtractFieldOption : ISerializable {
/// <summary>
/// A unique identifier for the option.
/// </summary>
[JsonPropertyName("key")]
public string Key { get; }

public AiExtractFieldOption(string key) {
Key = key;
}
internal string? RawJson { get; set; } = default;

void ISerializable.SetJson(string json) {
RawJson = json;
}

string? ISerializable.GetJson() {
return RawJson;
}

/// <summary>
/// Returns raw json response returned from the API.
/// </summary>
public Dictionary<string, object?>? GetRawData() {
return SimpleJsonSerializer.GetAllFields(this);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ public class AiExtractStructured : ISerializable {
[JsonPropertyName("include_reference")]
public bool? IncludeReference { get; init; }

/// <summary>
/// The taxonomy sources to be used for the structured extraction. They can either be an existing file or a taxonomy.
/// For your request to work, `fields` must also be provided. `taxonomy_sources` is not supported with `metadata_template`.
/// </summary>
[JsonPropertyName("taxonomy_sources")]
public IReadOnlyList<AiTaxonomySource>? TaxonomySources { get; init; }

public AiExtractStructured(IReadOnlyList<AiItemBase> items) {
Items = items;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class AiExtractStructuredFieldsField : ISerializable {
public string? Prompt { get; init; }

/// <summary>
/// The type of the field. It can include but is not limited to `string`, `float`, `date`, `enum`, and `multiSelect`.
/// The type of the field. It can include but is not limited to `string`, `float`, `date`, `enum`, `multiSelect`,`taxonomy`, `struct`, and `table`.
/// </summary>
[JsonPropertyName("type")]
public string? Type { get; init; }
Expand All @@ -44,6 +44,27 @@ public class AiExtractStructuredFieldsField : ISerializable {
[JsonPropertyName("options")]
public IReadOnlyList<AiExtractStructuredFieldsOptionsField>? Options { get; init; }

/// <summary>
/// The nested fields for this field. Used with `struct` and `table` field types to define the nested structure.
/// </summary>
[JsonPropertyName("fields")]
public IReadOnlyList<AiExtractSubField>? Fields { get; init; }

/// <summary>
/// The identifier for a taxonomy, which corresponds to the `key` of the taxonomy source. Required if using `taxonomy` type field.
/// </summary>
[JsonPropertyName("taxonomy_key")]
public string? TaxonomyKey { get; init; }

/// <summary>
/// The namespace of the taxonomy source. Required if using `taxonomy` type field from an existing taxonomy.
/// </summary>
[JsonPropertyName("namespace")]
public string? NamespaceParam { get; init; }

[JsonPropertyName("options_rules")]
public AiOptionsRules? OptionsRules { get; init; }

public AiExtractStructuredFieldsField(string key) {
Key = key;
}
Expand Down
68 changes: 68 additions & 0 deletions Box.Sdk.Gen.Net/Schemas/AiExtractSubField/AiExtractSubField.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
using Box.Sdk.Gen;
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Box.Sdk.Gen.Internal;
using Box.Sdk.Gen.Schemas;

namespace Box.Sdk.Gen.Schemas {
public class AiExtractSubField : ISerializable {
/// <summary>
/// A unique identifier for the nested field.
/// </summary>
[JsonPropertyName("key")]
public string Key { get; }

/// <summary>
/// A description of the nested field.
/// </summary>
[JsonPropertyName("description")]
public string? Description { get; init; }

/// <summary>
/// The display name of the nested field.
/// </summary>
[JsonPropertyName("displayName")]
public string? DisplayName { get; init; }

/// <summary>
/// Context about the nested field that may include how to find and how to format it.
/// </summary>
[JsonPropertyName("prompt")]
public string? Prompt { get; init; }

/// <summary>
/// The type of the nested field. Allowed types include `string`, `float`, `date`, `number`, `text`, `boolean`, `enum` and `multiSelect`.
/// </summary>
[JsonPropertyName("type")]
public string? Type { get; init; }

/// <summary>
/// A list of options for this nested field. Used with `enum` and `multiSelect` types.
/// </summary>
[JsonPropertyName("options")]
public IReadOnlyList<AiExtractFieldOption>? Options { get; init; }

public AiExtractSubField(string key) {
Key = key;
}
internal string? RawJson { get; set; } = default;

void ISerializable.SetJson(string json) {
RawJson = json;
}

string? ISerializable.GetJson() {
return RawJson;
}

/// <summary>
/// Returns raw json response returned from the API.
/// </summary>
public Dictionary<string, object?>? GetRawData() {
return SimpleJsonSerializer.GetAllFields(this);
}

}
}
45 changes: 45 additions & 0 deletions Box.Sdk.Gen.Net/Schemas/AiOptionsRules/AiOptionsRules.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Box.Sdk.Gen;
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Box.Sdk.Gen.Internal;

namespace Box.Sdk.Gen.Schemas {
public class AiOptionsRules : ISerializable {
/// <summary>
/// Indicates whether the field is a multi-select field.
/// If true, the field can have multiple values.
/// </summary>
[JsonPropertyName("multi_select")]
public bool? MultiSelect { get; init; }

/// <summary>
/// The selectable levels for the field.
/// This is used to limit the levels of the taxonomy that can be selected.
/// </summary>
[JsonPropertyName("selectable_levels")]
public IReadOnlyList<long>? SelectableLevels { get; init; }

public AiOptionsRules() {

}
internal string? RawJson { get; set; } = default;

void ISerializable.SetJson(string json) {
RawJson = json;
}

string? ISerializable.GetJson() {
return RawJson;
}

/// <summary>
/// Returns raw json response returned from the API.
/// </summary>
public Dictionary<string, object?>? GetRawData() {
return SimpleJsonSerializer.GetAllFields(this);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using Box.Sdk.Gen;
using System.Text.Json.Serialization;
using Box.Sdk.Gen.Internal;
using System.Collections.Generic;

namespace Box.Sdk.Gen.Schemas {
public class AiTaxonomyFileReference : ISerializable {
/// <summary>
/// The type of the taxonomy source.
/// </summary>
[JsonPropertyName("type")]
[JsonConverter(typeof(StringEnumConverter<AiTaxonomyFileReferenceTypeField>))]
public StringEnum<AiTaxonomyFileReferenceTypeField>? Type { get; init; }

/// <summary>
/// The identifier for a taxonomy, which corresponds to the `taxonomy_key` of the taxonomy source.
/// </summary>
[JsonPropertyName("taxonomy_key")]
public string? TaxonomyKey { get; init; }

/// <summary>
/// The ID of the taxonomy source. Required if the type is `file` and unsupported if the type is `taxonomy`.
/// </summary>
[JsonPropertyName("id")]
public string? Id { get; init; }

public AiTaxonomyFileReference() {

}
internal string? RawJson { get; set; } = default;

void ISerializable.SetJson(string json) {
RawJson = json;
}

string? ISerializable.GetJson() {
return RawJson;
}

/// <summary>
/// Returns raw json response returned from the API.
/// </summary>
public Dictionary<string, object?>? GetRawData() {
return SimpleJsonSerializer.GetAllFields(this);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.ComponentModel;
using Box.Sdk.Gen.Internal;

namespace Box.Sdk.Gen.Schemas {
public enum AiTaxonomyFileReferenceTypeField {
[Description("file")]
File
}
}
48 changes: 48 additions & 0 deletions Box.Sdk.Gen.Net/Schemas/AiTaxonomyReference/AiTaxonomyReference.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using Box.Sdk.Gen;
using System.Text.Json.Serialization;
using Box.Sdk.Gen.Internal;
using System.Collections.Generic;

namespace Box.Sdk.Gen.Schemas {
public class AiTaxonomyReference : ISerializable {
/// <summary>
/// The type of the taxonomy source.
/// </summary>
[JsonPropertyName("type")]
[JsonConverter(typeof(StringEnumConverter<AiTaxonomyReferenceTypeField>))]
public StringEnum<AiTaxonomyReferenceTypeField>? Type { get; init; }

/// <summary>
/// The identifier for a taxonomy, which corresponds to the `taxonomy_key` of the taxonomy source.
/// </summary>
[JsonPropertyName("taxonomy_key")]
public string? TaxonomyKey { get; init; }

/// <summary>
/// The namespace of the taxonomy source.
/// </summary>
[JsonPropertyName("namespace")]
public string? NamespaceParam { get; init; }

public AiTaxonomyReference() {

}
internal string? RawJson { get; set; } = default;

void ISerializable.SetJson(string json) {
RawJson = json;
}

string? ISerializable.GetJson() {
return RawJson;
}

/// <summary>
/// Returns raw json response returned from the API.
/// </summary>
public Dictionary<string, object?>? GetRawData() {
return SimpleJsonSerializer.GetAllFields(this);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.ComponentModel;
using Box.Sdk.Gen.Internal;

namespace Box.Sdk.Gen.Schemas {
public enum AiTaxonomyReferenceTypeField {
[Description("taxonomy")]
Taxonomy
}
}
Loading
Loading