Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

API Namespaces

Other Namespaces

Classes

Type aliases

Variables

Functions

Type aliases

Activity

Activity: { account: string; agg_count: number; aggregated: boolean; block_number: string; comment_id?: string; date: string; event: EventsName; event_index: number; following_id?: string; post_id?: string; space_id?: string }

Type declaration

  • account: string
  • agg_count: number
  • aggregated: boolean
  • block_number: string
  • Optional comment_id?: string
  • date: string

    Date of this activity. Example: "2020-12-03T19:22:36.000Z"

  • event: EventsName
  • event_index: number
  • Optional following_id?: string

    Account id.

  • Optional post_id?: string
  • Optional space_id?: string

AnyAccountId

AnyAccountId: AccountId | string

AnyPostId

AnyPostId: PostId | BN

AnyReactionId

AnyReactionId: ReactionId | BN

AnySpaceId

AnySpaceId: SpaceId | BN

CommentContent

CommentContent: CommonPostContent

CommonContent

CommonStruct

CommonStruct: Space | Post | SocialAccountWithId

ContentEnum

ContentEnum: None | Raw | IPFS | Hyper

ContentFilter

ContentFilter: { withContentOnly?: boolean }

Type declaration

  • Optional withContentOnly?: boolean

ContentResult

ContentResult<T>: Record<CidAsStr, T>

Type parameters

  • T

Counts

Counts: { activitiesCount: number; commentsCount: number; followsCount: number; postsCount: number; reactionsCount: number; spacesCount: number }

Type declaration

  • activitiesCount: number
  • commentsCount: number
  • followsCount: number
  • postsCount: number
  • reactionsCount: number
  • spacesCount: number

ElasticIndexName

ElasticIndexName: "subsocial_profiles" | "subsocial_spaces" | "subsocial_posts"

ElasticIndexTypes

ElasticIndexTypes: "all" | "profiles" | "spaces" | "posts"

ElasticPostDoc

ElasticPostDoc: { body?: string; spaceId?: string; tags?: string[]; title?: string }

Type declaration

  • Optional body?: string
  • Optional spaceId?: string
  • Optional tags?: string[]
  • Optional title?: string

ElasticProfileDoc

ElasticProfileDoc: { about?: string; name?: string }

Type declaration

  • Optional about?: string
  • Optional name?: string

ElasticQueryParams

ElasticQueryParams: { indexes?: ElasticIndexTypes[]; limit?: number; offset?: number; q?: string; tags?: string[] }

Type declaration

  • Optional indexes?: ElasticIndexTypes[]
  • Optional limit?: number
  • Optional offset?: number
  • Optional q?: string
  • Optional tags?: string[]

ElasticSpaceDoc

ElasticSpaceDoc: { about?: string; handle?: string; name?: string; tags?: string[] }

Type declaration

  • Optional about?: string
  • Optional handle?: string
  • Optional name?: string
  • Optional tags?: string[]

EventsName

EventsName: "AccountFollowed" | "SpaceFollowed" | "SpaceCreated" | "CommentCreated" | "CommentReplyCreated" | "PostCreated" | "PostShared" | "CommentShared" | "PostReactionCreated" | "CommentReactionCreated"

Filters

FindPostQuery

FindPostQuery: FindStruct<AnyPostId>

FindPostWithDetailsQuery

FindPostWithDetailsQuery: FindPostQuery & PostDetailsOpts

FindPostsQuery

FindPostsQuery: FindStructs<AnyPostId>

FindPostsWithDetailsQuery

FindPostsWithDetailsQuery: FindPostsQuery & PostDetailsOpts

FindSpaceQuery

FindSpaceQuery: FindStruct<AnySpaceId>

FindSpacesQuery

FindSpacesQuery: FindStructs<AnySpaceId>

FindStruct

FindStruct<Id>: { id: Id } & Filters

