Skip to content

Commit 32f1226

Browse files
author
stlc-bot
committed
Reconcile/cloud spec drift
Stainless-Generated-From: ddb34a52d0d53db5efeb33cc6f557466af4173e3
1 parent 5ee44cd commit 32f1226

113 files changed

Lines changed: 8189 additions & 147 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.

‎.github/workflows/test.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
- '!integrated/**'
7+
- '!stl-preview-head/**'
8+
- '!stl-preview-base/**'
9+
- '!generated'
10+
- '!codegen/**'
11+
- 'codegen/stl/**'
12+
pull_request:
13+
branches-ignore:
14+
- 'stl-preview-head/**'
15+
- 'stl-preview-base/**'
16+
17+
jobs:
18+
test:
19+
timeout-minutes: 15
20+
name: test
21+
runs-on: ubuntu-latest
22+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
23+
steps:
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
26+
- name: Set up Java
27+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
28+
with:
29+
distribution: temurin
30+
java-version: |
31+
8
32+
21
33+
cache: gradle
34+
35+
- name: Set up Gradle
36+
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
37+
38+
- name: Run tests
39+
run: ./scripts/test

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 131
1+
configured_endpoints: 136

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClient.kt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import com.llamacloud_prod.api.services.blocking.ParsingService
1616
import com.llamacloud_prod.api.services.blocking.PipelineService
1717
import com.llamacloud_prod.api.services.blocking.ProjectService
1818
import com.llamacloud_prod.api.services.blocking.RetrieverService
19+
import com.llamacloud_prod.api.services.blocking.SheetService
1920
import java.util.function.Consumer
2021

