Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/publish-sonatype.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to Sonatype in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/run-llama/llama-parse-java/actions/workflows/publish-sonatype.yml
name: Publish Sonatype
on:
workflow_dispatch:

release:
types: [published]

jobs:
publish:
name: publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
8
21
cache: gradle

- name: Set up Gradle
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0

- name: Publish to Sonatype
run: |-
export -- GPG_SIGNING_KEY_ID
printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD"
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
./gradlew publish --no-configuration-cache
env:
SONATYPE_USERNAME: ${{ secrets.LLAMA_CLOUD_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.LLAMA_CLOUD_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
GPG_SIGNING_KEY: ${{ secrets.LLAMA_CLOUD_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PASSWORD: ${{ secrets.LLAMA_CLOUD_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
24 changes: 24 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Doctor
on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'run-llama/llama-parse-java' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
SONATYPE_USERNAME: ${{ secrets.LLAMA_CLOUD_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.LLAMA_CLOUD_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
GPG_SIGNING_KEY: ${{ secrets.LLAMA_CLOUD_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PASSWORD: ${{ secrets.LLAMA_CLOUD_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 131
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamaindex-Georgehe4/llamacloud-prod-76b59acff99524099afaddec7a3d8cfebfd1ecc096e57284722bcd26b39e466e.yml
openapi_spec_hash: b52d9f7ba54524c4dd975fe53dd8e94e
config_hash: a65cacd5ca98538ef6f5e6ac330f25a9
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamaindex-Georgehe4/llamacloud-prod-e0d1814a9e3cdfe138f1d81fff8adb1c69a6891393d346721d39806fe79104e6.yml
openapi_spec_hash: 8f260b525aaaad8462f08a2421bda1b0
config_hash: 0133449059b0e0d5a9d15df2d954e39e
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## 0.1.0 (2026-06-18)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/run-llama/llama-parse-java/compare/v0.0.1...v0.1.0)

### Features

* **api:** api update ([698e957](https://github.com/run-llama/llama-parse-java/commit/698e957f65c81046e124ef97d932ee1e3fe6726f))


### Chores

* configure new SDK language ([f5bfbf1](https://github.com/run-llama/llama-parse-java/commit/f5bfbf17777ed432162656ae5e3eaeb7d40978cb))
* update SDK settings ([e500850](https://github.com/run-llama/llama-parse-java/commit/e5008501705dca8ae0396c09ad14f7205260e70d))
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Llama Cloud Java API Library

[![Maven Central](https://img.shields.io/maven-central/v/com.llamacloud_prod.api/llama-cloud-java)](https://central.sonatype.com/artifact/com.llamacloud_prod.api/llama-cloud-java/0.0.1)
[![javadoc](https://javadoc.io/badge2/com.llamacloud_prod.api/llama-cloud-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud-java/0.0.1)
<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.llamacloud_prod.api/llama-cloud-java)](https://central.sonatype.com/artifact/com.llamacloud_prod.api/llama-cloud-java/0.1.0)
[![javadoc](https://javadoc.io/badge2/com.llamacloud_prod.api/llama-cloud-java/0.1.0/javadoc.svg)](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud-java/0.1.0)

<!-- x-release-please-end -->

The Llama Cloud Java SDK provides convenient access to the [Llama Cloud REST API](https://developers.llamaindex.ai/) from applications written in Java.

Expand All @@ -16,14 +20,20 @@ Use the Llama Cloud MCP Server to enable AI assistants to interact with this API

> Note: You may need to set environment variables in your MCP client.

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-java/0.0.1).
<!-- x-release-please-start-version -->

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-java/0.1.0).

<!-- x-release-please-end -->

## Installation

<!-- x-release-please-start-version -->

### Gradle

```kotlin
implementation("com.llamacloud_prod.api:llama-cloud-java:0.0.1")
implementation("com.llamacloud_prod.api:llama-cloud-java:0.1.0")
```

### Maven
Expand All @@ -32,10 +42,12 @@ implementation("com.llamacloud_prod.api:llama-cloud-java:0.0.1")
<dependency>
<groupId>com.llamacloud_prod.api</groupId>
<artifactId>llama-cloud-java</artifactId>
<version>0.0.1</version>
<version>0.1.0</version>
</dependency>
```

<!-- x-release-please-end -->

## Requirements

This library requires Java 8 or later.
Expand Down Expand Up @@ -847,4 +859,4 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/llamacloud-prod-java/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/run-llama/llama-parse-java/issues) with questions, bugs, or suggestions.
33 changes: 33 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

errors=()

if [ -z "${SONATYPE_USERNAME}" ]; then
errors+=("The SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${SONATYPE_PASSWORD}" ]; then
errors+=("The SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${GPG_SIGNING_KEY}" ]; then
errors+=("The GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${GPG_SIGNING_PASSWORD}" ]; then
errors+=("The GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
echo -e "Found the following errors in the release environment:\n"

for error in "${errors[@]}"; do
echo -e "- $error\n"
done

exit 1
fi

echo "The environment is ready to push releases!"
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {

allprojects {
group = "com.llamacloud_prod.api"
version = "0.0.1"
version = "0.1.0" // x-release-please-version
}

subprojects {
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/llama-cloud.publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ configure<PublishingExtension> {
}

scm {
connection.set("scm:git:git://github.com/stainless-sdks/llamacloud-prod-java.git")
developerConnection.set("scm:git:git://github.com/stainless-sdks/llamacloud-prod-java.git")
url.set("https://github.com/stainless-sdks/llamacloud-prod-java")
connection.set("scm:git:git://github.com/run-llama/llama-parse-java.git")
developerConnection.set("scm:git:git://github.com/run-llama/llama-parse-java.git")
url.set("https://github.com/run-llama/llama-parse-java")
}

versionMapping {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This can happen if you are either:

Double-check that you are depending on compatible Jackson versions.

See https://www.github.com/stainless-sdks/llamacloud-prod-java#jackson for more information.
See https://www.github.com/run-llama/llama-parse-java#jackson for more information.
"""
.trimIndent()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ private constructor(
private val pageIds: JsonField<String>,
private val spaceKey: JsonField<String>,
private val supportsAccessControl: JsonField<Boolean>,
private val syncPermissions: JsonField<Boolean>,
private val userName: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {
Expand Down Expand Up @@ -60,6 +61,9 @@ private constructor(
@JsonProperty("supports_access_control")
@ExcludeMissing
supportsAccessControl: JsonField<Boolean> = JsonMissing.of(),
@JsonProperty("sync_permissions")
@ExcludeMissing
syncPermissions: JsonField<Boolean> = JsonMissing.of(),
@JsonProperty("user_name") @ExcludeMissing userName: JsonField<String> = JsonMissing.of(),
) : this(
authenticationMechanism,
Expand All @@ -74,6 +78,7 @@ private constructor(
pageIds,
spaceKey,
supportsAccessControl,
syncPermissions,
userName,
mutableMapOf(),
)
Expand Down Expand Up @@ -181,6 +186,17 @@ private constructor(
fun supportsAccessControl(): Optional<Boolean> =
supportsAccessControl.getOptional("supports_access_control")

/**
* Whether to fetch space-level permissions (allowed users/groups) and attach them to document
* metadata for access control. Disable for Confluence Server/Data Center versions whose
* permission APIs are unavailable (e.g. the JSON-RPC API removed in Data Center 9.2.6+), which
* otherwise surface as 401 errors during sync.
*
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun syncPermissions(): Optional<Boolean> = syncPermissions.getOptional("sync_permissions")

/**
* The username to use for authentication.
*
Expand Down Expand Up @@ -287,6 +303,15 @@ private constructor(
@ExcludeMissing
fun _supportsAccessControl(): JsonField<Boolean> = supportsAccessControl

/**
* Returns the raw JSON value of [syncPermissions].
*
* Unlike [syncPermissions], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("sync_permissions")
@ExcludeMissing
fun _syncPermissions(): JsonField<Boolean> = syncPermissions

/**
* Returns the raw JSON value of [userName].
*
Expand Down Expand Up @@ -335,6 +360,7 @@ private constructor(
private var pageIds: JsonField<String> = JsonMissing.of()
private var spaceKey: JsonField<String> = JsonMissing.of()
private var supportsAccessControl: JsonField<Boolean> = JsonMissing.of()
private var syncPermissions: JsonField<Boolean> = JsonMissing.of()
private var userName: JsonField<String> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

Expand All @@ -352,6 +378,7 @@ private constructor(
pageIds = cloudConfluenceDataSource.pageIds
spaceKey = cloudConfluenceDataSource.spaceKey
supportsAccessControl = cloudConfluenceDataSource.supportsAccessControl
syncPermissions = cloudConfluenceDataSource.syncPermissions
userName = cloudConfluenceDataSource.userName
additionalProperties = cloudConfluenceDataSource.additionalProperties.toMutableMap()
}
Expand Down Expand Up @@ -531,6 +558,26 @@ private constructor(
this.supportsAccessControl = supportsAccessControl
}

/**
* Whether to fetch space-level permissions (allowed users/groups) and attach them to
* document metadata for access control. Disable for Confluence Server/Data Center versions
* whose permission APIs are unavailable (e.g. the JSON-RPC API removed in Data Center
* 9.2.6+), which otherwise surface as 401 errors during sync.
*/
fun syncPermissions(syncPermissions: Boolean) =
syncPermissions(JsonField.of(syncPermissions))

/**
* Sets [Builder.syncPermissions] to an arbitrary JSON value.
*
* You should usually call [Builder.syncPermissions] with a well-typed [Boolean] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
fun syncPermissions(syncPermissions: JsonField<Boolean>) = apply {
this.syncPermissions = syncPermissions
}

/** The username to use for authentication. */
fun userName(userName: String?) = userName(JsonField.ofNullable(userName))

Expand Down Expand Up @@ -591,6 +638,7 @@ private constructor(
pageIds,
spaceKey,
supportsAccessControl,
syncPermissions,
userName,
additionalProperties.toMutableMap(),
)
Expand Down Expand Up @@ -623,6 +671,7 @@ private constructor(
pageIds()
spaceKey()
supportsAccessControl()
syncPermissions()
userName()
validated = true
}
Expand Down Expand Up @@ -654,6 +703,7 @@ private constructor(
(if (pageIds.asKnown().isPresent) 1 else 0) +
(if (spaceKey.asKnown().isPresent) 1 else 0) +
(if (supportsAccessControl.asKnown().isPresent) 1 else 0) +
(if (syncPermissions.asKnown().isPresent) 1 else 0) +
(if (userName.asKnown().isPresent) 1 else 0)

override fun equals(other: Any?): Boolean {
Expand All @@ -674,6 +724,7 @@ private constructor(
pageIds == other.pageIds &&
spaceKey == other.spaceKey &&
supportsAccessControl == other.supportsAccessControl &&
syncPermissions == other.syncPermissions &&
userName == other.userName &&
additionalProperties == other.additionalProperties
}
Expand All @@ -692,6 +743,7 @@ private constructor(
pageIds,
spaceKey,
supportsAccessControl,
syncPermissions,
userName,
additionalProperties,
)
Expand All @@ -700,5 +752,5 @@ private constructor(
override fun hashCode(): Int = hashCode

override fun toString() =
"CloudConfluenceDataSource{authenticationMechanism=$authenticationMechanism, serverUrl=$serverUrl, apiToken=$apiToken, className=$className, cql=$cql, failureHandling=$failureHandling, indexRestrictedPages=$indexRestrictedPages, keepMarkdownFormat=$keepMarkdownFormat, label=$label, pageIds=$pageIds, spaceKey=$spaceKey, supportsAccessControl=$supportsAccessControl, userName=$userName, additionalProperties=$additionalProperties}"
"CloudConfluenceDataSource{authenticationMechanism=$authenticationMechanism, serverUrl=$serverUrl, apiToken=$apiToken, className=$className, cql=$cql, failureHandling=$failureHandling, indexRestrictedPages=$indexRestrictedPages, keepMarkdownFormat=$keepMarkdownFormat, label=$label, pageIds=$pageIds, spaceKey=$spaceKey, supportsAccessControl=$supportsAccessControl, syncPermissions=$syncPermissions, userName=$userName, additionalProperties=$additionalProperties}"
}
Loading
Loading