Open ebanDev opened 2 months ago
Filter by layout, it's easier that finding type id.
https://github.com/anyproto/anytype-ts/blob/main/src/ts/interface/object.ts
export enum ObjectLayout {
Page = 0,
Human = 1,
Task = 2,
Set = 3,
Type = 4,
Relation = 5,
File = 6,
Dashboard = 7,
Image = 8,
Note = 9,
Space = 10,
Bookmark = 11,
OptionList = 12,
Option = 13,
Collection = 14,
Audio = 15,
Video = 16,
Date = 17,
SpaceView = 18,
Participant = 19,
Pdf = 20,
};
Thanks! your answer fixes the anything else section but I keep this issue open because the main issue isnt solved
Thanks! your answer fixes the anything else section but I keep this issue open because the main issue isnt solved
I'm sorry, but what is the main issue? I did not understand
Well I want to be able to filter by object type directly because for example two types can have the layout Note
Have you read a contributing guide?
Current Behavior
I'm trying communicate with my desktop instance of anytype using grpc-js, here is my current code :
As you can guess, for now I'm just trying to get all the avaiables Types, but this does not work and it returns all the objects. How am I supposed to filter for the objects? I tried reading the doc on anytype.model.Block.Content.Dataview.Filter but it is not clear enough for me (and ChatGPT) to write the right code.
Expected Behavior
It should send me back all the blocks of the type
_otobjectType
Steps To Reproduce
current behavior
sectionEnvironment
Anything else?
PS : I tried to filter the Type objects from the list of all the objects it returned me, but _otobjectType only corresponds to the built-in AnyType Types, I had to search a bit through the data and found that all the types I created have a fields.type.stringValue of "bafyreicyeglwtj3ihj66wgf3kx4agh2uk2u3lpzfonprl6nvnfmkmyga6q", I don't really understand why... Hope y'all will be able to help me :)