Skip to content

Commit 92aa446

Browse files
Add published API annotation
1 parent f8324e3 commit 92aa446

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

stream-android-core/src/main/java/io/getstream/android/core/api/filter/FilterField.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@
1515
*/
1616
package io.getstream.android.core.api.filter
1717

18+
import io.getstream.android.core.annotations.StreamPublishedApi
19+
1820
/**
1921
* Interface representing a field that can be used in filters for querying data from the Stream API.
2022
*
2123
* Implementations of this interface should provide [remote], which is the name of the field as
2224
* expected by the Stream API, and [localValue], a function to extract the field's value from a
2325
* model instance.
2426
*/
27+
@StreamPublishedApi
2528
public interface FilterField<M> {
2629
/** The name of this field as expected by the Stream API. */
2730
public val remote: String

stream-android-core/src/main/java/io/getstream/android/core/api/filter/Filters.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import io.getstream.android.core.internal.filter.BinaryOperator
2020
import io.getstream.android.core.internal.filter.CollectionOperator
2121

2222
/** Utility class for building filters. */
23+
@StreamPublishedApi
2324
public object Filters {
2425
/**
2526
* Creates a filter that combines multiple filters with a logical AND operation.

stream-android-core/src/main/java/io/getstream/android/core/api/sort/Sort.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@
1515
*/
1616
package io.getstream.android.core.api.sort
1717

18+
import io.getstream.android.core.annotations.StreamPublishedApi
19+
1820
/**
1921
* A sort configuration that combines a sort field with a direction.
2022
*
2123
* This class represents a complete sort specification that can be applied to collections of the
2224
* associated model type. It provides both local sorting capabilities and the ability to generate
2325
* remote API request parameters.
2426
*/
27+
@StreamPublishedApi
2528
public open class Sort<T>(public val field: SortField<T>, public val direction: SortDirection) :
2629
Comparator<T> {
2730

stream-android-core/src/main/java/io/getstream/android/core/api/sort/SortComparator.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package io.getstream.android.core.api.sort
1717

1818
import io.getstream.android.core.annotations.StreamInternalApi
19+
import io.getstream.android.core.annotations.StreamPublishedApi
1920

2021
/**
2122
* A comparator that can sort model instances by extracting comparable values.
@@ -28,6 +29,7 @@ import io.getstream.android.core.annotations.StreamInternalApi
2829
* @param V The type of the comparable value extracted from the model instances.
2930
* @property value A lambda that extracts a comparable value from a model instance.
3031
*/
32+
@StreamPublishedApi
3133
public class SortComparator<T, V : Comparable<V>>(public val value: (T) -> V) {
3234

3335
/**
@@ -70,6 +72,7 @@ public class SortComparator<T, V : Comparable<V>>(public val value: (T) -> V) {
7072
* Type erased type avoids making SortField generic while keeping the underlying value type intact
7173
* (no runtime type checks while sorting).
7274
*/
75+
@StreamPublishedApi
7376
public class AnySortComparator<T>(private val compare: (T?, T?, SortDirection) -> Int) {
7477

7578
/**

stream-android-core/src/main/java/io/getstream/android/core/api/utils/Response.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package io.getstream.android.core.api.utils
1717

18+
import io.getstream.android.core.annotations.StreamInternalApi
1819
import io.getstream.android.core.api.model.exceptions.StreamEndpointErrorData
1920
import io.getstream.android.core.api.serialization.StreamJsonSerialization
2021
import okhttp3.Response
@@ -26,6 +27,7 @@ import okhttp3.Response
2627
* @return The API error, or a failure if the response body could not be parsed.
2728
* @receiver The response to extract the error from.
2829
*/
30+
@StreamInternalApi
2931
public fun Response.toErrorData(with: StreamJsonSerialization): Result<StreamEndpointErrorData> =
3032
runCatching { peekBody(Long.MAX_VALUE).string() }
3133
.flatMap { with.fromJson(it, StreamEndpointErrorData::class.java) }

0 commit comments

Comments
 (0)