Browse Source

query node - storage provider metadata II

ondratra 3 years ago
parent
commit
725fdbb11f

+ 254 - 183
query-node/generated/graphql-server/generated/binding.ts

@@ -34,6 +34,9 @@ export interface Query {
     membersByHandle: <T = Array<MembersByHandleFTSOutput>>(args: { whereMembership?: MembershipWhereInput | null, skip?: Int | null, limit?: Int | null, text: String }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     search: <T = Array<SearchFTSOutput>>(args: { whereVideo?: VideoWhereInput | null, whereChannel?: ChannelWhereInput | null, skip?: Int | null, limit?: Int | null, text: String }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     videoCategoriesByName: <T = Array<VideoCategoriesByNameFTSOutput>>(args: { whereVideoCategory?: VideoCategoryWhereInput | null, skip?: Int | null, limit?: Int | null, text: String }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
+    storageProviders: <T = Array<StorageProvider>>(args: { offset?: Int | null, limit?: Int | null, where?: StorageProviderWhereInput | null, orderBy?: StorageProviderOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
+    storageProviderByUniqueInput: <T = StorageProvider | null>(args: { where: StorageProviderWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
+    storageProvidersConnection: <T = StorageProviderConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: StorageProviderWhereInput | null, orderBy?: StorageProviderOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     videoCategories: <T = Array<VideoCategory>>(args: { offset?: Int | null, limit?: Int | null, where?: VideoCategoryWhereInput | null, orderBy?: VideoCategoryOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
     videoCategoryByUniqueInput: <T = VideoCategory | null>(args: { where: VideoCategoryWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T | null> ,
     videoCategoriesConnection: <T = VideoCategoryConnection>(args: { first?: Int | null, after?: String | null, last?: Int | null, before?: String | null, where?: VideoCategoryWhereInput | null, orderBy?: VideoCategoryOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise<T> ,
@@ -90,8 +93,8 @@ export type ChannelCategoryOrderByInput =   'createdAt_ASC' |
   'deletedAt_DESC' |
   'name_ASC' |
   'name_DESC' |
-  'happenedIn_ASC' |
-  'happenedIn_DESC'
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC'
 
 export type ChannelOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
@@ -125,8 +128,8 @@ export type ChannelOrderByInput =   'createdAt_ASC' |
   'isCensored_DESC' |
   'languageId_ASC' |
   'languageId_DESC' |
-  'happenedIn_ASC' |
-  'happenedIn_DESC'
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC'
 
 export type CuratorGroupOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
@@ -143,8 +146,8 @@ export type DataObjectOrderByInput =   'createdAt_ASC' |
   'updatedAt_DESC' |
   'deletedAt_ASC' |
   'deletedAt_DESC' |
-  'addedAt_ASC' |
-  'addedAt_DESC' |
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC' |
   'typeId_ASC' |
   'typeId_DESC' |
   'size_ASC' |
@@ -175,12 +178,11 @@ export type LanguageOrderByInput =   'createdAt_ASC' |
   'deletedAt_DESC' |
   'iso_ASC' |
   'iso_DESC' |
-  'happenedIn_ASC' |
-  'happenedIn_DESC'
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC'
 
 export type LiaisonJudgement =   'PENDING' |
-  'ACCEPTED' |
-  'REJECTED'
+  'ACCEPTED'
 
 export type LicenseOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
@@ -215,15 +217,27 @@ export type MembershipOrderByInput =   'createdAt_ASC' |
   'controllerAccount_DESC' |
   'rootAccount_ASC' |
   'rootAccount_DESC' |
-  'registeredAtBlock_ASC' |
-  'registeredAtBlock_DESC' |
-  'registeredAtTime_ASC' |
-  'registeredAtTime_DESC' |
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC' |
   'entry_ASC' |
   'entry_DESC' |
   'subscription_ASC' |
   'subscription_DESC'
 
+export type StorageProviderOrderByInput =   'createdAt_ASC' |
+  'createdAt_DESC' |
+  'updatedAt_ASC' |
+  'updatedAt_DESC' |
+  'deletedAt_ASC' |
+  'deletedAt_DESC' |
+  'type_ASC' |
+  'type_DESC' |
+  'metadata_ASC' |
+  'metadata_DESC'
+
+export type StorageProviderType =   'GATEWAY' |
+  'STORAGE'
+
 export type VideoCategoryOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
   'updatedAt_ASC' |
@@ -232,8 +246,8 @@ export type VideoCategoryOrderByInput =   'createdAt_ASC' |
   'deletedAt_DESC' |
   'name_ASC' |
   'name_DESC' |
-  'happenedIn_ASC' |
-  'happenedIn_DESC'
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC'
 
 export type VideoMediaEncodingOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
@@ -262,8 +276,8 @@ export type VideoMediaMetadataOrderByInput =   'createdAt_ASC' |
   'pixelHeight_DESC' |
   'size_ASC' |
   'size_DESC' |
-  'happenedIn_ASC' |
-  'happenedIn_DESC'
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC'
 
 export type VideoOrderByInput =   'createdAt_ASC' |
   'createdAt_DESC' |
@@ -305,8 +319,8 @@ export type VideoOrderByInput =   'createdAt_ASC' |
   'mediaAvailability_DESC' |
   'mediaMetadataId_ASC' |
   'mediaMetadataId_DESC' |
-  'happenedIn_ASC' |
-  'happenedIn_DESC' |
+  'createdInBlock_ASC' |
+  'createdInBlock_DESC' |
   'isFeatured_ASC' |
   'isFeatured_DESC'
 
@@ -336,12 +350,12 @@ export interface BaseWhereInput {
 
 export interface ChannelCategoryCreateInput {
   name?: String | null
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 export interface ChannelCategoryUpdateInput {
   name?: String | null
-  happenedIn?: Float | null
+  createdInBlock?: Float | null
 }
 
 export interface ChannelCategoryWhereInput {
@@ -374,12 +388,12 @@ export interface ChannelCategoryWhereInput {
   name_startsWith?: String | null
   name_endsWith?: String | null
   name_in?: String[] | String | null
-  happenedIn_eq?: Int | null
-  happenedIn_gt?: Int | null
-  happenedIn_gte?: Int | null
-  happenedIn_lt?: Int | null
-  happenedIn_lte?: Int | null
-  happenedIn_in?: Int[] | Int | 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 {
@@ -402,7 +416,7 @@ export interface ChannelCreateInput {
   isPublic?: Boolean | null
   isCensored: Boolean
   languageId?: ID_Input | null
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 export interface ChannelUpdateInput {
@@ -421,7 +435,7 @@ export interface ChannelUpdateInput {
   isPublic?: Boolean | null
   isCensored?: Boolean | null
   languageId?: ID_Input | null
-  happenedIn?: Float | null
+  createdInBlock?: Float | null
 }
 
 export interface ChannelWhereInput {
@@ -484,12 +498,12 @@ export interface ChannelWhereInput {
   isCensored_in?: Boolean[] | Boolean | null
   languageId_eq?: ID_Input | null
   languageId_in?: ID_Output[] | ID_Output | null
-  happenedIn_eq?: Int | null
-  happenedIn_gt?: Int | null
-  happenedIn_gte?: Int | null
-  happenedIn_lt?: Int | null
-  happenedIn_lte?: Int | null
-  happenedIn_in?: Int[] | Int | 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 {
@@ -497,12 +511,12 @@ export interface ChannelWhereUniqueInput {
 }
 
 export interface CuratorGroupCreateInput {
-  curatorIds: Array<BigInt>
+  curatorIds: Array<Int>
   isActive: Boolean
 }
 
 export interface CuratorGroupUpdateInput {
-  curatorIds?: BigInt[] | BigInt | null
+  curatorIds?: Int[] | Int | null
   isActive?: Boolean | null
 }
 
@@ -541,22 +555,22 @@ export interface CuratorGroupWhereUniqueInput {
 
 export interface DataObjectCreateInput {
   owner: JSONObject
-  addedAt: Float
+  createdInBlock: Float
   typeId: Float
-  size: BigInt
-  liaisonId: BigInt
+  size: Float
+  liaisonId?: ID_Input | null
   liaisonJudgement: LiaisonJudgement
   ipfsContentId: String
   joystreamContentId: String
 }
 
 export interface DataObjectOwnerChannelCreateInput {
-  channel: BigInt
+  channel: Float
   dummy?: Float | null
 }
 
 export interface DataObjectOwnerChannelUpdateInput {
-  channel?: BigInt | null
+  channel?: Float | null
   dummy?: Float | null
 }
 
@@ -585,12 +599,12 @@ export interface DataObjectOwnerChannelWhereInput {
   deletedAt_gte?: DateTime | null
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
-  channel_eq?: BigInt | null
-  channel_gt?: BigInt | null
-  channel_gte?: BigInt | null
-  channel_lt?: BigInt | null
-  channel_lte?: BigInt | null
-  channel_in?: BigInt[] | BigInt | 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
@@ -649,11 +663,11 @@ export interface DataObjectOwnerCouncilWhereUniqueInput {
 }
 
 export interface DataObjectOwnerDaoCreateInput {
-  dao: BigInt
+  dao: Float
 }
 
 export interface DataObjectOwnerDaoUpdateInput {
-  dao?: BigInt | null
+  dao?: Float | null
 }
 
 export interface DataObjectOwnerDaoWhereInput {
@@ -681,12 +695,12 @@ export interface DataObjectOwnerDaoWhereInput {
   deletedAt_gte?: DateTime | null
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
-  dao_eq?: BigInt | null
-  dao_gt?: BigInt | null
-  dao_gte?: BigInt | null
-  dao_lt?: BigInt | null
-  dao_lte?: BigInt | null
-  dao_in?: BigInt[] | BigInt | 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 DataObjectOwnerDaoWhereUniqueInput {
@@ -694,12 +708,12 @@ export interface DataObjectOwnerDaoWhereUniqueInput {
 }
 
 export interface DataObjectOwnerMemberCreateInput {
-  member: BigInt
+  member: Float
   dummy?: Float | null
 }
 
 export interface DataObjectOwnerMemberUpdateInput {
-  member?: BigInt | null
+  member?: Float | null
   dummy?: Float | null
 }
 
@@ -728,12 +742,12 @@ export interface DataObjectOwnerMemberWhereInput {
   deletedAt_gte?: DateTime | null
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
-  member_eq?: BigInt | null
-  member_gt?: BigInt | null
-  member_gte?: BigInt | null
-  member_lt?: BigInt | null
-  member_lte?: BigInt | null
-  member_in?: BigInt[] | BigInt | null
+  member_eq?: Int | null
+  member_gt?: Int | null
+  member_gte?: Int | null
+  member_lt?: Int | null
+  member_lte?: Int | null
+  member_in?: Int[] | Int | null
   dummy_eq?: Int | null
   dummy_gt?: Int | null
   dummy_gte?: Int | null
@@ -747,11 +761,11 @@ export interface DataObjectOwnerMemberWhereUniqueInput {
 }
 
 export interface DataObjectOwnerWorkingGroupCreateInput {
-  dummy?: Float | null
+  workingGroup: Float
 }
 
 export interface DataObjectOwnerWorkingGroupUpdateInput {
-  dummy?: Float | null
+  workingGroup?: Float | null
 }
 
 export interface DataObjectOwnerWorkingGroupWhereInput {
@@ -779,12 +793,12 @@ export interface DataObjectOwnerWorkingGroupWhereInput {
   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
+  workingGroup_eq?: Int | null
+  workingGroup_gt?: Int | null
+  workingGroup_gte?: Int | null
+  workingGroup_lt?: Int | null
+  workingGroup_lte?: Int | null
+  workingGroup_in?: Int[] | Int | null
 }
 
 export interface DataObjectOwnerWorkingGroupWhereUniqueInput {
@@ -793,10 +807,10 @@ export interface DataObjectOwnerWorkingGroupWhereUniqueInput {
 
 export interface DataObjectUpdateInput {
   owner?: JSONObject | null
-  addedAt?: Float | null
+  createdInBlock?: Float | null
   typeId?: Float | null
-  size?: BigInt | null
-  liaisonId?: BigInt | null
+  size?: Float | null
+  liaisonId?: ID_Input | null
   liaisonJudgement?: LiaisonJudgement | null
   ipfsContentId?: String | null
   joystreamContentId?: String | null
@@ -828,30 +842,26 @@ export interface DataObjectWhereInput {
   deletedById_eq?: ID_Input | null
   deletedById_in?: ID_Output[] | ID_Output | null
   owner_json?: JSONObject | null
-  addedAt_eq?: Int | null
-  addedAt_gt?: Int | null
-  addedAt_gte?: Int | null
-  addedAt_lt?: Int | null
-  addedAt_lte?: Int | null
-  addedAt_in?: Int[] | Int | 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
   typeId_eq?: Int | null
   typeId_gt?: Int | null
   typeId_gte?: Int | null
   typeId_lt?: Int | null
   typeId_lte?: Int | null
   typeId_in?: Int[] | Int | null
-  size_eq?: BigInt | null
-  size_gt?: BigInt | null
-  size_gte?: BigInt | null
-  size_lt?: BigInt | null
-  size_lte?: BigInt | null
-  size_in?: BigInt[] | BigInt | null
-  liaisonId_eq?: BigInt | null
-  liaisonId_gt?: BigInt | null
-  liaisonId_gte?: BigInt | null
-  liaisonId_lt?: BigInt | null
-  liaisonId_lte?: BigInt | null
-  liaisonId_in?: BigInt[] | BigInt | null
+  size_eq?: Int | null
+  size_gt?: Int | null
+  size_gte?: Int | null
+  size_lt?: Int | null
+  size_lte?: Int | null
+  size_in?: Int[] | Int | null
+  liaisonId_eq?: ID_Input | null
+  liaisonId_in?: ID_Output[] | ID_Output | null
   liaisonJudgement_eq?: LiaisonJudgement | null
   liaisonJudgement_in?: LiaisonJudgement[] | LiaisonJudgement | null
   ipfsContentId_eq?: String | null
@@ -913,12 +923,12 @@ export interface FeaturedVideoWhereUniqueInput {
 
 export interface LanguageCreateInput {
   iso: String
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 export interface LanguageUpdateInput {
   iso?: String | null
-  happenedIn?: Float | null
+  createdInBlock?: Float | null
 }
 
 export interface LanguageWhereInput {
@@ -951,12 +961,12 @@ export interface LanguageWhereInput {
   iso_startsWith?: String | null
   iso_endsWith?: String | null
   iso_in?: String[] | String | null
-  happenedIn_eq?: Int | null
-  happenedIn_gt?: Int | null
-  happenedIn_gte?: Int | null
-  happenedIn_lt?: Int | null
-  happenedIn_lte?: Int | null
-  happenedIn_in?: Int[] | Int | 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 LanguageWhereUniqueInput {
@@ -1028,10 +1038,9 @@ export interface MembershipCreateInput {
   about?: String | null
   controllerAccount: String
   rootAccount: String
-  registeredAtBlock: Float
-  registeredAtTime: DateTime
+  createdInBlock: Float
   entry: MembershipEntryMethod
-  subscription?: BigInt | null
+  subscription?: Float | null
 }
 
 export interface MembershipUpdateInput {
@@ -1040,10 +1049,9 @@ export interface MembershipUpdateInput {
   about?: String | null
   controllerAccount?: String | null
   rootAccount?: String | null
-  registeredAtBlock?: Float | null
-  registeredAtTime?: DateTime | null
+  createdInBlock?: Float | null
   entry?: MembershipEntryMethod | null
-  subscription?: BigInt | null
+  subscription?: Float | null
 }
 
 export interface MembershipWhereInput {
@@ -1096,25 +1104,20 @@ export interface MembershipWhereInput {
   rootAccount_startsWith?: String | null
   rootAccount_endsWith?: String | null
   rootAccount_in?: String[] | String | null
-  registeredAtBlock_eq?: Int | null
-  registeredAtBlock_gt?: Int | null
-  registeredAtBlock_gte?: Int | null
-  registeredAtBlock_lt?: Int | null
-  registeredAtBlock_lte?: Int | null
-  registeredAtBlock_in?: Int[] | Int | null
-  registeredAtTime_eq?: DateTime | null
-  registeredAtTime_lt?: DateTime | null
-  registeredAtTime_lte?: DateTime | null
-  registeredAtTime_gt?: DateTime | null
-  registeredAtTime_gte?: DateTime | 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
   entry_eq?: MembershipEntryMethod | null
   entry_in?: MembershipEntryMethod[] | MembershipEntryMethod | null
-  subscription_eq?: BigInt | null
-  subscription_gt?: BigInt | null
-  subscription_gte?: BigInt | null
-  subscription_lt?: BigInt | null
-  subscription_lte?: BigInt | null
-  subscription_in?: BigInt[] | BigInt | null
+  subscription_eq?: Int | null
+  subscription_gt?: Int | null
+  subscription_gte?: Int | null
+  subscription_lt?: Int | null
+  subscription_lte?: Int | null
+  subscription_in?: Int[] | Int | null
 }
 
 export interface MembershipWhereUniqueInput {
@@ -1122,14 +1125,62 @@ export interface MembershipWhereUniqueInput {
   handle?: String | null
 }
 
+export interface StorageProviderCreateInput {
+  type: StorageProviderType
+  metadata?: String | null
+}
+
+export interface StorageProviderUpdateInput {
+  type?: StorageProviderType | null
+  metadata?: String | null
+}
+
+export interface StorageProviderWhereInput {
+  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
+  type_eq?: StorageProviderType | null
+  type_in?: StorageProviderType[] | StorageProviderType | null
+  metadata_eq?: String | null
+  metadata_contains?: String | null
+  metadata_startsWith?: String | null
+  metadata_endsWith?: String | null
+  metadata_in?: String[] | String | null
+}
+
+export interface StorageProviderWhereUniqueInput {
+  id: ID_Output
+}
+
 export interface VideoCategoryCreateInput {
   name?: String | null
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 export interface VideoCategoryUpdateInput {
   name?: String | null
-  happenedIn?: Float | null
+  createdInBlock?: Float | null
 }
 
 export interface VideoCategoryWhereInput {
@@ -1162,12 +1213,12 @@ export interface VideoCategoryWhereInput {
   name_startsWith?: String | null
   name_endsWith?: String | null
   name_in?: String[] | String | null
-  happenedIn_eq?: Int | null
-  happenedIn_gt?: Int | null
-  happenedIn_gte?: Int | null
-  happenedIn_lt?: Int | null
-  happenedIn_lte?: Int | null
-  happenedIn_in?: Int[] | Int | 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 VideoCategoryWhereUniqueInput {
@@ -1175,7 +1226,7 @@ export interface VideoCategoryWhereUniqueInput {
 }
 
 export interface VideoCreateInput {
-  channelId: ID_Output
+  channelId?: ID_Input | null
   categoryId?: ID_Input | null
   title?: String | null
   description?: String | null
@@ -1194,7 +1245,7 @@ export interface VideoCreateInput {
   mediaUrls: Array<String>
   mediaAvailability: AssetAvailability
   mediaMetadataId?: ID_Input | null
-  happenedIn: Float
+  createdInBlock: Float
   isFeatured: Boolean
 }
 
@@ -1260,16 +1311,16 @@ export interface VideoMediaMetadataCreateInput {
   encodingId?: ID_Input | null
   pixelWidth?: Float | null
   pixelHeight?: Float | null
-  size?: BigInt | null
-  happenedIn: Float
+  size?: Float | null
+  createdInBlock: Float
 }
 
 export interface VideoMediaMetadataUpdateInput {
   encodingId?: ID_Input | null
   pixelWidth?: Float | null
   pixelHeight?: Float | null
-  size?: BigInt | null
-  happenedIn?: Float | null
+  size?: Float | null
+  createdInBlock?: Float | null
 }
 
 export interface VideoMediaMetadataWhereInput {
@@ -1311,18 +1362,18 @@ export interface VideoMediaMetadataWhereInput {
   pixelHeight_lt?: Int | null
   pixelHeight_lte?: Int | null
   pixelHeight_in?: Int[] | Int | null
-  size_eq?: BigInt | null
-  size_gt?: BigInt | null
-  size_gte?: BigInt | null
-  size_lt?: BigInt | null
-  size_lte?: BigInt | null
-  size_in?: BigInt[] | BigInt | null
-  happenedIn_eq?: Int | null
-  happenedIn_gt?: Int | null
-  happenedIn_gte?: Int | null
-  happenedIn_lt?: Int | null
-  happenedIn_lte?: Int | null
-  happenedIn_in?: Int[] | Int | null
+  size_eq?: Int | null
+  size_gt?: Int | null
+  size_gte?: Int | null
+  size_lt?: Int | null
+  size_lte?: Int | null
+  size_in?: Int[] | Int | 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 VideoMediaMetadataWhereUniqueInput {
@@ -1349,7 +1400,7 @@ export interface VideoUpdateInput {
   mediaUrls?: String[] | String | null
   mediaAvailability?: AssetAvailability | null
   mediaMetadataId?: ID_Input | null
-  happenedIn?: Float | null
+  createdInBlock?: Float | null
   isFeatured?: Boolean | null
 }
 
@@ -1425,12 +1476,12 @@ export interface VideoWhereInput {
   mediaAvailability_in?: AssetAvailability[] | AssetAvailability | null
   mediaMetadataId_eq?: ID_Input | null
   mediaMetadataId_in?: ID_Output[] | ID_Output | null
-  happenedIn_eq?: Int | null
-  happenedIn_gt?: Int | null
-  happenedIn_gte?: Int | null
-  happenedIn_lt?: Int | null
-  happenedIn_lte?: Int | null
-  happenedIn_in?: Int[] | Int | 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
   isFeatured_eq?: Boolean | null
   isFeatured_in?: Boolean[] | Boolean | null
 }
@@ -1507,7 +1558,7 @@ export interface Channel extends BaseGraphQLObject {
   language?: Language | null
   languageId?: String | null
   videos: Array<Video>
-  happenedIn: Int
+  createdInBlock: Int
 }
 
 export interface ChannelCategoriesByNameFTSOutput {
@@ -1532,7 +1583,7 @@ export interface ChannelCategory extends BaseGraphQLObject {
   version: Int
   name?: String | null
   channels: Array<Channel>
-  happenedIn: Int
+  createdInBlock: Int
 }
 
 export interface ChannelCategoryConnection {
@@ -1566,7 +1617,7 @@ export interface CuratorGroup extends BaseGraphQLObject {
   deletedAt?: DateTime | null
   deletedById?: String | null
   version: Int
-  curatorIds: Array<BigInt>
+  curatorIds: Array<Int>
   isActive: Boolean
   channels: Array<Channel>
 }
@@ -1596,10 +1647,11 @@ export interface DataObject extends BaseGraphQLObject {
   deletedById?: String | null
   version: Int
   owner: DataObjectOwner
-  addedAt: Int
+  createdInBlock: Int
   typeId: Int
-  size: BigInt
-  liaisonId: BigInt
+  size: Int
+  liaison?: StorageProvider | null
+  liaisonId?: String | null
   liaisonJudgement: LiaisonJudgement
   ipfsContentId: String
   joystreamContentId: String
@@ -1621,7 +1673,7 @@ export interface DataObjectEdge {
 }
 
 export interface DataObjectOwnerChannel {
-  channel: BigInt
+  channel: Int
   dummy?: Int | null
 }
 
@@ -1630,16 +1682,16 @@ export interface DataObjectOwnerCouncil {
 }
 
 export interface DataObjectOwnerDao {
-  dao: BigInt
+  dao: Int
 }
 
 export interface DataObjectOwnerMember {
-  member: BigInt
+  member: Int
   dummy?: Int | null
 }
 
 export interface DataObjectOwnerWorkingGroup {
-  dummy?: Int | null
+  workingGroup: Int
 }
 
 export interface FeaturedVideo extends BaseGraphQLObject {
@@ -1676,7 +1728,7 @@ export interface Language extends BaseGraphQLObject {
   deletedById?: String | null
   version: Int
   iso: String
-  happenedIn: Int
+  createdInBlock: Int
   channellanguage?: Array<Channel> | null
   videolanguage?: Array<Video> | null
 }
@@ -1743,10 +1795,9 @@ export interface Membership extends BaseGraphQLObject {
   about?: String | null
   controllerAccount: String
   rootAccount: String
-  registeredAtBlock: Int
-  registeredAtTime: DateTime
+  createdInBlock: Int
   entry: MembershipEntryMethod
-  subscription?: BigInt | null
+  subscription?: Int | null
   channels: Array<Channel>
 }
 
@@ -1786,6 +1837,31 @@ export interface StandardDeleteResponse {
   id: ID_Output
 }
 
+export interface StorageProvider extends BaseGraphQLObject {
+  id: ID_Output
+  createdAt: DateTime
+  createdById: String
+  updatedAt?: DateTime | null
+  updatedById?: String | null
+  deletedAt?: DateTime | null
+  deletedById?: String | null
+  version: Int
+  type: StorageProviderType
+  metadata?: String | null
+  dataObjects: Array<DataObject>
+}
+
+export interface StorageProviderConnection {
+  totalCount: Int
+  edges: Array<StorageProviderEdge>
+  pageInfo: PageInfo
+}
+
+export interface StorageProviderEdge {
+  node: StorageProvider
+  cursor: String
+}
+
 export interface Video extends BaseGraphQLObject {
   id: ID_Output
   createdAt: DateTime
@@ -1795,8 +1871,8 @@ export interface Video extends BaseGraphQLObject {
   deletedAt?: DateTime | null
   deletedById?: String | null
   version: Int
-  channel: Channel
-  channelId: String
+  channel?: Channel | null
+  channelId?: String | null
   category?: VideoCategory | null
   categoryId?: String | null
   title?: String | null
@@ -1821,7 +1897,7 @@ export interface Video extends BaseGraphQLObject {
   mediaAvailability: AssetAvailability
   mediaMetadata?: VideoMediaMetadata | null
   mediaMetadataId?: String | null
-  happenedIn: Int
+  createdInBlock: Int
   isFeatured: Boolean
   featured?: FeaturedVideo | null
 }
@@ -1844,7 +1920,7 @@ export interface VideoCategory extends BaseGraphQLObject {
   version: Int
   name?: String | null
   videos: Array<Video>
-  happenedIn: Int
+  createdInBlock: Int
 }
 
 export interface VideoCategoryConnection {
@@ -1908,9 +1984,9 @@ export interface VideoMediaMetadata extends BaseGraphQLObject {
   encodingId?: String | null
   pixelWidth?: Int | null
   pixelHeight?: Int | null
-  size?: BigInt | null
+  size?: Int | null
   video?: Video | null
-  happenedIn: Int
+  createdInBlock: Int
 }
 
 export interface VideoMediaMetadataConnection {
@@ -1924,11 +2000,6 @@ export interface VideoMediaMetadataEdge {
   cursor: String
 }
 
-/*
-GraphQL representation of BigInt
-*/
-export type BigInt = string
-
 /*
 The `Boolean` scalar type represents `true` or `false`.
 */

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


+ 260 - 185
query-node/generated/graphql-server/generated/schema.graphql

@@ -61,9 +61,6 @@ input BaseWhereInput {
   deletedById_eq: String
 }
 
-"""GraphQL representation of BigInt"""
-scalar BigInt
-
 type Channel implements BaseGraphQLObject {
   id: ID!
   createdAt: DateTime!
@@ -113,7 +110,7 @@ type Channel implements BaseGraphQLObject {
   language: Language
   languageId: String
   videos: [Video!]!
-  happenedIn: Int!
+  createdInBlock: Int!
 }
 
 type ChannelCategoriesByNameFTSOutput {
@@ -139,7 +136,7 @@ type ChannelCategory implements BaseGraphQLObject {
   """The name of the category"""
   name: String
   channels: [Channel!]!
-  happenedIn: Int!
+  createdInBlock: Int!
 }
 
 type ChannelCategoryConnection {
@@ -150,7 +147,7 @@ type ChannelCategoryConnection {
 
 input ChannelCategoryCreateInput {
   name: String
-  happenedIn: Float!
+  createdInBlock: Float!
 }
 
 type ChannelCategoryEdge {
@@ -167,13 +164,13 @@ enum ChannelCategoryOrderByInput {
   deletedAt_DESC
   name_ASC
   name_DESC
-  happenedIn_ASC
-  happenedIn_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
 }
 
 input ChannelCategoryUpdateInput {
   name: String
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 input ChannelCategoryWhereInput {
@@ -206,12 +203,12 @@ input ChannelCategoryWhereInput {
   name_startsWith: String
   name_endsWith: String
   name_in: [String!]
-  happenedIn_eq: Int
-  happenedIn_gt: Int
-  happenedIn_gte: Int
-  happenedIn_lt: Int
-  happenedIn_lte: Int
-  happenedIn_in: [Int!]
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
 }
 
 input ChannelCategoryWhereUniqueInput {
@@ -240,7 +237,7 @@ input ChannelCreateInput {
   isPublic: Boolean
   isCensored: Boolean!
   languageId: ID
-  happenedIn: Float!
+  createdInBlock: Float!
 }
 
 type ChannelEdge {
@@ -281,8 +278,8 @@ enum ChannelOrderByInput {
   isCensored_DESC
   languageId_ASC
   languageId_DESC
-  happenedIn_ASC
-  happenedIn_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
 }
 
 input ChannelUpdateInput {
@@ -301,7 +298,7 @@ input ChannelUpdateInput {
   isPublic: Boolean
   isCensored: Boolean
   languageId: ID
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 input ChannelWhereInput {
@@ -364,12 +361,12 @@ input ChannelWhereInput {
   isCensored_in: [Boolean!]
   languageId_eq: ID
   languageId_in: [ID!]
-  happenedIn_eq: Int
-  happenedIn_gt: Int
-  happenedIn_gte: Int
-  happenedIn_lt: Int
-  happenedIn_lte: Int
-  happenedIn_in: [Int!]
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
 }
 
 input ChannelWhereUniqueInput {
@@ -387,7 +384,7 @@ type CuratorGroup implements BaseGraphQLObject {
   version: Int!
 
   """Curators belonging to this group"""
-  curatorIds: [BigInt!]!
+  curatorIds: [Int!]!
 
   """Is group active or not"""
   isActive: Boolean!
@@ -401,7 +398,7 @@ type CuratorGroupConnection {
 }
 
 input CuratorGroupCreateInput {
-  curatorIds: [BigInt!]!
+  curatorIds: [Int!]!
   isActive: Boolean!
 }
 
@@ -422,7 +419,7 @@ enum CuratorGroupOrderByInput {
 }
 
 input CuratorGroupUpdateInput {
-  curatorIds: [BigInt!]
+  curatorIds: [Int!]
   isActive: Boolean
 }
 
@@ -474,16 +471,15 @@ type DataObject implements BaseGraphQLObject {
   owner: DataObjectOwner!
 
   """Content added at"""
-  addedAt: Int!
+  createdInBlock: Int!
 
   """Content type id"""
   typeId: Int!
 
   """Content size in bytes"""
-  size: BigInt!
-
-  """Storage provider id of the liaison"""
-  liaisonId: BigInt!
+  size: Int!
+  liaison: StorageProvider
+  liaisonId: String
 
   """Storage provider as liaison judgment"""
   liaisonJudgement: LiaisonJudgement!
@@ -507,10 +503,10 @@ type DataObjectConnection {
 
 input DataObjectCreateInput {
   owner: JSONObject!
-  addedAt: Float!
+  createdInBlock: Float!
   typeId: Float!
-  size: BigInt!
-  liaisonId: BigInt!
+  size: Float!
+  liaisonId: ID
   liaisonJudgement: LiaisonJudgement!
   ipfsContentId: String!
   joystreamContentId: String!
@@ -528,8 +524,8 @@ enum DataObjectOrderByInput {
   updatedAt_DESC
   deletedAt_ASC
   deletedAt_DESC
-  addedAt_ASC
-  addedAt_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
   typeId_ASC
   typeId_DESC
   size_ASC
@@ -548,19 +544,19 @@ union DataObjectOwner = DataObjectOwnerMember | DataObjectOwnerChannel | DataObj
 
 type DataObjectOwnerChannel {
   """Channel identifier"""
-  channel: BigInt!
+  channel: Int!
 
   """Variant needs to have at least one property. This value is not used."""
   dummy: Int
 }
 
 input DataObjectOwnerChannelCreateInput {
-  channel: BigInt!
+  channel: Float!
   dummy: Float
 }
 
 input DataObjectOwnerChannelUpdateInput {
-  channel: BigInt
+  channel: Float
   dummy: Float
 }
 
@@ -589,12 +585,12 @@ input DataObjectOwnerChannelWhereInput {
   deletedAt_gte: DateTime
   deletedById_eq: ID
   deletedById_in: [ID!]
-  channel_eq: BigInt
-  channel_gt: BigInt
-  channel_gte: BigInt
-  channel_lt: BigInt
-  channel_lte: BigInt
-  channel_in: [BigInt!]
+  channel_eq: Int
+  channel_gt: Int
+  channel_gte: Int
+  channel_lt: Int
+  channel_lte: Int
+  channel_in: [Int!]
   dummy_eq: Int
   dummy_gt: Int
   dummy_gte: Int
@@ -659,15 +655,15 @@ input DataObjectOwnerCouncilWhereUniqueInput {
 
 type DataObjectOwnerDao {
   """DAO identifier"""
-  dao: BigInt!
+  dao: Int!
 }
 
 input DataObjectOwnerDaoCreateInput {
-  dao: BigInt!
+  dao: Float!
 }
 
 input DataObjectOwnerDaoUpdateInput {
-  dao: BigInt
+  dao: Float
 }
 
 input DataObjectOwnerDaoWhereInput {
@@ -695,12 +691,12 @@ input DataObjectOwnerDaoWhereInput {
   deletedAt_gte: DateTime
   deletedById_eq: ID
   deletedById_in: [ID!]
-  dao_eq: BigInt
-  dao_gt: BigInt
-  dao_gte: BigInt
-  dao_lt: BigInt
-  dao_lte: BigInt
-  dao_in: [BigInt!]
+  dao_eq: Int
+  dao_gt: Int
+  dao_gte: Int
+  dao_lt: Int
+  dao_lte: Int
+  dao_in: [Int!]
 }
 
 input DataObjectOwnerDaoWhereUniqueInput {
@@ -709,19 +705,19 @@ input DataObjectOwnerDaoWhereUniqueInput {
 
 type DataObjectOwnerMember {
   """Member identifier"""
-  member: BigInt!
+  member: Int!
 
   """Variant needs to have at least one property. This value is not used."""
   dummy: Int
 }
 
 input DataObjectOwnerMemberCreateInput {
-  member: BigInt!
+  member: Float!
   dummy: Float
 }
 
 input DataObjectOwnerMemberUpdateInput {
-  member: BigInt
+  member: Float
   dummy: Float
 }
 
@@ -750,12 +746,12 @@ input DataObjectOwnerMemberWhereInput {
   deletedAt_gte: DateTime
   deletedById_eq: ID
   deletedById_in: [ID!]
-  member_eq: BigInt
-  member_gt: BigInt
-  member_gte: BigInt
-  member_lt: BigInt
-  member_lte: BigInt
-  member_in: [BigInt!]
+  member_eq: Int
+  member_gt: Int
+  member_gte: Int
+  member_lt: Int
+  member_lte: Int
+  member_in: [Int!]
   dummy_eq: Int
   dummy_gt: Int
   dummy_gte: Int
@@ -769,16 +765,16 @@ input DataObjectOwnerMemberWhereUniqueInput {
 }
 
 type DataObjectOwnerWorkingGroup {
-  """Variant needs to have at least one property. This value is not used."""
-  dummy: Int
+  """Working group identifier"""
+  workingGroup: Int!
 }
 
 input DataObjectOwnerWorkingGroupCreateInput {
-  dummy: Float
+  workingGroup: Float!
 }
 
 input DataObjectOwnerWorkingGroupUpdateInput {
-  dummy: Float
+  workingGroup: Float
 }
 
 input DataObjectOwnerWorkingGroupWhereInput {
@@ -806,12 +802,12 @@ input DataObjectOwnerWorkingGroupWhereInput {
   deletedAt_gte: DateTime
   deletedById_eq: ID
   deletedById_in: [ID!]
-  dummy_eq: Int
-  dummy_gt: Int
-  dummy_gte: Int
-  dummy_lt: Int
-  dummy_lte: Int
-  dummy_in: [Int!]
+  workingGroup_eq: Int
+  workingGroup_gt: Int
+  workingGroup_gte: Int
+  workingGroup_lt: Int
+  workingGroup_lte: Int
+  workingGroup_in: [Int!]
 }
 
 input DataObjectOwnerWorkingGroupWhereUniqueInput {
@@ -820,10 +816,10 @@ input DataObjectOwnerWorkingGroupWhereUniqueInput {
 
 input DataObjectUpdateInput {
   owner: JSONObject
-  addedAt: Float
+  createdInBlock: Float
   typeId: Float
-  size: BigInt
-  liaisonId: BigInt
+  size: Float
+  liaisonId: ID
   liaisonJudgement: LiaisonJudgement
   ipfsContentId: String
   joystreamContentId: String
@@ -855,30 +851,26 @@ input DataObjectWhereInput {
   deletedById_eq: ID
   deletedById_in: [ID!]
   owner_json: JSONObject
-  addedAt_eq: Int
-  addedAt_gt: Int
-  addedAt_gte: Int
-  addedAt_lt: Int
-  addedAt_lte: Int
-  addedAt_in: [Int!]
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
   typeId_eq: Int
   typeId_gt: Int
   typeId_gte: Int
   typeId_lt: Int
   typeId_lte: Int
   typeId_in: [Int!]
-  size_eq: BigInt
-  size_gt: BigInt
-  size_gte: BigInt
-  size_lt: BigInt
-  size_lte: BigInt
-  size_in: [BigInt!]
-  liaisonId_eq: BigInt
-  liaisonId_gt: BigInt
-  liaisonId_gte: BigInt
-  liaisonId_lt: BigInt
-  liaisonId_lte: BigInt
-  liaisonId_in: [BigInt!]
+  size_eq: Int
+  size_gt: Int
+  size_gte: Int
+  size_lt: Int
+  size_lte: Int
+  size_in: [Int!]
+  liaisonId_eq: ID
+  liaisonId_in: [ID!]
   liaisonJudgement_eq: LiaisonJudgement
   liaisonJudgement_in: [LiaisonJudgement!]
   ipfsContentId_eq: String
@@ -999,7 +991,7 @@ type Language implements BaseGraphQLObject {
 
   """Language identifier ISO 639-1"""
   iso: String!
-  happenedIn: Int!
+  createdInBlock: Int!
   channellanguage: [Channel!]
   videolanguage: [Video!]
 }
@@ -1012,7 +1004,7 @@ type LanguageConnection {
 
 input LanguageCreateInput {
   iso: String!
-  happenedIn: Float!
+  createdInBlock: Float!
 }
 
 type LanguageEdge {
@@ -1029,13 +1021,13 @@ enum LanguageOrderByInput {
   deletedAt_DESC
   iso_ASC
   iso_DESC
-  happenedIn_ASC
-  happenedIn_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
 }
 
 input LanguageUpdateInput {
   iso: String
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 input LanguageWhereInput {
@@ -1068,12 +1060,12 @@ input LanguageWhereInput {
   iso_startsWith: String
   iso_endsWith: String
   iso_in: [String!]
-  happenedIn_eq: Int
-  happenedIn_gt: Int
-  happenedIn_gte: Int
-  happenedIn_lt: Int
-  happenedIn_lte: Int
-  happenedIn_in: [Int!]
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
 }
 
 input LanguageWhereUniqueInput {
@@ -1083,7 +1075,6 @@ input LanguageWhereUniqueInput {
 enum LiaisonJudgement {
   PENDING
   ACCEPTED
-  REJECTED
 }
 
 type License implements BaseGraphQLObject {
@@ -1228,16 +1219,13 @@ type Membership implements BaseGraphQLObject {
   rootAccount: String!
 
   """Blocknumber when member was registered"""
-  registeredAtBlock: Int!
-
-  """Timestamp when member was registered"""
-  registeredAtTime: DateTime!
+  createdInBlock: Int!
 
   """How the member was registered"""
   entry: MembershipEntryMethod!
 
   """The type of subscription the member has purchased if any."""
-  subscription: BigInt
+  subscription: Int
   channels: [Channel!]!
 }
 
@@ -1253,10 +1241,9 @@ input MembershipCreateInput {
   about: String
   controllerAccount: String!
   rootAccount: String!
-  registeredAtBlock: Float!
-  registeredAtTime: DateTime!
+  createdInBlock: Float!
   entry: MembershipEntryMethod!
-  subscription: BigInt
+  subscription: Float
 }
 
 type MembershipEdge {
@@ -1287,10 +1274,8 @@ enum MembershipOrderByInput {
   controllerAccount_DESC
   rootAccount_ASC
   rootAccount_DESC
-  registeredAtBlock_ASC
-  registeredAtBlock_DESC
-  registeredAtTime_ASC
-  registeredAtTime_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
   entry_ASC
   entry_DESC
   subscription_ASC
@@ -1303,10 +1288,9 @@ input MembershipUpdateInput {
   about: String
   controllerAccount: String
   rootAccount: String
-  registeredAtBlock: Float
-  registeredAtTime: DateTime
+  createdInBlock: Float
   entry: MembershipEntryMethod
-  subscription: BigInt
+  subscription: Float
 }
 
 input MembershipWhereInput {
@@ -1359,25 +1343,20 @@ input MembershipWhereInput {
   rootAccount_startsWith: String
   rootAccount_endsWith: String
   rootAccount_in: [String!]
-  registeredAtBlock_eq: Int
-  registeredAtBlock_gt: Int
-  registeredAtBlock_gte: Int
-  registeredAtBlock_lt: Int
-  registeredAtBlock_lte: Int
-  registeredAtBlock_in: [Int!]
-  registeredAtTime_eq: DateTime
-  registeredAtTime_lt: DateTime
-  registeredAtTime_lte: DateTime
-  registeredAtTime_gt: DateTime
-  registeredAtTime_gte: DateTime
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
   entry_eq: MembershipEntryMethod
   entry_in: [MembershipEntryMethod!]
-  subscription_eq: BigInt
-  subscription_gt: BigInt
-  subscription_gte: BigInt
-  subscription_lt: BigInt
-  subscription_lte: BigInt
-  subscription_in: [BigInt!]
+  subscription_eq: Int
+  subscription_gt: Int
+  subscription_gte: Int
+  subscription_lt: Int
+  subscription_lte: Int
+  subscription_in: [Int!]
 }
 
 input MembershipWhereUniqueInput {
@@ -1428,6 +1407,9 @@ type Query {
   membersByHandle(whereMembership: MembershipWhereInput, skip: Int = 0, limit: Int = 5, text: String!): [MembersByHandleFTSOutput!]!
   search(whereVideo: VideoWhereInput, whereChannel: ChannelWhereInput, skip: Int = 0, limit: Int = 5, text: String!): [SearchFTSOutput!]!
   videoCategoriesByName(whereVideoCategory: VideoCategoryWhereInput, skip: Int = 0, limit: Int = 5, text: String!): [VideoCategoriesByNameFTSOutput!]!
+  storageProviders(offset: Int, limit: Int = 50, where: StorageProviderWhereInput, orderBy: StorageProviderOrderByInput): [StorageProvider!]!
+  storageProviderByUniqueInput(where: StorageProviderWhereUniqueInput!): StorageProvider
+  storageProvidersConnection(first: Int, after: String, last: Int, before: String, where: StorageProviderWhereInput, orderBy: StorageProviderOrderByInput): StorageProviderConnection!
   videoCategories(offset: Int, limit: Int = 50, where: VideoCategoryWhereInput, orderBy: VideoCategoryOrderByInput): [VideoCategory!]!
   videoCategoryByUniqueInput(where: VideoCategoryWhereUniqueInput!): VideoCategory
   videoCategoriesConnection(first: Int, after: String, last: Int, before: String, where: VideoCategoryWhereInput, orderBy: VideoCategoryOrderByInput): VideoCategoryConnection!
@@ -1455,6 +1437,99 @@ type StandardDeleteResponse {
   id: ID!
 }
 
+type StorageProvider implements BaseGraphQLObject {
+  id: ID!
+  createdAt: DateTime!
+  createdById: String!
+  updatedAt: DateTime
+  updatedById: String
+  deletedAt: DateTime
+  deletedById: String
+  version: Int!
+  type: StorageProviderType!
+
+  """Custom metadata set by provider"""
+  metadata: String
+  dataObjects: [DataObject!]!
+}
+
+type StorageProviderConnection {
+  totalCount: Int!
+  edges: [StorageProviderEdge!]!
+  pageInfo: PageInfo!
+}
+
+input StorageProviderCreateInput {
+  type: StorageProviderType!
+  metadata: String
+}
+
+type StorageProviderEdge {
+  node: StorageProvider!
+  cursor: String!
+}
+
+enum StorageProviderOrderByInput {
+  createdAt_ASC
+  createdAt_DESC
+  updatedAt_ASC
+  updatedAt_DESC
+  deletedAt_ASC
+  deletedAt_DESC
+  type_ASC
+  type_DESC
+  metadata_ASC
+  metadata_DESC
+}
+
+enum StorageProviderType {
+  GATEWAY
+  STORAGE
+}
+
+input StorageProviderUpdateInput {
+  type: StorageProviderType
+  metadata: String
+}
+
+input StorageProviderWhereInput {
+  id_eq: ID
+  id_in: [ID!]
+  createdAt_eq: DateTime
+  createdAt_lt: DateTime
+  createdAt_lte: DateTime
+  createdAt_gt: DateTime
+  createdAt_gte: DateTime
+  createdById_eq: ID
+  createdById_in: [ID!]
+  updatedAt_eq: DateTime
+  updatedAt_lt: DateTime
+  updatedAt_lte: DateTime
+  updatedAt_gt: DateTime
+  updatedAt_gte: DateTime
+  updatedById_eq: ID
+  updatedById_in: [ID!]
+  deletedAt_all: Boolean
+  deletedAt_eq: DateTime
+  deletedAt_lt: DateTime
+  deletedAt_lte: DateTime
+  deletedAt_gt: DateTime
+  deletedAt_gte: DateTime
+  deletedById_eq: ID
+  deletedById_in: [ID!]
+  type_eq: StorageProviderType
+  type_in: [StorageProviderType!]
+  metadata_eq: String
+  metadata_contains: String
+  metadata_startsWith: String
+  metadata_endsWith: String
+  metadata_in: [String!]
+}
+
+input StorageProviderWhereUniqueInput {
+  id: ID!
+}
+
 type Subscription {
   stateSubscription: ProcessorState!
 }
@@ -1468,8 +1543,8 @@ type Video implements BaseGraphQLObject {
   deletedAt: DateTime
   deletedById: String
   version: Int!
-  channel: Channel!
-  channelId: String!
+  channel: Channel
+  channelId: String
   category: VideoCategory
   categoryId: String
 
@@ -1520,7 +1595,7 @@ type Video implements BaseGraphQLObject {
   mediaAvailability: AssetAvailability!
   mediaMetadata: VideoMediaMetadata
   mediaMetadataId: String
-  happenedIn: Int!
+  createdInBlock: Int!
 
   """Is video featured or not"""
   isFeatured: Boolean!
@@ -1549,7 +1624,7 @@ type VideoCategory implements BaseGraphQLObject {
   """The name of the category"""
   name: String
   videos: [Video!]!
-  happenedIn: Int!
+  createdInBlock: Int!
 }
 
 type VideoCategoryConnection {
@@ -1560,7 +1635,7 @@ type VideoCategoryConnection {
 
 input VideoCategoryCreateInput {
   name: String
-  happenedIn: Float!
+  createdInBlock: Float!
 }
 
 type VideoCategoryEdge {
@@ -1577,13 +1652,13 @@ enum VideoCategoryOrderByInput {
   deletedAt_DESC
   name_ASC
   name_DESC
-  happenedIn_ASC
-  happenedIn_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
 }
 
 input VideoCategoryUpdateInput {
   name: String
-  happenedIn: Float
+  createdInBlock: Float
 }
 
 input VideoCategoryWhereInput {
@@ -1616,12 +1691,12 @@ input VideoCategoryWhereInput {
   name_startsWith: String
   name_endsWith: String
   name_in: [String!]
-  happenedIn_eq: Int
-  happenedIn_gt: Int
-  happenedIn_gte: Int
-  happenedIn_lt: Int
-  happenedIn_lte: Int
-  happenedIn_in: [Int!]
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
 }
 
 input VideoCategoryWhereUniqueInput {
@@ -1635,7 +1710,7 @@ type VideoConnection {
 }
 
 input VideoCreateInput {
-  channelId: ID!
+  channelId: ID
   categoryId: ID
   title: String
   description: String
@@ -1654,7 +1729,7 @@ input VideoCreateInput {
   mediaUrls: [String!]!
   mediaAvailability: AssetAvailability!
   mediaMetadataId: ID
-  happenedIn: Float!
+  createdInBlock: Float!
   isFeatured: Boolean!
 }
 
@@ -1787,9 +1862,9 @@ type VideoMediaMetadata implements BaseGraphQLObject {
   pixelHeight: Int
 
   """Video media size in bytes"""
-  size: BigInt
+  size: Int
   video: Video
-  happenedIn: Int!
+  createdInBlock: Int!
 }
 
 type VideoMediaMetadataConnection {
@@ -1802,8 +1877,8 @@ input VideoMediaMetadataCreateInput {
   encodingId: ID
   pixelWidth: Float
   pixelHeight: Float
-  size: BigInt
-  happenedIn: Float!
+  size: Float
+  createdInBlock: Float!
 }
 
 type VideoMediaMetadataEdge {
@@ -1826,16 +1901,16 @@ enum VideoMediaMetadataOrderByInput {
   pixelHeight_DESC
   size_ASC
   size_DESC
-  happenedIn_ASC
-  happenedIn_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
 }
 
 input VideoMediaMetadataUpdateInput {
   encodingId: ID
   pixelWidth: Float
   pixelHeight: Float
-  size: BigInt
-  happenedIn: Float
+  size: Float
+  createdInBlock: Float
 }
 
 input VideoMediaMetadataWhereInput {
@@ -1877,18 +1952,18 @@ input VideoMediaMetadataWhereInput {
   pixelHeight_lt: Int
   pixelHeight_lte: Int
   pixelHeight_in: [Int!]
-  size_eq: BigInt
-  size_gt: BigInt
-  size_gte: BigInt
-  size_lt: BigInt
-  size_lte: BigInt
-  size_in: [BigInt!]
-  happenedIn_eq: Int
-  happenedIn_gt: Int
-  happenedIn_gte: Int
-  happenedIn_lt: Int
-  happenedIn_lte: Int
-  happenedIn_in: [Int!]
+  size_eq: Int
+  size_gt: Int
+  size_gte: Int
+  size_lt: Int
+  size_lte: Int
+  size_in: [Int!]
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
 }
 
 input VideoMediaMetadataWhereUniqueInput {
@@ -1936,8 +2011,8 @@ enum VideoOrderByInput {
   mediaAvailability_DESC
   mediaMetadataId_ASC
   mediaMetadataId_DESC
-  happenedIn_ASC
-  happenedIn_DESC
+  createdInBlock_ASC
+  createdInBlock_DESC
   isFeatured_ASC
   isFeatured_DESC
 }
@@ -1962,7 +2037,7 @@ input VideoUpdateInput {
   mediaUrls: [String!]
   mediaAvailability: AssetAvailability
   mediaMetadataId: ID
-  happenedIn: Float
+  createdInBlock: Float
   isFeatured: Boolean
 }
 
@@ -2038,12 +2113,12 @@ input VideoWhereInput {
   mediaAvailability_in: [AssetAvailability!]
   mediaMetadataId_eq: ID
   mediaMetadataId_in: [ID!]
-  happenedIn_eq: Int
-  happenedIn_gt: Int
-  happenedIn_gte: Int
-  happenedIn_lt: Int
-  happenedIn_lte: Int
-  happenedIn_in: [Int!]
+  createdInBlock_eq: Int
+  createdInBlock_gt: Int
+  createdInBlock_gte: Int
+  createdInBlock_lt: Int
+  createdInBlock_lte: Int
+  createdInBlock_in: [Int!]
   isFeatured_eq: Boolean
   isFeatured_in: [Boolean!]
 }

+ 5 - 4
query-node/generated/graphql-server/src/modules/data-object/data-object.model.ts

@@ -1,4 +1,4 @@
-import { BaseModel, IntField, Model, OneToMany, EnumField, StringField } from 'warthog';
+import { BaseModel, IntField, Model, ManyToOne, OneToMany, EnumField, StringField } from 'warthog';
 
 import { Column } from 'typeorm';
 import { Field } from 'type-graphql';
@@ -6,6 +6,7 @@ import { WarthogField } from 'warthog';
 
 import { DataObjectOwner } from '../variants/variants.model';
 
+import { StorageProvider } from '../storage-provider/storage-provider.model';
 import { Channel } from '../channel/channel.model';
 import { Video } from '../video/video.model';
 
@@ -36,11 +37,11 @@ export class DataObject extends BaseModel {
   })
   size!: number;
 
-  @IntField({
+  @ManyToOne(() => StorageProvider, (param: StorageProvider) => param.dataObjects, {
+    skipGraphQLField: true,
     nullable: true,
-    description: `Storage provider id of the liaison`,
   })
-  liaisonId?: number;
+  liaison?: StorageProvider;
 
   @EnumField('LiaisonJudgement', LiaisonJudgement, {
     description: `Storage provider as liaison judgment`,

+ 12 - 0
query-node/generated/graphql-server/src/modules/data-object/data-object.resolver.ts

@@ -30,6 +30,7 @@ import {
 import { DataObject } from './data-object.model';
 import { DataObjectService } from './data-object.service';
 
+import { StorageProvider } from '../storage-provider/storage-provider.model';
 import { Channel } from '../channel/channel.model';
 import { Video } from '../video/video.model';
 import { getConnection } from 'typeorm';
@@ -130,6 +131,17 @@ export class DataObjectResolver {
     return result as Promise<DataObjectConnection>;
   }
 
+  @FieldResolver(() => StorageProvider)
+  async liaison(@Root() r: DataObject): Promise<StorageProvider | null> {
+    const result = await getConnection()
+      .getRepository(DataObject)
+      .findOne(r.id, { relations: ['liaison'] });
+    if (result && result.liaison !== undefined) {
+      return result.liaison;
+    }
+    return null;
+  }
+
   @FieldResolver(() => Channel)
   async channelcoverPhotoDataObject(@Root() r: DataObject): Promise<Channel[] | null> {
     const result = await getConnection()

+ 6 - 1
query-node/generated/graphql-server/src/modules/storage-provider/storage-provider.model.ts

@@ -1,4 +1,6 @@
-import { BaseModel, Model, EnumField, StringField } from 'warthog';
+import { BaseModel, Model, OneToMany, EnumField, StringField } from 'warthog';
+
+import { DataObject } from '../data-object/data-object.model';
 
 import { StorageProviderType } from '../enums/enums';
 export { StorageProviderType };
@@ -14,6 +16,9 @@ export class StorageProvider extends BaseModel {
   })
   metadata?: string;
 
+  @OneToMany(() => DataObject, (param: DataObject) => param.liaison)
+  dataObjects?: DataObject[];
+
   constructor(init?: Partial<StorageProvider>) {
     super();
     Object.assign(this, init);

+ 14 - 0
query-node/generated/graphql-server/src/modules/storage-provider/storage-provider.resolver.ts

@@ -30,6 +30,9 @@ import {
 import { StorageProvider } from './storage-provider.model';
 import { StorageProviderService } from './storage-provider.service';
 
+import { DataObject } from '../data-object/data-object.model';
+import { getConnection } from 'typeorm';
+
 @ObjectType()
 export class StorageProviderEdge {
   @Field(() => StorageProvider, { nullable: false })
@@ -125,4 +128,15 @@ export class StorageProviderResolver {
 
     return result as Promise<StorageProviderConnection>;
   }
+
+  @FieldResolver(() => DataObject)
+  async dataObjects(@Root() r: StorageProvider): Promise<DataObject[] | null> {
+    const result = await getConnection()
+      .getRepository(StorageProvider)
+      .findOne(r.id, { relations: ['dataObjects'] });
+    if (result && result.dataObjects !== undefined) {
+      return result.dataObjects;
+    }
+    return null;
+  }
 }

+ 1 - 0
query-node/mappings/src/index.ts

@@ -1,3 +1,4 @@
 export * from './content'
 export * from './membership'
 export * from './storage'
+export * from './workingGroup'

+ 10 - 1
query-node/mappings/src/storage.ts

@@ -34,6 +34,7 @@ import {
   DataObjectOwnerCouncil,
   DataObjectOwnerWorkingGroup,
   LiaisonJudgement,
+  StorageProvider,
 } from 'query-node'
 
 export async function dataDirectory_ContentAdded(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
@@ -87,8 +88,16 @@ export async function dataDirectory_ContentAccepted(db: DatabaseManager, event:
     return inconsistentState('Non-existing content acceptation requested', encodedContentId)
   }
 
+  // load storage provider
+  const storageProvider = await db.get(StorageProvider, { where: { id: storageProviderId.toString() } as FindConditions<StorageProvider>})
+
+  // ensure object exists
+  if (!storageProvider) {
+    return inconsistentState('Non-existing content acceptation requested', storageProviderId)
+  }
+
   // update object
-  dataObject.liaisonId = storageProviderId.toNumber()
+  dataObject.liaison = storageProvider
   dataObject.liaisonJudgement = LiaisonJudgement.ACCEPTED
 
   // set last update time

+ 8 - 7
query-node/mappings/src/workingGroup.ts

@@ -1,6 +1,7 @@
 import { SubstrateEvent } from '@dzlzv/hydra-common'
 import { DatabaseManager } from '@dzlzv/hydra-db-utils'
 import { FindConditions } from 'typeorm'
+import { Bytes } from '@polkadot/types'
 
 import {
   inconsistentState,
@@ -37,7 +38,7 @@ export async function storageWorkingGroup_WorkerStorageUpdated(db: DatabaseManag
   const {workerId: storageProviderId, bytes: newMetadata} = new StorageWorkingGroup.WorkerStorageUpdatedEvent(event).data
 
   // call generic processing
-  await workingGroup_WorkerStorageUpdated(db, storageProviderId, newMetadata.toString())
+  await workingGroup_WorkerStorageUpdated(db, storageProviderId, newMetadata)
 }
 
 export async function storageWorkingGroup_TerminatedWorker(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
@@ -71,7 +72,7 @@ export async function gatewayWorkingGroup_WorkerStorageUpdated(db: DatabaseManag
   const {workerId: storageProviderId, bytes: newMetadata} = new GatewayWorkingGroup.WorkerStorageUpdatedEvent(event).data
 
   // call generic processing
-  await workingGroup_WorkerStorageUpdated(db, storageProviderId, newMetadata.toString())
+  await workingGroup_WorkerStorageUpdated(db, storageProviderId, newMetadata)
 }
 
 export async function gatewayWorkingGroup_TerminatedWorker(db: DatabaseManager, event: SubstrateEvent): Promise<void> {
@@ -97,13 +98,13 @@ export async function workingGroup_OpeningFilled(
   storageProviderType: StorageProviderType,
   applicationIdToWorkerIdMap: ApplicationIdToWorkerIdMap
 ): Promise<void> {
-  const storageProviderIds = [...applicationIdToWorkerIdMap.values()].map(item => item[1])
+  const storageProviderIds = [...applicationIdToWorkerIdMap.values()]
 
   for (const storageProviderId of storageProviderIds) {
-    const storageProvider = {
+    const storageProvider = new StorageProvider({
       id: storageProviderId.toString(),
       type: storageProviderType,
-    }
+    })
 
     await db.save<StorageProvider>(storageProvider)
   }
@@ -112,7 +113,7 @@ export async function workingGroup_OpeningFilled(
   logger.info("Storage provider has beed created", {ids: storageProviderIds.map(item => item.toString())})
 }
 
-export async function workingGroup_WorkerStorageUpdated(db: DatabaseManager, storageProviderId: WorkerId, newMetadata: string): Promise<void> {
+export async function workingGroup_WorkerStorageUpdated(db: DatabaseManager, storageProviderId: WorkerId, newMetadata: Bytes): Promise<void> {
   // load storage provider
   const storageProvider = await db.get(StorageProvider, { where: { id: storageProviderId.toString() } as FindConditions<StorageProvider> })
 
@@ -121,7 +122,7 @@ export async function workingGroup_WorkerStorageUpdated(db: DatabaseManager, sto
     return inconsistentState('Non-existing storage provider update requested', storageProviderId)
   }
 
-  storageProvider.metadata = newMetadata
+  storageProvider.metadata = newMetadata.toString()
 
   await db.save<StorageProvider>(storageProvider)
 

+ 3 - 1
query-node/schema.graphql

@@ -90,7 +90,7 @@ type DataObject @entity {
   size: Int!
 
   "Storage provider id of the liaison"
-  liaisonId: Int # liaison is unset until storage provider accepts or rejects the content
+  liaison: StorageProvider # liaison is unset until storage provider accepts or rejects the content
 
   "Storage provider as liaison judgment"
   liaisonJudgement: LiaisonJudgement!
@@ -400,4 +400,6 @@ type StorageProvider @entity {
 
   "Custom metadata set by provider"
   metadata: String
+
+  dataObjects: [DataObject!]! @derivedFrom(field: "liaison")
 }

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