Package-level declarations

Types

Link copied to clipboard
interface FalClient

The main client class that provides access to simple API model usage, as well as access to the queue APIs.

Link copied to clipboard
typealias OnStatusUpdate = (update: QueueStatus.StatusUpdate) -> Unit

A callback for receiving status updates from a queue subscription.

Link copied to clipboard
interface QueueClient

A Kotlin queue client for interacting with the fal queue APIs.

Link copied to clipboard
data class RequestOutput<Output>(val data: Output, val requestId: String)

A data class that represents the output of a request.

Link copied to clipboard
data class RunOptions(val httpMethod: String = "POST")
Link copied to clipboard
data class StatusOptions(val logs: Boolean = false)
Link copied to clipboard
data class StatusSubscribeOptions(val logs: Boolean = false)
Link copied to clipboard
data class SubmitOptions(val webhookUrl: String? = null)
Link copied to clipboard
data class SubscribeOptions(val logs: Boolean = false, val webhookUrl: String? = null)

Functions

Link copied to clipboard
fun createFalClient(config: ClientConfig? = null): FalClient
fun createFalClient(credentialsResolver: CredentialsResolver): FalClient
Link copied to clipboard
inline suspend fun <Output : Any> QueueClient.result(endpointId: String, requestId: String): RequestOutput<Output>
@JvmName(name = "result_")
inline suspend fun QueueClient.result(endpointId: String, requestId: String): RequestOutput<JsonObject>
Link copied to clipboard
inline suspend fun <Output : Any> FalClient.run(endpointId: String, input: Any, options: RunOptions = RunOptions()): RequestOutput<Output>
@JvmName(name = "run_")
suspend fun FalClient.run(endpointId: String, input: Any, options: RunOptions = RunOptions()): RequestOutput<JsonObject>
Link copied to clipboard
inline suspend fun <Output : Any> FalClient.subscribe(endpointId: String, input: Any, options: SubscribeOptions = SubscribeOptions(), noinline onUpdate: OnStatusUpdate? = null): RequestOutput<Output>
@JvmName(name = "subscribe_")
inline suspend fun FalClient.subscribe(endpointId: String, input: Any, options: SubscribeOptions = SubscribeOptions(), noinline onUpdate: OnStatusUpdate? = null): RequestOutput<JsonObject>