Properties:

  • id - Id of desired struct.
  • visibility - Filter for visible state of the struct (see Visibility).

Type parameters

  • Id

FindStructs

FindStructs<Id>: { ids: Id[] } & Filters

Properties:

  • ids - An array of ids of desired structs.
  • visibility - Filter for visible state of the structs (see Visibility).

Type parameters

  • Id

FindStructsFns

FindStructsFns: { findPosts: (ids: AnyPostId[]) => Promise<PostData[]>; findProfiles: (ids: AnyAccountId[]) => Promise<ProfileData[]>; findSpaces: (ids: AnySpaceId[]) => Promise<SpaceData[]> }

Type declaration

HttpRequestMethod

HttpRequestMethod: "post" | "get"

IElasticIndex

IElasticIndex: Record<string, ElasticIndexName>

IpfsCid

IpfsCid: string | CID | IpfsCid

MetaItem

NamedLink

NamedLink: { name: string; url?: string }

Type declaration

  • name: string
  • Optional url?: string

PostContent

PostContent: CommonPostContent & { canonical: string; image: string; link?: string; meta?: MetaItem[]; tags: string[]; title: string }

PostDetailsOpts

PostDetailsOpts: VisibilityFilter & { withOwner?: boolean; withSpace?: boolean }

PostExtensionEnum

PostExtensionEnum: RegularPost | Comment | SharedPost

PostUpdateType

PostUpdateType: { content: OptionContent; hidden: Option<bool>; space_id: Option<SpaceId> }

Type declaration

ProfileContent

ProfileContent: { about: string; avatar: string; name: string }

Type declaration

  • about: string
  • avatar: string
  • name: string

ProfileUpdateType

ProfileUpdateType: { content: OptionContent }

Type declaration

SharedPostContent

SharedPostContent: CommonPostContent

SpaceContent

SpaceContent: ContentFormat & { about: string; email: string; image: string; links: string[] | NamedLink[]; name: string; tags: string[] }

SpaceUpdateType

SpaceUpdateType: { content: OptionContent; handle: OptionOptionText; hidden: Option<bool>; permissions: Option<Option<SpacePermissions>> }

Type declaration

SubsocialContext

SubsocialContext: { useServer?: UseServerProps }

Type declaration

SubstrareProposal

SubstrareProposal: { kind: "SubstrateProposal"; network: "Kusama" | "Polkadot"; proposalIndex: number }

Type declaration

  • kind: "SubstrateProposal"
  • network: "Kusama" | "Polkadot"
  • proposalIndex: number

SubstrateId

SubstrateId: SpaceId | PostId | BN

SupportedSubstrateId

SupportedSubstrateId: SubstrateId | AnyAccountId | ReactionId

SupportedSubstrateResult

SupportedSubstrateResult: CommonStruct | SocialAccount | Reaction

UseServerProps

UseServerProps: { httpRequestMethod: HttpRequestMethod }

Type declaration

Visibility

Visibility: "onlyVisible" | "onlyHidden" | "onlyPublic" | "onlyUnlisted"

The four visible state filters correspond to the next conditions:

  • onlyVisible – The hidden field on corresponding Substrate struct (e.g. Space or Post) is false.
  • onlyHidden – The hidden field on corresponding Substrate struct (e.g. Space or Post) is true.
  • onlyPublic – The hidden field on corresponding Substrate struct (e.g. Space or Post) is false and there is a corresponding JSON file on IPFS.
  • onlyUnlisted – Either the hidden field on corresponding Substrate struct (e.g. Space or Post) is true or there is a no corresponding JSON file on IPFS.

VisibilityFilter

VisibilityFilter: { visibility?: Visibility }

Type declaration

Variables

Const AllElasticIndexes

AllElasticIndexes: ElasticIndexName[] = ...

Const Api

Api: typeof SubstrateConnect = ...

Const ElasticFields

