From d600645968b62770b2df3f4b3e44e428e89977fe Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 2 Dec 2025 07:20:06 -0800 Subject: [PATCH 1/2] docs: modify can_view_path description and add confidence scores for structured extract (box/box-openapi#566) --- .codegen.json | 2 +- .../CreateCollaborationRequestBody.java | 3 ++- .../UpdateCollaborationByIdRequestBody.java | 3 ++- .../AiExtractStructured.java | 23 +++++++++++++++- .../AiExtractStructuredResponse.java | 26 ++++++++++++++++++- 5 files changed, 52 insertions(+), 5 deletions(-) diff --git a/.codegen.json b/.codegen.json index 9abfa0438..7f4c39213 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "49f3695", "specHash": "7e4908e", "version": "10.2.0" } +{ "engineHash": "49f3695", "specHash": "5183b65", "version": "10.2.0" } diff --git a/src/main/java/com/box/sdkgen/managers/usercollaborations/CreateCollaborationRequestBody.java b/src/main/java/com/box/sdkgen/managers/usercollaborations/CreateCollaborationRequestBody.java index 2f245c282..e39079bc4 100644 --- a/src/main/java/com/box/sdkgen/managers/usercollaborations/CreateCollaborationRequestBody.java +++ b/src/main/java/com/box/sdkgen/managers/usercollaborations/CreateCollaborationRequestBody.java @@ -49,7 +49,8 @@ public class CreateCollaborationRequestBody extends SerializableObject { * Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled * to 1,000 per user. * - *

Only owner or co-owners can invite collaborators with a `can_view_path` of `true`. + *

Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only + * an owner can update `can_view_path` on existing collaborations. * *

`can_view_path` can only be used for folder collaborations. */ diff --git a/src/main/java/com/box/sdkgen/managers/usercollaborations/UpdateCollaborationByIdRequestBody.java b/src/main/java/com/box/sdkgen/managers/usercollaborations/UpdateCollaborationByIdRequestBody.java index 50e7c6ebb..8397f7b76 100644 --- a/src/main/java/com/box/sdkgen/managers/usercollaborations/UpdateCollaborationByIdRequestBody.java +++ b/src/main/java/com/box/sdkgen/managers/usercollaborations/UpdateCollaborationByIdRequestBody.java @@ -65,7 +65,8 @@ public class UpdateCollaborationByIdRequestBody extends SerializableObject { * Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled * to 1,000 per user. * - *

Only owner or co-owners can invite collaborators with a `can_view_path` of `true`. + *

Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only + * an owner can update `can_view_path` on existing collaborations. * *

`can_view_path` can only be used for folder collaborations. */ diff --git a/src/main/java/com/box/sdkgen/schemas/aiextractstructured/AiExtractStructured.java b/src/main/java/com/box/sdkgen/schemas/aiextractstructured/AiExtractStructured.java index 4e23ae994..582201abe 100644 --- a/src/main/java/com/box/sdkgen/schemas/aiextractstructured/AiExtractStructured.java +++ b/src/main/java/com/box/sdkgen/schemas/aiextractstructured/AiExtractStructured.java @@ -31,6 +31,10 @@ public class AiExtractStructured extends SerializableObject { */ protected List fields; + /** A flag to indicate whether confidence scores for every extracted field should be returned. */ + @JsonProperty("include_confidence_score") + protected Boolean includeConfidenceScore; + @JsonProperty("ai_agent") protected AiExtractStructuredAgent aiAgent; @@ -44,6 +48,7 @@ protected AiExtractStructured(Builder builder) { this.items = builder.items; this.metadataTemplate = builder.metadataTemplate; this.fields = builder.fields; + this.includeConfidenceScore = builder.includeConfidenceScore; this.aiAgent = builder.aiAgent; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -60,6 +65,10 @@ public List getFields() { return fields; } + public Boolean getIncludeConfidenceScore() { + return includeConfidenceScore; + } + public AiExtractStructuredAgent getAiAgent() { return aiAgent; } @@ -76,12 +85,13 @@ public boolean equals(Object o) { return Objects.equals(items, casted.items) && Objects.equals(metadataTemplate, casted.metadataTemplate) && Objects.equals(fields, casted.fields) + && Objects.equals(includeConfidenceScore, casted.includeConfidenceScore) && Objects.equals(aiAgent, casted.aiAgent); } @Override public int hashCode() { - return Objects.hash(items, metadataTemplate, fields, aiAgent); + return Objects.hash(items, metadataTemplate, fields, includeConfidenceScore, aiAgent); } @Override @@ -99,6 +109,10 @@ public String toString() { + fields + '\'' + ", " + + "includeConfidenceScore='" + + includeConfidenceScore + + '\'' + + ", " + "aiAgent='" + aiAgent + '\'' @@ -113,6 +127,8 @@ public static class Builder extends NullableFieldTracker { protected List fields; + protected Boolean includeConfidenceScore; + protected AiExtractStructuredAgent aiAgent; public Builder(List items) { @@ -130,6 +146,11 @@ public Builder fields(List fields) { return this; } + public Builder includeConfidenceScore(Boolean includeConfidenceScore) { + this.includeConfidenceScore = includeConfidenceScore; + return this; + } + public Builder aiAgent(AiAgentReference aiAgent) { this.aiAgent = new AiExtractStructuredAgent(aiAgent); return this; diff --git a/src/main/java/com/box/sdkgen/schemas/aiextractstructuredresponse/AiExtractStructuredResponse.java b/src/main/java/com/box/sdkgen/schemas/aiextractstructuredresponse/AiExtractStructuredResponse.java index 42e94c96e..3cdc770f9 100644 --- a/src/main/java/com/box/sdkgen/schemas/aiextractstructuredresponse/AiExtractStructuredResponse.java +++ b/src/main/java/com/box/sdkgen/schemas/aiextractstructuredresponse/AiExtractStructuredResponse.java @@ -28,6 +28,13 @@ public class AiExtractStructuredResponse extends SerializableObject { @JsonProperty("completion_reason") protected String completionReason; + /** + * The confidence score numeric values for each extracted field as a JSON dictionary. This can be + * empty if no field could be extracted. + */ + @JsonProperty("confidence_score") + protected Map confidenceScore; + @JsonProperty("ai_agent_info") protected AiAgentInfo aiAgentInfo; @@ -44,6 +51,7 @@ protected AiExtractStructuredResponse(Builder builder) { this.answer = builder.answer; this.createdAt = builder.createdAt; this.completionReason = builder.completionReason; + this.confidenceScore = builder.confidenceScore; this.aiAgentInfo = builder.aiAgentInfo; markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); } @@ -60,6 +68,10 @@ public String getCompletionReason() { return completionReason; } + public Map getConfidenceScore() { + return confidenceScore; + } + public AiAgentInfo getAiAgentInfo() { return aiAgentInfo; } @@ -76,12 +88,13 @@ public boolean equals(Object o) { return Objects.equals(answer, casted.answer) && Objects.equals(createdAt, casted.createdAt) && Objects.equals(completionReason, casted.completionReason) + && Objects.equals(confidenceScore, casted.confidenceScore) && Objects.equals(aiAgentInfo, casted.aiAgentInfo); } @Override public int hashCode() { - return Objects.hash(answer, createdAt, completionReason, aiAgentInfo); + return Objects.hash(answer, createdAt, completionReason, confidenceScore, aiAgentInfo); } @Override @@ -99,6 +112,10 @@ public String toString() { + completionReason + '\'' + ", " + + "confidenceScore='" + + confidenceScore + + '\'' + + ", " + "aiAgentInfo='" + aiAgentInfo + '\'' @@ -113,6 +130,8 @@ public static class Builder extends NullableFieldTracker { protected String completionReason; + protected Map confidenceScore; + protected AiAgentInfo aiAgentInfo; public Builder(Map answer, OffsetDateTime createdAt) { @@ -126,6 +145,11 @@ public Builder completionReason(String completionReason) { return this; } + public Builder confidenceScore(Map confidenceScore) { + this.confidenceScore = confidenceScore; + return this; + } + public Builder aiAgentInfo(AiAgentInfo aiAgentInfo) { this.aiAgentInfo = aiAgentInfo; return this; From 97c579f759cdd8e5f815c003ccb0353d249bd811 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 3 Dec 2025 02:20:22 -0800 Subject: [PATCH 2/2] chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 7f4c39213..337c2e19d 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "49f3695", "specHash": "5183b65", "version": "10.2.0" } +{ "engineHash": "4c432e3", "specHash": "5183b65", "version": "10.2.0" }