mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-03 15:19:44 +00:00
Revert "more annotations to god of annotations"
This reverts commit f8a8808508
.
This commit is contained in:
@@ -3,9 +3,7 @@ package dev.inmo.micro_utils.repos
|
||||
import dev.inmo.micro_utils.pagination.Pagination
|
||||
import dev.inmo.micro_utils.pagination.PaginationResult
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
interface ReadOneToManyKeyValueRepo<Key, Value> : Repo {
|
||||
suspend fun get(k: Key, pagination: Pagination, reversed: Boolean = false): PaginationResult<Value>
|
||||
suspend fun keys(pagination: Pagination, reversed: Boolean = false): PaginationResult<Key>
|
||||
@@ -17,7 +15,6 @@ interface ReadOneToManyKeyValueRepo<Key, Value> : Repo {
|
||||
@Deprecated("Renamed", ReplaceWith("ReadOneToManyKeyValueRepo", "dev.inmo.micro_utils.repos.ReadOneToManyKeyValueRepo"))
|
||||
typealias OneToManyReadKeyValueRepo<Key, Value> = ReadOneToManyKeyValueRepo<Key, Value>
|
||||
|
||||
@JsExport
|
||||
interface WriteOneToManyKeyValueRepo<Key, Value> : Repo {
|
||||
val onNewValue: Flow<Pair<Key, Value>>
|
||||
val onValueRemoved: Flow<Pair<Key, Value>>
|
||||
@@ -30,5 +27,4 @@ interface WriteOneToManyKeyValueRepo<Key, Value> : Repo {
|
||||
@Deprecated("Renamed", ReplaceWith("WriteOneToManyKeyValueRepo", "dev.inmo.micro_utils.repos.WriteOneToManyKeyValueRepo"))
|
||||
typealias OneToManyWriteKeyValueRepo<Key, Value> = WriteOneToManyKeyValueRepo<Key, Value>
|
||||
|
||||
@JsExport
|
||||
interface OneToManyKeyValueRepo<Key, Value> : ReadOneToManyKeyValueRepo<Key, Value>, WriteOneToManyKeyValueRepo<Key, Value>
|
@@ -1,6 +1,3 @@
|
||||
package dev.inmo.micro_utils.repos
|
||||
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
interface Repo
|
||||
|
@@ -3,9 +3,7 @@ package dev.inmo.micro_utils.repos
|
||||
import dev.inmo.micro_utils.pagination.Pagination
|
||||
import dev.inmo.micro_utils.pagination.PaginationResult
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
interface ReadStandardCRUDRepo<ObjectType, IdType> : Repo {
|
||||
suspend fun getByPagination(pagination: Pagination): PaginationResult<ObjectType>
|
||||
suspend fun getById(id: IdType): ObjectType?
|
||||
@@ -14,14 +12,11 @@ interface ReadStandardCRUDRepo<ObjectType, IdType> : Repo {
|
||||
}
|
||||
|
||||
typealias UpdatedValuePair<IdType, ValueType> = Pair<IdType, ValueType>
|
||||
@JsExport
|
||||
val <IdType> UpdatedValuePair<IdType, *>.id
|
||||
get() = first
|
||||
@JsExport
|
||||
val <ValueType> UpdatedValuePair<*, ValueType>.value
|
||||
get() = second
|
||||
|
||||
@JsExport
|
||||
interface WriteStandardCRUDRepo<ObjectType, IdType, InputValueType> : Repo {
|
||||
val newObjectsFlow: Flow<ObjectType>
|
||||
val updatedObjectsFlow: Flow<ObjectType>
|
||||
@@ -33,19 +28,15 @@ interface WriteStandardCRUDRepo<ObjectType, IdType, InputValueType> : Repo {
|
||||
suspend fun deleteById(ids: List<IdType>)
|
||||
}
|
||||
|
||||
@JsExport
|
||||
suspend fun <ObjectType, IdType, InputValueType> WriteStandardCRUDRepo<ObjectType, IdType, InputValueType>.create(
|
||||
vararg values: InputValueType
|
||||
): List<ObjectType> = create(values.toList())
|
||||
@JsExport
|
||||
suspend fun <ObjectType, IdType, InputValueType> WriteStandardCRUDRepo<ObjectType, IdType, InputValueType>.update(
|
||||
vararg values: UpdatedValuePair<IdType, InputValueType>
|
||||
): List<ObjectType> = update(values.toList())
|
||||
@JsExport
|
||||
suspend fun <ObjectType, IdType, InputValueType> WriteStandardCRUDRepo<ObjectType, IdType, InputValueType>.deleteById(
|
||||
vararg ids: IdType
|
||||
) = deleteById(ids.toList())
|
||||
|
||||
@JsExport
|
||||
interface StandardCRUDRepo<ObjectType, IdType, InputValueType> : ReadStandardCRUDRepo<ObjectType, IdType>,
|
||||
WriteStandardCRUDRepo<ObjectType, IdType, InputValueType>
|
@@ -3,9 +3,7 @@ package dev.inmo.micro_utils.repos
|
||||
import dev.inmo.micro_utils.pagination.Pagination
|
||||
import dev.inmo.micro_utils.pagination.PaginationResult
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
interface ReadStandardKeyValueRepo<Key, Value> : Repo {
|
||||
suspend fun get(k: Key): Value?
|
||||
suspend fun values(pagination: Pagination, reversed: Boolean = false): PaginationResult<Value>
|
||||
@@ -14,7 +12,6 @@ interface ReadStandardKeyValueRepo<Key, Value> : Repo {
|
||||
suspend fun count(): Long
|
||||
}
|
||||
|
||||
@JsExport
|
||||
interface WriteStandardKeyValueRepo<Key, Value> : Repo {
|
||||
val onNewValue: Flow<Pair<Key, Value>>
|
||||
val onValueRemoved: Flow<Key>
|
||||
@@ -23,5 +20,4 @@ interface WriteStandardKeyValueRepo<Key, Value> : Repo {
|
||||
suspend fun unset(k: Key)
|
||||
}
|
||||
|
||||
@JsExport
|
||||
interface StandardKeyValueRepo<Key, Value> : ReadStandardKeyValueRepo<Key, Value>, WriteStandardKeyValueRepo<Key, Value>
|
@@ -2,9 +2,7 @@ package dev.inmo.micro_utils.repos.pagination
|
||||
|
||||
import dev.inmo.micro_utils.pagination.*
|
||||
import dev.inmo.micro_utils.repos.ReadStandardCRUDRepo
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <T, ID, REPO : ReadStandardCRUDRepo<T, ID>> REPO.doForAll(
|
||||
@Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE")
|
||||
methodCaller: suspend REPO.(Pagination) -> PaginationResult<T>,
|
||||
@@ -17,12 +15,10 @@ suspend inline fun <T, ID, REPO : ReadStandardCRUDRepo<T, ID>> REPO.doForAll(
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <T, ID, REPO : ReadStandardCRUDRepo<T, ID>> REPO.doForAll(
|
||||
block: (List<T>) -> Unit
|
||||
) = doForAll({ getByPagination(it) }, block)
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <T, ID, REPO : ReadStandardCRUDRepo<T, ID>> REPO.getAll(
|
||||
@Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE")
|
||||
methodCaller: suspend REPO.(Pagination) -> PaginationResult<T>
|
||||
|
@@ -2,9 +2,7 @@ package dev.inmo.micro_utils.repos.pagination
|
||||
|
||||
import dev.inmo.micro_utils.pagination.*
|
||||
import dev.inmo.micro_utils.repos.*
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <Key, Value, REPO : ReadStandardKeyValueRepo<Key, Value>> REPO.doForAll(
|
||||
@Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE")
|
||||
methodCaller: suspend REPO.(Pagination) -> PaginationResult<Key>,
|
||||
@@ -17,12 +15,10 @@ suspend inline fun <Key, Value, REPO : ReadStandardKeyValueRepo<Key, Value>> REP
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <Key, Value, REPO : ReadStandardKeyValueRepo<Key, Value>> REPO.doForAll(
|
||||
block: (List<Pair<Key, Value>>) -> Unit
|
||||
) = doForAll({ keys(it, false) }, block)
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <Key, Value, REPO : ReadStandardKeyValueRepo<Key, Value>> REPO.getAll(
|
||||
@Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE")
|
||||
methodCaller: suspend REPO.(Pagination) -> PaginationResult<Key>
|
||||
|
@@ -2,9 +2,7 @@ package dev.inmo.micro_utils.repos.pagination
|
||||
|
||||
import dev.inmo.micro_utils.pagination.*
|
||||
import dev.inmo.micro_utils.repos.*
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <Key, Value, REPO : ReadOneToManyKeyValueRepo<Key, Value>> REPO.doForAll(
|
||||
@Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE")
|
||||
methodCaller: suspend REPO.(Pagination) -> PaginationResult<Key>,
|
||||
@@ -27,12 +25,10 @@ suspend inline fun <Key, Value, REPO : ReadOneToManyKeyValueRepo<Key, Value>> RE
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <Key, Value, REPO : ReadOneToManyKeyValueRepo<Key, Value>> REPO.doForAll(
|
||||
block: (List<Pair<Key, List<Value>>>) -> Unit
|
||||
) = doForAll({ keys(it, false) }, block)
|
||||
|
||||
@JsExport
|
||||
suspend inline fun <Key, Value, REPO : ReadOneToManyKeyValueRepo<Key, Value>> REPO.getAll(
|
||||
@Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE")
|
||||
methodCaller: suspend REPO.(Pagination) -> PaginationResult<Key>
|
||||
|
@@ -3,9 +3,7 @@ package dev.inmo.micro_utils.repos
|
||||
import dev.inmo.micro_utils.coroutines.BroadcastFlow
|
||||
import dev.inmo.micro_utils.pagination.*
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class ReadMapCRUDRepo<ObjectType, IdType>(
|
||||
private val map: Map<IdType, ObjectType> = emptyMap()
|
||||
) : ReadStandardCRUDRepo<ObjectType, IdType> {
|
||||
@@ -25,7 +23,6 @@ class ReadMapCRUDRepo<ObjectType, IdType>(
|
||||
override suspend fun count(): Long = map.size.toLong()
|
||||
}
|
||||
|
||||
@JsExport
|
||||
abstract class WriteMapCRUDRepo<ObjectType, IdType, InputValueType>(
|
||||
private val map: MutableMap<IdType, ObjectType> = mutableMapOf()
|
||||
) : WriteStandardCRUDRepo<ObjectType, IdType, InputValueType> {
|
||||
@@ -73,14 +70,12 @@ abstract class WriteMapCRUDRepo<ObjectType, IdType, InputValueType>(
|
||||
|
||||
}
|
||||
|
||||
@JsExport
|
||||
abstract class MapCRUDRepo<ObjectType, IdType, InputValueType>(
|
||||
map: MutableMap<IdType, ObjectType>
|
||||
) : StandardCRUDRepo<ObjectType, IdType, InputValueType>,
|
||||
ReadStandardCRUDRepo<ObjectType, IdType> by ReadMapCRUDRepo(map),
|
||||
WriteMapCRUDRepo<ObjectType, IdType, InputValueType>(map)
|
||||
|
||||
@JsExport
|
||||
fun <ObjectType, IdType, InputValueType> MapCRUDRepo(
|
||||
map: MutableMap<IdType, ObjectType>,
|
||||
updateCallback: suspend (newValue: InputValueType, id: IdType, old: ObjectType) -> ObjectType,
|
||||
@@ -95,7 +90,6 @@ fun <ObjectType, IdType, InputValueType> MapCRUDRepo(
|
||||
override suspend fun createObject(newValue: InputValueType): Pair<IdType, ObjectType> = createCallback(newValue)
|
||||
}
|
||||
|
||||
@JsExport
|
||||
fun <ObjectType, IdType, InputValueType> MutableMap<IdType, ObjectType>.asCrudRepo(
|
||||
updateCallback: suspend (newValue: InputValueType, id: IdType, old: ObjectType) -> ObjectType,
|
||||
createCallback: suspend (newValue: InputValueType) -> Pair<IdType, ObjectType>
|
||||
|
@@ -3,9 +3,7 @@ package dev.inmo.micro_utils.repos
|
||||
import dev.inmo.micro_utils.coroutines.BroadcastFlow
|
||||
import dev.inmo.micro_utils.pagination.*
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class ReadMapKeyValueRepo<Key, Value>(
|
||||
private val map: Map<Key, Value> = emptyMap()
|
||||
) : ReadStandardKeyValueRepo<Key, Value> {
|
||||
@@ -47,7 +45,6 @@ class ReadMapKeyValueRepo<Key, Value>(
|
||||
override suspend fun count(): Long = map.size.toLong()
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class WriteMapKeyValueRepo<Key, Value>(
|
||||
private val map: MutableMap<Key, Value> = mutableMapOf()
|
||||
) : WriteStandardKeyValueRepo<Key, Value> {
|
||||
@@ -68,12 +65,10 @@ class WriteMapKeyValueRepo<Key, Value>(
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class MapKeyValueRepo<Key, Value>(
|
||||
private val map: MutableMap<Key, Value> = mutableMapOf()
|
||||
) : StandardKeyValueRepo<Key, Value>,
|
||||
ReadStandardKeyValueRepo<Key, Value> by ReadMapKeyValueRepo(map),
|
||||
WriteStandardKeyValueRepo<Key, Value> by WriteMapKeyValueRepo(map)
|
||||
|
||||
@JsExport
|
||||
fun <K, V> MutableMap<K, V>.asKeyValueRepo(): StandardKeyValueRepo<K, V> = MapKeyValueRepo(this)
|
||||
|
@@ -4,9 +4,7 @@ import dev.inmo.micro_utils.coroutines.BroadcastFlow
|
||||
import dev.inmo.micro_utils.pagination.*
|
||||
import dev.inmo.micro_utils.pagination.utils.paginate
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class MapReadOneToManyKeyValueRepo<Key, Value>(
|
||||
private val map: Map<Key, List<Value>> = emptyMap()
|
||||
) : ReadOneToManyKeyValueRepo<Key, Value> {
|
||||
@@ -46,7 +44,6 @@ class MapReadOneToManyKeyValueRepo<Key, Value>(
|
||||
override suspend fun count(): Long = map.size.toLong()
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class MapWriteOneToManyKeyValueRepo<Key, Value>(
|
||||
private val map: MutableMap<Key, MutableList<Value>> = mutableMapOf()
|
||||
) : WriteOneToManyKeyValueRepo<Key, Value> {
|
||||
@@ -74,14 +71,12 @@ class MapWriteOneToManyKeyValueRepo<Key, Value>(
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class MapOneToManyKeyValueRepo<Key, Value>(
|
||||
private val map: MutableMap<Key, MutableList<Value>> = mutableMapOf()
|
||||
) : OneToManyKeyValueRepo<Key, Value>,
|
||||
ReadOneToManyKeyValueRepo<Key, Value> by MapReadOneToManyKeyValueRepo(map),
|
||||
WriteOneToManyKeyValueRepo<Key, Value> by MapWriteOneToManyKeyValueRepo(map)
|
||||
|
||||
@JsExport
|
||||
fun <K, V> MutableMap<K, List<V>>.asOneToManyKeyValueRepo(): OneToManyKeyValueRepo<K, V> = MapOneToManyKeyValueRepo(
|
||||
map { (k, v) -> k to v.toMutableList() }.toMap().toMutableMap()
|
||||
)
|
||||
|
@@ -11,9 +11,7 @@ import dev.inmo.micro_utils.repos.ktor.common.crud.*
|
||||
import io.ktor.client.HttpClient
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorReadStandardCrudRepo<ObjectType, IdType> (
|
||||
private val baseUrl: String,
|
||||
private val client: HttpClient = HttpClient(),
|
||||
|
@@ -3,9 +3,7 @@ package dev.inmo.micro_utils.repos.ktor.client.crud
|
||||
import dev.inmo.micro_utils.repos.*
|
||||
import io.ktor.client.HttpClient
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorStandardCrudRepo<ObjectType, IdType, InputValue> (
|
||||
baseUrl: String,
|
||||
baseSubpart: String,
|
||||
|
@@ -11,9 +11,7 @@ import io.ktor.client.HttpClient
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.*
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorWriteStandardCrudRepo<ObjectType, IdType, InputValue> (
|
||||
private val baseUrl: String,
|
||||
private val client: HttpClient = HttpClient(),
|
||||
|
@@ -11,9 +11,7 @@ import dev.inmo.micro_utils.repos.ktor.common.key_value.*
|
||||
import io.ktor.client.*
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorReadStandardKeyValueRepo<Key, Value> (
|
||||
private var baseUrl: String,
|
||||
private var client: HttpClient = HttpClient(),
|
||||
|
@@ -5,9 +5,7 @@ import dev.inmo.micro_utils.repos.ReadStandardKeyValueRepo
|
||||
import dev.inmo.micro_utils.repos.WriteStandardKeyValueRepo
|
||||
import io.ktor.client.*
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorStandartKeyValueRepo<K, V> (
|
||||
baseUrl: String,
|
||||
baseSubpart: String,
|
||||
|
@@ -11,9 +11,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.PairSerializer
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorWriteStandardKeyValueRepo<K, V> (
|
||||
private var baseUrl: String,
|
||||
private var client: HttpClient = HttpClient(),
|
||||
|
@@ -5,9 +5,7 @@ import dev.inmo.micro_utils.repos.ReadOneToManyKeyValueRepo
|
||||
import dev.inmo.micro_utils.repos.WriteOneToManyKeyValueRepo
|
||||
import io.ktor.client.HttpClient
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorOneToManyKeyValueRepo<Key, Value>(
|
||||
baseUrl: String,
|
||||
baseSubpart: String,
|
||||
|
@@ -11,9 +11,7 @@ import dev.inmo.micro_utils.repos.ktor.common.one_to_many.*
|
||||
import io.ktor.client.HttpClient
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorReadOneToManyKeyValueRepo<Key, Value> (
|
||||
private val baseUrl: String,
|
||||
private val client: HttpClient = HttpClient(),
|
||||
@@ -85,4 +83,5 @@ class KtorReadOneToManyKeyValueRepo<Key, Value> (
|
||||
),
|
||||
Long.serializer()
|
||||
)
|
||||
|
||||
}
|
@@ -11,9 +11,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.builtins.PairSerializer
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
class KtorWriteOneToManyKeyValueRepo<Key, Value> (
|
||||
private val baseUrl: String,
|
||||
private val client: HttpClient = HttpClient(),
|
||||
|
@@ -1,12 +1,6 @@
|
||||
package dev.inmo.micro_utils.repos.ktor.common.crud
|
||||
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
const val getByPaginationRouting = "getByPagination"
|
||||
@JsExport
|
||||
const val getByIdRouting = "getById"
|
||||
@JsExport
|
||||
const val containsRouting = "contains"
|
||||
@JsExport
|
||||
const val countRouting = "count"
|
||||
|
@@ -1,19 +1,10 @@
|
||||
package dev.inmo.micro_utils.repos.ktor.common.crud
|
||||
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
const val newObjectsFlowRouting = "newObjectsFlow"
|
||||
@JsExport
|
||||
const val updatedObjectsFlowRouting = "updatedObjectsFlow"
|
||||
@JsExport
|
||||
const val deletedObjectsIdsFlowRouting = "deletedObjectsIdsFlow"
|
||||
|
||||
@JsExport
|
||||
const val createRouting = "create"
|
||||
@JsExport
|
||||
const val updateRouting = "update"
|
||||
@JsExport
|
||||
const val updateManyRouting = "updateMany"
|
||||
@JsExport
|
||||
const val deleteByIdRouting = "deleteById"
|
||||
|
@@ -1,8 +1,4 @@
|
||||
package dev.inmo.micro_utils.repos.ktor.common.key_value
|
||||
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
const val keyParameterName = "key"
|
||||
@JsExport
|
||||
const val reversedParameterName = "reversed"
|
@@ -1,9 +1,7 @@
|
||||
package dev.inmo.micro_utils.repos.ktor.common.key_value
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
@Serializable
|
||||
data class KeyValuePostObject<K, V> (
|
||||
val key: K,
|
||||
|
@@ -1,23 +1,12 @@
|
||||
package dev.inmo.micro_utils.repos.ktor.common.key_value
|
||||
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
const val getRoute = "get"
|
||||
@JsExport
|
||||
const val valuesRoute = "values"
|
||||
@JsExport
|
||||
const val keysRoute = "keys"
|
||||
@JsExport
|
||||
const val containsRoute = "contains"
|
||||
@JsExport
|
||||
const val countRoute = "count"
|
||||
|
||||
@JsExport
|
||||
const val onNewValueRoute = "onNewValue"
|
||||
@JsExport
|
||||
const val onValueRemovedRoute = "onValueRemoved"
|
||||
@JsExport
|
||||
const val setRoute = "set"
|
||||
@JsExport
|
||||
const val unsetRoute = "unset"
|
@@ -1,10 +1,5 @@
|
||||
package dev.inmo.micro_utils.repos.ktor.common.one_to_many
|
||||
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
const val keyParameterName = "key"
|
||||
@JsExport
|
||||
const val valueParameterName = "value"
|
||||
@JsExport
|
||||
const val reversedParameterName = "reversed"
|
@@ -1,30 +1,16 @@
|
||||
package dev.inmo.micro_utils.repos.ktor.common.one_to_many
|
||||
|
||||
import kotlin.js.JsExport
|
||||
|
||||
@JsExport
|
||||
const val getRoute = "get"
|
||||
@JsExport
|
||||
const val keysRoute = "keys"
|
||||
@JsExport
|
||||
const val containsByKeyRoute = "containsByKey"
|
||||
@JsExport
|
||||
const val containsByKeyValueRoute = "containsByKeyValue"
|
||||
@JsExport
|
||||
const val countByKeyRoute = "countByKey"
|
||||
@JsExport
|
||||
const val countRoute = "count"
|
||||
|
||||
@JsExport
|
||||
const val onNewValueRoute = "onNewValue"
|
||||
@JsExport
|
||||
const val onValueRemovedRoute = "onValueRemoved"
|
||||
@JsExport
|
||||
const val onDataClearedRoute = "onDataCleared"
|
||||
|
||||
@JsExport
|
||||
const val addRoute = "add"
|
||||
@JsExport
|
||||
const val removeRoute = "remove"
|
||||
@JsExport
|
||||
const val clearRoute = "clear"
|
Reference in New Issue
Block a user