ElasticFields: { comment: { body: string }; post: { body: string; tags: string; title: string }; profile: { about: string; name: string }; space: { about: string; handle: string; name: string; tags: string } } = ...

Type declaration

  • comment: { body: string }
    • body: string
  • post: { body: string; tags: string; title: string }
    • body: string
    • tags: string
    • title: string
  • profile: { about: string; name: string }
    • about: string
    • name: string
  • space: { about: string; handle: string; name: string; tags: string }
    • about: string
    • handle: string
    • name: string
    • tags: string

Const ElasticIndex

ElasticIndex: IElasticIndex = ...

Const ReactionKinds

ReactionKinds: {} = ...

Type declaration

  • [key: string]: string

Const allDefinitions

allDefinitions: { subsocial: { types: { AccountInfo: string; Change: { add_owners: string; confirmed_by: string; created: string; expires_at: string; id: string; new_threshold: string; notes: string; remove_owners: string; space_id: string }; ChangeId: string; Comment: { parent_id: string; root_post_id: string }; Content: { _enum: { Hyper: string; IPFS: string; None: string; Raw: string } }; Donation: { amount: string; comment_id: string; created: string; donation_wallet: string; id: string; recipient: string }; DonationId: string; DonationRecipient: { _enum: { Account: string; Post: string; Space: string } }; DonationSettings: { donations_allowed: string; max_amount: string; min_amount: string }; DonationSettingsUpdate: { donations_allowed: string; max_amount: string; min_amount: string }; Drop: { first_drop_at: string; id: string; total_dropped: string }; DropId: string; EntityId: { _enum: { Account: string; Content: string; Post: string; Space: string } }; EntityStatus: { _enum: string[] }; Faucet: { drip_limit: string; dripped_in_current_period: string; enabled: string; next_period_at: string; period: string; period_limit: string }; FaucetSettings: { period: string; period_limit: string }; FaucetSettingsUpdate: { period: string; period_limit: string }; FaucetUpdate: { drip_limit: string; enabled: string; period: string; period_limit: string }; IpfsCid: string; Post: { content: string; created: string; downvotes_count: string; extension: string; hidden: string; hidden_replies_count: string; id: string; owner: string; replies_count: string; score: string; shares_count: string; space_id: string; updated: string; upvotes_count: string }; PostExtension: { _enum: { Comment: string; RegularPost: string; SharedPost: string } }; PostHistoryRecord: { edited: string; old_data: string }; PostId: string; PostUpdate: { content: string; hidden: string; space_id: string }; Profile: { content: string; created: string; updated: string }; ProfileHistoryRecord: { edited: string; old_data: string }; ProfileUpdate: { content: string }; Reaction: { created: string; id: string; kind: string; updated: string }; ReactionId: string; ReactionKind: { _enum: string[] }; Report: { created: string; id: string; reason: string; reported_entity: string; reported_within: string }; ReportId: string; Role: { content: string; created: string; disabled: string; expires_at: string; id: string; permissions: string; space_id: string; updated: string }; RoleId: string; RoleUpdate: { content: string; disabled: string; permissions: string }; ScoringAction: { _enum: string[] }; SessionKey: { created: string; expires_at: string; limit: string; spent: string; updated: string }; SocialAccount: { followers_count: string; following_accounts_count: string; following_spaces_count: string; profile: string; reputation: string }; Space: { content: string; created: string; followers_count: string; handle: string; hidden: string; hidden_posts_count: string; id: string; owner: string; parent_id: string; permissions: string; posts_count: string; score: string; updated: string }; SpaceHistoryRecord: { edited: string; old_data: string }; SpaceId: string; SpaceModerationSettings: { autoblock_threshold: string }; SpaceModerationSettingsUpdate: { autoblock_threshold: string }; SpaceOwners: { changes_count: string; created: string; owners: string; space_id: string; threshold: string }; SpacePermission: { _enum: string[] }; SpacePermissionSet: string; SpacePermissions: { everyone: string; follower: string; none: string; space_owner: string }; SpacePermissionsContext: { is_space_follower: string; is_space_owner: string; space_id: string; space_perms: string }; SpaceUpdate: { content: string; handle: string; hidden: string; parent_id: string; permissions: string }; Subscription: { created: string; id: string; is_active: string; plan_id: string; updated: string; wallet: string }; SubscriptionId: string; SubscriptionPeriod: { _enum: { Custom: string; Daily: string; Monthly: string; Quarterly: string; Weekly: string; Yearly: string } }; SubscriptionPlan: { content: string; created: string; id: string; is_active: string; period: string; price: string; space_id: string; updated: string; wallet: string }; SubscriptionPlanId: string; SuggestedStatus: { report_id: string; status: string; suggested: string }; User: { _enum: { Account: string; Space: string } }; WhoAndWhen: { account: string; block: string; time: string } } } } = ...