2122
/**
@@ -56,6 +57,8 @@ interface LlamaCloudClient {
5657

5758
fun files(): FileService
5859

60+
fun sheets(): SheetService
61+
5962
fun parsing(): ParsingService
6063

6164
fun extract(): ExtractService
@@ -105,6 +108,8 @@ interface LlamaCloudClient {
105108

106109
fun files(): FileService.WithRawResponse
107110

111+
fun sheets(): SheetService.WithRawResponse
112+
108113
fun parsing(): ParsingService.WithRawResponse
109114

110115
fun extract(): ExtractService.WithRawResponse

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientAsync.kt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import com.llamacloud_prod.api.services.async.ParsingServiceAsync
1616
import com.llamacloud_prod.api.services.async.PipelineServiceAsync
1717
import com.llamacloud_prod.api.services.async.ProjectServiceAsync
1818
import com.llamacloud_prod.api.services.async.RetrieverServiceAsync
19+
import com.llamacloud_prod.api.services.async.SheetServiceAsync
1920
import java.util.function.Consumer
2021

2122
/**
@@ -56,6 +57,8 @@ interface LlamaCloudClientAsync {
5657

5758
fun files(): FileServiceAsync
5859

60+
fun sheets(): SheetServiceAsync
61+
5962
fun parsing(): ParsingServiceAsync
6063

6164
fun extract(): ExtractServiceAsync
@@ -109,6 +112,8 @@ interface LlamaCloudClientAsync {
109112

110113
fun files(): FileServiceAsync.WithRawResponse
111114

115+
fun sheets(): SheetServiceAsync.WithRawResponse
116+
112117
fun parsing(): ParsingServiceAsync.WithRawResponse
113118

114119
fun extract(): ExtractServiceAsync.WithRawResponse

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientAsyncImpl.kt‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import com.llamacloud_prod.api.services.async.ProjectServiceAsync
3030
import com.llamacloud_prod.api.services.async.ProjectServiceAsyncImpl
3131
import com.llamacloud_prod.api.services.async.RetrieverServiceAsync
3232
import com.llamacloud_prod.api.services.async.RetrieverServiceAsyncImpl
33+
import com.llamacloud_prod.api.services.async.SheetServiceAsync
34+
import com.llamacloud_prod.api.services.async.SheetServiceAsyncImpl
3335
import java.util.function.Consumer
3436

3537
class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : LlamaCloudClientAsync {
@@ -51,6 +53,10 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
5153

5254
private val files: FileServiceAsync by lazy { FileServiceAsyncImpl(clientOptionsWithUserAgent) }
5355

56+
private val sheets: SheetServiceAsync by lazy {
57+
SheetServiceAsyncImpl(clientOptionsWithUserAgent)
58+
}
59+
5460
private val parsing: ParsingServiceAsync by lazy {
5561
ParsingServiceAsyncImpl(clientOptionsWithUserAgent)
5662
}
@@ -106,6 +112,8 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
106112

107113
override fun files(): FileServiceAsync = files
108114

115+
override fun sheets(): SheetServiceAsync = sheets
116+
109117
override fun parsing(): ParsingServiceAsync = parsing
110118

111119
override fun extract(): ExtractServiceAsync = extract
@@ -139,6 +147,10 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
139147
FileServiceAsyncImpl.WithRawResponseImpl(clientOptions)
140148
}
141149

150+
private val sheets: SheetServiceAsync.WithRawResponse by lazy {
151+
SheetServiceAsyncImpl.WithRawResponseImpl(clientOptions)
152+
}
153+
142154
private val parsing: ParsingServiceAsync.WithRawResponse by lazy {
143155
ParsingServiceAsyncImpl.WithRawResponseImpl(clientOptions)
144156
}
@@ -196,6 +208,8 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
196208

197209
override fun files(): FileServiceAsync.WithRawResponse = files
198210

211+
override fun sheets(): SheetServiceAsync.WithRawResponse = sheets
212+
199213
override fun parsing(): ParsingServiceAsync.WithRawResponse = parsing
200214

201215
override fun extract(): ExtractServiceAsync.WithRawResponse = extract

‎llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientImpl.kt‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import com.llamacloud_prod.api.services.blocking.ProjectService
3030
import com.llamacloud_prod.api.services.blocking.ProjectServiceImpl
3131
import com.llamacloud_prod.api.services.blocking.RetrieverService
3232
import com.llamacloud_prod.api.services.blocking.RetrieverServiceImpl
33+
import com.llamacloud_prod.api.services.blocking.SheetService
34+
import com.llamacloud_prod.api.services.blocking.SheetServiceImpl
3335
import java.util.function.Consumer
3436

3537
class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaCloudClient {
@@ -51,6 +53,8 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
5153

5254
private val files: FileService by lazy { FileServiceImpl(clientOptionsWithUserAgent) }
5355

56+
private val sheets: SheetService by lazy { SheetServiceImpl(clientOptionsWithUserAgent) }
57+
5458
private val parsing: ParsingService by lazy { ParsingServiceImpl(clientOptionsWithUserAgent) }
5559

5660
private val extract: ExtractService by lazy { ExtractServiceImpl(clientOptionsWithUserAgent) }
@@ -98,6 +102,8 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
98102

99103
override fun files(): FileService = files
100104

105+
override fun sheets(): SheetService = sheets
106+
101107
override fun parsing(): ParsingService = parsing
102108

103109
override fun extract(): ExtractService = extract
@@ -131,6 +137,10 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
131137
FileServiceImpl.WithRawResponseImpl(clientOptions)
132138
}
133139

140+
private val sheets: SheetService.WithRawResponse by lazy {
141+
SheetServiceImpl.WithRawResponseImpl(clientOptions)
142+
}
143+
134144
private val parsing: ParsingService.WithRawResponse by lazy {
135145
ParsingServiceImpl.WithRawResponseImpl(clientOptions)
136146
}
@@ -188,6 +198,8 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
188198

189199
override fun files(): FileService.WithRawResponse = files
190200

201+
override fun sheets(): SheetService.WithRawResponse = sheets
202+
191203
override fun parsing(): ParsingService.WithRawResponse = parsing
192204

193205
override fun extract(): ExtractService.WithRawResponse = extract

‎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
}

0 commit comments

Comments
 (0)