diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1332969..fea3454 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.1" + ".": "1.0.0" } \ No newline at end of file diff --git a/README.md b/README.md index ccdf68e..ca194c2 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.llamacloud_prod.api/llama-cloud)](https://central.sonatype.com/artifact/com.llamacloud_prod.api/llama-cloud/0.0.1) -[![javadoc](https://javadoc.io/badge2/com.llamacloud_prod.api/llama-cloud/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud/0.0.1) +[![Maven Central](https://img.shields.io/maven-central/v/com.llamacloud_prod.api/llama-cloud)](https://central.sonatype.com/artifact/com.llamacloud_prod.api/llama-cloud/1.0.0) +[![javadoc](https://javadoc.io/badge2/com.llamacloud_prod.api/llama-cloud/1.0.0/javadoc.svg)](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud/1.0.0) @@ -22,7 +22,7 @@ Use the Llama Cloud MCP Server to enable AI assistants to interact with this API -The REST API documentation can be found on [developers.llamaindex.ai](https://developers.llamaindex.ai/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud/0.0.1). +The REST API documentation can be found on [developers.llamaindex.ai](https://developers.llamaindex.ai/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud/1.0.0). @@ -33,7 +33,7 @@ The REST API documentation can be found on [developers.llamaindex.ai](https://de ### Gradle ```kotlin -implementation("ai.llamaindex:llama-cloud:0.0.1") +implementation("ai.llamaindex:llama-cloud:1.0.0") ``` ### Maven @@ -42,7 +42,7 @@ implementation("ai.llamaindex:llama-cloud:0.0.1") ai.llamaindex llama-cloud - 0.0.1 + 1.0.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 538ea70..9945957 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "ai.llamaindex" - version = "0.0.1" // x-release-please-version + version = "1.0.0" // x-release-please-version } subprojects { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParams.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParams.kt index ea2a607..c9cf31c 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParams.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParams.kt @@ -9335,6 +9335,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -9350,6 +9351,9 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), @@ -9357,6 +9361,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, mutableMapOf(), ) @@ -9389,6 +9394,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' + * header (value 'sha256='). Recompute the HMAC over the raw request body + * with this secret to verify the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected + * type (e.g. if the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -9427,6 +9444,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field + * has an unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -9464,6 +9491,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -9474,6 +9502,7 @@ private constructor( webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() @@ -9561,6 +9590,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each + * request includes an HMAC-SHA256 signature of the request body in the + * 'LC-Signature' header (value 'sha256='). Recompute the HMAC over the + * raw request body with this secret to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed + * [String] value instead. This method is primarily for setting the field to + * an undocumented or not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -9614,6 +9670,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -9639,6 +9696,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -9663,6 +9721,7 @@ private constructor( ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @@ -10103,6 +10162,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -10112,6 +10172,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -10120,7 +10181,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponse.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponse.kt index 0cf8178..850dd92 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponse.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponse.kt @@ -9430,6 +9430,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -9445,6 +9446,9 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), @@ -9452,6 +9456,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, mutableMapOf(), ) @@ -9487,6 +9492,19 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each + * request includes an HMAC-SHA256 signature of the request body in the + * 'LC-Signature' header (value 'sha256='). Recompute the HMAC over the + * raw request body with this secret to verify the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an + * unexpected type (e.g. if the server responded with an unexpected + * value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -9526,6 +9544,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON + * field has an unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -9563,6 +9591,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -9573,6 +9602,7 @@ private constructor( webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() @@ -9664,6 +9694,35 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each + * request includes an HMAC-SHA256 signature of the request body in the + * 'LC-Signature' header (value 'sha256='). Recompute the HMAC over + * the raw request body with this secret to verify the delivery is + * authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a + * well-typed [String] value instead. This method is primarily for + * setting the field to an undocumented or not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = + apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -9719,6 +9778,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -9744,6 +9804,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -9768,6 +9829,7 @@ private constructor( ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @@ -10213,6 +10275,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -10222,6 +10285,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -10230,7 +10294,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponse.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponse.kt index ea455f1..c096155 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponse.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponse.kt @@ -26,6 +26,7 @@ private constructor( private val id: JsonField, private val exportConfigId: JsonField, private val name: JsonField, + private val outputDirectoryId: JsonField, private val projectId: JsonField, private val sourceDirectoryId: JsonField, private val syncConfigId: JsonField, @@ -45,6 +46,9 @@ private constructor( @ExcludeMissing exportConfigId: JsonField = JsonMissing.of(), @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + @JsonProperty("output_directory_id") + @ExcludeMissing + outputDirectoryId: JsonField = JsonMissing.of(), @JsonProperty("project_id") @ExcludeMissing projectId: JsonField = JsonMissing.of(), @JsonProperty("source_directory_id") @ExcludeMissing @@ -72,6 +76,7 @@ private constructor( id, exportConfigId, name, + outputDirectoryId, projectId, sourceDirectoryId, syncConfigId, @@ -108,6 +113,14 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * ID of the output directory holding the indexed files. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun outputDirectoryId(): String = outputDirectoryId.getRequired("output_directory_id") + /** * Project this index belongs to. * @@ -203,6 +216,16 @@ private constructor( */ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + /** + * Returns the raw JSON value of [outputDirectoryId]. + * + * Unlike [outputDirectoryId], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_directory_id") + @ExcludeMissing + fun _outputDirectoryId(): JsonField = outputDirectoryId + /** * Returns the raw JSON value of [projectId]. * @@ -301,6 +324,7 @@ private constructor( * .id() * .exportConfigId() * .name() + * .outputDirectoryId() * .projectId() * .sourceDirectoryId() * .syncConfigId() @@ -315,6 +339,7 @@ private constructor( private var id: JsonField? = null private var exportConfigId: JsonField? = null private var name: JsonField? = null + private var outputDirectoryId: JsonField? = null private var projectId: JsonField? = null private var sourceDirectoryId: JsonField? = null private var syncConfigId: JsonField? = null @@ -331,6 +356,7 @@ private constructor( id = indexCreateResponse.id exportConfigId = indexCreateResponse.exportConfigId name = indexCreateResponse.name + outputDirectoryId = indexCreateResponse.outputDirectoryId projectId = indexCreateResponse.projectId sourceDirectoryId = indexCreateResponse.sourceDirectoryId syncConfigId = indexCreateResponse.syncConfigId @@ -379,6 +405,21 @@ private constructor( */ fun name(name: JsonField) = apply { this.name = name } + /** ID of the output directory holding the indexed files. */ + fun outputDirectoryId(outputDirectoryId: String) = + outputDirectoryId(JsonField.of(outputDirectoryId)) + + /** + * Sets [Builder.outputDirectoryId] to an arbitrary JSON value. + * + * You should usually call [Builder.outputDirectoryId] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputDirectoryId(outputDirectoryId: JsonField) = apply { + this.outputDirectoryId = outputDirectoryId + } + /** Project this index belongs to. */ fun projectId(projectId: String) = projectId(JsonField.of(projectId)) @@ -544,6 +585,7 @@ private constructor( * .id() * .exportConfigId() * .name() + * .outputDirectoryId() * .projectId() * .sourceDirectoryId() * .syncConfigId() @@ -556,6 +598,7 @@ private constructor( checkRequired("id", id), checkRequired("exportConfigId", exportConfigId), checkRequired("name", name), + checkRequired("outputDirectoryId", outputDirectoryId), checkRequired("projectId", projectId), checkRequired("sourceDirectoryId", sourceDirectoryId), checkRequired("syncConfigId", syncConfigId), @@ -587,6 +630,7 @@ private constructor( id() exportConfigId() name() + outputDirectoryId() projectId() sourceDirectoryId() syncConfigId() @@ -617,6 +661,7 @@ private constructor( (if (id.asKnown().isPresent) 1 else 0) + (if (exportConfigId.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + + (if (outputDirectoryId.asKnown().isPresent) 1 else 0) + (if (projectId.asKnown().isPresent) 1 else 0) + (if (sourceDirectoryId.asKnown().isPresent) 1 else 0) + (if (syncConfigId.asKnown().isPresent) 1 else 0) + @@ -745,6 +790,7 @@ private constructor( id == other.id && exportConfigId == other.exportConfigId && name == other.name && + outputDirectoryId == other.outputDirectoryId && projectId == other.projectId && sourceDirectoryId == other.sourceDirectoryId && syncConfigId == other.syncConfigId && @@ -762,6 +808,7 @@ private constructor( id, exportConfigId, name, + outputDirectoryId, projectId, sourceDirectoryId, syncConfigId, @@ -778,5 +825,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "IndexCreateResponse{id=$id, exportConfigId=$exportConfigId, name=$name, projectId=$projectId, sourceDirectoryId=$sourceDirectoryId, syncConfigId=$syncConfigId, createdAt=$createdAt, description=$description, lastExportedAt=$lastExportedAt, lastSyncedAt=$lastSyncedAt, metadata=$metadata, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" + "IndexCreateResponse{id=$id, exportConfigId=$exportConfigId, name=$name, outputDirectoryId=$outputDirectoryId, projectId=$projectId, sourceDirectoryId=$sourceDirectoryId, syncConfigId=$syncConfigId, createdAt=$createdAt, description=$description, lastExportedAt=$lastExportedAt, lastSyncedAt=$lastSyncedAt, metadata=$metadata, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" } diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponse.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponse.kt index 7ebac05..030d5a3 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponse.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponse.kt @@ -26,6 +26,7 @@ private constructor( private val id: JsonField, private val exportConfigId: JsonField, private val name: JsonField, + private val outputDirectoryId: JsonField, private val projectId: JsonField, private val sourceDirectoryId: JsonField, private val syncConfigId: JsonField, @@ -45,6 +46,9 @@ private constructor( @ExcludeMissing exportConfigId: JsonField = JsonMissing.of(), @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + @JsonProperty("output_directory_id") + @ExcludeMissing + outputDirectoryId: JsonField = JsonMissing.of(), @JsonProperty("project_id") @ExcludeMissing projectId: JsonField = JsonMissing.of(), @JsonProperty("source_directory_id") @ExcludeMissing @@ -72,6 +76,7 @@ private constructor( id, exportConfigId, name, + outputDirectoryId, projectId, sourceDirectoryId, syncConfigId, @@ -108,6 +113,14 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * ID of the output directory holding the indexed files. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun outputDirectoryId(): String = outputDirectoryId.getRequired("output_directory_id") + /** * Project this index belongs to. * @@ -203,6 +216,16 @@ private constructor( */ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + /** + * Returns the raw JSON value of [outputDirectoryId]. + * + * Unlike [outputDirectoryId], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_directory_id") + @ExcludeMissing + fun _outputDirectoryId(): JsonField = outputDirectoryId + /** * Returns the raw JSON value of [projectId]. * @@ -301,6 +324,7 @@ private constructor( * .id() * .exportConfigId() * .name() + * .outputDirectoryId() * .projectId() * .sourceDirectoryId() * .syncConfigId() @@ -315,6 +339,7 @@ private constructor( private var id: JsonField? = null private var exportConfigId: JsonField? = null private var name: JsonField? = null + private var outputDirectoryId: JsonField? = null private var projectId: JsonField? = null private var sourceDirectoryId: JsonField? = null private var syncConfigId: JsonField? = null @@ -331,6 +356,7 @@ private constructor( id = indexGetResponse.id exportConfigId = indexGetResponse.exportConfigId name = indexGetResponse.name + outputDirectoryId = indexGetResponse.outputDirectoryId projectId = indexGetResponse.projectId sourceDirectoryId = indexGetResponse.sourceDirectoryId syncConfigId = indexGetResponse.syncConfigId @@ -379,6 +405,21 @@ private constructor( */ fun name(name: JsonField) = apply { this.name = name } + /** ID of the output directory holding the indexed files. */ + fun outputDirectoryId(outputDirectoryId: String) = + outputDirectoryId(JsonField.of(outputDirectoryId)) + + /** + * Sets [Builder.outputDirectoryId] to an arbitrary JSON value. + * + * You should usually call [Builder.outputDirectoryId] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputDirectoryId(outputDirectoryId: JsonField) = apply { + this.outputDirectoryId = outputDirectoryId + } + /** Project this index belongs to. */ fun projectId(projectId: String) = projectId(JsonField.of(projectId)) @@ -544,6 +585,7 @@ private constructor( * .id() * .exportConfigId() * .name() + * .outputDirectoryId() * .projectId() * .sourceDirectoryId() * .syncConfigId() @@ -556,6 +598,7 @@ private constructor( checkRequired("id", id), checkRequired("exportConfigId", exportConfigId), checkRequired("name", name), + checkRequired("outputDirectoryId", outputDirectoryId), checkRequired("projectId", projectId), checkRequired("sourceDirectoryId", sourceDirectoryId), checkRequired("syncConfigId", syncConfigId), @@ -587,6 +630,7 @@ private constructor( id() exportConfigId() name() + outputDirectoryId() projectId() sourceDirectoryId() syncConfigId() @@ -617,6 +661,7 @@ private constructor( (if (id.asKnown().isPresent) 1 else 0) + (if (exportConfigId.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + + (if (outputDirectoryId.asKnown().isPresent) 1 else 0) + (if (projectId.asKnown().isPresent) 1 else 0) + (if (sourceDirectoryId.asKnown().isPresent) 1 else 0) + (if (syncConfigId.asKnown().isPresent) 1 else 0) + @@ -745,6 +790,7 @@ private constructor( id == other.id && exportConfigId == other.exportConfigId && name == other.name && + outputDirectoryId == other.outputDirectoryId && projectId == other.projectId && sourceDirectoryId == other.sourceDirectoryId && syncConfigId == other.syncConfigId && @@ -762,6 +808,7 @@ private constructor( id, exportConfigId, name, + outputDirectoryId, projectId, sourceDirectoryId, syncConfigId, @@ -778,5 +825,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "IndexGetResponse{id=$id, exportConfigId=$exportConfigId, name=$name, projectId=$projectId, sourceDirectoryId=$sourceDirectoryId, syncConfigId=$syncConfigId, createdAt=$createdAt, description=$description, lastExportedAt=$lastExportedAt, lastSyncedAt=$lastSyncedAt, metadata=$metadata, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" + "IndexGetResponse{id=$id, exportConfigId=$exportConfigId, name=$name, outputDirectoryId=$outputDirectoryId, projectId=$projectId, sourceDirectoryId=$sourceDirectoryId, syncConfigId=$syncConfigId, createdAt=$createdAt, description=$description, lastExportedAt=$lastExportedAt, lastSyncedAt=$lastSyncedAt, metadata=$metadata, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" } diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponse.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponse.kt index 1bf8e97..bff74d3 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponse.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponse.kt @@ -26,6 +26,7 @@ private constructor( private val id: JsonField, private val exportConfigId: JsonField, private val name: JsonField, + private val outputDirectoryId: JsonField, private val projectId: JsonField, private val sourceDirectoryId: JsonField, private val syncConfigId: JsonField, @@ -45,6 +46,9 @@ private constructor( @ExcludeMissing exportConfigId: JsonField = JsonMissing.of(), @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + @JsonProperty("output_directory_id") + @ExcludeMissing + outputDirectoryId: JsonField = JsonMissing.of(), @JsonProperty("project_id") @ExcludeMissing projectId: JsonField = JsonMissing.of(), @JsonProperty("source_directory_id") @ExcludeMissing @@ -72,6 +76,7 @@ private constructor( id, exportConfigId, name, + outputDirectoryId, projectId, sourceDirectoryId, syncConfigId, @@ -108,6 +113,14 @@ private constructor( */ fun name(): String = name.getRequired("name") + /** + * ID of the output directory holding the indexed files. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun outputDirectoryId(): String = outputDirectoryId.getRequired("output_directory_id") + /** * Project this index belongs to. * @@ -203,6 +216,16 @@ private constructor( */ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + /** + * Returns the raw JSON value of [outputDirectoryId]. + * + * Unlike [outputDirectoryId], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_directory_id") + @ExcludeMissing + fun _outputDirectoryId(): JsonField = outputDirectoryId + /** * Returns the raw JSON value of [projectId]. * @@ -301,6 +324,7 @@ private constructor( * .id() * .exportConfigId() * .name() + * .outputDirectoryId() * .projectId() * .sourceDirectoryId() * .syncConfigId() @@ -315,6 +339,7 @@ private constructor( private var id: JsonField? = null private var exportConfigId: JsonField? = null private var name: JsonField? = null + private var outputDirectoryId: JsonField? = null private var projectId: JsonField? = null private var sourceDirectoryId: JsonField? = null private var syncConfigId: JsonField? = null @@ -331,6 +356,7 @@ private constructor( id = indexListResponse.id exportConfigId = indexListResponse.exportConfigId name = indexListResponse.name + outputDirectoryId = indexListResponse.outputDirectoryId projectId = indexListResponse.projectId sourceDirectoryId = indexListResponse.sourceDirectoryId syncConfigId = indexListResponse.syncConfigId @@ -379,6 +405,21 @@ private constructor( */ fun name(name: JsonField) = apply { this.name = name } + /** ID of the output directory holding the indexed files. */ + fun outputDirectoryId(outputDirectoryId: String) = + outputDirectoryId(JsonField.of(outputDirectoryId)) + + /** + * Sets [Builder.outputDirectoryId] to an arbitrary JSON value. + * + * You should usually call [Builder.outputDirectoryId] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputDirectoryId(outputDirectoryId: JsonField) = apply { + this.outputDirectoryId = outputDirectoryId + } + /** Project this index belongs to. */ fun projectId(projectId: String) = projectId(JsonField.of(projectId)) @@ -544,6 +585,7 @@ private constructor( * .id() * .exportConfigId() * .name() + * .outputDirectoryId() * .projectId() * .sourceDirectoryId() * .syncConfigId() @@ -556,6 +598,7 @@ private constructor( checkRequired("id", id), checkRequired("exportConfigId", exportConfigId), checkRequired("name", name), + checkRequired("outputDirectoryId", outputDirectoryId), checkRequired("projectId", projectId), checkRequired("sourceDirectoryId", sourceDirectoryId), checkRequired("syncConfigId", syncConfigId), @@ -587,6 +630,7 @@ private constructor( id() exportConfigId() name() + outputDirectoryId() projectId() sourceDirectoryId() syncConfigId() @@ -617,6 +661,7 @@ private constructor( (if (id.asKnown().isPresent) 1 else 0) + (if (exportConfigId.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + + (if (outputDirectoryId.asKnown().isPresent) 1 else 0) + (if (projectId.asKnown().isPresent) 1 else 0) + (if (sourceDirectoryId.asKnown().isPresent) 1 else 0) + (if (syncConfigId.asKnown().isPresent) 1 else 0) + @@ -745,6 +790,7 @@ private constructor( id == other.id && exportConfigId == other.exportConfigId && name == other.name && + outputDirectoryId == other.outputDirectoryId && projectId == other.projectId && sourceDirectoryId == other.sourceDirectoryId && syncConfigId == other.syncConfigId && @@ -762,6 +808,7 @@ private constructor( id, exportConfigId, name, + outputDirectoryId, projectId, sourceDirectoryId, syncConfigId, @@ -778,5 +825,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "IndexListResponse{id=$id, exportConfigId=$exportConfigId, name=$name, projectId=$projectId, sourceDirectoryId=$sourceDirectoryId, syncConfigId=$syncConfigId, createdAt=$createdAt, description=$description, lastExportedAt=$lastExportedAt, lastSyncedAt=$lastSyncedAt, metadata=$metadata, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" + "IndexListResponse{id=$id, exportConfigId=$exportConfigId, name=$name, outputDirectoryId=$outputDirectoryId, projectId=$projectId, sourceDirectoryId=$sourceDirectoryId, syncConfigId=$syncConfigId, createdAt=$createdAt, description=$description, lastExportedAt=$lastExportedAt, lastSyncedAt=$lastSyncedAt, metadata=$metadata, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" } diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParams.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParams.kt index 1617940..474e46f 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParams.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParams.kt @@ -847,6 +847,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -862,10 +863,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are @@ -895,6 +906,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -933,6 +956,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -966,6 +999,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -974,6 +1008,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -1053,6 +1088,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -1097,6 +1159,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -1121,6 +1184,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -1144,6 +1208,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @JsonCreator private constructor(private val value: JsonField) : @@ -1565,6 +1630,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -1574,6 +1640,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -1582,7 +1649,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJob.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJob.kt index 5dc0afb..aa819ce 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJob.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJob.kt @@ -1315,6 +1315,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -1330,10 +1331,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events @@ -1363,6 +1374,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -1401,6 +1424,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -1437,6 +1470,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -1445,6 +1479,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -1526,6 +1561,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' + * header (value 'sha256='). Recompute the HMAC over the raw request body with + * this secret to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -1575,6 +1637,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -1600,6 +1663,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -1623,6 +1687,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @@ -2052,6 +2117,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -2061,6 +2127,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -2069,7 +2136,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParams.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParams.kt index 3636135..86c8d79 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParams.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParams.kt @@ -965,6 +965,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -980,10 +981,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events that trigger this webhook. Options: 'parse.success' (job completed), 'parse.error' @@ -1015,6 +1026,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * HTTPS URL to receive webhook POST requests. Must be publicly accessible * @@ -1053,6 +1076,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -1086,6 +1119,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -1094,6 +1128,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -1181,6 +1216,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** HTTPS URL to receive webhook POST requests. Must be publicly accessible */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -1225,6 +1287,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -1249,6 +1312,7 @@ private constructor( webhookEvents() webhookHeaders().ifPresent { it.validate() } webhookOutputFormat().ifPresent { it.validate() } + webhookSigningSecret() webhookUrl() validated = true } @@ -1272,6 +1336,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.size ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (webhookOutputFormat.asKnown().getOrNull()?.validity() ?: 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) /** @@ -1548,6 +1613,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -1557,6 +1623,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -1565,7 +1632,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequest.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequest.kt index 2bb7e31..a1dae1b 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequest.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequest.kt @@ -465,6 +465,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -480,10 +481,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are @@ -513,6 +524,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -551,6 +574,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -584,6 +617,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -592,6 +626,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -671,6 +706,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -715,6 +777,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -739,6 +802,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -762,6 +826,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @JsonCreator private constructor(private val value: JsonField) : @@ -1183,6 +1248,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -1192,6 +1258,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -1200,7 +1267,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2Parameters.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2Parameters.kt index b795bbe..66f84bb 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2Parameters.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2Parameters.kt @@ -54,6 +54,7 @@ private constructor( private val pageRanges: JsonField, private val processingControl: JsonField, private val processingOptions: JsonField, + private val webhookConfigurationIds: JsonField>, private val webhookConfigurations: JsonField>, private val additionalProperties: MutableMap, ) { @@ -89,6 +90,9 @@ private constructor( @JsonProperty("processing_options") @ExcludeMissing processingOptions: JsonField = JsonMissing.of(), + @JsonProperty("webhook_configuration_ids") + @ExcludeMissing + webhookConfigurationIds: JsonField> = JsonMissing.of(), @JsonProperty("webhook_configurations") @ExcludeMissing webhookConfigurations: JsonField> = JsonMissing.of(), @@ -106,6 +110,7 @@ private constructor( pageRanges, processingControl, processingOptions, + webhookConfigurationIds, webhookConfigurations, mutableMapOf(), ) @@ -137,7 +142,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -242,6 +247,15 @@ private constructor( fun processingOptions(): Optional = processingOptions.getOptional("processing_options") + /** + * IDs of saved webhook configurations to notify for this job. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun webhookConfigurationIds(): Optional> = + webhookConfigurationIds.getOptional("webhook_configuration_ids") + /** * Webhook endpoints for job status notifications. Multiple webhooks can be configured for * different events or services @@ -345,6 +359,16 @@ private constructor( @ExcludeMissing fun _processingOptions(): JsonField = processingOptions + /** + * Returns the raw JSON value of [webhookConfigurationIds]. + * + * Unlike [webhookConfigurationIds], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_configuration_ids") + @ExcludeMissing + fun _webhookConfigurationIds(): JsonField> = webhookConfigurationIds + /** * Returns the raw JSON value of [webhookConfigurations]. * @@ -397,6 +421,7 @@ private constructor( private var pageRanges: JsonField = JsonMissing.of() private var processingControl: JsonField = JsonMissing.of() private var processingOptions: JsonField = JsonMissing.of() + private var webhookConfigurationIds: JsonField>? = null private var webhookConfigurations: JsonField>? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -415,6 +440,8 @@ private constructor( pageRanges = parseV2Parameters.pageRanges processingControl = parseV2Parameters.processingControl processingOptions = parseV2Parameters.processingOptions + webhookConfigurationIds = + parseV2Parameters.webhookConfigurationIds.map { it.toMutableList() } webhookConfigurations = parseV2Parameters.webhookConfigurations.map { it.toMutableList() } additionalProperties = parseV2Parameters.additionalProperties.toMutableMap() @@ -453,7 +480,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -643,6 +670,40 @@ private constructor( this.processingOptions = processingOptions } + /** IDs of saved webhook configurations to notify for this job. */ + fun webhookConfigurationIds(webhookConfigurationIds: List?) = + webhookConfigurationIds(JsonField.ofNullable(webhookConfigurationIds)) + + /** + * Alias for calling [Builder.webhookConfigurationIds] with + * `webhookConfigurationIds.orElse(null)`. + */ + fun webhookConfigurationIds(webhookConfigurationIds: Optional>) = + webhookConfigurationIds(webhookConfigurationIds.getOrNull()) + + /** + * Sets [Builder.webhookConfigurationIds] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookConfigurationIds] with a well-typed + * `List` value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun webhookConfigurationIds(webhookConfigurationIds: JsonField>) = apply { + this.webhookConfigurationIds = webhookConfigurationIds.map { it.toMutableList() } + } + + /** + * Adds a single [String] to [webhookConfigurationIds]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addWebhookConfigurationId(webhookConfigurationId: String) = apply { + webhookConfigurationIds = + (webhookConfigurationIds ?: JsonField.of(mutableListOf())).also { + checkKnown("webhookConfigurationIds", it).add(webhookConfigurationId) + } + } + /** * Webhook endpoints for job status notifications. Multiple webhooks can be configured for * different events or services @@ -721,6 +782,7 @@ private constructor( pageRanges, processingControl, processingOptions, + (webhookConfigurationIds ?: JsonMissing.of()).map { it.toImmutable() }, (webhookConfigurations ?: JsonMissing.of()).map { it.toImmutable() }, additionalProperties.toMutableMap(), ) @@ -757,6 +819,7 @@ private constructor( pageRanges().ifPresent { it.validate() } processingControl().ifPresent { it.validate() } processingOptions().ifPresent { it.validate() } + webhookConfigurationIds() webhookConfigurations().ifPresent { it.forEach { it.validate() } } validated = true } @@ -788,6 +851,7 @@ private constructor( (pageRanges.asKnown().getOrNull()?.validity() ?: 0) + (processingControl.asKnown().getOrNull()?.validity() ?: 0) + (processingOptions.asKnown().getOrNull()?.validity() ?: 0) + + (webhookConfigurationIds.asKnown().getOrNull()?.size ?: 0) + (webhookConfigurations.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) /** @@ -947,7 +1011,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -969,6 +1033,8 @@ private constructor( @JvmField val LATEST = of("latest") + @JvmField val _2026_06_26 = of("2026-06-26") + @JvmField val _2026_06_18 = of("2026-06-18") @JvmField val _2025_12_11 = of("2025-12-11") @@ -979,6 +1045,7 @@ private constructor( /** An enum containing [Version]'s known values. */ enum class Known { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, } @@ -994,6 +1061,7 @@ private constructor( */ enum class Value { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, /** An enum member indicating that [Version] was instantiated with an unknown value. */ @@ -1010,6 +1078,7 @@ private constructor( fun value(): Value = when (this) { LATEST -> Value.LATEST + _2026_06_26 -> Value._2026_06_26 _2026_06_18 -> Value._2026_06_18 _2025_12_11 -> Value._2025_12_11 else -> Value._UNKNOWN @@ -1027,6 +1096,7 @@ private constructor( fun known(): Known = when (this) { LATEST -> Known.LATEST + _2026_06_26 -> Known._2026_06_26 _2026_06_18 -> Known._2026_06_18 _2025_12_11 -> Known._2025_12_11 else -> throw LlamaCloudInvalidDataException("Unknown Version: $value") @@ -9377,7 +9447,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -9881,7 +9951,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -11495,7 +11565,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -11520,6 +11590,8 @@ private constructor( @JvmField val LATEST = of("latest") + @JvmField val _2026_06_26 = of("2026-06-26") + @JvmField val _2026_06_18 = of("2026-06-18") @JvmField val _2025_12_11 = of("2025-12-11") @@ -11530,6 +11602,7 @@ private constructor( /** An enum containing [Version]'s known values. */ enum class Known { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, } @@ -11545,6 +11618,7 @@ private constructor( */ enum class Value { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, /** @@ -11564,6 +11638,7 @@ private constructor( fun value(): Value = when (this) { LATEST -> Value.LATEST + _2026_06_26 -> Value._2026_06_26 _2026_06_18 -> Value._2026_06_18 _2025_12_11 -> Value._2025_12_11 else -> Value._UNKNOWN @@ -11581,6 +11656,7 @@ private constructor( fun known(): Known = when (this) { LATEST -> Known.LATEST + _2026_06_26 -> Known._2026_06_26 _2026_06_18 -> Known._2026_06_18 _2025_12_11 -> Known._2025_12_11 else -> throw LlamaCloudInvalidDataException("Unknown Version: $value") @@ -17681,6 +17757,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -17696,10 +17773,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events that trigger this webhook. Options: 'parse.success' (job completed), 'parse.error' @@ -17731,6 +17818,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * HTTPS URL to receive webhook POST requests. Must be publicly accessible * @@ -17769,6 +17868,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -17802,6 +17911,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -17810,6 +17920,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -17897,6 +18008,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** HTTPS URL to receive webhook POST requests. Must be publicly accessible */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -17941,6 +18079,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -17965,6 +18104,7 @@ private constructor( webhookEvents() webhookHeaders().ifPresent { it.validate() } webhookOutputFormat().ifPresent { it.validate() } + webhookSigningSecret() webhookUrl() validated = true } @@ -17988,6 +18128,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.size ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (webhookOutputFormat.asKnown().getOrNull()?.validity() ?: 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) /** @@ -18264,6 +18405,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -18273,6 +18415,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -18281,7 +18424,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { @@ -18303,6 +18446,7 @@ private constructor( pageRanges == other.pageRanges && processingControl == other.processingControl && processingOptions == other.processingOptions && + webhookConfigurationIds == other.webhookConfigurationIds && webhookConfigurations == other.webhookConfigurations && additionalProperties == other.additionalProperties } @@ -18322,6 +18466,7 @@ private constructor( pageRanges, processingControl, processingOptions, + webhookConfigurationIds, webhookConfigurations, additionalProperties, ) @@ -18330,5 +18475,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ParseV2Parameters{productType=$productType, tier=$tier, version=$version, agenticOptions=$agenticOptions, clientName=$clientName, cropBox=$cropBox, disableCache=$disableCache, fastOptions=$fastOptions, inputOptions=$inputOptions, outputOptions=$outputOptions, pageRanges=$pageRanges, processingControl=$processingControl, processingOptions=$processingOptions, webhookConfigurations=$webhookConfigurations, additionalProperties=$additionalProperties}" + "ParseV2Parameters{productType=$productType, tier=$tier, version=$version, agenticOptions=$agenticOptions, clientName=$clientName, cropBox=$cropBox, disableCache=$disableCache, fastOptions=$fastOptions, inputOptions=$inputOptions, outputOptions=$outputOptions, pageRanges=$pageRanges, processingControl=$processingControl, processingOptions=$processingOptions, webhookConfigurationIds=$webhookConfigurationIds, webhookConfigurations=$webhookConfigurations, additionalProperties=$additionalProperties}" } diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreate.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreate.kt index 2eec138..22ff640 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreate.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreate.kt @@ -332,6 +332,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -347,10 +348,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are @@ -380,6 +391,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -418,6 +441,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -451,6 +484,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -459,6 +493,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -538,6 +573,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -582,6 +644,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -606,6 +669,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -629,6 +693,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @JsonCreator private constructor(private val value: JsonField) : @@ -1050,6 +1115,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -1059,6 +1125,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -1067,7 +1134,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParams.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParams.kt index a8f9b45..302c88c 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParams.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParams.kt @@ -76,7 +76,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -212,6 +212,24 @@ private constructor( */ fun sourceUrl(): Optional = body.sourceUrl() + /** + * Arbitrary key/value tags to attach to this job. Returned when retrieving the job. Not + * searchable. Limits apply to the number of entries and the length of keys and values; + * oversized metadata is rejected. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun userMetadata(): Optional = body.userMetadata() + + /** + * IDs of saved webhook configurations to notify for this job. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun webhookConfigurationIds(): Optional> = body.webhookConfigurationIds() + /** * Webhook endpoints for job status notifications. Multiple webhooks can be configured for * different events or services @@ -328,6 +346,21 @@ private constructor( */ fun _sourceUrl(): JsonField = body._sourceUrl() + /** + * Returns the raw JSON value of [userMetadata]. + * + * Unlike [userMetadata], this method doesn't throw if the JSON field has an unexpected type. + */ + fun _userMetadata(): JsonField = body._userMetadata() + + /** + * Returns the raw JSON value of [webhookConfigurationIds]. + * + * Unlike [webhookConfigurationIds], this method doesn't throw if the JSON field has an + * unexpected type. + */ + fun _webhookConfigurationIds(): JsonField> = body._webhookConfigurationIds() + /** * Returns the raw JSON value of [webhookConfigurations]. * @@ -431,7 +464,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -693,6 +726,60 @@ private constructor( */ fun sourceUrl(sourceUrl: JsonField) = apply { body.sourceUrl(sourceUrl) } + /** + * Arbitrary key/value tags to attach to this job. Returned when retrieving the job. Not + * searchable. Limits apply to the number of entries and the length of keys and values; + * oversized metadata is rejected. + */ + fun userMetadata(userMetadata: UserMetadata?) = apply { body.userMetadata(userMetadata) } + + /** Alias for calling [Builder.userMetadata] with `userMetadata.orElse(null)`. */ + fun userMetadata(userMetadata: Optional) = + userMetadata(userMetadata.getOrNull()) + + /** + * Sets [Builder.userMetadata] to an arbitrary JSON value. + * + * You should usually call [Builder.userMetadata] with a well-typed [UserMetadata] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun userMetadata(userMetadata: JsonField) = apply { + body.userMetadata(userMetadata) + } + + /** IDs of saved webhook configurations to notify for this job. */ + fun webhookConfigurationIds(webhookConfigurationIds: List?) = apply { + body.webhookConfigurationIds(webhookConfigurationIds) + } + + /** + * Alias for calling [Builder.webhookConfigurationIds] with + * `webhookConfigurationIds.orElse(null)`. + */ + fun webhookConfigurationIds(webhookConfigurationIds: Optional>) = + webhookConfigurationIds(webhookConfigurationIds.getOrNull()) + + /** + * Sets [Builder.webhookConfigurationIds] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookConfigurationIds] with a well-typed + * `List` value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun webhookConfigurationIds(webhookConfigurationIds: JsonField>) = apply { + body.webhookConfigurationIds(webhookConfigurationIds) + } + + /** + * Adds a single [String] to [webhookConfigurationIds]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addWebhookConfigurationId(webhookConfigurationId: String) = apply { + body.addWebhookConfigurationId(webhookConfigurationId) + } + /** * Webhook endpoints for job status notifications. Multiple webhooks can be configured for * different events or services @@ -900,6 +987,8 @@ private constructor( private val processingControl: JsonField, private val processingOptions: JsonField, private val sourceUrl: JsonField, + private val userMetadata: JsonField, + private val webhookConfigurationIds: JsonField>, private val webhookConfigurations: JsonField>, private val additionalProperties: MutableMap, ) { @@ -946,6 +1035,12 @@ private constructor( @JsonProperty("source_url") @ExcludeMissing sourceUrl: JsonField = JsonMissing.of(), + @JsonProperty("user_metadata") + @ExcludeMissing + userMetadata: JsonField = JsonMissing.of(), + @JsonProperty("webhook_configuration_ids") + @ExcludeMissing + webhookConfigurationIds: JsonField> = JsonMissing.of(), @JsonProperty("webhook_configurations") @ExcludeMissing webhookConfigurations: JsonField> = JsonMissing.of(), @@ -966,6 +1061,8 @@ private constructor( processingControl, processingOptions, sourceUrl, + userMetadata, + webhookConfigurationIds, webhookConfigurations, mutableMapOf(), ) @@ -984,7 +1081,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -1125,6 +1222,25 @@ private constructor( */ fun sourceUrl(): Optional = sourceUrl.getOptional("source_url") + /** + * Arbitrary key/value tags to attach to this job. Returned when retrieving the job. Not + * searchable. Limits apply to the number of entries and the length of keys and values; + * oversized metadata is rejected. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun userMetadata(): Optional = userMetadata.getOptional("user_metadata") + + /** + * IDs of saved webhook configurations to notify for this job. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookConfigurationIds(): Optional> = + webhookConfigurationIds.getOptional("webhook_configuration_ids") + /** * Webhook endpoints for job status notifications. Multiple webhooks can be configured for * different events or services @@ -1265,6 +1381,26 @@ private constructor( */ @JsonProperty("source_url") @ExcludeMissing fun _sourceUrl(): JsonField = sourceUrl + /** + * Returns the raw JSON value of [userMetadata]. + * + * Unlike [userMetadata], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("user_metadata") + @ExcludeMissing + fun _userMetadata(): JsonField = userMetadata + + /** + * Returns the raw JSON value of [webhookConfigurationIds]. + * + * Unlike [webhookConfigurationIds], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_configuration_ids") + @ExcludeMissing + fun _webhookConfigurationIds(): JsonField> = webhookConfigurationIds + /** * Returns the raw JSON value of [webhookConfigurations]. * @@ -1320,6 +1456,8 @@ private constructor( private var processingControl: JsonField = JsonMissing.of() private var processingOptions: JsonField = JsonMissing.of() private var sourceUrl: JsonField = JsonMissing.of() + private var userMetadata: JsonField = JsonMissing.of() + private var webhookConfigurationIds: JsonField>? = null private var webhookConfigurations: JsonField>? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -1341,6 +1479,8 @@ private constructor( processingControl = body.processingControl processingOptions = body.processingOptions sourceUrl = body.sourceUrl + userMetadata = body.userMetadata + webhookConfigurationIds = body.webhookConfigurationIds.map { it.toMutableList() } webhookConfigurations = body.webhookConfigurations.map { it.toMutableList() } additionalProperties = body.additionalProperties.toMutableMap() } @@ -1375,7 +1515,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -1642,6 +1782,63 @@ private constructor( */ fun sourceUrl(sourceUrl: JsonField) = apply { this.sourceUrl = sourceUrl } + /** + * Arbitrary key/value tags to attach to this job. Returned when retrieving the job. Not + * searchable. Limits apply to the number of entries and the length of keys and values; + * oversized metadata is rejected. + */ + fun userMetadata(userMetadata: UserMetadata?) = + userMetadata(JsonField.ofNullable(userMetadata)) + + /** Alias for calling [Builder.userMetadata] with `userMetadata.orElse(null)`. */ + fun userMetadata(userMetadata: Optional) = + userMetadata(userMetadata.getOrNull()) + + /** + * Sets [Builder.userMetadata] to an arbitrary JSON value. + * + * You should usually call [Builder.userMetadata] with a well-typed [UserMetadata] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun userMetadata(userMetadata: JsonField) = apply { + this.userMetadata = userMetadata + } + + /** IDs of saved webhook configurations to notify for this job. */ + fun webhookConfigurationIds(webhookConfigurationIds: List?) = + webhookConfigurationIds(JsonField.ofNullable(webhookConfigurationIds)) + + /** + * Alias for calling [Builder.webhookConfigurationIds] with + * `webhookConfigurationIds.orElse(null)`. + */ + fun webhookConfigurationIds(webhookConfigurationIds: Optional>) = + webhookConfigurationIds(webhookConfigurationIds.getOrNull()) + + /** + * Sets [Builder.webhookConfigurationIds] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookConfigurationIds] with a well-typed + * `List` value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun webhookConfigurationIds(webhookConfigurationIds: JsonField>) = apply { + this.webhookConfigurationIds = webhookConfigurationIds.map { it.toMutableList() } + } + + /** + * Adds a single [String] to [webhookConfigurationIds]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addWebhookConfigurationId(webhookConfigurationId: String) = apply { + webhookConfigurationIds = + (webhookConfigurationIds ?: JsonField.of(mutableListOf())).also { + checkKnown("webhookConfigurationIds", it).add(webhookConfigurationId) + } + } + /** * Webhook endpoints for job status notifications. Multiple webhooks can be configured * for different events or services @@ -1724,6 +1921,8 @@ private constructor( processingControl, processingOptions, sourceUrl, + userMetadata, + (webhookConfigurationIds ?: JsonMissing.of()).map { it.toImmutable() }, (webhookConfigurations ?: JsonMissing.of()).map { it.toImmutable() }, additionalProperties.toMutableMap(), ) @@ -1760,6 +1959,8 @@ private constructor( processingControl().ifPresent { it.validate() } processingOptions().ifPresent { it.validate() } sourceUrl() + userMetadata().ifPresent { it.validate() } + webhookConfigurationIds() webhookConfigurations().ifPresent { it.forEach { it.validate() } } validated = true } @@ -1795,6 +1996,8 @@ private constructor( (processingControl.asKnown().getOrNull()?.validity() ?: 0) + (processingOptions.asKnown().getOrNull()?.validity() ?: 0) + (if (sourceUrl.asKnown().isPresent) 1 else 0) + + (userMetadata.asKnown().getOrNull()?.validity() ?: 0) + + (webhookConfigurationIds.asKnown().getOrNull()?.size ?: 0) + (webhookConfigurations.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) override fun equals(other: Any?): Boolean { @@ -1819,6 +2022,8 @@ private constructor( processingControl == other.processingControl && processingOptions == other.processingOptions && sourceUrl == other.sourceUrl && + userMetadata == other.userMetadata && + webhookConfigurationIds == other.webhookConfigurationIds && webhookConfigurations == other.webhookConfigurations && additionalProperties == other.additionalProperties } @@ -1841,6 +2046,8 @@ private constructor( processingControl, processingOptions, sourceUrl, + userMetadata, + webhookConfigurationIds, webhookConfigurations, additionalProperties, ) @@ -1849,7 +2056,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Body{tier=$tier, version=$version, agenticOptions=$agenticOptions, clientName=$clientName, configurationId=$configurationId, cropBox=$cropBox, disableCache=$disableCache, fastOptions=$fastOptions, fileId=$fileId, httpProxy=$httpProxy, inputOptions=$inputOptions, outputOptions=$outputOptions, pageRanges=$pageRanges, processingControl=$processingControl, processingOptions=$processingOptions, sourceUrl=$sourceUrl, webhookConfigurations=$webhookConfigurations, additionalProperties=$additionalProperties}" + "Body{tier=$tier, version=$version, agenticOptions=$agenticOptions, clientName=$clientName, configurationId=$configurationId, cropBox=$cropBox, disableCache=$disableCache, fastOptions=$fastOptions, fileId=$fileId, httpProxy=$httpProxy, inputOptions=$inputOptions, outputOptions=$outputOptions, pageRanges=$pageRanges, processingControl=$processingControl, processingOptions=$processingOptions, sourceUrl=$sourceUrl, userMetadata=$userMetadata, webhookConfigurationIds=$webhookConfigurationIds, webhookConfigurations=$webhookConfigurations, additionalProperties=$additionalProperties}" } /** @@ -2009,7 +2216,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -2031,6 +2238,8 @@ private constructor( @JvmField val LATEST = of("latest") + @JvmField val _2026_06_26 = of("2026-06-26") + @JvmField val _2026_06_18 = of("2026-06-18") @JvmField val _2025_12_11 = of("2025-12-11") @@ -2041,6 +2250,7 @@ private constructor( /** An enum containing [Version]'s known values. */ enum class Known { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, } @@ -2056,6 +2266,7 @@ private constructor( */ enum class Value { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, /** An enum member indicating that [Version] was instantiated with an unknown value. */ @@ -2072,6 +2283,7 @@ private constructor( fun value(): Value = when (this) { LATEST -> Value.LATEST + _2026_06_26 -> Value._2026_06_26 _2026_06_18 -> Value._2026_06_18 _2025_12_11 -> Value._2025_12_11 else -> Value._UNKNOWN @@ -2089,6 +2301,7 @@ private constructor( fun known(): Known = when (this) { LATEST -> Known.LATEST + _2026_06_26 -> Known._2026_06_26 _2026_06_18 -> Known._2026_06_18 _2025_12_11 -> Known._2025_12_11 else -> throw LlamaCloudInvalidDataException("Unknown Version: $value") @@ -10439,7 +10652,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -10943,7 +11156,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -12557,7 +12770,7 @@ private constructor( * * Current `latest` by tier: * - `fast`: `2025-12-11` - * - `cost_effective`: `2026-06-18` + * - `cost_effective`: `2026-06-26` * - `agentic`: `2026-06-18` * - `agentic_plus`: `2026-06-18` * @@ -12582,6 +12795,8 @@ private constructor( @JvmField val LATEST = of("latest") + @JvmField val _2026_06_26 = of("2026-06-26") + @JvmField val _2026_06_18 = of("2026-06-18") @JvmField val _2025_12_11 = of("2025-12-11") @@ -12592,6 +12807,7 @@ private constructor( /** An enum containing [Version]'s known values. */ enum class Known { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, } @@ -12607,6 +12823,7 @@ private constructor( */ enum class Value { LATEST, + _2026_06_26, _2026_06_18, _2025_12_11, /** @@ -12626,6 +12843,7 @@ private constructor( fun value(): Value = when (this) { LATEST -> Value.LATEST + _2026_06_26 -> Value._2026_06_26 _2026_06_18 -> Value._2026_06_18 _2025_12_11 -> Value._2025_12_11 else -> Value._UNKNOWN @@ -12643,6 +12861,7 @@ private constructor( fun known(): Known = when (this) { LATEST -> Known.LATEST + _2026_06_26 -> Known._2026_06_26 _2026_06_18 -> Known._2026_06_18 _2025_12_11 -> Known._2025_12_11 else -> throw LlamaCloudInvalidDataException("Unknown Version: $value") @@ -18731,6 +18950,119 @@ private constructor( "ProcessingOptions{aggressiveTableExtraction=$aggressiveTableExtraction, autoModeConfiguration=$autoModeConfiguration, costOptimizer=$costOptimizer, disableHeuristics=$disableHeuristics, ignore=$ignore, ocrParameters=$ocrParameters, specializedChartParsing=$specializedChartParsing, additionalProperties=$additionalProperties}" } + /** + * Arbitrary key/value tags to attach to this job. Returned when retrieving the job. Not + * searchable. Limits apply to the number of entries and the length of keys and values; + * oversized metadata is rejected. + */ + class UserMetadata + @JsonCreator + private constructor( + @com.fasterxml.jackson.annotation.JsonValue + private val additionalProperties: Map + ) { + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = additionalProperties + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [UserMetadata]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [UserMetadata]. */ + class Builder internal constructor() { + + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(userMetadata: UserMetadata) = apply { + additionalProperties = userMetadata.additionalProperties.toMutableMap() + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [UserMetadata]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): UserMetadata = UserMetadata(additionalProperties.toImmutable()) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LlamaCloudInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): UserMetadata = apply { + if (validated) { + return@apply + } + + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LlamaCloudInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + additionalProperties.count { (_, value) -> !value.isNull() && !value.isMissing() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is UserMetadata && additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = "UserMetadata{additionalProperties=$additionalProperties}" + } + /** * Webhook configuration for receiving parsing job notifications. * @@ -18743,6 +19075,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -18758,10 +19091,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events that trigger this webhook. Options: 'parse.success' (job completed), 'parse.error' @@ -18793,6 +19136,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * HTTPS URL to receive webhook POST requests. Must be publicly accessible * @@ -18831,6 +19186,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -18864,6 +19229,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -18872,6 +19238,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -18959,6 +19326,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** HTTPS URL to receive webhook POST requests. Must be publicly accessible */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -19003,6 +19397,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -19027,6 +19422,7 @@ private constructor( webhookEvents() webhookHeaders().ifPresent { it.validate() } webhookOutputFormat().ifPresent { it.validate() } + webhookSigningSecret() webhookUrl() validated = true } @@ -19050,6 +19446,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.size ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (webhookOutputFormat.asKnown().getOrNull()?.validity() ?: 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) /** @@ -19326,6 +19723,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -19335,6 +19733,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -19343,7 +19742,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponse.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponse.kt index 0ca3a22..2013724 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponse.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponse.kt @@ -12,6 +12,7 @@ import com.llamacloud_prod.api.core.JsonField import com.llamacloud_prod.api.core.JsonMissing import com.llamacloud_prod.api.core.JsonValue import com.llamacloud_prod.api.core.checkRequired +import com.llamacloud_prod.api.core.toImmutable import com.llamacloud_prod.api.errors.LlamaCloudInvalidDataException import java.time.OffsetDateTime import java.util.Collections @@ -31,6 +32,7 @@ private constructor( private val name: JsonField, private val tier: JsonField, private val updatedAt: JsonField, + private val userMetadata: JsonField, private val additionalProperties: MutableMap, ) { @@ -50,7 +52,21 @@ private constructor( @JsonProperty("updated_at") @ExcludeMissing updatedAt: JsonField = JsonMissing.of(), - ) : this(id, projectId, status, createdAt, errorMessage, name, tier, updatedAt, mutableMapOf()) + @JsonProperty("user_metadata") + @ExcludeMissing + userMetadata: JsonField = JsonMissing.of(), + ) : this( + id, + projectId, + status, + createdAt, + errorMessage, + name, + tier, + updatedAt, + userMetadata, + mutableMapOf(), + ) /** * Unique parse job identifier @@ -116,6 +132,14 @@ private constructor( */ fun updatedAt(): Optional = updatedAt.getOptional("updated_at") + /** + * Key/value tags associated with this job. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun userMetadata(): Optional = userMetadata.getOptional("user_metadata") + /** * Returns the raw JSON value of [id]. * @@ -178,6 +202,15 @@ private constructor( @ExcludeMissing fun _updatedAt(): JsonField = updatedAt + /** + * Returns the raw JSON value of [userMetadata]. + * + * Unlike [userMetadata], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("user_metadata") + @ExcludeMissing + fun _userMetadata(): JsonField = userMetadata + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -216,6 +249,7 @@ private constructor( private var name: JsonField = JsonMissing.of() private var tier: JsonField = JsonMissing.of() private var updatedAt: JsonField = JsonMissing.of() + private var userMetadata: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -228,6 +262,7 @@ private constructor( name = parsingCreateResponse.name tier = parsingCreateResponse.tier updatedAt = parsingCreateResponse.updatedAt + userMetadata = parsingCreateResponse.userMetadata additionalProperties = parsingCreateResponse.additionalProperties.toMutableMap() } @@ -340,6 +375,25 @@ private constructor( */ fun updatedAt(updatedAt: JsonField) = apply { this.updatedAt = updatedAt } + /** Key/value tags associated with this job. */ + fun userMetadata(userMetadata: UserMetadata?) = + userMetadata(JsonField.ofNullable(userMetadata)) + + /** Alias for calling [Builder.userMetadata] with `userMetadata.orElse(null)`. */ + fun userMetadata(userMetadata: Optional) = + userMetadata(userMetadata.getOrNull()) + + /** + * Sets [Builder.userMetadata] to an arbitrary JSON value. + * + * You should usually call [Builder.userMetadata] with a well-typed [UserMetadata] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun userMetadata(userMetadata: JsonField) = apply { + this.userMetadata = userMetadata + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -383,6 +437,7 @@ private constructor( name, tier, updatedAt, + userMetadata, additionalProperties.toMutableMap(), ) } @@ -410,6 +465,7 @@ private constructor( name() tier() updatedAt() + userMetadata().ifPresent { it.validate() } validated = true } @@ -435,7 +491,8 @@ private constructor( (if (errorMessage.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + (if (tier.asKnown().isPresent) 1 else 0) + - (if (updatedAt.asKnown().isPresent) 1 else 0) + (if (updatedAt.asKnown().isPresent) 1 else 0) + + (userMetadata.asKnown().getOrNull()?.validity() ?: 0) /** Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED */ class Status @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -592,6 +649,115 @@ private constructor( override fun toString() = value.toString() } + /** Key/value tags associated with this job. */ + class UserMetadata + @JsonCreator + private constructor( + @com.fasterxml.jackson.annotation.JsonValue + private val additionalProperties: Map + ) { + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = additionalProperties + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [UserMetadata]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [UserMetadata]. */ + class Builder internal constructor() { + + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(userMetadata: UserMetadata) = apply { + additionalProperties = userMetadata.additionalProperties.toMutableMap() + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [UserMetadata]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): UserMetadata = UserMetadata(additionalProperties.toImmutable()) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LlamaCloudInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): UserMetadata = apply { + if (validated) { + return@apply + } + + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LlamaCloudInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + additionalProperties.count { (_, value) -> !value.isNull() && !value.isMissing() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is UserMetadata && additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = "UserMetadata{additionalProperties=$additionalProperties}" + } + override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -606,6 +772,7 @@ private constructor( name == other.name && tier == other.tier && updatedAt == other.updatedAt && + userMetadata == other.userMetadata && additionalProperties == other.additionalProperties } @@ -619,6 +786,7 @@ private constructor( name, tier, updatedAt, + userMetadata, additionalProperties, ) } @@ -626,5 +794,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ParsingCreateResponse{id=$id, projectId=$projectId, status=$status, createdAt=$createdAt, errorMessage=$errorMessage, name=$name, tier=$tier, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" + "ParsingCreateResponse{id=$id, projectId=$projectId, status=$status, createdAt=$createdAt, errorMessage=$errorMessage, name=$name, tier=$tier, updatedAt=$updatedAt, userMetadata=$userMetadata, additionalProperties=$additionalProperties}" } diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponse.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponse.kt index 5473677..638b9ac 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponse.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponse.kt @@ -621,6 +621,7 @@ private constructor( private val name: JsonField, private val tier: JsonField, private val updatedAt: JsonField, + private val userMetadata: JsonField, private val additionalProperties: MutableMap, ) { @@ -642,6 +643,9 @@ private constructor( @JsonProperty("updated_at") @ExcludeMissing updatedAt: JsonField = JsonMissing.of(), + @JsonProperty("user_metadata") + @ExcludeMissing + userMetadata: JsonField = JsonMissing.of(), ) : this( id, projectId, @@ -651,6 +655,7 @@ private constructor( name, tier, updatedAt, + userMetadata, mutableMapOf(), ) @@ -718,6 +723,14 @@ private constructor( */ fun updatedAt(): Optional = updatedAt.getOptional("updated_at") + /** + * Key/value tags associated with this job. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun userMetadata(): Optional = userMetadata.getOptional("user_metadata") + /** * Returns the raw JSON value of [id]. * @@ -781,6 +794,16 @@ private constructor( @ExcludeMissing fun _updatedAt(): JsonField = updatedAt + /** + * Returns the raw JSON value of [userMetadata]. + * + * Unlike [userMetadata], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("user_metadata") + @ExcludeMissing + fun _userMetadata(): JsonField = userMetadata + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -819,6 +842,7 @@ private constructor( private var name: JsonField = JsonMissing.of() private var tier: JsonField = JsonMissing.of() private var updatedAt: JsonField = JsonMissing.of() + private var userMetadata: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -831,6 +855,7 @@ private constructor( name = job.name tier = job.tier updatedAt = job.updatedAt + userMetadata = job.userMetadata additionalProperties = job.additionalProperties.toMutableMap() } @@ -953,6 +978,25 @@ private constructor( this.updatedAt = updatedAt } + /** Key/value tags associated with this job. */ + fun userMetadata(userMetadata: UserMetadata?) = + userMetadata(JsonField.ofNullable(userMetadata)) + + /** Alias for calling [Builder.userMetadata] with `userMetadata.orElse(null)`. */ + fun userMetadata(userMetadata: Optional) = + userMetadata(userMetadata.getOrNull()) + + /** + * Sets [Builder.userMetadata] to an arbitrary JSON value. + * + * You should usually call [Builder.userMetadata] with a well-typed [UserMetadata] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun userMetadata(userMetadata: JsonField) = apply { + this.userMetadata = userMetadata + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -996,6 +1040,7 @@ private constructor( name, tier, updatedAt, + userMetadata, additionalProperties.toMutableMap(), ) } @@ -1024,6 +1069,7 @@ private constructor( name() tier() updatedAt() + userMetadata().ifPresent { it.validate() } validated = true } @@ -1050,7 +1096,8 @@ private constructor( (if (errorMessage.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + (if (tier.asKnown().isPresent) 1 else 0) + - (if (updatedAt.asKnown().isPresent) 1 else 0) + (if (updatedAt.asKnown().isPresent) 1 else 0) + + (userMetadata.asKnown().getOrNull()?.validity() ?: 0) /** Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED */ class Status @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -1210,6 +1257,119 @@ private constructor( override fun toString() = value.toString() } + /** Key/value tags associated with this job. */ + class UserMetadata + @JsonCreator + private constructor( + @com.fasterxml.jackson.annotation.JsonValue + private val additionalProperties: Map + ) { + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = additionalProperties + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [UserMetadata]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [UserMetadata]. */ + class Builder internal constructor() { + + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(userMetadata: UserMetadata) = apply { + additionalProperties = userMetadata.additionalProperties.toMutableMap() + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [UserMetadata]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): UserMetadata = UserMetadata(additionalProperties.toImmutable()) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws LlamaCloudInvalidDataException if any value type in this object doesn't match + * its expected type. + */ + fun validate(): UserMetadata = apply { + if (validated) { + return@apply + } + + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LlamaCloudInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + additionalProperties.count { (_, value) -> !value.isNull() && !value.isMissing() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is UserMetadata && additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = "UserMetadata{additionalProperties=$additionalProperties}" + } + override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -1224,6 +1384,7 @@ private constructor( name == other.name && tier == other.tier && updatedAt == other.updatedAt && + userMetadata == other.userMetadata && additionalProperties == other.additionalProperties } @@ -1237,6 +1398,7 @@ private constructor( name, tier, updatedAt, + userMetadata, additionalProperties, ) } @@ -1244,7 +1406,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Job{id=$id, projectId=$projectId, status=$status, createdAt=$createdAt, errorMessage=$errorMessage, name=$name, tier=$tier, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" + "Job{id=$id, projectId=$projectId, status=$status, createdAt=$createdAt, errorMessage=$errorMessage, name=$name, tier=$tier, updatedAt=$updatedAt, userMetadata=$userMetadata, additionalProperties=$additionalProperties}" } /** Metadata for all extracted images. */ diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponse.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponse.kt index 7820d7d..ac08d58 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponse.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponse.kt @@ -12,6 +12,7 @@ import com.llamacloud_prod.api.core.JsonField import com.llamacloud_prod.api.core.JsonMissing import com.llamacloud_prod.api.core.JsonValue import com.llamacloud_prod.api.core.checkRequired +import com.llamacloud_prod.api.core.toImmutable import com.llamacloud_prod.api.errors.LlamaCloudInvalidDataException import java.time.OffsetDateTime import java.util.Collections @@ -31,6 +32,7 @@ private constructor( private val name: JsonField, private val tier: JsonField, private val updatedAt: JsonField, + private val userMetadata: JsonField, private val additionalProperties: MutableMap, ) { @@ -50,7 +52,21 @@ private constructor( @JsonProperty("updated_at") @ExcludeMissing updatedAt: JsonField = JsonMissing.of(), - ) : this(id, projectId, status, createdAt, errorMessage, name, tier, updatedAt, mutableMapOf()) + @JsonProperty("user_metadata") + @ExcludeMissing + userMetadata: JsonField = JsonMissing.of(), + ) : this( + id, + projectId, + status, + createdAt, + errorMessage, + name, + tier, + updatedAt, + userMetadata, + mutableMapOf(), + ) /** * Unique parse job identifier @@ -116,6 +132,14 @@ private constructor( */ fun updatedAt(): Optional = updatedAt.getOptional("updated_at") + /** + * Key/value tags associated with this job. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun userMetadata(): Optional = userMetadata.getOptional("user_metadata") + /** * Returns the raw JSON value of [id]. * @@ -178,6 +202,15 @@ private constructor( @ExcludeMissing fun _updatedAt(): JsonField = updatedAt + /** + * Returns the raw JSON value of [userMetadata]. + * + * Unlike [userMetadata], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("user_metadata") + @ExcludeMissing + fun _userMetadata(): JsonField = userMetadata + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -216,6 +249,7 @@ private constructor( private var name: JsonField = JsonMissing.of() private var tier: JsonField = JsonMissing.of() private var updatedAt: JsonField = JsonMissing.of() + private var userMetadata: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -228,6 +262,7 @@ private constructor( name = parsingListResponse.name tier = parsingListResponse.tier updatedAt = parsingListResponse.updatedAt + userMetadata = parsingListResponse.userMetadata additionalProperties = parsingListResponse.additionalProperties.toMutableMap() } @@ -340,6 +375,25 @@ private constructor( */ fun updatedAt(updatedAt: JsonField) = apply { this.updatedAt = updatedAt } + /** Key/value tags associated with this job. */ + fun userMetadata(userMetadata: UserMetadata?) = + userMetadata(JsonField.ofNullable(userMetadata)) + + /** Alias for calling [Builder.userMetadata] with `userMetadata.orElse(null)`. */ + fun userMetadata(userMetadata: Optional) = + userMetadata(userMetadata.getOrNull()) + + /** + * Sets [Builder.userMetadata] to an arbitrary JSON value. + * + * You should usually call [Builder.userMetadata] with a well-typed [UserMetadata] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun userMetadata(userMetadata: JsonField) = apply { + this.userMetadata = userMetadata + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -383,6 +437,7 @@ private constructor( name, tier, updatedAt, + userMetadata, additionalProperties.toMutableMap(), ) } @@ -410,6 +465,7 @@ private constructor( name() tier() updatedAt() + userMetadata().ifPresent { it.validate() } validated = true } @@ -435,7 +491,8 @@ private constructor( (if (errorMessage.asKnown().isPresent) 1 else 0) + (if (name.asKnown().isPresent) 1 else 0) + (if (tier.asKnown().isPresent) 1 else 0) + - (if (updatedAt.asKnown().isPresent) 1 else 0) + (if (updatedAt.asKnown().isPresent) 1 else 0) + + (userMetadata.asKnown().getOrNull()?.validity() ?: 0) /** Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED */ class Status @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -592,6 +649,115 @@ private constructor( override fun toString() = value.toString() } + /** Key/value tags associated with this job. */ + class UserMetadata + @JsonCreator + private constructor( + @com.fasterxml.jackson.annotation.JsonValue + private val additionalProperties: Map + ) { + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = additionalProperties + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [UserMetadata]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [UserMetadata]. */ + class Builder internal constructor() { + + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(userMetadata: UserMetadata) = apply { + additionalProperties = userMetadata.additionalProperties.toMutableMap() + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [UserMetadata]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): UserMetadata = UserMetadata(additionalProperties.toImmutable()) + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws LlamaCloudInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): UserMetadata = apply { + if (validated) { + return@apply + } + + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LlamaCloudInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + additionalProperties.count { (_, value) -> !value.isNull() && !value.isMissing() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is UserMetadata && additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = "UserMetadata{additionalProperties=$additionalProperties}" + } + override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -606,6 +772,7 @@ private constructor( name == other.name && tier == other.tier && updatedAt == other.updatedAt && + userMetadata == other.userMetadata && additionalProperties == other.additionalProperties } @@ -619,6 +786,7 @@ private constructor( name, tier, updatedAt, + userMetadata, additionalProperties, ) } @@ -626,5 +794,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ParsingListResponse{id=$id, projectId=$projectId, status=$status, createdAt=$createdAt, errorMessage=$errorMessage, name=$name, tier=$tier, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" + "ParsingListResponse{id=$id, projectId=$projectId, status=$status, createdAt=$createdAt, errorMessage=$errorMessage, name=$name, tier=$tier, updatedAt=$updatedAt, userMetadata=$userMetadata, additionalProperties=$additionalProperties}" } diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParameters.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParameters.kt index 016deaf..b36fcbb 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParameters.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParameters.kt @@ -6316,6 +6316,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -6331,10 +6332,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are @@ -6364,6 +6375,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -6402,6 +6425,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -6435,6 +6468,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -6443,6 +6477,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -6522,6 +6557,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -6566,6 +6628,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -6590,6 +6653,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -6613,6 +6677,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @JsonCreator private constructor(private val value: JsonField) : @@ -7034,6 +7099,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -7043,6 +7109,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -7051,7 +7118,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParams.kt b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParams.kt index 2f051c4..b212873 100644 --- a/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParams.kt +++ b/llama-cloud-core/src/main/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParams.kt @@ -847,6 +847,7 @@ private constructor( private val webhookEvents: JsonField>, private val webhookHeaders: JsonField, private val webhookOutputFormat: JsonField, + private val webhookSigningSecret: JsonField, private val webhookUrl: JsonField, private val additionalProperties: MutableMap, ) { @@ -862,10 +863,20 @@ private constructor( @JsonProperty("webhook_output_format") @ExcludeMissing webhookOutputFormat: JsonField = JsonMissing.of(), + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + webhookSigningSecret: JsonField = JsonMissing.of(), @JsonProperty("webhook_url") @ExcludeMissing webhookUrl: JsonField = JsonMissing.of(), - ) : this(webhookEvents, webhookHeaders, webhookOutputFormat, webhookUrl, mutableMapOf()) + ) : this( + webhookEvents, + webhookHeaders, + webhookOutputFormat, + webhookSigningSecret, + webhookUrl, + mutableMapOf(), + ) /** * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are @@ -895,6 +906,18 @@ private constructor( fun webhookOutputFormat(): Optional = webhookOutputFormat.getOptional("webhook_output_format") + /** + * Shared signing secret used to sign webhook deliveries. When set, each request includes an + * HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value + * 'sha256='). Recompute the HMAC over the raw request body with this secret to verify + * the delivery is authentic. + * + * @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun webhookSigningSecret(): Optional = + webhookSigningSecret.getOptional("webhook_signing_secret") + /** * URL to receive webhook POST notifications * @@ -933,6 +956,16 @@ private constructor( @ExcludeMissing fun _webhookOutputFormat(): JsonField = webhookOutputFormat + /** + * Returns the raw JSON value of [webhookSigningSecret]. + * + * Unlike [webhookSigningSecret], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("webhook_signing_secret") + @ExcludeMissing + fun _webhookSigningSecret(): JsonField = webhookSigningSecret + /** * Returns the raw JSON value of [webhookUrl]. * @@ -966,6 +999,7 @@ private constructor( private var webhookEvents: JsonField>? = null private var webhookHeaders: JsonField = JsonMissing.of() private var webhookOutputFormat: JsonField = JsonMissing.of() + private var webhookSigningSecret: JsonField = JsonMissing.of() private var webhookUrl: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -974,6 +1008,7 @@ private constructor( webhookEvents = webhookConfiguration.webhookEvents.map { it.toMutableList() } webhookHeaders = webhookConfiguration.webhookHeaders webhookOutputFormat = webhookConfiguration.webhookOutputFormat + webhookSigningSecret = webhookConfiguration.webhookSigningSecret webhookUrl = webhookConfiguration.webhookUrl additionalProperties = webhookConfiguration.additionalProperties.toMutableMap() } @@ -1053,6 +1088,33 @@ private constructor( this.webhookOutputFormat = webhookOutputFormat } + /** + * Shared signing secret used to sign webhook deliveries. When set, each request + * includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header + * (value 'sha256='). Recompute the HMAC over the raw request body with this secret + * to verify the delivery is authentic. + */ + fun webhookSigningSecret(webhookSigningSecret: String?) = + webhookSigningSecret(JsonField.ofNullable(webhookSigningSecret)) + + /** + * Alias for calling [Builder.webhookSigningSecret] with + * `webhookSigningSecret.orElse(null)`. + */ + fun webhookSigningSecret(webhookSigningSecret: Optional) = + webhookSigningSecret(webhookSigningSecret.getOrNull()) + + /** + * Sets [Builder.webhookSigningSecret] to an arbitrary JSON value. + * + * You should usually call [Builder.webhookSigningSecret] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun webhookSigningSecret(webhookSigningSecret: JsonField) = apply { + this.webhookSigningSecret = webhookSigningSecret + } + /** URL to receive webhook POST notifications */ fun webhookUrl(webhookUrl: String?) = webhookUrl(JsonField.ofNullable(webhookUrl)) @@ -1097,6 +1159,7 @@ private constructor( (webhookEvents ?: JsonMissing.of()).map { it.toImmutable() }, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties.toMutableMap(), ) @@ -1121,6 +1184,7 @@ private constructor( webhookEvents().ifPresent { it.forEach { it.validate() } } webhookHeaders().ifPresent { it.validate() } webhookOutputFormat() + webhookSigningSecret() webhookUrl() validated = true } @@ -1144,6 +1208,7 @@ private constructor( (webhookEvents.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + (webhookHeaders.asKnown().getOrNull()?.validity() ?: 0) + (if (webhookOutputFormat.asKnown().isPresent) 1 else 0) + + (if (webhookSigningSecret.asKnown().isPresent) 1 else 0) + (if (webhookUrl.asKnown().isPresent) 1 else 0) class WebhookEvent @JsonCreator private constructor(private val value: JsonField) : @@ -1565,6 +1630,7 @@ private constructor( webhookEvents == other.webhookEvents && webhookHeaders == other.webhookHeaders && webhookOutputFormat == other.webhookOutputFormat && + webhookSigningSecret == other.webhookSigningSecret && webhookUrl == other.webhookUrl && additionalProperties == other.additionalProperties } @@ -1574,6 +1640,7 @@ private constructor( webhookEvents, webhookHeaders, webhookOutputFormat, + webhookSigningSecret, webhookUrl, additionalProperties, ) @@ -1582,7 +1649,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" + "WebhookConfiguration{webhookEvents=$webhookEvents, webhookHeaders=$webhookHeaders, webhookOutputFormat=$webhookOutputFormat, webhookSigningSecret=$webhookSigningSecret, webhookUrl=$webhookUrl, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParamsTest.kt index f13c743..22d36ee 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParamsTest.kt @@ -215,6 +215,7 @@ internal class BatchCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -451,6 +452,7 @@ internal class BatchCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -705,6 +707,7 @@ internal class BatchCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -964,6 +967,7 @@ internal class BatchCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -1197,6 +1201,7 @@ internal class BatchCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponseTest.kt index 8447eb0..612ad46 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponseTest.kt @@ -261,6 +261,7 @@ internal class JobItemGetProcessingResultsResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl( "https://example.com/webhooks/llamacloud" ) @@ -537,6 +538,7 @@ internal class JobItemGetProcessingResultsResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -818,6 +820,7 @@ internal class JobItemGetProcessingResultsResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl( "https://example.com/webhooks/llamacloud" ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponseTest.kt index 480adb8..e6877cf 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexCreateResponseTest.kt @@ -18,6 +18,7 @@ internal class IndexCreateResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") @@ -36,6 +37,7 @@ internal class IndexCreateResponseTest { assertThat(indexCreateResponse.id()).isEqualTo("id") assertThat(indexCreateResponse.exportConfigId()).isEqualTo("export_config_id") assertThat(indexCreateResponse.name()).isEqualTo("name") + assertThat(indexCreateResponse.outputDirectoryId()).isEqualTo("output_directory_id") assertThat(indexCreateResponse.projectId()).isEqualTo("project_id") assertThat(indexCreateResponse.sourceDirectoryId()).isEqualTo("source_directory_id") assertThat(indexCreateResponse.syncConfigId()).isEqualTo("sync_config_id") @@ -64,6 +66,7 @@ internal class IndexCreateResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponseTest.kt index 73725fc..5f50c5b 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexGetResponseTest.kt @@ -18,6 +18,7 @@ internal class IndexGetResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") @@ -36,6 +37,7 @@ internal class IndexGetResponseTest { assertThat(indexGetResponse.id()).isEqualTo("id") assertThat(indexGetResponse.exportConfigId()).isEqualTo("export_config_id") assertThat(indexGetResponse.name()).isEqualTo("name") + assertThat(indexGetResponse.outputDirectoryId()).isEqualTo("output_directory_id") assertThat(indexGetResponse.projectId()).isEqualTo("project_id") assertThat(indexGetResponse.sourceDirectoryId()).isEqualTo("source_directory_id") assertThat(indexGetResponse.syncConfigId()).isEqualTo("sync_config_id") @@ -64,6 +66,7 @@ internal class IndexGetResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListPageResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListPageResponseTest.kt index 77cde56..5ef7a65 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListPageResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListPageResponseTest.kt @@ -20,6 +20,7 @@ internal class IndexListPageResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") @@ -45,6 +46,7 @@ internal class IndexListPageResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") @@ -74,6 +76,7 @@ internal class IndexListPageResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponseTest.kt index 86d4a79..f9ffe9c 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/indexes/IndexListResponseTest.kt @@ -18,6 +18,7 @@ internal class IndexListResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") @@ -36,6 +37,7 @@ internal class IndexListResponseTest { assertThat(indexListResponse.id()).isEqualTo("id") assertThat(indexListResponse.exportConfigId()).isEqualTo("export_config_id") assertThat(indexListResponse.name()).isEqualTo("name") + assertThat(indexListResponse.outputDirectoryId()).isEqualTo("output_directory_id") assertThat(indexListResponse.projectId()).isEqualTo("project_id") assertThat(indexListResponse.sourceDirectoryId()).isEqualTo("source_directory_id") assertThat(indexListResponse.syncConfigId()).isEqualTo("sync_config_id") @@ -64,6 +66,7 @@ internal class IndexListResponseTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id") diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParamsTest.kt index 6fd3ab2..f0c1b84 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParamsTest.kt @@ -55,6 +55,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -110,6 +111,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -185,6 +187,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -235,6 +238,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetListPageResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetListPageResponseTest.kt index 50e9205..a984e11 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetListPageResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetListPageResponseTest.kt @@ -114,6 +114,7 @@ internal class SheetListPageResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -238,6 +239,7 @@ internal class SheetListPageResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -370,6 +372,7 @@ internal class SheetListPageResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJobTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJobTest.kt index aa78da1..e3c10dd 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJobTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetsJobTest.kt @@ -103,6 +103,7 @@ internal class SheetsJobTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -216,6 +217,7 @@ internal class SheetsJobTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -334,6 +336,7 @@ internal class SheetsJobTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParamsTest.kt index b30469f..b43c613 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classifier/jobs/JobCreateParamsTest.kt @@ -43,6 +43,7 @@ internal class JobCreateParamsTest { .webhookOutputFormat( JobCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -82,6 +83,7 @@ internal class JobCreateParamsTest { .webhookOutputFormat( JobCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -149,6 +151,7 @@ internal class JobCreateParamsTest { .webhookOutputFormat( JobCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -186,6 +189,7 @@ internal class JobCreateParamsTest { .webhookOutputFormat( JobCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateParamsTest.kt index 82fba1a..d6c3bc6 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateParamsTest.kt @@ -59,6 +59,7 @@ internal class ClassifyCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -120,6 +121,7 @@ internal class ClassifyCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -203,6 +205,7 @@ internal class ClassifyCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -258,6 +261,7 @@ internal class ClassifyCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequestTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequestTest.kt index df3ff47..5d7af27 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequestTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/classify/ClassifyCreateRequestTest.kt @@ -57,6 +57,7 @@ internal class ClassifyCreateRequestTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -105,6 +106,7 @@ internal class ClassifyCreateRequestTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -157,6 +159,7 @@ internal class ClassifyCreateRequestTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2ParametersTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2ParametersTest.kt index 85cd57d..44c570f 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2ParametersTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/configurations/ParseV2ParametersTest.kt @@ -274,6 +274,8 @@ internal class ParseV2ParametersTest { ) .build() ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParseV2Parameters.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -286,6 +288,7 @@ internal class ParseV2ParametersTest { .webhookOutputFormat( ParseV2Parameters.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -549,6 +552,8 @@ internal class ParseV2ParametersTest { ) .build() ) + assertThat(parseV2Parameters.webhookConfigurationIds().getOrNull()) + .containsExactly("whc-...", "whc-...") assertThat(parseV2Parameters.webhookConfigurations().getOrNull()) .containsExactly( ParseV2Parameters.WebhookConfiguration.builder() @@ -562,6 +567,7 @@ internal class ParseV2ParametersTest { .webhookOutputFormat( ParseV2Parameters.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -830,6 +836,8 @@ internal class ParseV2ParametersTest { ) .build() ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParseV2Parameters.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -842,6 +850,7 @@ internal class ParseV2ParametersTest { .webhookOutputFormat( ParseV2Parameters.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractCreateParamsTest.kt index 1b3ccbd..e104789 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractCreateParamsTest.kt @@ -66,6 +66,7 @@ internal class ExtractCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -136,6 +137,7 @@ internal class ExtractCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -232,6 +234,7 @@ internal class ExtractCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -294,6 +297,7 @@ internal class ExtractCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreateTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreateTest.kt index 71266d5..c325dac 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreateTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/extract/ExtractV2JobCreateTest.kt @@ -65,6 +65,7 @@ internal class ExtractV2JobCreateTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -121,6 +122,7 @@ internal class ExtractV2JobCreateTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -181,6 +183,7 @@ internal class ExtractV2JobCreateTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParamsTest.kt index 4de6ab5..289bd62 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateParamsTest.kt @@ -270,6 +270,14 @@ internal class ParsingCreateParamsTest { .build() ) .sourceUrl("https:") + .userMetadata( + ParsingCreateParams.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParsingCreateParams.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -282,6 +290,7 @@ internal class ParsingCreateParamsTest { .webhookOutputFormat( ParsingCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -558,6 +567,14 @@ internal class ParsingCreateParamsTest { .build() ) .sourceUrl("https:") + .userMetadata( + ParsingCreateParams.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParsingCreateParams.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -570,6 +587,7 @@ internal class ParsingCreateParamsTest { .webhookOutputFormat( ParsingCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -869,6 +887,14 @@ internal class ParsingCreateParamsTest { .build() ) .sourceUrl("https:") + .userMetadata( + ParsingCreateParams.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParsingCreateParams.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -881,6 +907,7 @@ internal class ParsingCreateParamsTest { .webhookOutputFormat( ParsingCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) @@ -1150,6 +1177,14 @@ internal class ParsingCreateParamsTest { .build() ) assertThat(body.sourceUrl()).contains("https:") + assertThat(body.userMetadata()) + .contains( + ParsingCreateParams.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) + assertThat(body.webhookConfigurationIds().getOrNull()).containsExactly("whc-...", "whc-...") assertThat(body.webhookConfigurations().getOrNull()) .containsExactly( ParsingCreateParams.WebhookConfiguration.builder() @@ -1163,6 +1198,7 @@ internal class ParsingCreateParamsTest { .webhookOutputFormat( ParsingCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponseTest.kt index f92b692..599663b 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingCreateResponseTest.kt @@ -3,6 +3,7 @@ package com.llamacloud_prod.api.models.parsing import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.llamacloud_prod.api.core.JsonValue import com.llamacloud_prod.api.core.jsonMapper import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat @@ -22,6 +23,12 @@ internal class ParsingCreateResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingCreateResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() assertThat(parsingCreateResponse.id()).isEqualTo("pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") @@ -35,6 +42,13 @@ internal class ParsingCreateResponseTest { assertThat(parsingCreateResponse.tier()).contains("fast") assertThat(parsingCreateResponse.updatedAt()) .contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + assertThat(parsingCreateResponse.userMetadata()) + .contains( + ParsingCreateResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) } @Test @@ -50,6 +64,12 @@ internal class ParsingCreateResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingCreateResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() val roundtrippedParsingCreateResponse = diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponseTest.kt index 0ede9e1..aa7489e 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingGetResponseTest.kt @@ -25,6 +25,12 @@ internal class ParsingGetResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingGetResponse.Job.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() ) .imagesContentMetadata( @@ -161,6 +167,12 @@ internal class ParsingGetResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingGetResponse.Job.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() ) assertThat(parsingGetResponse.imagesContentMetadata()) @@ -306,6 +318,12 @@ internal class ParsingGetResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingGetResponse.Job.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() ) .imagesContentMetadata( diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListPageResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListPageResponseTest.kt index f58f78c..e4d8297 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListPageResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListPageResponseTest.kt @@ -3,6 +3,7 @@ package com.llamacloud_prod.api.models.parsing import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.llamacloud_prod.api.core.JsonValue import com.llamacloud_prod.api.core.jsonMapper import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat @@ -24,6 +25,12 @@ internal class ParsingListPageResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingListResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() ) .nextPageToken("next_page_token") @@ -41,6 +48,12 @@ internal class ParsingListPageResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingListResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() ) assertThat(parsingListPageResponse.nextPageToken()).contains("next_page_token") @@ -62,6 +75,12 @@ internal class ParsingListPageResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingListResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() ) .nextPageToken("next_page_token") diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponseTest.kt index 063b05b..4641a22 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/parsing/ParsingListResponseTest.kt @@ -3,6 +3,7 @@ package com.llamacloud_prod.api.models.parsing import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.llamacloud_prod.api.core.JsonValue import com.llamacloud_prod.api.core.jsonMapper import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat @@ -22,6 +23,12 @@ internal class ParsingListResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingListResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() assertThat(parsingListResponse.id()).isEqualTo("pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") @@ -35,6 +42,13 @@ internal class ParsingListResponseTest { assertThat(parsingListResponse.tier()).contains("fast") assertThat(parsingListResponse.updatedAt()) .contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + assertThat(parsingListResponse.userMetadata()) + .contains( + ParsingListResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) } @Test @@ -50,6 +64,12 @@ internal class ParsingListResponseTest { .name("Q4 Financial Report") .tier("fast") .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .userMetadata( + ParsingListResponse.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) .build() val roundtrippedParsingListResponse = diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParametersTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParametersTest.kt index aaf9eb5..d7bf29f 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParametersTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/LlamaParseParametersTest.kt @@ -156,6 +156,7 @@ internal class LlamaParseParametersTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -310,6 +311,7 @@ internal class LlamaParseParametersTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -459,6 +461,7 @@ internal class LlamaParseParametersTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateParamsTest.kt index ccf5eb5..fdd70be 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateParamsTest.kt @@ -212,6 +212,7 @@ internal class PipelineCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -492,6 +493,7 @@ internal class PipelineCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -794,6 +796,7 @@ internal class PipelineCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -1063,6 +1066,7 @@ internal class PipelineCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateTest.kt index 3de1e67..35866f1 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineCreateTest.kt @@ -208,6 +208,7 @@ internal class PipelineCreateTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -468,6 +469,7 @@ internal class PipelineCreateTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -736,6 +738,7 @@ internal class PipelineCreateTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineTest.kt index b450457..6794e75 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineTest.kt @@ -267,6 +267,7 @@ internal class PipelineTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -584,6 +585,7 @@ internal class PipelineTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -909,6 +911,7 @@ internal class PipelineTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpdateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpdateParamsTest.kt index e5f377e..aba2c68 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpdateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpdateParamsTest.kt @@ -202,6 +202,7 @@ internal class PipelineUpdateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -475,6 +476,7 @@ internal class PipelineUpdateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -735,6 +737,7 @@ internal class PipelineUpdateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpsertParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpsertParamsTest.kt index e6111ec..b83d052 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpsertParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/pipelines/PipelineUpsertParamsTest.kt @@ -212,6 +212,7 @@ internal class PipelineUpsertParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -492,6 +493,7 @@ internal class PipelineUpsertParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -794,6 +796,7 @@ internal class PipelineUpsertParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -1063,6 +1066,7 @@ internal class PipelineUpsertParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParamsTest.kt index 33a34fe..746aed4 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetCreateParamsTest.kt @@ -56,6 +56,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -111,6 +112,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -186,6 +188,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -236,6 +239,7 @@ internal class SheetCreateParamsTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetListPageResponseTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetListPageResponseTest.kt index 1b3b01c..f1f3704 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetListPageResponseTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/models/sheets/SheetListPageResponseTest.kt @@ -116,6 +116,7 @@ internal class SheetListPageResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -240,6 +241,7 @@ internal class SheetListPageResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -372,6 +374,7 @@ internal class SheetListPageResponseTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/ServiceParamsTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/ServiceParamsTest.kt index 28d7d7c..a13e6bd 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/ServiceParamsTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/ServiceParamsTest.kt @@ -334,6 +334,14 @@ internal class ServiceParamsTest { .build() ) .sourceUrl("https:") + .userMetadata( + ParsingCreateParams.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParsingCreateParams.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -346,6 +354,7 @@ internal class ServiceParamsTest { .webhookOutputFormat( ParsingCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ClassifyServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ClassifyServiceAsyncTest.kt index e055a94..089ad14 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ClassifyServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ClassifyServiceAsyncTest.kt @@ -71,6 +71,7 @@ internal class ClassifyServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ExtractServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ExtractServiceAsyncTest.kt index 333232a..84dad0f 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ExtractServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ExtractServiceAsyncTest.kt @@ -88,6 +88,7 @@ internal class ExtractServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ParsingServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ParsingServiceAsyncTest.kt index ef2349b..332095e 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ParsingServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/ParsingServiceAsyncTest.kt @@ -291,6 +291,14 @@ internal class ParsingServiceAsyncTest { .build() ) .sourceUrl("https:") + .userMetadata( + ParsingCreateParams.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParsingCreateParams.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -303,6 +311,7 @@ internal class ParsingServiceAsyncTest { .webhookOutputFormat( ParsingCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/PipelineServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/PipelineServiceAsyncTest.kt index e58e233..4c73e8e 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/PipelineServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/PipelineServiceAsyncTest.kt @@ -251,6 +251,7 @@ internal class PipelineServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -581,6 +582,7 @@ internal class PipelineServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -938,6 +940,7 @@ internal class PipelineServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/SheetServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/SheetServiceAsyncTest.kt index 66cd8d9..1114f2f 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/SheetServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/SheetServiceAsyncTest.kt @@ -68,6 +68,7 @@ internal class SheetServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/BatchServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/BatchServiceAsyncTest.kt index 361f0ed..4732aa5 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/BatchServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/BatchServiceAsyncTest.kt @@ -238,6 +238,7 @@ internal class BatchServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/SheetServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/SheetServiceAsyncTest.kt index 76a8161..8aa973c 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/SheetServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/beta/SheetServiceAsyncTest.kt @@ -68,6 +68,7 @@ internal class SheetServiceAsyncTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/classifier/JobServiceAsyncTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/classifier/JobServiceAsyncTest.kt index 73c4a0f..3e25832 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/classifier/JobServiceAsyncTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/async/classifier/JobServiceAsyncTest.kt @@ -53,6 +53,7 @@ internal class JobServiceAsyncTest { .webhookOutputFormat( JobCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ClassifyServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ClassifyServiceTest.kt index 89c26cd..0e67074 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ClassifyServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ClassifyServiceTest.kt @@ -71,6 +71,7 @@ internal class ClassifyServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ExtractServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ExtractServiceTest.kt index 4638b91..5807d41 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ExtractServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ExtractServiceTest.kt @@ -88,6 +88,7 @@ internal class ExtractServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ParsingServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ParsingServiceTest.kt index 01fd2ee..fb573ae 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ParsingServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/ParsingServiceTest.kt @@ -291,6 +291,14 @@ internal class ParsingServiceTest { .build() ) .sourceUrl("https:") + .userMetadata( + ParsingCreateParams.UserMetadata.builder() + .putAdditionalProperty("owner", JsonValue.from("jerry")) + .putAdditionalProperty("team", JsonValue.from("research")) + .build() + ) + .addWebhookConfigurationId("whc-...") + .addWebhookConfigurationId("whc-...") .addWebhookConfiguration( ParsingCreateParams.WebhookConfiguration.builder() .addWebhookEvent("parse.success") @@ -303,6 +311,7 @@ internal class ParsingServiceTest { .webhookOutputFormat( ParsingCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/PipelineServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/PipelineServiceTest.kt index 1322c16..c4e5ece 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/PipelineServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/PipelineServiceTest.kt @@ -251,6 +251,7 @@ internal class PipelineServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -579,6 +580,7 @@ internal class PipelineServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) @@ -930,6 +932,7 @@ internal class PipelineServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/SheetServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/SheetServiceTest.kt index 51e1ac8..8398b66 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/SheetServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/SheetServiceTest.kt @@ -68,6 +68,7 @@ internal class SheetServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/BatchServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/BatchServiceTest.kt index 62f0ab8..5a1c120 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/BatchServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/BatchServiceTest.kt @@ -238,6 +238,7 @@ internal class BatchServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/SheetServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/SheetServiceTest.kt index db67075..c463463 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/SheetServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/beta/SheetServiceTest.kt @@ -68,6 +68,7 @@ internal class SheetServiceTest { .build() ) .webhookOutputFormat("json") + .webhookSigningSecret("whsec_...") .webhookUrl("https://example.com/webhooks/llamacloud") .build() ) diff --git a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/classifier/JobServiceTest.kt b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/classifier/JobServiceTest.kt index 45a3257..c6f6f9a 100644 --- a/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/classifier/JobServiceTest.kt +++ b/llama-cloud-core/src/test/kotlin/com/llamacloud_prod/api/services/blocking/classifier/JobServiceTest.kt @@ -53,6 +53,7 @@ internal class JobServiceTest { .webhookOutputFormat( JobCreateParams.WebhookConfiguration.WebhookOutputFormat.JSON ) + .webhookSigningSecret("webhook_signing_secret") .webhookUrl("https:") .build() ) diff --git a/llama-cloud-proguard-test/src/test/kotlin/com/llamacloud_prod/api/proguard/ProGuardCompatibilityTest.kt b/llama-cloud-proguard-test/src/test/kotlin/com/llamacloud_prod/api/proguard/ProGuardCompatibilityTest.kt index 9fce0c5..9198de6 100644 --- a/llama-cloud-proguard-test/src/test/kotlin/com/llamacloud_prod/api/proguard/ProGuardCompatibilityTest.kt +++ b/llama-cloud-proguard-test/src/test/kotlin/com/llamacloud_prod/api/proguard/ProGuardCompatibilityTest.kt @@ -74,6 +74,7 @@ internal class ProGuardCompatibilityTest { .id("id") .exportConfigId("export_config_id") .name("name") + .outputDirectoryId("output_directory_id") .projectId("project_id") .sourceDirectoryId("source_directory_id") .syncConfigId("sync_config_id")