Type declaration

  • subsocial: { types: { AccountInfo: string; Change: { add_owners: string; confirmed_by: string; created: string; expires_at: string; id: string; new_threshold: string; notes: string; remove_owners: string; space_id: string }; ChangeId: string; Comment: { parent_id: string; root_post_id: string }; Content: { _enum: { Hyper: string; IPFS: string; None: string; Raw: string } }; Donation: { amount: string; comment_id: string; created: string; donation_wallet: string; id: string; recipient: string }; DonationId: string; DonationRecipient: { _enum: { Account: string; Post: string; Space: string } }; DonationSettings: { donations_allowed: string; max_amount: string; min_amount: string }; DonationSettingsUpdate: { donations_allowed: string; max_amount: string; min_amount: string }; Drop: { first_drop_at: string; id: string; total_dropped: string }; DropId: string; EntityId: { _enum: { Account: string; Content: string; Post: string; Space: string } }; EntityStatus: { _enum: string[] }; Faucet: { drip_limit: string; dripped_in_current_period: string; enabled: string; next_period_at: string; period: string; period_limit: string }; FaucetSettings: { period: string; period_limit: string }; FaucetSettingsUpdate: { period: string; period_limit: string }; FaucetUpdate: { drip_limit: string; enabled: string; period: string; period_limit: string }; IpfsCid: string; Post: { content: string; created: string; downvotes_count: string; extension: string; hidden: string; hidden_replies_count: string; id: string; owner: string; replies_count: string; score: string; shares_count: string; space_id: string; updated: string; upvotes_count: string }; PostExtension: { _enum: { Comment: string; RegularPost: string; SharedPost: string } }; PostHistoryRecord: { edited: string; old_data: string }; PostId: string; PostUpdate: { content: string; hidden: string; space_id: string }; Profile: { content: string; created: string; updated: string }; ProfileHistoryRecord: { edited: string; old_data: string }; ProfileUpdate: { content: string }; Reaction: { created: string; id: string; kind: string; updated: string }; ReactionId: string; ReactionKind: { _enum: string[] }; Report: { created: string; id: string; reason: string; reported_entity: string; reported_within: string }; ReportId: string; Role: { content: string; created: string; disabled: string; expires_at: string; id: string; permissions: string; space_id: string; updated: string }; RoleId: string; RoleUpdate: { content: string; disabled: string; permissions: string }; ScoringAction: { _enum: string[] }; SessionKey: { created: string; expires_at: string; limit: string; spent: string; updated: string }; SocialAccount: { followers_count: string; following_accounts_count: string; following_spaces_count: string; profile: string; reputation: string }; Space: { content: string; created: string; followers_count: string; handle: string; hidden: string; hidden_posts_count: string; id: string; owner: string; parent_id: string; permissions: string; posts_count: string; score: string; updated: string }; SpaceHistoryRecord: { edited: string; old_data: string }; SpaceId: string; SpaceModerationSettings: { autoblock_threshold: string }; SpaceModerationSettingsUpdate: { autoblock_threshold: string }; SpaceOwners: { changes_count: string; created: string; owners: string; space_id: string; threshold: string }; SpacePermission: { _enum: string[] }; SpacePermissionSet: string; SpacePermissions: { everyone: string; follower: string; none: string; space_owner: string }; SpacePermissionsContext: { is_space_follower: string; is_space_owner: string; space_id: string; space_perms: string }; SpaceUpdate: { content: string; handle: string; hidden: string; parent_id: string; permissions: string }; Subscription: { created: string; id: string; is_active: string; plan_id: string; updated: string; wallet: string }; SubscriptionId: string; SubscriptionPeriod: { _enum: { Custom: string; Daily: string; Monthly: string; Quarterly: string; Weekly: string; Yearly: string } }; SubscriptionPlan: { content: string; created: string; id: string; is_active: string; period: string; price: string; space_id: string; updated: string; wallet: string }; SubscriptionPlanId: string; SuggestedStatus: { report_id: string; status: string; suggested: string }; User: { _enum: { Account: string; Space: string } }; WhoAndWhen: { account: string; block: string; time: string } } }
    • types: { AccountInfo: string; Change: { add_owners: string; confirmed_by: string; created: string; expires_at: string; id: string; new_threshold: string; notes: string; remove_owners: string; space_id: string }; ChangeId: string; Comment: { parent_id: string; root_post_id: string }; Content: { _enum: { Hyper: string; IPFS: string; None: string; Raw: string } }; Donation: { amount: string; comment_id: string; created: string; donation_wallet: string; id: string; recipient: string }; DonationId: string; DonationRecipient: { _enum: { Account: string; Post: string; Space: string } }; DonationSettings: { donations_allowed: string; max_amount: string; min_amount: string }; DonationSettingsUpdate: { donations_allowed: string; max_amount: string; min_amount: string }; Drop: { first_drop_at: string; id: string; total_dropped: string }; DropId: string; EntityId: { _enum: { Account: string; Content: string; Post: string; Space: string } }; EntityStatus: { _enum: string[] }; Faucet: { drip_limit: string; dripped_in_current_period: string; enabled: string; next_period_at: string; period: string; period_limit: string }; FaucetSettings: { period: string; period_limit: string }; FaucetSettingsUpdate: { period: string; period_limit: string }; FaucetUpdate: { drip_limit: string; enabled: string; period: string; period_limit: string }; IpfsCid: string; Post: { content: string; created: string; downvotes_count: string; extension: string; hidden: string; hidden_replies_count: string; id: string; owner: string; replies_count: string; score: string; shares_count: string; space_id: string; updated: string; upvotes_count: string }; PostExtension: { _enum: { Comment: string; RegularPost: string; SharedPost: string } }; PostHistoryRecord: { edited: string; old_data: string }; PostId: string; PostUpdate: { content: string; hidden: string; space_id: string }; Profile: { content: string; created: string; updated: string }; ProfileHistoryRecord: { edited: string; old_data: string }; ProfileUpdate: { content: string }; Reaction: { created: string; id: string; kind: string; updated: string }; ReactionId: string; ReactionKind: { _enum: string[] }; Report: { created: string; id: string; reason: string; reported_entity: string; reported_within: string }; ReportId: string; Role: { content: string; created: string; disabled: string; expires_at: string; id: string; permissions: string; space_id: string; updated: string }; RoleId: string; RoleUpdate: { content: string; disabled: string; permissions: string }; ScoringAction: { _enum: string[] }; SessionKey: { created: string; expires_at: string; limit: string; spent: string; updated: string }; SocialAccount: { followers_count: string; following_accounts_count: string; following_spaces_count: string; profile: string; reputation: string }; Space: { content: string; created: string; followers_count: string; handle: string; hidden: string; hidden_posts_count: string; id: string; owner: string; parent_id: string; permissions: string; posts_count: string; score: string; updated: string }; SpaceHistoryRecord: { edited: string; old_data: string }; SpaceId: string; SpaceModerationSettings: { autoblock_threshold: string }; SpaceModerationSettingsUpdate: { autoblock_threshold: string }; SpaceOwners: { changes_count: string; created: string; owners: string; space_id: string; threshold: string }; SpacePermission: { _enum: string[] }; SpacePermissionSet: string; SpacePermissions: { everyone: string; follower: string; none: string; space_owner: string }; SpacePermissionsContext: { is_space_follower: string; is_space_owner: string; space_id: string; space_perms: string }; SpaceUpdate: { content: string; handle: string; hidden: string; parent_id: string; permissions: string }; Subscription: { created: string; id: string; is_active: string; plan_id: string; updated: string; wallet: string }; SubscriptionId: string; SubscriptionPeriod: { _enum: { Custom: string; Daily: string; Monthly: string; Quarterly: string; Weekly: string; Yearly: string } }; SubscriptionPlan: { content: string; created: string; id: string; is_active: string; period: string; price: string; space_id: string; updated: string; wallet: string }; SubscriptionPlanId: string; SuggestedStatus: { report_id: string; status: string; suggested: string }; User: { _enum: { Account: string; Space: string } }; WhoAndWhen: { account: string; block: string; time: string } }
      • AccountInfo: string
      • Change: { add_owners: string; confirmed_by: string; created: string; expires_at: string; id: string; new_threshold: string; notes: string; remove_owners: string; space_id: string }
        • add_owners: string
        • confirmed_by: string
        • created: string
        • expires_at: string
        • id: string
        • new_threshold: string
        • notes: string
        • remove_owners: string
        • space_id: string
      • ChangeId: string
      • Comment: { parent_id: string; root_post_id: string }
        • parent_id: string
        • root_post_id: string
      • Content: { _enum: { Hyper: string; IPFS: string; None: string; Raw: string } }
        • _enum: { Hyper: string; IPFS: string; None: string; Raw: string }
          • Hyper: string
          • IPFS: string
          • None: string
          • Raw: string
      • Donation: { amount: string; comment_id: string; created: string; donation_wallet: string; id: string; recipient: string }
        • amount: string
        • comment_id: string
        • created: string
        • donation_wallet: string
        • id: string
        • recipient: string
      • DonationId: string
      • DonationRecipient: { _enum: { Account: string; Post: string; Space: string } }
        • _enum: { Account: string; Post: string; Space: string }
          • Account: string
          • Post: string
          • Space: string
      • DonationSettings: { donations_allowed: string; max_amount: string; min_amount: string }
        • donations_allowed: string
        • max_amount: string
        • min_amount: string
      • DonationSettingsUpdate: { donations_allowed: string; max_amount: string; min_amount: string }
        • donations_allowed: string
        • max_amount: string
        • min_amount: string
      • Drop: { first_drop_at: string; id: string; total_dropped: string }
        • first_drop_at: string
        • id: string
        • total_dropped: string
      • DropId: string
      • EntityId: { _enum: { Account: string; Content: string; Post: string; Space: string } }
        • _enum: { Account: string; Content: string; Post: string; Space: string }
          • Account: string
          • Content: string
          • Post: string
          • Space: string
      • EntityStatus: { _enum: string[] }
        • _enum: string[]
      • Faucet: { drip_limit: string; dripped_in_current_period: string; enabled: string; next_period_at: string; period: string; period_limit: string }
        • drip_limit: string
        • dripped_in_current_period: string
        • enabled: string
        • next_period_at: string
        • period: string
        • period_limit: string
      • FaucetSettings: { period: string; period_limit: string }
        • period: string
        • period_limit: string
      • FaucetSettingsUpdate: { period: string; period_limit: string }
        • period: string
        • period_limit: string
      • FaucetUpdate: { drip_limit: string; enabled: string; period: string; period_limit: string }
        • drip_limit: string
        • enabled: string
        • period: string
        • period_limit: string
      • IpfsCid: string
      • Post: { content: string; created: string; downvotes_count: string; extension: string; hidden: string; hidden_replies_count: string; id: string; owner: string; replies_count: string; score: string; shares_count: string; space_id: string; updated: string; upvotes_count: string }
        • content: string
        • created: string
        • downvotes_count: string
        • extension: string
        • hidden: string
        • hidden_replies_count: string
        • id: string
        • owner: string
        • replies_count: string
        • score: string
        • shares_count: string
        • space_id: string
        • updated: string
        • upvotes_count: string
      • PostExtension: { _enum: { Comment: string; RegularPost: string; SharedPost: string } }
        • _enum: { Comment: string; RegularPost: string; SharedPost: string }
          • Comment: string
          • RegularPost: string
          • SharedPost: string
      • PostHistoryRecord: { edited: string; old_data: string }
        • edited: string
        • old_data: string
      • PostId: string
      • PostUpdate: { content: string; hidden: string; space_id: string }
        • content: string
        • hidden: string
        • space_id: string
      • Profile: { content: string; created: string; updated: string }
        • content: string
        • created: string
        • updated: string
      • ProfileHistoryRecord: { edited: string; old_data: string }
        • edited: string
        • old_data: string
      • ProfileUpdate: { content: string }
        • content: string
      • Reaction: { created: string; id: string; kind: string; updated: string }
        • created: string
        • id: string
        • kind: string
        • updated: string
      • ReactionId: string
      • ReactionKind: { _enum: string[] }
        • _enum: string[]
      • Report: { created: string; id: string; reason: string; reported_entity: string; reported_within: string }
        • created: string
        • id: string
        • reason: string
        • reported_entity: string
        • reported_within: string
      • ReportId: string
      • Role: { content: string; created: string; disabled: string; expires_at: string; id: string; permissions: string; space_id: string; updated: string }
        • content: string
        • created: string
        • disabled: string
        • expires_at: string
        • id: string
        • permissions: string
        • space_id: string
        • updated: string
      • RoleId: string
      • RoleUpdate: { content: string; disabled: string; permissions: string }
        • content: string
        • disabled: string
        • permissions: string
      • ScoringAction: { _enum: string[] }
        • _enum: string[]
      • SessionKey: { created: string; expires_at: string; limit: string; spent: string; updated: string }
        • created: string
        • expires_at: string
        • limit: string
        • spent: string
        • updated: string
      • SocialAccount: { followers_count: string; following_accounts_count: string; following_spaces_count: string; profile: string; reputation: string }
        • followers_count: string
        • following_accounts_count: string
        • following_spaces_count: string
        • profile: string
        • reputation: string
      • Space: { content: string; created: string; followers_count: string; handle: string; hidden: string; hidden_posts_count: string; id: string; owner: string; parent_id: string; permissions: string; posts_count: string; score: string; updated: string }
        • content: string
        • created: string
        • followers_count: string
        • handle: string
        • hidden: string
        • hidden_posts_count: string
        • id: string
        • owner: string
        • parent_id: string
        • permissions: string
        • posts_count: string
        • score: string
        • updated: string
      • SpaceHistoryRecord: { edited: string; old_data: string }
        • edited: string
        • old_data: string
      • SpaceId: string
      • SpaceModerationSettings: { autoblock_threshold: string }
        • autoblock_threshold: string
      • SpaceModerationSettingsUpdate: { autoblock_threshold: string }
        • autoblock_threshold: string
      • SpaceOwners: { changes_count: string; created: string; owners: string; space_id: string; threshold: string }
        • changes_count: string
        • created: string
        • owners: string
        • space_id: string
        • threshold: string
      • SpacePermission: { _enum: string[] }
        • _enum: string[]
      • SpacePermissionSet: string
      • SpacePermissions: { everyone: string; follower: string; none: string; space_owner: string }
        • everyone: string
        • follower: string
        • none: string
        • space_owner: string
      • SpacePermissionsContext: { is_space_follower: string; is_space_owner: string; space_id: string; space_perms: string }
        • is_space_follower: string
        • is_space_owner: string
        • space_id: string
        • space_perms: string
      • SpaceUpdate: { content: string; handle: string; hidden: string; parent_id: string; permissions: string }
        • content: string
        • handle: string
        • hidden: string
        • parent_id: string
        • permissions: string
      • Subscription: { created: string; id: string; is_active: string; plan_id: string; updated: string; wallet: string }
        • created: string
        • id: string
        • is_active: string
        • plan_id: string
        • updated: string
        • wallet: string
      • SubscriptionId: string
      • SubscriptionPeriod: { _enum: { Custom: string; Daily: string; Monthly: string; Quarterly: string; Weekly: string; Yearly: string } }
        • _enum: { Custom: string; Daily: string; Monthly: string; Quarterly: string; Weekly: string; Yearly: string }
          • Custom: string
          • Daily: string
          • Monthly: string
          • Quarterly: string
          • Weekly: string
          • Yearly: string
      • SubscriptionPlan: { content: string; created: string; id: string; is_active: string; period: string; price: string; space_id: string; updated: string; wallet: string }
        • content: string
        • created: string
        • id: string
        • is_active: string
        • period: string
        • price: string
        • space_id: string
        • updated: string
        • wallet: string
      • SubscriptionPlanId: string
      • SuggestedStatus: { report_id: string; status: string; suggested: string }
        • report_id: string
        • status: string
        • suggested: string
      • User: { _enum: { Account: string; Space: string } }
        • _enum: { Account: string; Space: string }
          • Account: string
          • Space: string
      • WhoAndWhen: { account: string; block: string; time: string }
        • account: string
        • block: string
        • time: string

