Skip to content

Commit 698e957

Browse files
feat(api): api update
1 parent 1c41f0d commit 698e957

85 files changed

Lines changed: 1842 additions & 144 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 131
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamaindex-Georgehe4/llamacloud-prod-80b700c0d7226b93045c519a6b5c6eb880c0f95f9d569a244824d7305db281c4.yml
3-
openapi_spec_hash: b52d9f7ba54524c4dd975fe53dd8e94e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamaindex-Georgehe4/llamacloud-prod-e0d1814a9e3cdfe138f1d81fff8adb1c69a6891393d346721d39806fe79104e6.yml
3+
openapi_spec_hash: 8f260b525aaaad8462f08a2421bda1b0
44
config_hash: 0133449059b0e0d5a9d15df2d954e39e

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/models/CloudConfluenceDataSource.kt‎

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ private constructor(
3232
private val pageIds: JsonField<String>,
3333
private val spaceKey: JsonField<String>,
3434
private val supportsAccessControl: JsonField<Boolean>,
35+
private val syncPermissions: JsonField<Boolean>,
3536
private val userName: JsonField<String>,
3637
private val additionalProperties: MutableMap<String, JsonValue>,
3738
) {
@@ -60,6 +61,9 @@ private constructor(
6061
@JsonProperty("supports_access_control")
6162
@ExcludeMissing
6263
supportsAccessControl: JsonField<Boolean> = JsonMissing.of(),
64+
@JsonProperty("sync_permissions")
65+
@ExcludeMissing
66+
syncPermissions: JsonField<Boolean> = JsonMissing.of(),
6367
@JsonProperty("user_name") @ExcludeMissing userName: JsonField<String> = JsonMissing.of(),
6468
) : this(
6569
authenticationMechanism,
@@ -74,6 +78,7 @@ private constructor(
7478
pageIds,
7579
spaceKey,
7680
supportsAccessControl,
81+
syncPermissions,
7782
userName,
7883
mutableMapOf(),
7984
)
@@ -181,6 +186,17 @@ private constructor(
181186
fun supportsAccessControl(): Optional<Boolean> =
182187
supportsAccessControl.getOptional("supports_access_control")
183188

189+
/**
190+
* Whether to fetch space-level permissions (allowed users/groups) and attach them to document
191+
* metadata for access control. Disable for Confluence Server/Data Center versions whose
192+
* permission APIs are unavailable (e.g. the JSON-RPC API removed in Data Center 9.2.6+), which
193+
* otherwise surface as 401 errors during sync.
194+
*
195+
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if the
196+
* server responded with an unexpected value).
197+
*/
198+
fun syncPermissions(): Optional<Boolean> = syncPermissions.getOptional("sync_permissions")
199+
184200
/**
185201
* The username to use for authentication.
186202
*
@@ -287,6 +303,15 @@ private constructor(
287303
@ExcludeMissing
288304
fun _supportsAccessControl(): JsonField<Boolean> = supportsAccessControl
289305

306+
/**
307+
* Returns the raw JSON value of [syncPermissions].
308+
*
309+
* Unlike [syncPermissions], this method doesn't throw if the JSON field has an unexpected type.
310+
*/
311+
@JsonProperty("sync_permissions")
312+
@ExcludeMissing
313+
fun _syncPermissions(): JsonField<Boolean> = syncPermissions
314+
290315
/**
291316
* Returns the raw JSON value of [userName].
292317
*
@@ -335,6 +360,7 @@ private constructor(
335360
private var pageIds: JsonField<String> = JsonMissing.of()
336361
private var spaceKey: JsonField<String> = JsonMissing.of()
337362
private var supportsAccessControl: JsonField<Boolean> = JsonMissing.of()
363+
private var syncPermissions: JsonField<Boolean> = JsonMissing.of()
338364
private var userName: JsonField<String> = JsonMissing.of()
339365
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
340366

@@ -352,6 +378,7 @@ private constructor(
352378
pageIds = cloudConfluenceDataSource.pageIds
353379
spaceKey = cloudConfluenceDataSource.spaceKey
354380
supportsAccessControl = cloudConfluenceDataSource.supportsAccessControl
381+
syncPermissions = cloudConfluenceDataSource.syncPermissions
355382
userName = cloudConfluenceDataSource.userName
356383
additionalProperties = cloudConfluenceDataSource.additionalProperties.toMutableMap()
357384
}
@@ -531,6 +558,26 @@ private constructor(
531558
this.supportsAccessControl = supportsAccessControl
532559
}
533560

561+
/**
562+
* Whether to fetch space-level permissions (allowed users/groups) and attach them to
563+
* document metadata for access control. Disable for Confluence Server/Data Center versions
564+
* whose permission APIs are unavailable (e.g. the JSON-RPC API removed in Data Center
565+
* 9.2.6+), which otherwise surface as 401 errors during sync.
566+
*/
567+
fun syncPermissions(syncPermissions: Boolean) =
568+
syncPermissions(JsonField.of(syncPermissions))
569+
570+
/**
571+
* Sets [Builder.syncPermissions] to an arbitrary JSON value.
572+
*
573+
* You should usually call [Builder.syncPermissions] with a well-typed [Boolean] value
574+
* instead. This method is primarily for setting the field to an undocumented or not yet
575+
* supported value.
576+
*/
577+
fun syncPermissions(syncPermissions: JsonField<Boolean>) = apply {
578+
this.syncPermissions = syncPermissions
579+
}
580+
534581
/** The username to use for authentication. */
535582
fun userName(userName: String?) = userName(JsonField.ofNullable(userName))
536583

@@ -591,6 +638,7 @@ private constructor(
591638
pageIds,
592639
spaceKey,
593640
supportsAccessControl,
641+
syncPermissions,
594642
userName,
595643
additionalProperties.toMutableMap(),
596644
)
@@ -623,6 +671,7 @@ private constructor(
623671
pageIds()
624672
spaceKey()
625673
supportsAccessControl()
674+
syncPermissions()
626675
userName()
627676
validated = true
628677
}
@@ -654,6 +703,7 @@ private constructor(
654703
(if (pageIds.asKnown().isPresent) 1 else 0) +
655704
(if (spaceKey.asKnown().isPresent) 1 else 0) +
656705
(if (supportsAccessControl.asKnown().isPresent) 1 else 0) +
706+
(if (syncPermissions.asKnown().isPresent) 1 else 0) +
657707
(if (userName.asKnown().isPresent) 1 else 0)
658708

659709
override fun equals(other: Any?): Boolean {
@@ -674,6 +724,7 @@ private constructor(
674724
pageIds == other.pageIds &&
675725
spaceKey == other.spaceKey &&
676726
supportsAccessControl == other.supportsAccessControl &&
727+
syncPermissions == other.syncPermissions &&
677728
userName == other.userName &&
678729
additionalProperties == other.additionalProperties
679730
}
@@ -692,6 +743,7 @@ private constructor(
692743
pageIds,
693744
spaceKey,
694745
supportsAccessControl,
746+
syncPermissions,
695747
userName,
696748
additionalProperties,
697749
)
@@ -700,5 +752,5 @@ private constructor(
700752
override fun hashCode(): Int = hashCode
701753

702754
override fun toString() =
703-
"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}"
755+
"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}"
704756
}

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/BatchCreateParams.kt‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9726,6 +9726,16 @@ private constructor(
97269726

97279727
@JvmField val SHEETS_CANCELLED = of("sheets.cancelled")
97289728

9729+
@JvmField val SPLIT_PENDING = of("split.pending")
9730+
9731+
@JvmField val SPLIT_PROCESSING = of("split.processing")
9732+
9733+
@JvmField val SPLIT_SUCCESS = of("split.success")
9734+
9735+
@JvmField val SPLIT_ERROR = of("split.error")
9736+
9737+
@JvmField val SPLIT_CANCELLED = of("split.cancelled")
9738+
97299739
@JvmField val UNMAPPED_EVENT = of("unmapped_event")
97309740

97319741
@JvmStatic fun of(value: String) = WebhookEvent(JsonField.of(value))
@@ -9755,6 +9765,11 @@ private constructor(
97559765
SHEETS_ERROR,
97569766
SHEETS_PARTIAL_SUCCESS,
97579767
SHEETS_CANCELLED,
9768+
SPLIT_PENDING,
9769+
SPLIT_PROCESSING,
9770+
SPLIT_SUCCESS,
9771+
SPLIT_ERROR,
9772+
SPLIT_CANCELLED,
97589773
UNMAPPED_EVENT,
97599774
}
97609775

@@ -9792,6 +9807,11 @@ private constructor(
97929807
SHEETS_ERROR,
97939808
SHEETS_PARTIAL_SUCCESS,
97949809
SHEETS_CANCELLED,
9810+
SPLIT_PENDING,
9811+
SPLIT_PROCESSING,
9812+
SPLIT_SUCCESS,
9813+
SPLIT_ERROR,
9814+
SPLIT_CANCELLED,
97959815
UNMAPPED_EVENT,
97969816
/**
97979817
* An enum member indicating that [WebhookEvent] was instantiated with
@@ -9831,6 +9851,11 @@ private constructor(
98319851
SHEETS_ERROR -> Value.SHEETS_ERROR
98329852
SHEETS_PARTIAL_SUCCESS -> Value.SHEETS_PARTIAL_SUCCESS
98339853
SHEETS_CANCELLED -> Value.SHEETS_CANCELLED
9854+
SPLIT_PENDING -> Value.SPLIT_PENDING
9855+
SPLIT_PROCESSING -> Value.SPLIT_PROCESSING
9856+
SPLIT_SUCCESS -> Value.SPLIT_SUCCESS
9857+
SPLIT_ERROR -> Value.SPLIT_ERROR
9858+
SPLIT_CANCELLED -> Value.SPLIT_CANCELLED
98349859
UNMAPPED_EVENT -> Value.UNMAPPED_EVENT
98359860
else -> Value._UNKNOWN
98369861
}
@@ -9868,6 +9893,11 @@ private constructor(
98689893
SHEETS_ERROR -> Known.SHEETS_ERROR
98699894
SHEETS_PARTIAL_SUCCESS -> Known.SHEETS_PARTIAL_SUCCESS
98709895
SHEETS_CANCELLED -> Known.SHEETS_CANCELLED
9896+
SPLIT_PENDING -> Known.SPLIT_PENDING
9897+
SPLIT_PROCESSING -> Known.SPLIT_PROCESSING
9898+
SPLIT_SUCCESS -> Known.SPLIT_SUCCESS
9899+
SPLIT_ERROR -> Known.SPLIT_ERROR
9900+
SPLIT_CANCELLED -> Known.SPLIT_CANCELLED
98719901
UNMAPPED_EVENT -> Known.UNMAPPED_EVENT
98729902
else ->
98739903
throw LlamaCloudInvalidDataException(

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/batch/jobitems/JobItemGetProcessingResultsResponse.kt‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9833,6 +9833,16 @@ private constructor(
98339833

98349834
@JvmField val SHEETS_CANCELLED = of("sheets.cancelled")
98359835

9836+
@JvmField val SPLIT_PENDING = of("split.pending")
9837+
9838+
@JvmField val SPLIT_PROCESSING = of("split.processing")
9839+
9840+
@JvmField val SPLIT_SUCCESS = of("split.success")
9841+
9842+
@JvmField val SPLIT_ERROR = of("split.error")
9843+
9844+
@JvmField val SPLIT_CANCELLED = of("split.cancelled")
9845+
98369846
@JvmField val UNMAPPED_EVENT = of("unmapped_event")
98379847

98389848
@JvmStatic fun of(value: String) = WebhookEvent(JsonField.of(value))
@@ -9862,6 +9872,11 @@ private constructor(
98629872
SHEETS_ERROR,
98639873
SHEETS_PARTIAL_SUCCESS,
98649874
SHEETS_CANCELLED,
9875+
SPLIT_PENDING,
9876+
SPLIT_PROCESSING,
9877+
SPLIT_SUCCESS,
9878+
SPLIT_ERROR,
9879+
SPLIT_CANCELLED,
98659880
UNMAPPED_EVENT,
98669881
}
98679882

@@ -9899,6 +9914,11 @@ private constructor(
98999914
SHEETS_ERROR,
99009915
SHEETS_PARTIAL_SUCCESS,
99019916
SHEETS_CANCELLED,
9917+
SPLIT_PENDING,
9918+
SPLIT_PROCESSING,
9919+
SPLIT_SUCCESS,
9920+
SPLIT_ERROR,
9921+
SPLIT_CANCELLED,
99029922
UNMAPPED_EVENT,
99039923
/**
99049924
* An enum member indicating that [WebhookEvent] was instantiated
@@ -9939,6 +9959,11 @@ private constructor(
99399959
SHEETS_ERROR -> Value.SHEETS_ERROR
99409960
SHEETS_PARTIAL_SUCCESS -> Value.SHEETS_PARTIAL_SUCCESS
99419961
SHEETS_CANCELLED -> Value.SHEETS_CANCELLED
9962+
SPLIT_PENDING -> Value.SPLIT_PENDING
9963+
SPLIT_PROCESSING -> Value.SPLIT_PROCESSING
9964+
SPLIT_SUCCESS -> Value.SPLIT_SUCCESS
9965+
SPLIT_ERROR -> Value.SPLIT_ERROR
9966+
SPLIT_CANCELLED -> Value.SPLIT_CANCELLED
99429967
UNMAPPED_EVENT -> Value.UNMAPPED_EVENT
99439968
else -> Value._UNKNOWN
99449969
}
@@ -9976,6 +10001,11 @@ private constructor(
997610001
SHEETS_ERROR -> Known.SHEETS_ERROR
997710002
SHEETS_PARTIAL_SUCCESS -> Known.SHEETS_PARTIAL_SUCCESS
997810003
SHEETS_CANCELLED -> Known.SHEETS_CANCELLED
10004+
SPLIT_PENDING -> Known.SPLIT_PENDING
10005+
SPLIT_PROCESSING -> Known.SPLIT_PROCESSING
10006+
SPLIT_SUCCESS -> Known.SPLIT_SUCCESS
10007+
SPLIT_ERROR -> Known.SPLIT_ERROR
10008+
SPLIT_CANCELLED -> Known.SPLIT_CANCELLED
997910009
UNMAPPED_EVENT -> Known.UNMAPPED_EVENT
998010010
else ->
998110011
throw LlamaCloudInvalidDataException(

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetCreateParams.kt‎

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ import kotlin.jvm.optionals.getOrNull
2929
* Provide at most one of `configuration` (an inline parsing configuration) or `configuration_id` (a
3030
* saved configuration preset). If neither is provided, a default configuration is used. Optionally
3131
* include `webhook_configurations` to receive `sheets.*` status notifications.
32-
*
33-
* Experimental: not production-ready and subject to change.
3432
*/
33+
@Deprecated("deprecated")
3534
class SheetCreateParams
3635
private constructor(
3736
private val organizationId: String?,
@@ -1206,6 +1205,16 @@ private constructor(
12061205

12071206
@JvmField val SHEETS_CANCELLED = of("sheets.cancelled")
12081207

1208+
@JvmField val SPLIT_PENDING = of("split.pending")
1209+
1210+
@JvmField val SPLIT_PROCESSING = of("split.processing")
1211+
1212+
@JvmField val SPLIT_SUCCESS = of("split.success")
1213+
1214+
@JvmField val SPLIT_ERROR = of("split.error")
1215+
1216+
@JvmField val SPLIT_CANCELLED = of("split.cancelled")
1217+
12091218
@JvmField val UNMAPPED_EVENT = of("unmapped_event")
12101219

12111220
@JvmStatic fun of(value: String) = WebhookEvent(JsonField.of(value))
@@ -1235,6 +1244,11 @@ private constructor(
12351244
SHEETS_ERROR,
12361245
SHEETS_PARTIAL_SUCCESS,
12371246
SHEETS_CANCELLED,
1247+
SPLIT_PENDING,
1248+
SPLIT_PROCESSING,
1249+
SPLIT_SUCCESS,
1250+
SPLIT_ERROR,
1251+
SPLIT_CANCELLED,
12381252
UNMAPPED_EVENT,
12391253
}
12401254

@@ -1270,6 +1284,11 @@ private constructor(
12701284
SHEETS_ERROR,
12711285
SHEETS_PARTIAL_SUCCESS,
12721286
SHEETS_CANCELLED,
1287+
SPLIT_PENDING,
1288+
SPLIT_PROCESSING,
1289+
SPLIT_SUCCESS,
1290+
SPLIT_ERROR,
1291+
SPLIT_CANCELLED,
12731292
UNMAPPED_EVENT,
12741293
/**
12751294
* An enum member indicating that [WebhookEvent] was instantiated with an unknown
@@ -1309,6 +1328,11 @@ private constructor(
13091328
SHEETS_ERROR -> Value.SHEETS_ERROR
13101329
SHEETS_PARTIAL_SUCCESS -> Value.SHEETS_PARTIAL_SUCCESS
13111330
SHEETS_CANCELLED -> Value.SHEETS_CANCELLED
1331+
SPLIT_PENDING -> Value.SPLIT_PENDING
1332+
SPLIT_PROCESSING -> Value.SPLIT_PROCESSING
1333+
SPLIT_SUCCESS -> Value.SPLIT_SUCCESS
1334+
SPLIT_ERROR -> Value.SPLIT_ERROR
1335+
SPLIT_CANCELLED -> Value.SPLIT_CANCELLED
13121336
UNMAPPED_EVENT -> Value.UNMAPPED_EVENT
13131337
else -> Value._UNKNOWN
13141338
}
@@ -1346,6 +1370,11 @@ private constructor(
13461370
SHEETS_ERROR -> Known.SHEETS_ERROR
13471371
SHEETS_PARTIAL_SUCCESS -> Known.SHEETS_PARTIAL_SUCCESS
13481372
SHEETS_CANCELLED -> Known.SHEETS_CANCELLED
1373+
SPLIT_PENDING -> Known.SPLIT_PENDING
1374+
SPLIT_PROCESSING -> Known.SPLIT_PROCESSING
1375+
SPLIT_SUCCESS -> Known.SPLIT_SUCCESS
1376+
SPLIT_ERROR -> Known.SPLIT_ERROR
1377+
SPLIT_CANCELLED -> Known.SPLIT_CANCELLED
13491378
UNMAPPED_EVENT -> Known.UNMAPPED_EVENT
13501379
else -> throw LlamaCloudInvalidDataException("Unknown WebhookEvent: $value")
13511380
}

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetDeleteJobParams.kt‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ import java.util.Objects
1111
import java.util.Optional
1212
import kotlin.jvm.optionals.getOrNull
1313

14-
/**
15-
* Delete a spreadsheet parsing job and its associated data. Experimental: not production-ready and
16-
* subject to change.
17-
*/
14+
/** Delete a spreadsheet parsing job and its associated data. */
15+
@Deprecated("deprecated")
1816
class SheetDeleteJobParams
1917
private constructor(
2018
private val spreadsheetJobId: String?,

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/models/beta/sheets/SheetGetParams.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import kotlin.jvm.optionals.getOrNull
1212

1313
/**
1414
* Get a spreadsheet parsing job. When `include_results=True` (default), embeds extracted regions
15-
* and results if complete, skipping the separate `/results` call. Experimental: not
16-
* production-ready and subject to change.
15+
* and results if complete, skipping the separate `/results` call.
1716
*/
17+
@Deprecated("deprecated")
1818
class SheetGetParams
1919
private constructor(
2020
private val spreadsheetJobId: String?,

0 commit comments

Comments
 (0)