From d5085197fae6b24d8cb9100129ec4c750b727a57 Mon Sep 17 00:00:00 2001
From: box-sdk-build
Date: Thu, 20 Feb 2025 07:13:19 -0800
Subject: [PATCH 1/7] chore: Update .codegen.json with commit hash of codegen
and openapi spec
---
.codegen.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.codegen.json b/.codegen.json
index 4b41120a..a9c28d99 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "8a9cc1d", "specHash": "f20ba3f", "version": "1.8.0" }
+{ "engineHash": "22f85cc", "specHash": "f20ba3f", "version": "1.8.0" }
From c08b6b21524e50b18e10a4b6f2b1b6d8189df4da Mon Sep 17 00:00:00 2001
From: box-sdk-build
Date: Fri, 21 Feb 2025 03:14:01 -0800
Subject: [PATCH 2/7] docs: Documentation for Java SDK (box/box-codegen#664)
---
.codegen.json | 2 +-
README.md | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.codegen.json b/.codegen.json
index a9c28d99..6d0a1268 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "22f85cc", "specHash": "f20ba3f", "version": "1.8.0" }
+{ "engineHash": "5c674a3", "specHash": "f20ba3f", "version": "1.8.0" }
diff --git a/README.md b/README.md
index 6925c05d..59ad5ea1 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-# Box Dotnet SDK GENERATED
+# Box Dotnet SDK Gen
[](http://opensource.box.com/badges)

@@ -28,7 +28,7 @@ Embrace the new generation of Box SDKs and unlock the full potential of the Box
-- [Box Dotnet SDK GENERATED](#box-dotnet-sdk-generated)
+- [Box Dotnet SDK Gen](#box-dotnet-sdk-gen)
- [Table of contents](#table-of-contents)
- [Installing](#installing)
- [BouncyCastle runtime integrity check](#bouncycastle-runtime-integrity-check)
From 5d7de167fba0580194de1d82415a1011ba814128 Mon Sep 17 00:00:00 2001
From: box-sdk-build
Date: Fri, 21 Feb 2025 05:23:52 -0800
Subject: [PATCH 3/7] docs: remove beta tag for AI extract endpoints
(box/box-openapi#511)
---
.codegen.json | 2 +-
Box.Sdk.Gen/Schemas/AiAsk/AiAsk.cs | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/.codegen.json b/.codegen.json
index 6d0a1268..1b864815 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "5c674a3", "specHash": "f20ba3f", "version": "1.8.0" }
+{ "engineHash": "5c674a3", "specHash": "137a375", "version": "1.8.0" }
diff --git a/Box.Sdk.Gen/Schemas/AiAsk/AiAsk.cs b/Box.Sdk.Gen/Schemas/AiAsk/AiAsk.cs
index 76a777cd..42350d0f 100644
--- a/Box.Sdk.Gen/Schemas/AiAsk/AiAsk.cs
+++ b/Box.Sdk.Gen/Schemas/AiAsk/AiAsk.cs
@@ -9,7 +9,7 @@
namespace Box.Sdk.Gen.Schemas {
public class AiAsk : ISerializable {
///
- /// The mode specifies if this request is for a single or multiple items. If you select `single_item_qa` the `items` array can have one element only. Selecting `multiple_item_qa` allows you to provide up to 25 items.
+ /// Box AI handles text documents with text representations up to 1MB in size, or a maximum of 25 files, whichever comes first. If the text file size exceeds 1MB, the first 1MB of text representation will be processed. Box AI handles image documents with a resolution of 1024 x 1024 pixels, with a maximum of 5 images or 5 pages for multi-page images. If the number of image or image pages exceeds 5, the first 5 images or pages will be processed. If you set mode parameter to `single_item_qa`, the items array can have one element only. Currently Box AI does not support multi-modal requests. If both images and text are sent Box AI will only process the text.
///
[JsonPropertyName("mode")]
[JsonConverter(typeof(StringEnumConverter))]
@@ -23,10 +23,6 @@ public class AiAsk : ISerializable {
///
/// The items to be processed by the LLM, often files.
- ///
- /// **Note**: Box AI handles documents with text representations up to 1MB in size, or a maximum of 25 files, whichever comes first.
- /// If the file size exceeds 1MB, the first 1MB of text representation will be processed.
- /// If you set `mode` parameter to `single_item_qa`, the `items` array can have one element only.
///
[JsonPropertyName("items")]
public IReadOnlyList Items { get; }
From 21178a6db0930978466ec109b5b9757b902abcb4 Mon Sep 17 00:00:00 2001
From: box-sdk-build
Date: Fri, 21 Feb 2025 05:25:50 -0800
Subject: [PATCH 4/7] chore: Update .codegen.json with commit hash of codegen
and openapi spec
---
.codegen.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.codegen.json b/.codegen.json
index 1b864815..4a521de3 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "5c674a3", "specHash": "137a375", "version": "1.8.0" }
+{ "engineHash": "5c674a3", "specHash": "06fc5f7", "version": "1.8.0" }
From 51d137a21a9444cfb3353c5be9ff7c9b660d7dbb Mon Sep 17 00:00:00 2001
From: box-sdk-build
Date: Mon, 24 Feb 2025 01:11:06 -0800
Subject: [PATCH 5/7] chore: Update .codegen.json with commit hash of codegen
and openapi spec
---
.codegen.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.codegen.json b/.codegen.json
index 4a521de3..44484d0c 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "5c674a3", "specHash": "06fc5f7", "version": "1.8.0" }
+{ "engineHash": "89ce9ce", "specHash": "06fc5f7", "version": "1.8.0" }
From 5dfd1c547b442385b5154fb2e41d531ca4fca9ed Mon Sep 17 00:00:00 2001
From: box-sdk-build
Date: Mon, 24 Feb 2025 05:08:58 -0800
Subject: [PATCH 6/7] test: reorder function calls to fix test samples
(box/box-codegen#666)
---
.codegen.json | 2 +-
.../LegalHoldPoliciesManagerTests.cs | 28 +++++++++----------
.../MetadataTemplatesManagerTests.cs | 23 +++++++++++----
docs/LegalHoldPolicies.md | 4 +--
docs/MetadataTemplates.md | 2 +-
5 files changed, 36 insertions(+), 23 deletions(-)
diff --git a/.codegen.json b/.codegen.json
index 44484d0c..380c7d47 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "89ce9ce", "specHash": "06fc5f7", "version": "1.8.0" }
+{ "engineHash": "ef00939", "specHash": "06fc5f7", "version": "1.8.0" }
diff --git a/Box.Sdk.Gen.Tests.Integration/Test/LegalHoldPolicies/LegalHoldPoliciesManagerTests.cs b/Box.Sdk.Gen.Tests.Integration/Test/LegalHoldPolicies/LegalHoldPoliciesManagerTests.cs
index 27c2c0d7..833b7ba7 100644
--- a/Box.Sdk.Gen.Tests.Integration/Test/LegalHoldPolicies/LegalHoldPoliciesManagerTests.cs
+++ b/Box.Sdk.Gen.Tests.Integration/Test/LegalHoldPolicies/LegalHoldPoliciesManagerTests.cs
@@ -12,6 +12,20 @@ public class LegalHoldPoliciesManagerTests {
public LegalHoldPoliciesManagerTests() {
client = new CommonsManager().GetDefaultClient();
}
+ [TestMethod]
+ public async System.Threading.Tasks.Task TestCreateNotOngoingLegalHoldPolicy() {
+ string legalHoldPolicyName = Utils.GetUUID();
+ const string legalHoldDescription = "test description";
+ System.DateTimeOffset filterStartedAt = Utils.DateTimeFromString(dateTime: "2021-01-01T00:00:00-08:00");
+ System.DateTimeOffset filterEndedAt = Utils.DateTimeFromString(dateTime: "2022-01-01T00:00:00-08:00");
+ LegalHoldPolicy legalHoldPolicy = await client.LegalHoldPolicies.CreateLegalHoldPolicyAsync(requestBody: new CreateLegalHoldPolicyRequestBody(policyName: legalHoldPolicyName) { Description = legalHoldDescription, IsOngoing = false, FilterStartedAt = filterStartedAt, FilterEndedAt = filterEndedAt });
+ Assert.IsTrue(legalHoldPolicy.PolicyName == legalHoldPolicyName);
+ Assert.IsTrue(legalHoldPolicy.Description == legalHoldDescription);
+ Assert.IsTrue(Utils.DateTimeToString(dateTime: NullableUtils.Unwrap(legalHoldPolicy.FilterStartedAt)) == Utils.DateTimeToString(dateTime: filterStartedAt));
+ Assert.IsTrue(Utils.DateTimeToString(dateTime: NullableUtils.Unwrap(legalHoldPolicy.FilterEndedAt)) == Utils.DateTimeToString(dateTime: filterEndedAt));
+ await client.LegalHoldPolicies.DeleteLegalHoldPolicyByIdAsync(legalHoldPolicyId: legalHoldPolicy.Id);
+ }
+
[TestMethod]
public async System.Threading.Tasks.Task TestCreateUpdateGetDeleteLegalHoldPolicy() {
string legalHoldPolicyName = Utils.GetUUID();
@@ -30,19 +44,5 @@ public async System.Threading.Tasks.Task TestCreateUpdateGetDeleteLegalHoldPolic
await client.LegalHoldPolicies.DeleteLegalHoldPolicyByIdAsync(legalHoldPolicyId: legalHoldPolicyId);
}
- [TestMethod]
- public async System.Threading.Tasks.Task TestCreateNotOngoingLegalHoldPolicy() {
- string legalHoldPolicyName = Utils.GetUUID();
- const string legalHoldDescription = "test description";
- System.DateTimeOffset filterStartedAt = Utils.DateTimeFromString(dateTime: "2021-01-01T00:00:00-08:00");
- System.DateTimeOffset filterEndedAt = Utils.DateTimeFromString(dateTime: "2022-01-01T00:00:00-08:00");
- LegalHoldPolicy legalHoldPolicy = await client.LegalHoldPolicies.CreateLegalHoldPolicyAsync(requestBody: new CreateLegalHoldPolicyRequestBody(policyName: legalHoldPolicyName) { Description = legalHoldDescription, IsOngoing = false, FilterStartedAt = filterStartedAt, FilterEndedAt = filterEndedAt });
- Assert.IsTrue(legalHoldPolicy.PolicyName == legalHoldPolicyName);
- Assert.IsTrue(legalHoldPolicy.Description == legalHoldDescription);
- Assert.IsTrue(Utils.DateTimeToString(dateTime: NullableUtils.Unwrap(legalHoldPolicy.FilterStartedAt)) == Utils.DateTimeToString(dateTime: filterStartedAt));
- Assert.IsTrue(Utils.DateTimeToString(dateTime: NullableUtils.Unwrap(legalHoldPolicy.FilterEndedAt)) == Utils.DateTimeToString(dateTime: filterEndedAt));
- await client.LegalHoldPolicies.DeleteLegalHoldPolicyByIdAsync(legalHoldPolicyId: legalHoldPolicy.Id);
- }
-
}
}
\ No newline at end of file
diff --git a/Box.Sdk.Gen.Tests.Integration/Test/MetadataTemplates/MetadataTemplatesManagerTests.cs b/Box.Sdk.Gen.Tests.Integration/Test/MetadataTemplates/MetadataTemplatesManagerTests.cs
index 30d3a5b3..7e0622b6 100644
--- a/Box.Sdk.Gen.Tests.Integration/Test/MetadataTemplates/MetadataTemplatesManagerTests.cs
+++ b/Box.Sdk.Gen.Tests.Integration/Test/MetadataTemplates/MetadataTemplatesManagerTests.cs
@@ -18,16 +18,29 @@ public MetadataTemplatesManagerTests() {
[TestMethod]
public async System.Threading.Tasks.Task TestMetadataTemplates() {
string templateKey = string.Concat("key", Utils.GetUUID());
- MetadataTemplate template = await client.MetadataTemplates.CreateMetadataTemplateAsync(requestBody: new CreateMetadataTemplateRequestBody(scope: "enterprise", displayName: templateKey) { TemplateKey = templateKey, Fields = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.String, key: "testName", displayName: "testName")}) });
+ MetadataTemplate template = await client.MetadataTemplates.CreateMetadataTemplateAsync(requestBody: new CreateMetadataTemplateRequestBody(scope: "enterprise", displayName: templateKey) { TemplateKey = templateKey, Fields = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.String, key: "testName", displayName: "testName"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Float, key: "age", displayName: "age"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Date, key: "birthDate", displayName: "birthDate"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Enum, key: "countryCode", displayName: "countryCode") { Options = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "US"),new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "CA")}) },new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.MultiSelect, key: "sports", displayName: "sports") { Options = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "basketball"),new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "football"),new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "tennis")}) }}) });
Assert.IsTrue(template.TemplateKey == templateKey);
Assert.IsTrue(template.DisplayName == templateKey);
- Assert.IsTrue(NullableUtils.Unwrap(template.Fields).Count == 1);
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields).Count == 5);
Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[0].Key == "testName");
Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[0].DisplayName == "testName");
+ Assert.IsTrue(StringUtils.ToStringRepresentation(NullableUtils.Unwrap(template.Fields)[0].Type) == "string");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[1].Key == "age");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[1].DisplayName == "age");
+ Assert.IsTrue(StringUtils.ToStringRepresentation(NullableUtils.Unwrap(template.Fields)[1].Type) == "float");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[2].Key == "birthDate");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[2].DisplayName == "birthDate");
+ Assert.IsTrue(StringUtils.ToStringRepresentation(NullableUtils.Unwrap(template.Fields)[2].Type) == "date");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[3].Key == "countryCode");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[3].DisplayName == "countryCode");
+ Assert.IsTrue(StringUtils.ToStringRepresentation(NullableUtils.Unwrap(template.Fields)[3].Type) == "enum");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[4].Key == "sports");
+ Assert.IsTrue(NullableUtils.Unwrap(template.Fields)[4].DisplayName == "sports");
+ Assert.IsTrue(StringUtils.ToStringRepresentation(NullableUtils.Unwrap(template.Fields)[4].Type) == "multiSelect");
MetadataTemplate updatedTemplate = await client.MetadataTemplates.UpdateMetadataTemplateAsync(scope: UpdateMetadataTemplateScope.Enterprise, templateKey: templateKey, requestBody: Array.AsReadOnly(new [] {new UpdateMetadataTemplateRequestBody(op: UpdateMetadataTemplateRequestBodyOpField.AddField) { FieldKey = "newfieldname", Data = new Dictionary() { { "type", "string" }, { "displayName", "newFieldName" } } }}));
- Assert.IsTrue(NullableUtils.Unwrap(updatedTemplate.Fields).Count == 2);
- Assert.IsTrue(NullableUtils.Unwrap(updatedTemplate.Fields)[1].Key == "newfieldname");
- Assert.IsTrue(NullableUtils.Unwrap(updatedTemplate.Fields)[1].DisplayName == "newFieldName");
+ Assert.IsTrue(NullableUtils.Unwrap(updatedTemplate.Fields).Count == 6);
+ Assert.IsTrue(NullableUtils.Unwrap(updatedTemplate.Fields)[5].Key == "newfieldname");
+ Assert.IsTrue(NullableUtils.Unwrap(updatedTemplate.Fields)[5].DisplayName == "newFieldName");
MetadataTemplate getMetadataTemplate = await client.MetadataTemplates.GetMetadataTemplateByIdAsync(templateId: template.Id);
Assert.IsTrue(getMetadataTemplate.Id == template.Id);
MetadataTemplate getMetadataTemplateSchema = await client.MetadataTemplates.GetMetadataTemplateAsync(scope: GetMetadataTemplateScope.Enterprise, templateKey: NullableUtils.Unwrap(template.TemplateKey));
diff --git a/docs/LegalHoldPolicies.md b/docs/LegalHoldPolicies.md
index a343755f..d4897bee 100644
--- a/docs/LegalHoldPolicies.md
+++ b/docs/LegalHoldPolicies.md
@@ -50,7 +50,7 @@ See the endpoint docs at
```
-await client.LegalHoldPolicies.CreateLegalHoldPolicyAsync(requestBody: new CreateLegalHoldPolicyRequestBody(policyName: legalHoldPolicyName) { Description = legalHoldDescription, IsOngoing = true });
+await client.LegalHoldPolicies.CreateLegalHoldPolicyAsync(requestBody: new CreateLegalHoldPolicyRequestBody(policyName: legalHoldPolicyName) { Description = legalHoldDescription, IsOngoing = false, FilterStartedAt = filterStartedAt, FilterEndedAt = filterEndedAt });
```
### Arguments
@@ -148,7 +148,7 @@ See the endpoint docs at
```
-await client.LegalHoldPolicies.DeleteLegalHoldPolicyByIdAsync(legalHoldPolicyId: legalHoldPolicyId);
+await client.LegalHoldPolicies.DeleteLegalHoldPolicyByIdAsync(legalHoldPolicyId: legalHoldPolicy.Id);
```
### Arguments
diff --git a/docs/MetadataTemplates.md b/docs/MetadataTemplates.md
index 4bf351ab..50a402c6 100644
--- a/docs/MetadataTemplates.md
+++ b/docs/MetadataTemplates.md
@@ -266,7 +266,7 @@ See the endpoint docs at
```
-await client.MetadataTemplates.CreateMetadataTemplateAsync(requestBody: new CreateMetadataTemplateRequestBody(scope: "enterprise", displayName: templateKey) { TemplateKey = templateKey, Fields = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.String, key: "testName", displayName: "testName")}) });
+await client.MetadataTemplates.CreateMetadataTemplateAsync(requestBody: new CreateMetadataTemplateRequestBody(scope: "enterprise", displayName: templateKey) { TemplateKey = templateKey, Fields = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.String, key: "testName", displayName: "testName"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Float, key: "age", displayName: "age"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Date, key: "birthDate", displayName: "birthDate"),new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.Enum, key: "countryCode", displayName: "countryCode") { Options = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "US"),new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "CA")}) },new CreateMetadataTemplateRequestBodyFieldsField(type: CreateMetadataTemplateRequestBodyFieldsTypeField.MultiSelect, key: "sports", displayName: "sports") { Options = Array.AsReadOnly(new [] {new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "basketball"),new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "football"),new CreateMetadataTemplateRequestBodyFieldsOptionsField(key: "tennis")}) }}) });
```
### Arguments
From edb2d0866245b6f9d0826278616480987b8af89a Mon Sep 17 00:00:00 2001
From: box-sdk-build
Date: Wed, 26 Feb 2025 00:41:26 -0800
Subject: [PATCH 7/7] chore: Update .codegen.json with commit hash of codegen
and openapi spec
---
.codegen.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.codegen.json b/.codegen.json
index 380c7d47..85de7c74 100644
--- a/.codegen.json
+++ b/.codegen.json
@@ -1 +1 @@
-{ "engineHash": "ef00939", "specHash": "06fc5f7", "version": "1.8.0" }
+{ "engineHash": "77017fa", "specHash": "06fc5f7", "version": "1.8.0" }