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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.8.0"
".": "7.8.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 7.8.1 (2026-05-13)

Full Changelog: [v7.8.0...v7.8.1](https://github.com/Finch-API/finch-api-java/compare/v7.8.0...v7.8.1)

### Chores

* **internal:** codegen related update ([2893186](https://github.com/Finch-API/finch-api-java/commit/2893186dbe22a68d0997cf817420cb0ccc0450f4))

## 7.8.0 (2026-05-12)

Full Changelog: [v7.7.0...v7.8.0](https://github.com/Finch-API/finch-api-java/compare/v7.7.0...v7.8.0)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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

[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/7.8.0)
[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.8.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.8.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/7.8.1)
[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.8.1/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.8.1)

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

Expand All @@ -24,7 +24,7 @@ Use the Finch MCP Server to enable AI assistants to interact with this API, allo

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

The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.8.0).
The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.8.1).

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

Expand All @@ -35,7 +35,7 @@ The REST API documentation can be found on [developer.tryfinch.com](https://deve
### Gradle

```kotlin
implementation("com.tryfinch.api:finch-java:7.8.0")
implementation("com.tryfinch.api:finch-java:7.8.1")
```

### Maven
Expand All @@ -44,7 +44,7 @@ implementation("com.tryfinch.api:finch-java:7.8.0")
<dependency>
<groupId>com.tryfinch.api</groupId>
<artifactId>finch-java</artifactId>
<version>7.8.0</version>
<version>7.8.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.tryfinch.api"
version = "7.8.0" // x-release-please-version
version = "7.8.1" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
// File generated from our OpenAPI spec by Stainless.

package com.tryfinch.api.models

import com.tryfinch.api.core.AutoPager
import com.tryfinch.api.core.Page
import com.tryfinch.api.core.checkRequired
import com.tryfinch.api.services.blocking.hris.DirectoryService
import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrDefault
import kotlin.jvm.optionals.getOrNull

/** @see DirectoryService.listIndividuals */
@Deprecated("use `list` instead")
class HrisDirectoryListIndividualsPage
private constructor(
private val service: DirectoryService,
private val params: HrisDirectoryListIndividualsParams,
private val response: HrisDirectoryListIndividualsPageResponse,
) : Page<IndividualInDirectory> {

/**
* Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data.
*
* @see HrisDirectoryListIndividualsPageResponse.individuals
*/
fun individuals(): List<IndividualInDirectory> =
response._individuals().getOptional("individuals").getOrNull() ?: emptyList()

/**
* Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data.
*
* @see HrisDirectoryListIndividualsPageResponse.paging
*/
fun paging(): Optional<Paging> = response._paging().getOptional("paging")

override fun items(): List<IndividualInDirectory> = individuals()

override fun hasNextPage(): Boolean {
if (items().isEmpty()) {
return false
}

val offset = paging().flatMap { it._offset().getOptional("offset") }.getOrDefault(0)
val totalCount = paging().flatMap { it._count().getOptional("count") }.getOrNull()
return totalCount == null || offset + items().size < totalCount
}

fun nextPageParams(): HrisDirectoryListIndividualsParams {
val offset = paging().flatMap { it._offset().getOptional("offset") }.getOrDefault(0)
return params.toBuilder().offset(offset + items().size).build()
}

override fun nextPage(): HrisDirectoryListIndividualsPage =
service.listIndividuals(nextPageParams())

fun autoPager(): AutoPager<IndividualInDirectory> = AutoPager.from(this)

/** The parameters that were used to request this page. */
fun params(): HrisDirectoryListIndividualsParams = params

/** The response that this page was parsed from. */
fun response(): HrisDirectoryListIndividualsPageResponse = response

fun toBuilder() = Builder().from(this)

companion object {

/**
* Returns a mutable builder for constructing an instance of
* [HrisDirectoryListIndividualsPage].
*
* The following fields are required:
* ```java
* .service()
* .params()
* .response()
* ```
*/
@JvmStatic fun builder() = Builder()
}

/** A builder for [HrisDirectoryListIndividualsPage]. */
class Builder internal constructor() {

private var service: DirectoryService? = null
private var params: HrisDirectoryListIndividualsParams? = null
private var response: HrisDirectoryListIndividualsPageResponse? = null

@JvmSynthetic
internal fun from(hrisDirectoryListIndividualsPage: HrisDirectoryListIndividualsPage) =
apply {
service = hrisDirectoryListIndividualsPage.service
params = hrisDirectoryListIndividualsPage.params
response = hrisDirectoryListIndividualsPage.response
}

fun service(service: DirectoryService) = apply { this.service = service }

/** The parameters that were used to request this page. */
fun params(params: HrisDirectoryListIndividualsParams) = apply { this.params = params }

/** The response that this page was parsed from. */
fun response(response: HrisDirectoryListIndividualsPageResponse) = apply {
this.response = response
}

/**
* Returns an immutable instance of [HrisDirectoryListIndividualsPage].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
* .service()
* .params()
* .response()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
fun build(): HrisDirectoryListIndividualsPage =
HrisDirectoryListIndividualsPage(
checkRequired("service", service),
checkRequired("params", params),
checkRequired("response", response),
)
}

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return other is HrisDirectoryListIndividualsPage &&
service == other.service &&
params == other.params &&
response == other.response
}

override fun hashCode(): Int = Objects.hash(service, params, response)

override fun toString() =
"HrisDirectoryListIndividualsPage{service=$service, params=$params, response=$response}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
// File generated from our OpenAPI spec by Stainless.

package com.tryfinch.api.models

import com.tryfinch.api.core.AutoPagerAsync
import com.tryfinch.api.core.PageAsync
import com.tryfinch.api.core.checkRequired
import com.tryfinch.api.services.async.hris.DirectoryServiceAsync
import java.util.Objects
import java.util.Optional
import java.util.concurrent.CompletableFuture
import java.util.concurrent.Executor
import kotlin.jvm.optionals.getOrDefault
import kotlin.jvm.optionals.getOrNull

/** @see DirectoryServiceAsync.listIndividuals */
@Deprecated("use `list` instead")
class HrisDirectoryListIndividualsPageAsync
private constructor(
private val service: DirectoryServiceAsync,
private val streamHandlerExecutor: Executor,
private val params: HrisDirectoryListIndividualsParams,
private val response: HrisDirectoryListIndividualsPageResponse,
) : PageAsync<IndividualInDirectory> {

/**
* Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data.
*
* @see HrisDirectoryListIndividualsPageResponse.individuals
*/
fun individuals(): List<IndividualInDirectory> =
response._individuals().getOptional("individuals").getOrNull() ?: emptyList()

/**
* Delegates to [HrisDirectoryListIndividualsPageResponse], but gracefully handles missing data.
*
* @see HrisDirectoryListIndividualsPageResponse.paging
*/
fun paging(): Optional<Paging> = response._paging().getOptional("paging")

override fun items(): List<IndividualInDirectory> = individuals()

override fun hasNextPage(): Boolean {
if (items().isEmpty()) {
return false
}

val offset = paging().flatMap { it._offset().getOptional("offset") }.getOrDefault(0)
val totalCount = paging().flatMap { it._count().getOptional("count") }.getOrNull()
return totalCount == null || offset + items().size < totalCount
}

fun nextPageParams(): HrisDirectoryListIndividualsParams {
val offset = paging().flatMap { it._offset().getOptional("offset") }.getOrDefault(0)
return params.toBuilder().offset(offset + items().size).build()
}

override fun nextPage(): CompletableFuture<HrisDirectoryListIndividualsPageAsync> =
service.listIndividuals(nextPageParams())

fun autoPager(): AutoPagerAsync<IndividualInDirectory> =
AutoPagerAsync.from(this, streamHandlerExecutor)

/** The parameters that were used to request this page. */
fun params(): HrisDirectoryListIndividualsParams = params

/** The response that this page was parsed from. */
fun response(): HrisDirectoryListIndividualsPageResponse = response

fun toBuilder() = Builder().from(this)

companion object {

/**
* Returns a mutable builder for constructing an instance of
* [HrisDirectoryListIndividualsPageAsync].
*
* The following fields are required:
* ```java
* .service()
* .streamHandlerExecutor()
* .params()
* .response()
* ```
*/
@JvmStatic fun builder() = Builder()
}

/** A builder for [HrisDirectoryListIndividualsPageAsync]. */
class Builder internal constructor() {

private var service: DirectoryServiceAsync? = null
private var streamHandlerExecutor: Executor? = null
private var params: HrisDirectoryListIndividualsParams? = null
private var response: HrisDirectoryListIndividualsPageResponse? = null

@JvmSynthetic
internal fun from(
hrisDirectoryListIndividualsPageAsync: HrisDirectoryListIndividualsPageAsync
) = apply {
service = hrisDirectoryListIndividualsPageAsync.service
streamHandlerExecutor = hrisDirectoryListIndividualsPageAsync.streamHandlerExecutor
params = hrisDirectoryListIndividualsPageAsync.params
response = hrisDirectoryListIndividualsPageAsync.response
}

fun service(service: DirectoryServiceAsync) = apply { this.service = service }

fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
this.streamHandlerExecutor = streamHandlerExecutor
}

/** The parameters that were used to request this page. */
fun params(params: HrisDirectoryListIndividualsParams) = apply { this.params = params }

/** The response that this page was parsed from. */
fun response(response: HrisDirectoryListIndividualsPageResponse) = apply {
this.response = response
}

/**
* Returns an immutable instance of [HrisDirectoryListIndividualsPageAsync].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
* .service()
* .streamHandlerExecutor()
* .params()
* .response()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
fun build(): HrisDirectoryListIndividualsPageAsync =
HrisDirectoryListIndividualsPageAsync(
checkRequired("service", service),
checkRequired("streamHandlerExecutor", streamHandlerExecutor),
checkRequired("params", params),
checkRequired("response", response),
)
}

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return other is HrisDirectoryListIndividualsPageAsync &&
service == other.service &&
streamHandlerExecutor == other.streamHandlerExecutor &&
params == other.params &&
response == other.response
}

override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)

override fun toString() =
"HrisDirectoryListIndividualsPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
}
Loading
Loading