1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-2905 Primitives | Epic | Foundation for primitives (#2098)

Co-authored-by: Evgenii Kozlov <enklave.mare.balticum@protonmail.com>
This commit is contained in:
Konstantin Ivanov 2025-02-28 20:47:43 +01:00 committed by GitHub
parent 88aa30d64b
commit 4bc1e060f3
Signed by: github
GPG key ID: B5690EEEBB952194
153 changed files with 10877 additions and 1616 deletions

View file

@ -2,6 +2,7 @@ package com.anytypeio.anytype.data.auth.repo.block
import com.anytypeio.anytype.core_models.Block
import com.anytypeio.anytype.core_models.Command
import com.anytypeio.anytype.core_models.Command.ObjectTypeConflictingFields
import com.anytypeio.anytype.core_models.Config
import com.anytypeio.anytype.core_models.CreateBlockLinkWithObjectResult
import com.anytypeio.anytype.core_models.CreateObjectResult
@ -307,12 +308,18 @@ class BlockDataRepository(
override suspend fun createSet(
space: Id,
objectType: String?
objectType: String?,
details: Struct?
): CreateObjectSet.Response {
val result = remote.createSet(space = space, objectType = objectType)
val result = remote.createSet(
space = space,
objectType = objectType,
details = details
)
return CreateObjectSet.Response(
target = result.targetId,
payload = result.payload
target = result.objectId,
payload = result.payload,
details = result.details
)
}
@ -1101,4 +1108,16 @@ class BlockDataRepository(
override suspend fun setDeviceNetworkState(type: DeviceNetworkType) {
remote.setDeviceNetworkState(type)
}
override suspend fun objectTypeListConflictingRelations(command: ObjectTypeConflictingFields): List<Id> {
return remote.objectTypeListConflictingRelations(command)
}
override suspend fun objectTypeSetRecommendedHeaderFields(command: Command.ObjectTypeSetRecommendedHeaderFields) {
remote.objectTypeSetRecommendedHeaderFields(command)
}
override suspend fun objectTypeSetRecommendedFields(command: Command.ObjectTypeSetRecommendedFields) {
remote.objectTypeSetRecommendedFields(command)
}
}

View file

@ -2,6 +2,7 @@ package com.anytypeio.anytype.data.auth.repo.block
import com.anytypeio.anytype.core_models.Block
import com.anytypeio.anytype.core_models.Command
import com.anytypeio.anytype.core_models.Command.ObjectTypeConflictingFields
import com.anytypeio.anytype.core_models.Config
import com.anytypeio.anytype.core_models.CreateBlockLinkWithObjectResult
import com.anytypeio.anytype.core_models.CreateObjectResult
@ -106,7 +107,8 @@ interface BlockRemote {
suspend fun createSet(
space: Id,
objectType: String?
objectType: String?,
details: Struct?
): Response.Set.Create
suspend fun setDataViewViewerPosition(
@ -468,4 +470,9 @@ interface BlockRemote {
suspend fun debugAccountSelectTrace(dir: String): String
suspend fun setDeviceNetworkState(type: DeviceNetworkType)
suspend fun objectTypeListConflictingRelations(command: ObjectTypeConflictingFields): List<Id>
suspend fun objectTypeSetRecommendedHeaderFields(command: Command.ObjectTypeSetRecommendedHeaderFields)
suspend fun objectTypeSetRecommendedFields(command: Command.ObjectTypeSetRecommendedFields)
}