Const registry

registry: TypeRegistry = ...

Const types

types: {} = ...

Type declaration

Functions

asAccountId

  • asAccountId(id: AnyAccountId): GenericAccountId | undefined

Const asIpfsCid

contentFilter

  • contentFilter<T>(__namedParameters: Props<T>): T[]

Const createResolveSubsocialApi

  • createResolveSubsocialApi(context: NewSubsocialApiProps): () => Promise<Api>

Const getApi

  • getApi(url: string): Promise<ApiPromise>

Const getPostIdFromExtension

  • getPostIdFromExtension(postData?: HasPostStruct): PostId

Const getSharedPostId

  • getSharedPostId(postData: any): PostId

Const getUniqueIds

  • getUniqueIds<ID>(ids: ID[]): ID[]

Const isEmptyContent

  • isEmptyContent(struct?: StructWithHidden): boolean

Const isEmptyIpfsContent

  • isEmptyIpfsContent(struct?: HasContent): boolean

Const isHidden

  • isHidden(struct?: StructWithHidden): boolean

Const isIpfs

Const isPublic

  • isPublic(struct?: StructWithHidden): struct is StructWithHidden

Const isUnlisted

  • isUnlisted(struct?: StructWithHidden): boolean

Const isValidIpfsCid

  • isValidIpfsCid(cid: IpfsCid): boolean

Const isVisible

  • isVisible(struct?: StructWithHidden): struct is StructWithHidden

loadAndSetPostRelatedStructs

Const newSubsocialApi

  • newSubsocialApi(__namedParameters: NewSubsocialApiProps): Promise<Api>

Const notEmptyIpfsContent

  • notEmptyIpfsContent(struct?: HasContent): boolean

Const registerSubsocialTypes

  • registerSubsocialTypes(): void

Const resolveCidOfContent

  • resolveCidOfContent(content?: Content): string

visibilityFilter

  • visibilityFilter<T>(structs: T[], filter?: Visibility): T[]