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
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "e392e8c", "specHash": "dd7f7a9", "version": "10.14.0" }
{ "engineHash": "6f9492d", "specHash": "131c54a", "version": "10.14.0" }
22 changes: 0 additions & 22 deletions .github/workflows/fossa.yml

This file was deleted.

4 changes: 4 additions & 0 deletions docs/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

Sends an AI request to supported LLMs and returns an answer specifically focused on the user's question given the provided context.

You can ask a question about a single file, several files, or the entire contents of a Box Hub. To search across and ask questions about everything in a Box Hub, send a single item with `type` set to `hubs` and the Hub's ID as the `id`. Box AI answers the question using the indexed content of all files in that Hub.

Asking questions about a Box Hub requires Box AI for Hubs to be enabled in the Admin Console before the Hub is created, so that its content is indexed.

This operation is performed by calling function `createAiAsk`.

See the endpoint docs at
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/box/sdkgen/managers/ai/AiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ protected AiManager(Builder builder) {
* Sends an AI request to supported LLMs and returns an answer specifically focused on the user's
* question given the provided context.
*
* <p>You can ask a question about a single file, several files, or the entire contents of a Box
* Hub. To search across and ask questions about everything in a Box Hub, send a single item with
* `type` set to `hubs` and the Hub's ID as the `id`. Box AI answers the question using the
* indexed content of all files in that Hub.
*
* <p>Asking questions about a Box Hub requires Box AI for Hubs to be enabled in the Admin Console
* before the Hub is created, so that its content is indexed.
*
* @param requestBody Request body of createAiAsk method
*/
public AiResponseFull createAiAsk(AiAsk requestBody) {
Expand All @@ -51,6 +59,14 @@ public AiResponseFull createAiAsk(AiAsk requestBody) {
* Sends an AI request to supported LLMs and returns an answer specifically focused on the user's
* question given the provided context.
*
* <p>You can ask a question about a single file, several files, or the entire contents of a Box
* Hub. To search across and ask questions about everything in a Box Hub, send a single item with
* `type` set to `hubs` and the Hub's ID as the `id`. Box AI answers the question using the
* indexed content of all files in that Hub.
*
* <p>Asking questions about a Box Hub requires Box AI for Hubs to be enabled in the Admin Console
* before the Hub is created, so that its content is indexed.
*
* @param requestBody Request body of createAiAsk method
* @param headers Headers of createAiAsk method
*/
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/box/sdkgen/schemas/aiask/AiAsk.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public class AiAsk extends SerializableObject {
*/
protected final String prompt;

/** The items to be processed by the LLM, often files. */
/**
* The items to be processed by the LLM, often files. To search across and ask questions about the
* contents of a Box Hub, pass a single item with `type` set to `hubs`. See the item `type`
* property for details.
*/
protected final List<AiItemAsk> items;

/**
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/box/sdkgen/schemas/aiitemask/AiItemAsk.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
@JsonFilter("nullablePropertyFilter")
public class AiItemAsk extends SerializableObject {

/** The ID of the file. */
/** The ID of the file, or the ID of the Box Hub when `type` is `hubs`. */
protected final String id;

/** The type of the item. A `hubs` item must be used as a single item. */
/**
* The type of the item. Use `file` to ask a question about a file, or `hubs` to search across and
* ask a question about the entire contents of a Box Hub. A `hubs` item must be the only item in
* the request.
*/
@JsonDeserialize(using = AiItemAskTypeField.AiItemAskTypeFieldDeserializer.class)
@JsonSerialize(using = AiItemAskTypeField.AiItemAskTypeFieldSerializer.class)
protected final EnumWrapper<AiItemAskTypeField> type;
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/com/box/sdkgen/schemas/signrequest/SignRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ public boolean equals(Object o) {
&& Objects.equals(externalId, casted.externalId)
&& Objects.equals(templateId, casted.templateId)
&& Objects.equals(externalSystemName, casted.externalSystemName)
&& Objects.equals(requestFlow, casted.requestFlow)
&& Objects.equals(type, casted.type)
&& Objects.equals(sourceFiles, casted.sourceFiles)
&& Objects.equals(signers, casted.signers)
Expand Down Expand Up @@ -282,6 +283,7 @@ public int hashCode() {
externalId,
templateId,
externalSystemName,
requestFlow,
type,
sourceFiles,
signers,
Expand Down Expand Up @@ -357,6 +359,10 @@ public String toString() {
+ externalSystemName
+ '\''
+ ", "
+ "requestFlow='"
+ requestFlow
+ '\''
+ ", "
+ "type='"
+ type
+ '\''
Expand Down Expand Up @@ -663,6 +669,13 @@ public Builder externalSystemName(String externalSystemName) {
return this;
}

@Override
public Builder requestFlow(String requestFlow) {
this.requestFlow = requestFlow;
this.markNullableFieldAsSet("request_flow");
return this;
}

public SignRequest build() {
return new SignRequest(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ public class SignRequestBase extends SerializableObject {
@Nullable
protected String externalSystemName;

/**
* The flow type of the sign request. Values can include `standard` or `cfr11`. When not specified
* during creation, a default is chosen based on admin settings.
*/
@JsonProperty("request_flow")
@Nullable
protected String requestFlow;

public SignRequestBase() {
super();
}
Expand All @@ -126,6 +134,7 @@ protected SignRequestBase(Builder builder) {
this.externalId = builder.externalId;
this.templateId = builder.templateId;
this.externalSystemName = builder.externalSystemName;
this.requestFlow = builder.requestFlow;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
}

Expand Down Expand Up @@ -181,6 +190,10 @@ public String getExternalSystemName() {
return externalSystemName;
}

public String getRequestFlow() {
return requestFlow;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -202,7 +215,8 @@ public boolean equals(Object o) {
&& Objects.equals(daysValid, casted.daysValid)
&& Objects.equals(externalId, casted.externalId)
&& Objects.equals(templateId, casted.templateId)
&& Objects.equals(externalSystemName, casted.externalSystemName);
&& Objects.equals(externalSystemName, casted.externalSystemName)
&& Objects.equals(requestFlow, casted.requestFlow);
}

@Override
Expand All @@ -220,7 +234,8 @@ public int hashCode() {
daysValid,
externalId,
templateId,
externalSystemName);
externalSystemName,
requestFlow);
}

@Override
Expand Down Expand Up @@ -277,6 +292,10 @@ public String toString() {
+ "externalSystemName='"
+ externalSystemName
+ '\''
+ ", "
+ "requestFlow='"
+ requestFlow
+ '\''
+ "}";
}

Expand Down Expand Up @@ -308,6 +327,8 @@ public static class Builder extends NullableFieldTracker {

protected String externalSystemName;

protected String requestFlow;

public Builder isDocumentPreparationNeeded(Boolean isDocumentPreparationNeeded) {
this.isDocumentPreparationNeeded = isDocumentPreparationNeeded;
return this;
Expand Down Expand Up @@ -381,6 +402,12 @@ public Builder externalSystemName(String externalSystemName) {
return this;
}

public Builder requestFlow(String requestFlow) {
this.requestFlow = requestFlow;
this.markNullableFieldAsSet("request_flow");
return this;
}

public SignRequestBase build() {
return new SignRequestBase(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public boolean equals(Object o) {
&& Objects.equals(externalId, casted.externalId)
&& Objects.equals(templateId, casted.templateId)
&& Objects.equals(externalSystemName, casted.externalSystemName)
&& Objects.equals(requestFlow, casted.requestFlow)
&& Objects.equals(sourceFiles, casted.sourceFiles)
&& Objects.equals(signatureColor, casted.signatureColor)
&& Objects.equals(signers, casted.signers)
Expand All @@ -130,6 +131,7 @@ public int hashCode() {
externalId,
templateId,
externalSystemName,
requestFlow,
sourceFiles,
signatureColor,
signers,
Expand Down Expand Up @@ -191,6 +193,10 @@ public String toString() {
+ externalSystemName
+ '\''
+ ", "
+ "requestFlow='"
+ requestFlow
+ '\''
+ ", "
+ "sourceFiles='"
+ sourceFiles
+ '\''
Expand Down Expand Up @@ -335,6 +341,13 @@ public Builder externalSystemName(String externalSystemName) {
return this;
}

@Override
public Builder requestFlow(String requestFlow) {
this.requestFlow = requestFlow;
this.markNullableFieldAsSet("request_flow");
return this;
}

public SignRequestCreateRequest build() {
return new SignRequestCreateRequest(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.box.sdkgen.schemas.signrequestsignerinput;

import com.box.sdkgen.internal.Nullable;
import com.box.sdkgen.schemas.signrequestprefilltag.SignRequestPrefillTag;
import com.box.sdkgen.schemas.signrequestsignerinputcustomvalidation.SignRequestSignerInputCustomValidation;
import com.box.sdkgen.schemas.signrequestsignerinputdateasiavalidation.SignRequestSignerInputDateAsiaValidation;
Expand Down Expand Up @@ -58,6 +59,21 @@ public class SignRequestSignerInput extends SignRequestPrefillTag {
*/
protected SignRequestSignerInputValidation validation;

/**
* The reason for the signer's input, applicable to signature or initial content types in a
* `cfr11` request flow. The value is `null` when not applicable.
*/
@Nullable protected String reason;

/**
* Indicates whether the signer's input has been validated through re-authentication. Applicable
* only for signature or initial content types in a `cfr11` request flow. The value is `null` for
* standard request flows or non-applicable input types.
*/
@JsonProperty("is_validated")
@Nullable
protected Boolean isValidated;

public SignRequestSignerInput(@JsonProperty("page_index") long pageIndex) {
super();
this.pageIndex = pageIndex;
Expand All @@ -70,6 +86,8 @@ protected SignRequestSignerInput(Builder builder) {
this.pageIndex = builder.pageIndex;
this.readOnly = builder.readOnly;
this.validation = builder.validation;
this.reason = builder.reason;
this.isValidated = builder.isValidated;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
}

Expand All @@ -93,6 +111,14 @@ public SignRequestSignerInputValidation getValidation() {
return validation;
}

public String getReason() {
return reason;
}

public Boolean getIsValidated() {
return isValidated;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -110,7 +136,9 @@ public boolean equals(Object o) {
&& Objects.equals(contentType, casted.contentType)
&& Objects.equals(pageIndex, casted.pageIndex)
&& Objects.equals(readOnly, casted.readOnly)
&& Objects.equals(validation, casted.validation);
&& Objects.equals(validation, casted.validation)
&& Objects.equals(reason, casted.reason)
&& Objects.equals(isValidated, casted.isValidated);
}

@Override
Expand All @@ -124,7 +152,9 @@ public int hashCode() {
contentType,
pageIndex,
readOnly,
validation);
validation,
reason,
isValidated);
}

@Override
Expand Down Expand Up @@ -165,6 +195,14 @@ public String toString() {
+ "validation='"
+ validation
+ '\''
+ ", "
+ "reason='"
+ reason
+ '\''
+ ", "
+ "isValidated='"
+ isValidated
+ '\''
+ "}";
}

Expand All @@ -180,6 +218,10 @@ public static class Builder extends SignRequestPrefillTag.Builder {

protected SignRequestSignerInputValidation validation;

protected String reason;

protected Boolean isValidated;

public Builder(long pageIndex) {
super();
this.pageIndex = pageIndex;
Expand Down Expand Up @@ -270,6 +312,18 @@ public Builder validation(SignRequestSignerInputValidation validation) {
return this;
}

public Builder reason(String reason) {
this.reason = reason;
this.markNullableFieldAsSet("reason");
return this;
}

public Builder isValidated(Boolean isValidated) {
this.isValidated = isValidated;
this.markNullableFieldAsSet("is_validated");
return this;
}

@Override
public Builder documentTagId(String documentTagId) {
this.documentTagId = documentTagId;
Expand Down
Loading
Loading