Browse Source

query node - working group leader support

ondratra 3 years ago
parent
commit
39a02193ab

+ 337 - 337
query-node/generated/graphql-server/generated/binding.ts

@@ -6,12 +6,6 @@ import { IResolvers } from 'graphql-tools/dist/Interfaces'
 import * as schema from  './schema.graphql'
 
 export interface Query {
-    channelCategories: <T = Array<ChannelCategory>>(args: { offset?: Int | null, limit?: Int | null, where?: ChannelCategoryWhereInput | null, orderBy?: ChannelCategoryOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channelCategoryByUniqueInput: <T = ChannelCategory | null>(args: { where: ChannelCategoryWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    channelCategoriesConnection: <T = ChannelCategoryConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: ChannelCategoryWhereInput | null, orderBy?: ChannelCategoryOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channels: <T = Array<Channel>>(args: { offset?: Int | null, limit?: Int | null, where?: ChannelWhereInput | null, orderBy?: ChannelOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
-    channelByUniqueInput: <T = Channel | null>(args: { where: ChannelWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
-    channelsConnection: <T = ChannelConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: ChannelWhereInput | null, orderBy?: ChannelOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     curatorGroups: <T = Array<CuratorGroup>>(args: { offset?: Int | null, limit?: Int | null, where?: CuratorGroupWhereInput | null, orderBy?: CuratorGroupOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     curatorGroupByUniqueInput: <T = CuratorGroup | null>(args: { where: CuratorGroupWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
     curatorGroupsConnection: <T = CuratorGroupConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: CuratorGroupWhereInput | null, orderBy?: CuratorGroupOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
@@ -21,6 +15,12 @@ export interface Query {
     featuredVideos: <T = Array<FeaturedVideo>>(args: { offset?: Int | null, limit?: Int | null, where?: FeaturedVideoWhereInput | null, orderBy?: FeaturedVideoOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     featuredVideoByUniqueInput: <T = FeaturedVideo | null>(args: { where: FeaturedVideoWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
     featuredVideosConnection: <T = FeaturedVideoConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: FeaturedVideoWhereInput | null, orderBy?: FeaturedVideoOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
+    channelCategories: <T = Array<ChannelCategory>>(args: { offset?: Int | null, limit?: Int | null, where?: ChannelCategoryWhereInput | null, orderBy?: ChannelCategoryOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
+    channelCategoryByUniqueInput: <T = ChannelCategory | null>(args: { where: ChannelCategoryWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
+    channelCategoriesConnection: <T = ChannelCategoryConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: ChannelCategoryWhereInput | null, orderBy?: ChannelCategoryOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
+    channels: <T = Array<Channel>>(args: { offset?: Int | null, limit?: Int | null, where?: ChannelWhereInput | null, orderBy?: ChannelOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
+    channelByUniqueInput: <T = Channel | null>(args: { where: ChannelWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
+    channelsConnection: <T = ChannelConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: ChannelWhereInput | null, orderBy?: ChannelOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     languages: <T = Array<Language>>(args: { offset?: Int | null, limit?: Int | null, where?: LanguageWhereInput | null, orderBy?: LanguageOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     languageByUniqueInput: <T = Language | null>(args: { where: LanguageWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
     languagesConnection: <T = LanguageConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: LanguageWhereInput | null, orderBy?: LanguageOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
@@ -85,6 +85,45 @@ export type AssetAvailability =   'ACCEPTED' |
   'PENDING' |
   'INVALID'
 
+export type CuratorGroupOrderByInput =   'createdAt_ASC' |
+  'createdAt_DESC' |
+  'updatedAt_ASC' |
+  'updatedAt_DESC' |
+  'deletedAt_ASC' |
+  'deletedAt_DESC' |
+  'isActive_ASC' |
+  'isActive_DESC'
+
+export type DataObjectOrderByInput =   'createdAt_ASC' |
+  'createdAt_DESC' |
+  'updatedAt_ASC' |
+  'updatedAt_DESC' |
+  'deletedAt_ASC' |
+  'deletedAt_DESC' |
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC' |
+  'typeId_ASC' |
+  'typeId_DESC' |
+  'size_ASC' |
+  'size_DESC' |
+  'liaisonId_ASC' |
+  'liaisonId_DESC' |
+  'liaisonJudgement_ASC' |
+  'liaisonJudgement_DESC' |
+  'ipfsContentId_ASC' |
+  'ipfsContentId_DESC' |
+  'joystreamContentId_ASC' |
+  'joystreamContentId_DESC'
+
+export type FeaturedVideoOrderByInput =   'createdAt_ASC' |
+  'createdAt_DESC' |
+  'updatedAt_ASC' |
+  'updatedAt_DESC' |
+  'deletedAt_ASC' |
+  'deletedAt_DESC' |
+  'videoId_ASC' |
+  'videoId_DESC'
+
 export type ChannelCategoryOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
   'updatedAt_ASC' |
@@ -131,45 +170,6 @@ export type ChannelOrderByInput =   'createdAt_ASC' |
   'createdInBlock_ASC' |
   'createdInBlock_DESC'
 
-export type CuratorGroupOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'isActive_ASC' |
-  'isActive_DESC'
-
-export type DataObjectOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'createdInBlock_ASC' |
-  'createdInBlock_DESC' |
-  'typeId_ASC' |
-  'typeId_DESC' |
-  'size_ASC' |
-  'size_DESC' |
-  'liaisonId_ASC' |
-  'liaisonId_DESC' |
-  'liaisonJudgement_ASC' |
-  'liaisonJudgement_DESC' |
-  'ipfsContentId_ASC' |
-  'ipfsContentId_DESC' |
-  'joystreamContentId_ASC' |
-  'joystreamContentId_DESC'
-
-export type FeaturedVideoOrderByInput =   'createdAt_ASC' |
-  'createdAt_DESC' |
-  'updatedAt_ASC' |
-  'updatedAt_DESC' |
-  'deletedAt_ASC' |
-  'deletedAt_DESC' |
-  'videoId_ASC' |
-  'videoId_DESC'
-
 export type LanguageOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
   'updatedAt_ASC' |
@@ -352,168 +352,6 @@ export interface BaseWhereInput {
   deletedById_eq?: String | null
 }
 
-export interface ChannelCategoryCreateInput {
-  name?: String | null
-  createdInBlock: Float
-}
-
-export interface ChannelCategoryUpdateInput {
-  name?: String | null
-  createdInBlock?: Float | null
-}
-
-export interface ChannelCategoryWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  name_eq?: String | null
-  name_contains?: String | null
-  name_startsWith?: String | null
-  name_endsWith?: String | null
-  name_in?: String[] | String | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-}
-
-export interface ChannelCategoryWhereUniqueInput {
-  id: ID_Output
-}
-
-export interface ChannelCreateInput {
-  ownerMemberId?: ID_Input | null
-  ownerCuratorGroupId?: ID_Input | null
-  categoryId?: ID_Input | null
-  rewardAccount?: String | null
-  title?: String | null
-  description?: String | null
-  coverPhotoDataObjectId?: ID_Input | null
-  coverPhotoUrls: Array<String>
-  coverPhotoAvailability: AssetAvailability
-  avatarPhotoDataObjectId?: ID_Input | null
-  avatarPhotoUrls: Array<String>
-  avatarPhotoAvailability: AssetAvailability
-  isPublic?: Boolean | null
-  isCensored: Boolean
-  languageId?: ID_Input | null
-  createdInBlock: Float
-}
-
-export interface ChannelUpdateInput {
-  ownerMemberId?: ID_Input | null
-  ownerCuratorGroupId?: ID_Input | null
-  categoryId?: ID_Input | null
-  rewardAccount?: String | null
-  title?: String | null
-  description?: String | null
-  coverPhotoDataObjectId?: ID_Input | null
-  coverPhotoUrls?: String[] | String | null
-  coverPhotoAvailability?: AssetAvailability | null
-  avatarPhotoDataObjectId?: ID_Input | null
-  avatarPhotoUrls?: String[] | String | null
-  avatarPhotoAvailability?: AssetAvailability | null
-  isPublic?: Boolean | null
-  isCensored?: Boolean | null
-  languageId?: ID_Input | null
-  createdInBlock?: Float | null
-}
-
-export interface ChannelWhereInput {
-  id_eq?: ID_Input | null
-  id_in?: ID_Output[] | ID_Output | null
-  createdAt_eq?: DateTime | null
-  createdAt_lt?: DateTime | null
-  createdAt_lte?: DateTime | null
-  createdAt_gt?: DateTime | null
-  createdAt_gte?: DateTime | null
-  createdById_eq?: ID_Input | null
-  createdById_in?: ID_Output[] | ID_Output | null
-  updatedAt_eq?: DateTime | null
-  updatedAt_lt?: DateTime | null
-  updatedAt_lte?: DateTime | null
-  updatedAt_gt?: DateTime | null
-  updatedAt_gte?: DateTime | null
-  updatedById_eq?: ID_Input | null
-  updatedById_in?: ID_Output[] | ID_Output | null
-  deletedAt_all?: Boolean | null
-  deletedAt_eq?: DateTime | null
-  deletedAt_lt?: DateTime | null
-  deletedAt_lte?: DateTime | null
-  deletedAt_gt?: DateTime | null
-  deletedAt_gte?: DateTime | null
-  deletedById_eq?: ID_Input | null
-  deletedById_in?: ID_Output[] | ID_Output | null
-  ownerMemberId_eq?: ID_Input | null
-  ownerMemberId_in?: ID_Output[] | ID_Output | null
-  ownerCuratorGroupId_eq?: ID_Input | null
-  ownerCuratorGroupId_in?: ID_Output[] | ID_Output | null
-  categoryId_eq?: ID_Input | null
-  categoryId_in?: ID_Output[] | ID_Output | null
-  rewardAccount_eq?: String | null
-  rewardAccount_contains?: String | null
-  rewardAccount_startsWith?: String | null
-  rewardAccount_endsWith?: String | null
-  rewardAccount_in?: String[] | String | null
-  title_eq?: String | null
-  title_contains?: String | null
-  title_startsWith?: String | null
-  title_endsWith?: String | null
-  title_in?: String[] | String | null
-  description_eq?: String | null
-  description_contains?: String | null
-  description_startsWith?: String | null
-  description_endsWith?: String | null
-  description_in?: String[] | String | null
-  coverPhotoDataObjectId_eq?: ID_Input | null
-  coverPhotoDataObjectId_in?: ID_Output[] | ID_Output | null
-  coverPhotoAvailability_eq?: AssetAvailability | null
-  coverPhotoAvailability_in?: AssetAvailability[] | AssetAvailability | null
-  avatarPhotoDataObjectId_eq?: ID_Input | null
-  avatarPhotoDataObjectId_in?: ID_Output[] | ID_Output | null
-  avatarPhotoAvailability_eq?: AssetAvailability | null
-  avatarPhotoAvailability_in?: AssetAvailability[] | AssetAvailability | null
-  isPublic_eq?: Boolean | null
-  isPublic_in?: Boolean[] | Boolean | null
-  isCensored_eq?: Boolean | null
-  isCensored_in?: Boolean[] | Boolean | null
-  languageId_eq?: ID_Input | null
-  languageId_in?: ID_Output[] | ID_Output | null
-  createdInBlock_eq?: Int | null
-  createdInBlock_gt?: Int | null
-  createdInBlock_gte?: Int | null
-  createdInBlock_lt?: Int | null
-  createdInBlock_lte?: Int | null
-  createdInBlock_in?: Int[] | Int | null
-}
-
-export interface ChannelWhereUniqueInput {
-  id: ID_Output
-}
-
 export interface CuratorGroupCreateInput {
   curatorIds: Array<Int>
   isActive: Boolean
@@ -568,17 +406,15 @@ export interface DataObjectCreateInput {
   joystreamContentId: String
 }
 
-export interface DataObjectOwnerChannelCreateInput {
-  channel: Float
+export interface DataObjectOwnerCouncilCreateInput {
   dummy?: Float | null
 }
 
-export interface DataObjectOwnerChannelUpdateInput {
-  channel?: Float | null
+export interface DataObjectOwnerCouncilUpdateInput {
   dummy?: Float | null
 }
 
-export interface DataObjectOwnerChannelWhereInput {
+export interface DataObjectOwnerCouncilWhereInput {
   id_eq?: ID_Input | null
   id_in?: ID_Output[] | ID_Output | null
   createdAt_eq?: DateTime | null
@@ -603,12 +439,6 @@ export interface DataObjectOwnerChannelWhereInput {
   deletedAt_gte?: DateTime | null
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
-  channel_eq?: Int | null
-  channel_gt?: Int | null
-  channel_gte?: Int | null
-  channel_lt?: Int | null
-  channel_lte?: Int | null
-  channel_in?: Int[] | Int | null
   dummy_eq?: Int | null
   dummy_gt?: Int | null
   dummy_gte?: Int | null
@@ -617,19 +447,19 @@ export interface DataObjectOwnerChannelWhereInput {
   dummy_in?: Int[] | Int | null
 }
 
-export interface DataObjectOwnerChannelWhereUniqueInput {
+export interface DataObjectOwnerCouncilWhereUniqueInput {
   id: ID_Output
 }
 
-export interface DataObjectOwnerCouncilCreateInput {
-  dummy?: Float | null
+export interface DataObjectOwnerDaoCreateInput {
+  dao: Float
 }
 
-export interface DataObjectOwnerCouncilUpdateInput {
-  dummy?: Float | null
+export interface DataObjectOwnerDaoUpdateInput {
+  dao?: Float | null
 }
 
-export interface DataObjectOwnerCouncilWhereInput {
+export interface DataObjectOwnerDaoWhereInput {
   id_eq?: ID_Input | null
   id_in?: ID_Output[] | ID_Output | null
   createdAt_eq?: DateTime | null
@@ -654,27 +484,29 @@ export interface DataObjectOwnerCouncilWhereInput {
   deletedAt_gte?: DateTime | null
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
-  dummy_eq?: Int | null
-  dummy_gt?: Int | null
-  dummy_gte?: Int | null
-  dummy_lt?: Int | null
-  dummy_lte?: Int | null
-  dummy_in?: Int[] | Int | null
+  dao_eq?: Int | null
+  dao_gt?: Int | null
+  dao_gte?: Int | null
+  dao_lt?: Int | null
+  dao_lte?: Int | null
+  dao_in?: Int[] | Int | null
 }
 
-export interface DataObjectOwnerCouncilWhereUniqueInput {
+export interface DataObjectOwnerDaoWhereUniqueInput {
   id: ID_Output
 }
 
-export interface DataObjectOwnerDaoCreateInput {
-  dao: Float
+export interface DataObjectOwnerChannelCreateInput {
+  channel: Float
+  dummy?: Float | null
 }
 
-export interface DataObjectOwnerDaoUpdateInput {
-  dao?: Float | null
+export interface DataObjectOwnerChannelUpdateInput {
+  channel?: Float | null
+  dummy?: Float | null
 }
 
-export interface DataObjectOwnerDaoWhereInput {
+export interface DataObjectOwnerChannelWhereInput {
   id_eq?: ID_Input | null
   id_in?: ID_Output[] | ID_Output | null
   createdAt_eq?: DateTime | null
@@ -699,15 +531,21 @@ export interface DataObjectOwnerDaoWhereInput {
   deletedAt_gte?: DateTime | null
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
-  dao_eq?: Int | null
-  dao_gt?: Int | null
-  dao_gte?: Int | null
-  dao_lt?: Int | null
-  dao_lte?: Int | null
-  dao_in?: Int[] | Int | null
+  channel_eq?: Int | null
+  channel_gt?: Int | null
+  channel_gte?: Int | null
+  channel_lt?: Int | null
+  channel_lte?: Int | null
+  channel_in?: Int[] | Int | null
+  dummy_eq?: Int | null
+  dummy_gt?: Int | null
+  dummy_gte?: Int | null
+  dummy_lt?: Int | null
+  dummy_lte?: Int | null
+  dummy_in?: Int[] | Int | null
 }
 
-export interface DataObjectOwnerDaoWhereUniqueInput {
+export interface DataObjectOwnerChannelWhereUniqueInput {
   id: ID_Output
 }
 
@@ -888,11 +726,134 @@ export interface FeaturedVideoCreateInput {
   videoId: ID_Output
 }
 
-export interface FeaturedVideoUpdateInput {
-  videoId?: ID_Input | null
+export interface FeaturedVideoUpdateInput {
+  videoId?: ID_Input | null
+}
+
+export interface FeaturedVideoWhereInput {
+  id_eq?: ID_Input | null
+  id_in?: ID_Output[] | ID_Output | null
+  createdAt_eq?: DateTime | null
+  createdAt_lt?: DateTime | null
+  createdAt_lte?: DateTime | null
+  createdAt_gt?: DateTime | null
+  createdAt_gte?: DateTime | null
+  createdById_eq?: ID_Input | null
+  createdById_in?: ID_Output[] | ID_Output | null
+  updatedAt_eq?: DateTime | null
+  updatedAt_lt?: DateTime | null
+  updatedAt_lte?: DateTime | null
+  updatedAt_gt?: DateTime | null
+  updatedAt_gte?: DateTime | null
+  updatedById_eq?: ID_Input | null
+  updatedById_in?: ID_Output[] | ID_Output | null
+  deletedAt_all?: Boolean | null
+  deletedAt_eq?: DateTime | null
+  deletedAt_lt?: DateTime | null
+  deletedAt_lte?: DateTime | null
+  deletedAt_gt?: DateTime | null
+  deletedAt_gte?: DateTime | null
+  deletedById_eq?: ID_Input | null
+  deletedById_in?: ID_Output[] | ID_Output | null
+  videoId_eq?: ID_Input | null
+  videoId_in?: ID_Output[] | ID_Output | null
+}
+
+export interface FeaturedVideoWhereUniqueInput {
+  id: ID_Output
+}
+
+export interface ChannelCategoryCreateInput {
+  name?: String | null
+  createdInBlock: Float
+}
+
+export interface ChannelCategoryUpdateInput {
+  name?: String | null
+  createdInBlock?: Float | null
+}
+
+export interface ChannelCategoryWhereInput {
+  id_eq?: ID_Input | null
+  id_in?: ID_Output[] | ID_Output | null
+  createdAt_eq?: DateTime | null
+  createdAt_lt?: DateTime | null
+  createdAt_lte?: DateTime | null
+  createdAt_gt?: DateTime | null
+  createdAt_gte?: DateTime | null
+  createdById_eq?: ID_Input | null
+  createdById_in?: ID_Output[] | ID_Output | null
+  updatedAt_eq?: DateTime | null
+  updatedAt_lt?: DateTime | null
+  updatedAt_lte?: DateTime | null
+  updatedAt_gt?: DateTime | null
+  updatedAt_gte?: DateTime | null
+  updatedById_eq?: ID_Input | null
+  updatedById_in?: ID_Output[] | ID_Output | null
+  deletedAt_all?: Boolean | null
+  deletedAt_eq?: DateTime | null
+  deletedAt_lt?: DateTime | null
+  deletedAt_lte?: DateTime | null
+  deletedAt_gt?: DateTime | null
+  deletedAt_gte?: DateTime | null
+  deletedById_eq?: ID_Input | null
+  deletedById_in?: ID_Output[] | ID_Output | null
+  name_eq?: String | null
+  name_contains?: String | null
+  name_startsWith?: String | null
+  name_endsWith?: String | null
+  name_in?: String[] | String | null
+  createdInBlock_eq?: Int | null
+  createdInBlock_gt?: Int | null
+  createdInBlock_gte?: Int | null
+  createdInBlock_lt?: Int | null
+  createdInBlock_lte?: Int | null
+  createdInBlock_in?: Int[] | Int | null
+}
+
+export interface ChannelCategoryWhereUniqueInput {
+  id: ID_Output
+}
+
+export interface ChannelCreateInput {
+  ownerMemberId?: ID_Input | null
+  ownerCuratorGroupId?: ID_Input | null
+  categoryId?: ID_Input | null
+  rewardAccount?: String | null
+  title?: String | null
+  description?: String | null
+  coverPhotoDataObjectId?: ID_Input | null
+  coverPhotoUrls: Array<String>
+  coverPhotoAvailability: AssetAvailability
+  avatarPhotoDataObjectId?: ID_Input | null
+  avatarPhotoUrls: Array<String>
+  avatarPhotoAvailability: AssetAvailability
+  isPublic?: Boolean | null
+  isCensored: Boolean
+  languageId?: ID_Input | null
+  createdInBlock: Float
+}
+
+export interface ChannelUpdateInput {
+  ownerMemberId?: ID_Input | null
+  ownerCuratorGroupId?: ID_Input | null
+  categoryId?: ID_Input | null
+  rewardAccount?: String | null
+  title?: String | null
+  description?: String | null
+  coverPhotoDataObjectId?: ID_Input | null
+  coverPhotoUrls?: String[] | String | null
+  coverPhotoAvailability?: AssetAvailability | null
+  avatarPhotoDataObjectId?: ID_Input | null
+  avatarPhotoUrls?: String[] | String | null
+  avatarPhotoAvailability?: AssetAvailability | null
+  isPublic?: Boolean | null
+  isCensored?: Boolean | null
+  languageId?: ID_Input | null
+  createdInBlock?: Float | null
 }
 
-export interface FeaturedVideoWhereInput {
+export interface ChannelWhereInput {
   id_eq?: ID_Input | null
   id_in?: ID_Output[] | ID_Output | null
   createdAt_eq?: DateTime | null
@@ -917,11 +878,50 @@ export interface FeaturedVideoWhereInput {
   deletedAt_gte?: DateTime | null
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
-  videoId_eq?: ID_Input | null
-  videoId_in?: ID_Output[] | ID_Output | null
+  ownerMemberId_eq?: ID_Input | null
+  ownerMemberId_in?: ID_Output[] | ID_Output | null
+  ownerCuratorGroupId_eq?: ID_Input | null
+  ownerCuratorGroupId_in?: ID_Output[] | ID_Output | null
+  categoryId_eq?: ID_Input | null
+  categoryId_in?: ID_Output[] | ID_Output | null
+  rewardAccount_eq?: String | null
+  rewardAccount_contains?: String | null
+  rewardAccount_startsWith?: String | null
+  rewardAccount_endsWith?: String | null
+  rewardAccount_in?: String[] | String | null
+  title_eq?: String | null
+  title_contains?: String | null
+  title_startsWith?: String | null
+  title_endsWith?: String | null
+  title_in?: String[] | String | null
+  description_eq?: String | null
+  description_contains?: String | null
+  description_startsWith?: String | null
+  description_endsWith?: String | null
+  description_in?: String[] | String | null
+  coverPhotoDataObjectId_eq?: ID_Input | null
+  coverPhotoDataObjectId_in?: ID_Output[] | ID_Output | null
+  coverPhotoAvailability_eq?: AssetAvailability | null
+  coverPhotoAvailability_in?: AssetAvailability[] | AssetAvailability | null
+  avatarPhotoDataObjectId_eq?: ID_Input | null
+  avatarPhotoDataObjectId_in?: ID_Output[] | ID_Output | null
+  avatarPhotoAvailability_eq?: AssetAvailability | null
+  avatarPhotoAvailability_in?: AssetAvailability[] | AssetAvailability | null
+  isPublic_eq?: Boolean | null
+  isPublic_in?: Boolean[] | Boolean | null
+  isCensored_eq?: Boolean | null
+  isCensored_in?: Boolean[] | Boolean | null
+  languageId_eq?: ID_Input | null
+  languageId_in?: ID_Output[] | ID_Output | null
+  createdInBlock_eq?: Int | null
+  createdInBlock_gt?: Int | null
+  createdInBlock_gte?: Int | null
+  createdInBlock_lt?: Int | null
+  createdInBlock_lte?: Int | null
+  createdInBlock_in?: Int[] | Int | null
 }
 
-export interface FeaturedVideoWhereUniqueInput {
+export interface ChannelWhereUniqueInput {
   id: ID_Output
 }
 
@@ -1542,87 +1542,6 @@ export interface BaseModelUUID extends BaseGraphQLObject {
   version: Int
 }
 
-export interface Channel extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  ownerMember?: Membership | null
-  ownerMemberId?: String | null
-  ownerCuratorGroup?: CuratorGroup | null
-  ownerCuratorGroupId?: String | null
-  category?: ChannelCategory | null
-  categoryId?: String | null
-  rewardAccount?: String | null
-  title?: String | null
-  description?: String | null
-  coverPhotoDataObject?: DataObject | null
-  coverPhotoDataObjectId?: String | null
-  coverPhotoUrls: Array<String>
-  coverPhotoAvailability: AssetAvailability
-  avatarPhotoDataObject?: DataObject | null
-  avatarPhotoDataObjectId?: String | null
-  avatarPhotoUrls: Array<String>
-  avatarPhotoAvailability: AssetAvailability
-  isPublic?: Boolean | null
-  isCensored: Boolean
-  language?: Language | null
-  languageId?: String | null
-  videos: Array<Video>
-  createdInBlock: Int
-}
-
-export interface ChannelCategoriesByNameFTSOutput {
-  item: ChannelCategoriesByNameSearchResult
-  rank: Float
-  isTypeOf: String
-  highlight: String
-}
-
-/*
- * Category of media channel
-
- */
-export interface ChannelCategory extends BaseGraphQLObject {
-  id: ID_Output
-  createdAt: DateTime
-  createdById: String
-  updatedAt?: DateTime | null
-  updatedById?: String | null
-  deletedAt?: DateTime | null
-  deletedById?: String | null
-  version: Int
-  name?: String | null
-  channels: Array<Channel>
-  createdInBlock: Int
-}
-
-export interface ChannelCategoryConnection {
-  totalCount: Int
-  edges: Array<ChannelCategoryEdge>
-  pageInfo: PageInfo
-}
-
-export interface ChannelCategoryEdge {
-  node: ChannelCategory
-  cursor: String
-}
-
-export interface ChannelConnection {
-  totalCount: Int
-  edges: Array<ChannelEdge>
-  pageInfo: PageInfo
-}
-
-export interface ChannelEdge {
-  node: Channel
-  cursor: String
-}
-
 export interface CuratorGroup extends BaseGraphQLObject {
   id: ID_Output
   createdAt: DateTime
@@ -1687,11 +1606,6 @@ export interface DataObjectEdge {
   cursor: String
 }
 
-export interface DataObjectOwnerChannel {
-  channel: Int
-  dummy?: Int | null
-}
-
 export interface DataObjectOwnerCouncil {
   dummy?: Int | null
 }
@@ -1700,6 +1614,11 @@ export interface DataObjectOwnerDao {
   dao: Int
 }
 
+export interface DataObjectOwnerChannel {
+  channel: Int
+  dummy?: Int | null
+}
+
 export interface DataObjectOwnerMember {
   member: Int
   dummy?: Int | null
@@ -1733,6 +1652,87 @@ export interface FeaturedVideoEdge {
   cursor: String
 }
 
+export interface Channel extends BaseGraphQLObject {
+  id: ID_Output
+  createdAt: DateTime
+  createdById: String
+  updatedAt?: DateTime | null
+  updatedById?: String | null
+  deletedAt?: DateTime | null
+  deletedById?: String | null
+  version: Int
+  ownerMember?: Membership | null
+  ownerMemberId?: String | null
+  ownerCuratorGroup?: CuratorGroup | null
+  ownerCuratorGroupId?: String | null
+  category?: ChannelCategory | null
+  categoryId?: String | null
+  rewardAccount?: String | null
+  title?: String | null
+  description?: String | null
+  coverPhotoDataObject?: DataObject | null
+  coverPhotoDataObjectId?: String | null
+  coverPhotoUrls: Array<String>
+  coverPhotoAvailability: AssetAvailability
+  avatarPhotoDataObject?: DataObject | null
+  avatarPhotoDataObjectId?: String | null
+  avatarPhotoUrls: Array<String>
+  avatarPhotoAvailability: AssetAvailability
+  isPublic?: Boolean | null
+  isCensored: Boolean
+  language?: Language | null
+  languageId?: String | null
+  videos: Array<Video>
+  createdInBlock: Int
+}
+
+export interface ChannelCategoriesByNameFTSOutput {
+  item: ChannelCategoriesByNameSearchResult
+  rank: Float
+  isTypeOf: String
+  highlight: String
+}
+
+/*
+ * Category of media channel
+
+ */
+export interface ChannelCategory extends BaseGraphQLObject {
+  id: ID_Output
+  createdAt: DateTime
+  createdById: String
+  updatedAt?: DateTime | null
+  updatedById?: String | null
+  deletedAt?: DateTime | null
+  deletedById?: String | null
+  version: Int
+  name?: String | null
+  channels: Array<Channel>
+  createdInBlock: Int
+}
+
+export interface ChannelCategoryConnection {
+  totalCount: Int
+  edges: Array<ChannelCategoryEdge>
+  pageInfo: PageInfo
+}
+
+export interface ChannelCategoryEdge {
+  node: ChannelCategory
+  cursor: String
+}
+
+export interface ChannelConnection {
+  totalCount: Int
+  edges: Array<ChannelEdge>
+  pageInfo: PageInfo
+}
+
+export interface ChannelEdge {
+  node: Channel
+  cursor: String
+}
+
 export interface Language extends BaseGraphQLObject {
   id: ID_Output
   createdAt: DateTime
@@ -2064,10 +2064,10 @@ The `String` scalar type represents textual data, represented as UTF-8 character
 */
 export type String = string
 
-export type ChannelCategoriesByNameSearchResult = ChannelCategory
-
 export type DataObjectOwner = DataObjectOwnerMember | DataObjectOwnerChannel | DataObjectOwnerDao | DataObjectOwnerCouncil | DataObjectOwnerWorkingGroup
 
+export type ChannelCategoriesByNameSearchResult = ChannelCategory
+
 export type MembersByHandleSearchResult = Membership
 
 export type SearchSearchResult = Channel | Video

File diff suppressed because it is too large
+ 411 - 260
query-node/generated/graphql-server/generated/classes.ts


File diff suppressed because it is too large
+ 444 - 483
query-node/generated/graphql-server/generated/schema.graphql


+ 103 - 16
query-node/generated/types/gateway-working-group.ts

@@ -9,7 +9,7 @@ import {
   OpeningId,
   RationaleText,
   RewardPolicy,
-  WorkerId
+  WorkerId,
 } from "@joystream/types/augment";
 import { Bytes, Option, bool } from "@polkadot/types";
 
@@ -50,13 +50,13 @@ export namespace GatewayWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
       ]);
     }
 
     get bytes(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.ctx.params[1].value
+        this.ctx.params[1].value,
       ]);
     }
   }
@@ -71,7 +71,7 @@ export namespace GatewayWorkingGroup {
   export class OpeningFilledEvent {
     public readonly expectedParamTypes = [
       "OpeningId",
-      "ApplicationIdToWorkerIdMap"
+      "ApplicationIdToWorkerIdMap",
     ];
 
     constructor(public readonly ctx: SubstrateEvent) {}
@@ -99,7 +99,7 @@ export namespace GatewayWorkingGroup {
 
     get openingId(): OpeningId {
       return createTypeUnsafe<OpeningId & Codec>(typeRegistry, "OpeningId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
       ]);
     }
 
@@ -147,7 +147,7 @@ export namespace GatewayWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
       ]);
     }
 
@@ -195,7 +195,94 @@ export namespace GatewayWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
+      ]);
+    }
+
+    get rationaleText(): RationaleText {
+      return createTypeUnsafe<RationaleText & Codec>(
+        typeRegistry,
+        "RationaleText",
+        [this.ctx.params[1].value]
+      );
+    }
+  }
+  /**
+   *  Emits on setting the leader.
+   *  Params:
+   *  - Worker id.
+   *
+   *  Event parameters: [WorkerId, ]
+   */
+  export class LeaderSetEvent {
+    public readonly expectedParamTypes = ["WorkerId"];
+
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get data(): LeaderSet_Params {
+      return new LeaderSet_Params(this.ctx);
+    }
+
+    validateParams(): boolean {
+      if (this.expectedParamTypes.length !== this.ctx.params.length) {
+        return false;
+      }
+      let valid = true;
+      this.expectedParamTypes.forEach((type, i) => {
+        if (type !== this.ctx.params[i].type) {
+          valid = false;
+        }
+      });
+      return valid;
+    }
+  }
+
+  class LeaderSet_Params {
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get workerId(): WorkerId {
+      return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
+        this.ctx.params[0].value,
+      ]);
+    }
+  }
+  /**
+   *  Emits on terminating the leader.
+   *  Params:
+   *  - leader worker id.
+   *  - termination rationale text
+   *
+   *  Event parameters: [WorkerId, RationaleText, ]
+   */
+  export class TerminatedLeaderEvent {
+    public readonly expectedParamTypes = ["WorkerId", "RationaleText"];
+
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get data(): TerminatedLeader_Params {
+      return new TerminatedLeader_Params(this.ctx);
+    }
+
+    validateParams(): boolean {
+      if (this.expectedParamTypes.length !== this.ctx.params.length) {
+        return false;
+      }
+      let valid = true;
+      this.expectedParamTypes.forEach((type, i) => {
+        if (type !== this.ctx.params[i].type) {
+          valid = false;
+        }
+      });
+      return valid;
+    }
+  }
+
+  class TerminatedLeader_Params {
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get workerId(): WorkerId {
+      return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
+        this.ctx.params[0].value,
       ]);
     }
 
@@ -245,13 +332,13 @@ export namespace GatewayWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
     get storage(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.extrinsic.args[1].value
+        this.extrinsic.args[1].value,
       ]);
     }
   }
@@ -264,7 +351,7 @@ export namespace GatewayWorkingGroup {
     public readonly expectedArgTypes = [
       "OpeningId",
       "ApplicationIdSet",
-      "Option<RewardPolicy>"
+      "Option<RewardPolicy>",
     ];
 
     constructor(public readonly ctx: SubstrateEvent) {
@@ -297,7 +384,7 @@ export namespace GatewayWorkingGroup {
 
     get openingId(): OpeningId {
       return createTypeUnsafe<OpeningId & Codec>(typeRegistry, "OpeningId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
@@ -354,13 +441,13 @@ export namespace GatewayWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
     get rationaleText(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.extrinsic.args[1].value
+        this.extrinsic.args[1].value,
       ]);
     }
   }
@@ -402,19 +489,19 @@ export namespace GatewayWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
     get rationaleText(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.extrinsic.args[1].value
+        this.extrinsic.args[1].value,
       ]);
     }
 
     get slashStake(): bool {
       return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
-        this.extrinsic.args[2].value
+        this.extrinsic.args[2].value,
       ]);
     }
   }

+ 103 - 16
query-node/generated/types/storage-working-group.ts

@@ -9,7 +9,7 @@ import {
   OpeningId,
   RationaleText,
   RewardPolicy,
-  WorkerId
+  WorkerId,
 } from "@joystream/types/augment";
 import { Bytes, Option, bool } from "@polkadot/types";
 
@@ -50,13 +50,13 @@ export namespace StorageWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
       ]);
     }
 
     get bytes(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.ctx.params[1].value
+        this.ctx.params[1].value,
       ]);
     }
   }
@@ -71,7 +71,7 @@ export namespace StorageWorkingGroup {
   export class OpeningFilledEvent {
     public readonly expectedParamTypes = [
       "OpeningId",
-      "ApplicationIdToWorkerIdMap"
+      "ApplicationIdToWorkerIdMap",
     ];
 
     constructor(public readonly ctx: SubstrateEvent) {}
@@ -99,7 +99,7 @@ export namespace StorageWorkingGroup {
 
     get openingId(): OpeningId {
       return createTypeUnsafe<OpeningId & Codec>(typeRegistry, "OpeningId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
       ]);
     }
 
@@ -147,7 +147,7 @@ export namespace StorageWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
       ]);
     }
 
@@ -195,7 +195,94 @@ export namespace StorageWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.ctx.params[0].value
+        this.ctx.params[0].value,
+      ]);
+    }
+
+    get rationaleText(): RationaleText {
+      return createTypeUnsafe<RationaleText & Codec>(
+        typeRegistry,
+        "RationaleText",
+        [this.ctx.params[1].value]
+      );
+    }
+  }
+  /**
+   *  Emits on setting the leader.
+   *  Params:
+   *  - Worker id.
+   *
+   *  Event parameters: [WorkerId, ]
+   */
+  export class LeaderSetEvent {
+    public readonly expectedParamTypes = ["WorkerId"];
+
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get data(): LeaderSet_Params {
+      return new LeaderSet_Params(this.ctx);
+    }
+
+    validateParams(): boolean {
+      if (this.expectedParamTypes.length !== this.ctx.params.length) {
+        return false;
+      }
+      let valid = true;
+      this.expectedParamTypes.forEach((type, i) => {
+        if (type !== this.ctx.params[i].type) {
+          valid = false;
+        }
+      });
+      return valid;
+    }
+  }
+
+  class LeaderSet_Params {
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get workerId(): WorkerId {
+      return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
+        this.ctx.params[0].value,
+      ]);
+    }
+  }
+  /**
+   *  Emits on terminating the leader.
+   *  Params:
+   *  - leader worker id.
+   *  - termination rationale text
+   *
+   *  Event parameters: [WorkerId, RationaleText, ]
+   */
+  export class TerminatedLeaderEvent {
+    public readonly expectedParamTypes = ["WorkerId", "RationaleText"];
+
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get data(): TerminatedLeader_Params {
+      return new TerminatedLeader_Params(this.ctx);
+    }
+
+    validateParams(): boolean {
+      if (this.expectedParamTypes.length !== this.ctx.params.length) {
+        return false;
+      }
+      let valid = true;
+      this.expectedParamTypes.forEach((type, i) => {
+        if (type !== this.ctx.params[i].type) {
+          valid = false;
+        }
+      });
+      return valid;
+    }
+  }
+
+  class TerminatedLeader_Params {
+    constructor(public readonly ctx: SubstrateEvent) {}
+
+    get workerId(): WorkerId {
+      return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
+        this.ctx.params[0].value,
       ]);
     }
 
@@ -245,13 +332,13 @@ export namespace StorageWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
     get storage(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.extrinsic.args[1].value
+        this.extrinsic.args[1].value,
       ]);
     }
   }
@@ -264,7 +351,7 @@ export namespace StorageWorkingGroup {
     public readonly expectedArgTypes = [
       "OpeningId",
       "ApplicationIdSet",
-      "Option<RewardPolicy>"
+      "Option<RewardPolicy>",
     ];
 
     constructor(public readonly ctx: SubstrateEvent) {
@@ -297,7 +384,7 @@ export namespace StorageWorkingGroup {
 
     get openingId(): OpeningId {
       return createTypeUnsafe<OpeningId & Codec>(typeRegistry, "OpeningId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
@@ -354,13 +441,13 @@ export namespace StorageWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
     get rationaleText(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.extrinsic.args[1].value
+        this.extrinsic.args[1].value,
       ]);
     }
   }
@@ -402,19 +489,19 @@ export namespace StorageWorkingGroup {
 
     get workerId(): WorkerId {
       return createTypeUnsafe<WorkerId & Codec>(typeRegistry, "WorkerId", [
-        this.extrinsic.args[0].value
+        this.extrinsic.args[0].value,
       ]);
     }
 
     get rationaleText(): Bytes {
       return createTypeUnsafe<Bytes & Codec>(typeRegistry, "Bytes", [
-        this.extrinsic.args[1].value
+        this.extrinsic.args[1].value,
       ]);
     }
 
     get slashStake(): bool {
       return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
-        this.extrinsic.args[2].value
+        this.extrinsic.args[2].value,
       ]);
     }
   }

+ 19 - 1
query-node/manifest.yml

@@ -58,11 +58,17 @@ typegen:
     - storage_working_group.OpeningFilled
     - storage_working_group.TerminatedWorker
     - storage_working_group.WorkerExited
+    - storage_working_group.LeaderSet
+    # - storage_working_group.LeaderUnset # not needed as long as Leader vs Worker distinction is not needed
+    - storage_working_group.TerminatedLeader
 
     - gateway_working_group.WorkerStorageUpdated
     - gateway_working_group.OpeningFilled
     - gateway_working_group.TerminatedWorker
     - gateway_working_group.WorkerExited
+    - gateway_working_group.LeaderSet
+    # - gateway_working_group.LeaderUnset # not needed as long as Leader vs Worker distinction is not needed
+    - gateway_working_group.TerminatedLeader
   calls:
     # members
     - members.buyMembership
@@ -202,6 +208,7 @@ mappings:
     #  handler: data_directory_ContentUploadingStatusUpdated(DatabaseManager, SubstrateEvent)
 
     # working groups
+    ## storage - workers
     - event: storageWorkingGroup.WorkerStorageUpdated
       handler: storageWorkingGroup_WorkerStorageUpdated(DatabaseManager, SubstrateEvent)
     - event: storageWorkingGroup.OpeningFilled
@@ -211,8 +218,13 @@ mappings:
     - event: storageWorkingGroup.WorkerExited
       handler: storageWorkingGroup_WorkerExited(DatabaseManager, SubstrateEvent)
 
+    ## storage - leader
+    - event: storageWorkingGroup.LeaderSet
+      handler: storageWorkingGroup_LeaderSet(DatabaseManager, SubstrateEvent)
+    - event: storageWorkingGroup.TerminatedLeader
+      handler: storageWorkingGroup_TerminatedLeader(DatabaseManager, SubstrateEvent)
 
-
+    ## gateway - workers
     - event: gatewayWorkingGroup.WorkerStorageUpdated
       handler: gatewayWorkingGroup_WorkerStorageUpdated(DatabaseManager, SubstrateEvent)
     - event: gatewayWorkingGroup.OpeningFilled
@@ -222,6 +234,12 @@ mappings:
     - event: gatewayWorkingGroup.WorkerExited
       handler: gatewayWorkingGroup_WorkerExited(DatabaseManager, SubstrateEvent)
 
+    ## gateway - leader
+    - event: gatewayWorkingGroup.LeaderSet
+      handler: gatewayWorkingGroup_LeaderSet(DatabaseManager, SubstrateEvent)
+    - event: gatewayWorkingGroup.TerminatedLeader
+      handler: gatewayWorkingGroup_TerminatedLeader(DatabaseManager, SubstrateEvent)
+
   extrinsicHandlers:
     # infer defaults here
     #- extrinsic: Balances.Transfer

+ 66 - 14
query-node/mappings/src/workingGroup.ts

@@ -57,6 +57,22 @@ export async function storageWorkingGroup_WorkerExited(db: DatabaseManager, even
   await workingGroup_WorkerExited(db, WorkerType.STORAGE, workerId)
 }
 
+export async function storageWorkingGroup_LeaderSet(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
+  // read event data
+  const {workerId} = new StorageWorkingGroup.LeaderSetEvent(event).data
+
+  // call generic processing
+  await workingGroup_LeaderSet(db, WorkerType.STORAGE, workerId)
+}
+
+export async function storageWorkingGroup_TerminatedLeader(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
+  // read event data
+  const {workerId} = new StorageWorkingGroup.TerminatedLeaderEvent(event).data
+
+  // call generic processing
+  await workingGroup_TerminatedLeader(db, WorkerType.STORAGE, workerId)
+}
+
 /////////////////// Gateway working group //////////////////////////////////////
 
 export async function gatewayWorkingGroup_OpeningFilled(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
@@ -77,7 +93,7 @@ export async function gatewayWorkingGroup_WorkerStorageUpdated(db: DatabaseManag
 
 export async function gatewayWorkingGroup_TerminatedWorker(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
   // read event data
-  const {workerId} = new StorageWorkingGroup.TerminatedWorkerEvent(event).data
+  const {workerId} = new GatewayWorkingGroup.TerminatedWorkerEvent(event).data
 
   // call generic processing
   await workingGroup_TerminatedWorker(db, WorkerType.GATEWAY, workerId)
@@ -85,12 +101,28 @@ export async function gatewayWorkingGroup_TerminatedWorker(db: DatabaseManager,
 
 export async function gatewayWorkingGroup_WorkerExited(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
   // read event data
-  const {workerId} = new StorageWorkingGroup.WorkerExitedEvent(event).data
+  const {workerId} = new GatewayWorkingGroup.WorkerExitedEvent(event).data
 
   // call generic processing
   await workingGroup_WorkerExited(db, WorkerType.GATEWAY, workerId)
 }
 
+export async function gatewayWorkingGroup_LeaderSet(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
+  // read event data
+  const {workerId} = new GatewayWorkingGroup.LeaderSetEvent(event).data
+
+  // call generic processing
+  await workingGroup_LeaderSet(db, WorkerType.GATEWAY, workerId)
+}
+
+export async function gatewayWorkingGroup_TerminatedLeader(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
+  // read event data
+  const {workerId} = new GatewayWorkingGroup.TerminatedLeaderEvent(event).data
+
+  // call generic processing
+  await workingGroup_TerminatedLeader(db, WorkerType.GATEWAY, workerId)
+}
+
 /////////////////// Generic working group processing ///////////////////////////
 
 export async function workingGroup_OpeningFilled(
@@ -101,18 +133,11 @@ export async function workingGroup_OpeningFilled(
   const workerIds = [...applicationIdToWorkerIdMap.values()]
 
   for (const workerId of workerIds) {
-    // create new worker
-    const newWorker = new Worker({
-      workerId: workerId.toString(),
-      type: workerType,
-      isActive: true,
-    })
-
-    await db.save<Worker>(newWorker)
+    await createWorker(db, workerId, workerType)
   }
 
   // emit log event
-  logger.info("Worker has been created", {ids: workerIds.map(item => item.toString()), workerType})
+  logger.info("Workers have been created", {ids: workerIds.map(item => item.toString()), workerType})
 }
 
 export async function workingGroup_WorkerStorageUpdated(db: DatabaseManager, workerType: WorkerType, workerId: WorkerId, newMetadata: Bytes): Promise<void> {
@@ -134,7 +159,7 @@ export async function workingGroup_WorkerStorageUpdated(db: DatabaseManager, wor
   await db.save<Worker>(worker)
 
   // emit log event
-  logger.info("Storage provider has been updated", {workerId, workerType})
+  logger.info("Worker has been updated", {workerId, workerType})
 }
 
 export async function workingGroup_TerminatedWorker(db: DatabaseManager, workerType: WorkerType, workerId: WorkerId): Promise<void> {
@@ -142,7 +167,7 @@ export async function workingGroup_TerminatedWorker(db: DatabaseManager, workerT
   await deactivateWorker(db, workerType, workerId)
 
   // emit log event
-  logger.info("Storage provider has beed removed (worker terminated)", {workerId, workerType})
+  logger.info("Worker has been removed (worker terminated)", {workerId, workerType})
 }
 
 export async function workingGroup_WorkerExited(db: DatabaseManager, workerType: WorkerType, workerId: WorkerId): Promise<void> {
@@ -150,11 +175,38 @@ export async function workingGroup_WorkerExited(db: DatabaseManager, workerType:
   await deactivateWorker(db, workerType, workerId)
 
   // emit log event
-  logger.info("Storage provider has beed removed (worker exited)", {workerId, workerType})
+  logger.info("Worker has been removed (worker exited)", {workerId, workerType})
+}
+
+export async function workingGroup_LeaderSet(db: DatabaseManager, workerType: WorkerType, workerId: WorkerId): Promise<void> {
+  // create leader (worker)
+  await createWorker(db, workerId, workerType)
+
+  // emit log event
+  logger.info("Working group leader has been removed (worker exited)", {workerId, workerType})
+}
+
+export async function workingGroup_TerminatedLeader(db: DatabaseManager, workerType: WorkerType, workerId: WorkerId): Promise<void> {
+  // do removal logic
+  await deactivateWorker(db, workerType, workerId)
+
+  // emit log event
+  logger.info("Working group leader has been removed (worker exited)", {workerId, workerType})
 }
 
 /////////////////// Helpers ////////////////////////////////////////////////////
 
+async function createWorker(db: DatabaseManager, workerId: WorkerId, workerType: WorkerType): Promise<void> {
+  // create new worker
+  const newWorker = new Worker({
+    workerId: workerId.toString(),
+    type: workerType,
+    isActive: true,
+  })
+
+  await db.save<Worker>(newWorker)
+}
+
 async function deactivateWorker(db: DatabaseManager, workerType: WorkerType, workerId: WorkerId) {
   // load worker
   const worker = await db.get(Worker, {

Some files were not shown because too many files changed in this diff