UNPKG

@oap75/types

Version:

JavaScript type definitions for Subsocial blockchain.

49 lines (48 loc) 1.2 kB
export declare type ElasticIndexTypes = 'all' | 'profiles' | 'spaces' | 'posts'; export declare type ElasticIndexName = 'subsocial_profiles' | 'subsocial_spaces' | 'subsocial_posts'; export declare type IElasticIndex = Record<string, ElasticIndexName>; export declare const ElasticIndex: IElasticIndex; export declare const AllElasticIndexes: ElasticIndexName[]; export declare const ElasticFields: { space: { name: string; handle: string; about: string; tags: string; }; post: { title: string; body: string; tags: string; }; comment: { body: string; }; profile: { name: string; about: string; }; }; export declare type ElasticQueryParams = { indexes?: ElasticIndexTypes[]; q?: string; tags?: string[]; limit?: number; offset?: number; }; export declare type ElasticSpaceDoc = { name?: string; handle?: string; about?: string; tags?: string[]; }; export declare type ElasticPostDoc = { spaceId?: string; title?: string; body?: string; tags?: string[]; }; export declare type ElasticProfileDoc = { name?: string; about?: string; };