version: '0.1'
description: Joystream query-node manifest file for sumer
repository: https://github.com/Joystream/joystream
hydraVersion: "2"
dataSource:
  kind: substrate
  chain: joystream
  indexerVersion: '0.1.6'
entities:
  - mappings/lib/generated/**/*.model.js
typegen:
  metadata:
    source: wss://sumer.joystream.app
  events:
    # members
    - members.MemberRegistered
    - members.MemberUpdatedAboutText
    - members.MemberUpdatedAvatar
    - members.MemberUpdatedHandle
    - members.MemberSetRootAccount
    - members.MemberSetControllerAccount

    # content directory
    - content.CuratorGroupCreated
    - content.CuratorGroupStatusSet
    - content.CuratorAdded
    - content.CuratorRemoved
    - content.ChannelCreated
    - content.ChannelUpdated
    - content.ChannelAssetsRemoved
    - content.ChannelCensored
    - content.ChannelUncensored
    - content.ChannelOwnershipTransferRequested
    - content.ChannelOwnershipTransferRequestWithdrawn
    - content.ChannelOwnershipTransferred
    - content.ChannelCategoryCreated
    - content.ChannelCategoryUpdated
    - content.ChannelCategoryDeleted
    - content.VideoCategoryCreated
    - content.VideoCategoryUpdated
    - content.VideoCategoryDeleted
    - content.VideoCreated
    - content.VideoUpdated
    - content.VideoDeleted
    - content.VideoCensored
    - content.VideoUncensored
    - content.FeaturedVideosSet
  calls:
    # members
    - members.buyMembership
    - members.addScreenedMember
    - members.changeMemberAboutText
    - members.changeMemberAvatar
    - members.changeMemberHandle
    - members.setRootAccount
    - members.setControllerAccount

    # content directory
    - content.create_curator_group
    - content.set_curator_group_status
    - content.add_curator_to_group
    - content.remove_curator_from_group
    - content.create_channel
    - content.update_channel
    - content.remove_channel_assets
    - content.censor_channel
    - content.uncensor_channel
    - content.create_channel_category
    - content.update_channel_category
    - content.delete_channel_category
    - content.request_channel_transfer
    - content.cancel_channel_transfer_request
    - content.accept_channel_transfer
    - content.create_video
    - content.update_video
    - content.delete_video
    - content.create_playlist
    - content.update_playlist
    - content.delete_playlist
    - content.set_featured_videos
    - content.create_video_category
    - content.update_video_category
    - content.delete_video_category
    - content.remove_person_from_video
    - content.censor_video
    - content.uncensor_video

  outDir: ./generated/types
  customTypes:
    lib: '@joystream/types/augment'
    typedefsLoc: '../types/augment/all/defs.json'
mappings:
  # js module that exports the handler functions
  mappingsModule: mappings/lib/mappings
  # additinal libraries the processor loads
  # typically it is a module with event and extrinsic types generated by hydra-typegen
  imports:
    - mappings/lib/generated/types
  eventHandlers:
    - event: members.MemberRegistered
      handler: members_MemberRegistered(DatabaseManager, SubstrateEvent)
    - event: members.MemberUpdatedAboutText
      handler: members_MemberUpdatedAboutText(DatabaseManager, SubstrateEvent)
    - event: members.MemberUpdatedAvatar
      handler: members_MemberUpdatedAvatar(DatabaseManager, SubstrateEvent)
    - event: members.MemberUpdatedHandle
      handler: members_MemberUpdatedHandle(DatabaseManager, SubstrateEvent)
    - event: members.MemberSetRootAccount
      handler: members_MemberSetRootAccount(DatabaseManager, SubstrateEvent)
    - event: members.MemberSetControllerAccount
      handler: members_MemberSetControllerAccount(DatabaseManager, SubstrateEvent)

    - event: content.CuratorGroupCreated
      handler: content_CuratorGroupCreated(DatabaseManager, SubstrateEvent)
    - event: content.CuratorGroupStatusSet
      handler: content_CuratorGroupStatusSet(DatabaseManager, SubstrateEvent)
    - event: content.CuratorAdded
      handler: content_CuratorAdded(DatabaseManager, SubstrateEvent)
    - event: content.CuratorRemoved
      handler: content_CuratorRemoved(DatabaseManager, SubstrateEvent)
    - event: content.ChannelCreated
      handler: content_ChannelCreated(DatabaseManager, SubstrateEvent)
    - event: content.ChannelUpdated
      handler: content_ChannelUpdated(DatabaseManager, SubstrateEvent)
    - event: content.ChannelAssetsRemoved
      handler: content_ChannelAssetsRemoved(DatabaseManager, SubstrateEvent)
    - event: content.ChannelCensored
      handler: content_ChannelCensored(DatabaseManager, SubstrateEvent)
    - event: content.ChannelUncensored
      handler: content_ChannelUncensored(DatabaseManager, SubstrateEvent)
    - event: content.ChannelOwnershipTransferRequested
      handler: content_ChannelOwnershipTransferRequested(DatabaseManager, SubstrateEvent)
    - event: content.ChannelOwnershipTransferRequestWithdrawn
      handler: content_ChannelOwnershipTransferRequestWithdrawn(DatabaseManager, SubstrateEvent)
    - event: content.ChannelOwnershipTransferred
      handler: content_ChannelOwnershipTransferred(DatabaseManager, SubstrateEvent)
    - event: content.ChannelCategoryCreated
      handler: content_ChannelCategoryCreated(DatabaseManager, SubstrateEvent)
    - event: content.ChannelCategoryUpdated
      handler: content_ChannelCategoryUpdated(DatabaseManager, SubstrateEvent)
    - event: content.ChannelCategoryDeleted
      handler: content_ChannelCategoryDeleted(DatabaseManager, SubstrateEvent)
    - event: content.VideoCategoryCreated
      handler: content_VideoCategoryCreated(DatabaseManager, SubstrateEvent)
    - event: content.VideoCategoryUpdated
      handler: content_VideoCategoryUpdated(DatabaseManager, SubstrateEvent)
    - event: content.VideoCategoryDeleted
      handler: content_VideoCategoryDeleted(DatabaseManager, SubstrateEvent)
    - event: content.VideoCreated
      handler: content_VideoCreated(DatabaseManager, SubstrateEvent)
    - event: content.VideoUpdated
      handler: content_VideoUpdated(DatabaseManager, SubstrateEvent)
    - event: content.VideoDeleted
      handler: content_VideoDeleted(DatabaseManager, SubstrateEvent)
    - event: content.VideoCensored
      handler: content_VideoCensored(DatabaseManager, SubstrateEvent)
    - event: content.VideoUncensored
      handler: content_VideoUncensored(DatabaseManager, SubstrateEvent)
    - event: content.FeaturedVideosSet
      handler: content_FeaturedVideosSet(DatabaseManager, SubstrateEvent)
  extrinsicHandlers:
    # infer defaults here
    #- extrinsic: Balances.Transfer
    #- extrinsic: Sudo.batchCall
    #  handler: handleSudoCall(DatabaseManager,SubstrateEvent)
  preBlockHooks:
  postBlockHooks:
